diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 140c7ad8..00000000 --- a/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -_build -*.bak -*~ -.DS_Store -.idea - -#eclipse -.project -.pydevproject -.settings - -# Include zip files present in static_root -!/static_root/**/*.zip diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..de749f99 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,50 @@ +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. Juhas, J. W. Liu, D. Bryndin, E. S. Bozin, + J. Bloch, Th. Proffen and S. J. L. Billinge, PDFfit2 and + PDFgui: computer programs for studying nanostructure in + crystals, J. Phys.: Condens. Matter 19, 335219 (2007) + +Copyright 2006-2007, Board of Trustees of Michigan State University, +Copyright 2008-2009, 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: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * 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. + + * 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 COPYRIGHT HOLDER "AS IS". COPYRIGHT HOLDER +EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EITHER +EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR SUITABILITY +FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM FROM +INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, TRADE +SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT SHALL +COPYRIGHT HOLDER BE LIABLE TO ANY PARTY 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 OR RELATING TO THIS AGREEMENT, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/Makefile b/Makefile deleted file mode 100644 index 0e1ef966..00000000 --- a/Makefile +++ /dev/null @@ -1,267 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -CURRENT_DOC_DIR = ./static_root/doc -TEMP_TEST_DOC_DIR = ./doc - -# 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) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.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 "Create hard-linked copy of 'static_root':" - @echo - rsync -aO -F --link-dest=$(CURDIR)/static_root/ \ - static_root/ $(BUILDDIR)/html/ - @echo - @echo "Validate symbolic links:" - @echo - @find $(BUILDDIR)/html -type l \( -exec test -e {} \; -or -print \) | \ - sed 's/^/[broken] /' | ( ! grep . ) && echo "[OK]" - @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/sphinxTestRun.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/sphinxTestRun.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/sphinxTestRun" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/sphinxTestRun" - @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: - # For some reason, the doc directory for our sources is set to - # ./static_root/doc but Sphinx expects it to be at ./doc and this has yet to - # be addressed. The effect of this discontinuity is that when Sphinx is - # running, it looks in the incorrect location with relative paths for static - # files we are serving up. This ultimately is not an issue for the - # functionality of the website as the links are indeed consistent in the - # static files generated, but it causes tests such as `linkcheck` to fail. - # For this reason, this make command has been modified to accoun for this - # discontinuity to preserve the validity of the test, but this change may - # have impact on future modifications to the website's internal structure - # and/or a fix for this issue, hence the in-line documentation of the problem - # (which gets printed to the console upon `linkcheck`'s failure). - # - # Here's what the make command was prior to this modification (and likely - # should be converted back to after addressing the issue): - # - # $(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." - # - # Here's an overview of the logic for circumventing the issue: - # - # (1) Attempt to create the symlink to the actual doc directory in the - # location that Sphinx expects it to be. - # => Success - # (a) Run linkcheck as we've properly configured our local structure - # to be what Sphinx expects. - # (b) Delete the symlink hack/patch, regardless of `linkcheck`'s - # success as we know we create ./doc as a symlink in (1) (as - # opposed to it being a directory containing its own data - # possibly created at a later time without knowledge of this - # fix). - # => Failure - # (a) Do no proceed and let this message be printed for future - # debugging/maintainance effors. - test -h $(TEMP_TEST_DOC_DIR) \ - || ln -sT $(CURRENT_DOC_DIR) $(TEMP_TEST_DOC_DIR) \ - && $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck \ - ; rm $(TEMP_TEST_DOC_DIR) - @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." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." - -# Publish to diffpy.github.io - -GITREPOPATH = $(CURDIR)/.git -SOURCEBRANCH = $(shell git symbolic-ref --short HEAD) -PUBLISHBRANCH = master -PUBFIRSTREMOTE = $(shell git branch -r --list "*/$(PUBLISHBRANCH)" | head -1) -GITREMOTE = $(shell git config --get branch.$(PUBLISHBRANCH).remote) -GITREMOTEURL = $(shell git config --get remote.$(GITREMOTE).url) -GITLASTCOMMIT = $(shell git rev-parse --short HEAD) - -.create-publish-branch: - @git rev-parse --verify --quiet $(PUBLISHBRANCH) >/dev/null || \ - echo $(PUBFIRSTREMOTE) | grep -q . || \ - ( echo "No remote found for branch $(PUBLISHBRANCH)" >&2; exit 1 ) - git rev-parse --verify --quiet $(PUBLISHBRANCH) >/dev/null || \ - git branch --track $(PUBLISHBRANCH) $(PUBFIRSTREMOTE) - -publish-prepare: .create-publish-branch - @test -d $(BUILDDIR)/html || \ - ( echo >&2 "Run 'make html' first!"; false ) - test -d $(BUILDDIR)/webpage || \ - git clone -s -b $(PUBLISHBRANCH) $(GITREPOPATH) $(BUILDDIR)/webpage - git -C $(BUILDDIR)/webpage fetch - git -C $(BUILDDIR)/webpage checkout --force $(PUBLISHBRANCH) - git -C $(BUILDDIR)/webpage pull $(GITREMOTEURL) $(PUBLISHBRANCH) - rsync -aOcv --delete --exclude=.git --exclude=.rsync-exclude \ - --exclude-from=$(BUILDDIR)/webpage/.rsync-exclude \ - --link-dest=$(realpath $(BUILDDIR)/html) \ - $(BUILDDIR)/html/ $(BUILDDIR)/webpage/ - git -C $(BUILDDIR)/webpage add --force --all . - git -C $(BUILDDIR)/webpage diff --cached --quiet || \ - git -C $(BUILDDIR)/webpage \ - commit -m "Sync with the source at $(GITLASTCOMMIT)" - git -C $(BUILDDIR)/webpage push $(GITREPOPATH) $(PUBLISHBRANCH) - -publish-push: - git push $(GITREMOTE) $(SOURCEBRANCH) $(PUBLISHBRANCH) diff --git a/NSFnugget.rst b/NSFnugget.rst deleted file mode 100644 index 9f72d93b..00000000 --- a/NSFnugget.rst +++ /dev/null @@ -1,41 +0,0 @@ -Enabling new science in nanoscale structure characterization of complex materials -================================================================================= - -.. include:: abbreviations.txt - -*C. L. Farrow, P. Juhás, J. W. Liu, D. Bryndin, E. S. Božin, J. Bloch, -and S. J. L. Billinge (Michigan State University)* - -To understand and control the properties of materials it is necessary to have -a detailed knowledge of their atomic structure. Increasingly, we are interested -in exploiting materials with complex structures on the nanoscale, which presents -special experimental challenges as crystallography, the standard approach to -structure determination, loses its power on these length-scales. Alternative -methods sensitive to nanoscale order are under development. The diffraction -sub-group of the DANSE project recently released a new software tool that -will have a large impact in nanostructure characterization using x-ray and -neutron diffraction. - - - -.. figure:: images/PDFgui_screenshot_707.png - :align: center - :scale: 50 % - - Screen-shot of PDFgui during a refinement of multiple data-sets - - -The diffraction data are Fourier transformed to obtain the atomic pair distribution -function (PDF) and analyzed by quantitatively fitting nanostructure models to the -data. PDFgui allows rapid setup of individual and multiple -refinements. This program will be implemented at the -POWGEN3 and NOMAD diffractometers at SNS with macros to allow real-time parametric -refinements similar to those shown, allowing researchers to make scientific -discoveries during data collection, at the beam-time, and not a-posteriori after -the beamtime is over. PDFgui has numerous extensions -that are described in more detail in [#]_. The beta version of PDFgui -is now in public release, available for Windows, Linux and Mac OSX platforms, -and in the first month has been downloaded 220 times. More information can be -found at https://www.diffpy.org. - -.. [#] |citeFarrowJpcm07| diff --git a/PublishedRevision b/PublishedRevision new file mode 100644 index 00000000..ffea877c --- /dev/null +++ b/PublishedRevision @@ -0,0 +1 @@ +HEAD diff --git a/README.md b/README.md deleted file mode 100644 index f15d06d4..00000000 --- a/README.md +++ /dev/null @@ -1,200 +0,0 @@ -diffpy.github.io -================ - -Sphinx sources for the [diffpy.org][site] web page. - -### Quick Jump: - -- [GitHub Structure](#github-structure) -- [Where to Make Changes](#where-to-make-changes) - - [Adding Citations](#adding-citations) - - [Adding Publications that Describe a DiffPy Project (the "Reference" Section)](#reference-section-1) - - [Adding Other Publications (the "Publication Using diffpy.cmi" Section)](#reference-section-2) -- [New Version of Existing Project](#new-version) -- [New Project](#publishing-new-project) -- [Publishing Changes](#publishing-changes) - - [Testing Changes](#testing-changes) - - [Maintainers (Publishing Changes)](#publishing-changes) - - -# GitHub Structure - -This repository contains 3 branches: - -1. [`source`][source] sphinx sources for the web page -2. [`master`][master] sources compiled to HTML format that are published via GitHub pages -3. [`archive`][archive] converted subversion repository for the old diffpy.org sources - -The basic logic is we edit on the source branch and follow instructions below to build the -sources. The built sources, in the form of html files, are then copied to the master branch -which is what GitHub pages is configured to render. - - -# Publishing New Version of an Existing Project - -For releasing an updated version of a project, first generate the release for the project and -make sure it is successfully deployed at Pypi and conda-forge. - -If you would like to see Connor's commented out comments about how to link pdf versions of -documentation manuals please see the raw source code of this readme. However, we are moving -away from having separately built manuals. - - -With the [`source` branch][source] checed out, edit the landing page of your project] (e.g., -`products/pdfgetx.rst` for PDFgetx3) to document and provide the updated version of your project. - -Once the preceding steps are complete, see -the instructions of the [Publishing Changes](#submitting-changes) section for publishing these changes. - -# Where to Make Changes - -Here is a brief map of where in the sources to make updates when different things happen - -## A new paper has appeared describing a diffpy product - - -### Adding Publications that Describe a DiffPy Project (the "Reference" Section) - -When adding a new publication to the list of [references used within the website](https://www.diffpy.org/publications.html), add the -citation text of the publication to the documentation *only once* as a named snippet in -[abbreviations.txt](https://github.com/diffpy/diffpy.github.io/blob/source/abbreviations.txt#L286). For example: -``` -.. |citeJuhasJac18| replace:: - P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, S. J. L. Billinge, - `PDFgetN3: atomic pair distribution functions from - neutron powder diffraction data using ad hoc corrections - `__, - *J. Appl. Crystallogr.*, **51**, 1492--1497 (2018) - |downloadJuhasJac18| -``` -Here, `|citeJuhasJac18|` is the name that can be used elsewhere in the documentation and -the Sphinx documentation generator will replace all instances of this tag with the indented -text following the `replace::` directive. - -**Important:** After defining the publication's tag as described above, make sure to add the -publication to the list of publications maintained in [publications.rst](https://github.com/diffpy/diffpy.github.io/blob/source/publications.rst). Make sure that -you add the reference to the proper section and do so in descending reverse chronological order -(i.e., the newest citations should appear at the top of their respective sections). - -*Note:* In this example, the citation is for a publication -which describes a product of the diffpy.cmi project (namely, PDFgetN3). For publications which -describe a component of diffpy.cmi, we provide a link to download the publication directly from -the [diffpy.org][site] website. Here, the link is provided via the `|downloadJuhasJac18|` tag -which is the identifier for another snippet within [abbreviations.txt](https://github.com/diffpy/diffpy.github.io/blob/source/abbreviations.txt#L294) following the definition -of `|citeJuhasJac18|`, seen here as: -``` -.. |downloadJuhasJac18| image:: /images/pdficon_small.png - :target: /doc/pdfgetx/Juhas-jac-2018.pdf -``` -Furthermore, note that since the initial use of `|downloadJuhasJac18|` occurs within the indented text -of the definition of `|citeJuhasJac18|`, the link to `|downloadJuhasJac18|` will appear -everywhere `|citeJuhasJac18|` does. - -Lastly, make sure that the linked publication has been included within this project's files, placed in -an appropriate directory (typically, the parent directory of the project that the paper relates to). In -the above example, the publication covers the PDFgetN3 feature of the `pdfgetx` package, thus it is -placed within `pdfgetx`'s documentation directory and referenced accordingly with the line -``` - :target: /doc/pdfgetx/Juhas-jac-2018.pdf -``` - - - -### Adding Other Publications (the "Publication Using diffpy.cmi" Section) - -Adding references to publications that do not describe the release/use of a product within the diffpy.cmi -project (e.g., papers which use some component of diffpy.cmi), we simply provide the usual citation text (with -appropriate DOI link). To add a citation of this type, refer to the information in [Reference Section](#reference-section-1), but -disregard everything starting at, and following, the [Note](#reference-section-note). - - -# Publishing New Project - -For adding a new project to the website, see one of the existing projects (e.g., [pdfgetx](https://www.diffpy.org/products/pdfgetx.html)) as a reference. - -You will need to create a directory for the project to live in within (e.g., [/static_root/doc/pdfgetx](https://github.com/diffpy/diffpy.github.io/tree/source/static_root/doc/pdfgetx)), then -write a landing page for the project (e.g., [/products/pdfgetx.rst](https://github.com/diffpy/diffpy.github.io/blob/source/products/pdfgetx.rst)) which will provide any necessary information -or files needed for a user to use the project. Once this is complete, see -[Publishing New Version of Existing Project](#new-version) for steps on publishing the project. - - -# Publishing Changes - -In order to test and/or publish changes, activate a conda environment that has a working installation of Sphinx - -## Testing Changes - -With your sphinx containing env activated, run the set of Sphinx validation command(s) to check that the static -files that Sphinx will create to be served on the website are written properly: -``` -diffpy.github.io (source)$ make linkcheck SPHINXOPTS="-W" -``` -*NOTE:* the `"-W"` flag forces warnings to be treated as errors. If you believe there is a falsely reported -warning that should be ignored that is preventing the test from passing, rerun the above command with the -`SPHINXOPTS="-W"` portion omitted. Note that on Windows this seemed to generate a number of warnings -not seen on linux and which didn't indicate anything broken. - -Additionally, one can visually/user-experience validate that the changes are what is expected by running: -``` -diffpy.github.io (source)$ make html -``` -Then opening `/_build/html/index.html` which will open a local instance of the website with the proposed changes -in place. - - -## Maintainers (Publishing Changes) - -First, follow the steps outlines in [Testing Changes](#testing-changes). Note that these tests, as they currently exist, are -not extensive and it's quite possible that something indeed may appear incorrectly on the website (hence the manual -review portion). After reviewing the changes, have Sphinx generate the static files to be hosted on the website: -``` -diffpy.github.io (source)$ make html -``` - -Note: this could not be run by successfully by simon on Git Bash. It can presumably be run from WSL? -Prepare the changes to be published: -``` -diffpy.github.io (source)$ make publish-prepare -``` - -Finally, publish the changes: -``` -diffpy.github.io (source)$ make publish-push -``` - - - -[site]: "diffpy.org" -[source]: "source" -[master]: "master" -[archive]: "archive" diff --git a/_includes/substitutions.rst b/_includes/substitutions.rst deleted file mode 100644 index 96287220..00000000 --- a/_includes/substitutions.rst +++ /dev/null @@ -1,2 +0,0 @@ -.. define global names and alias here -.. |diffpycmi| replace:: diffpy.cmi diff --git a/_static/.empty b/_static/.empty deleted file mode 100644 index e69de29b..00000000 diff --git a/_static/diffpy-styles.css b/_static/diffpy-styles.css deleted file mode 100644 index a13987f0..00000000 --- a/_static/diffpy-styles.css +++ /dev/null @@ -1 +0,0 @@ -/* Add CSS style overrides here */ diff --git a/_templates/layout.html b/_templates/layout.html deleted file mode 100644 index 87639d83..00000000 --- a/_templates/layout.html +++ /dev/null @@ -1,5 +0,0 @@ -{# Import the theme's layout. #} -{% extends "!layout.html" %} - -{# Custom CSS overrides #} -{# placeholder, see git log this-file #} diff --git a/_templates/menu01.html b/_templates/menu01.html deleted file mode 100644 index ebcb477b..00000000 --- a/_templates/menu01.html +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/_templates/navbar.html b/_templates/navbar.html deleted file mode 100644 index 3c98d0ea..00000000 --- a/_templates/navbar.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "!navbar.html" %} - -{# disable the toc block #} -{% block navbartoc %} -{% endblock %} - -{# add menu to the extra block #} -{% block navbarextra %} - {% include "menu01.html" %} -{% endblock %} diff --git a/abbreviations.txt b/abbreviations.txt deleted file mode 100644 index 0cab1d73..00000000 --- a/abbreviations.txt +++ /dev/null @@ -1,307 +0,0 @@ -.. vim: set ft=rst: - -.. Named web links ----------------------------------------------------- - -.. |anaconda-download| replace:: https://www.anaconda.com/distribution -.. _anaconda-download: https://www.anaconda.com/distribution -.. _diffpy-users: https://groups.google.com/d/forum/diffpy-users -.. _ctv-xpdfsuite: https://columbia.resoluteinnovation.com/technologies/M11-120 - -.. GitHub repositories ------------------------------------------------- - -.. _diffpy.mpdf: https://github.com/benfrandsen/diffpy.magpdf -.. _diffpy.srfit: https://github.com/diffpy/diffpy.srfit -.. _diffpy.srreal: https://github.com/diffpy/diffpy.srreal -.. _diffpy.structure: https://github.com/diffpy/diffpy.structure -.. _diffpy.utils: https://github.com/diffpy/diffpy.utils -.. _libdiffpy: https://github.com/diffpy/libdiffpy -.. _libobjcryst: https://github.com/diffpy/libobjcryst -.. _pyobjcryst: https://github.com/diffpy/pyobjcryst -.. _srfit-sasview: https://github.com/diffpy/srfit-sasview - -.. External online documentation --------------------------------------- - -.. _doc-diffpy.srfit: https://diffpy.github.io/diffpy.srfit -.. _doc-diffpy.srreal: https://diffpy.github.io/diffpy.srreal -.. _doc-diffpy.structure: https://diffpystructure.readthedocs.io -.. _doc-diffpy.utils: https://diffpy.github.io/diffpy.utils -.. _doc-libdiffpy: https://diffpy.github.io/libdiffpy -.. _doc-pyobjcryst: https://diffpy.github.io/pyobjcryst - -.. Citations ----------------------------------------------------------- - -.. |citeJuhasJac13| replace:: - P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge, `PDFgetX3: - A rapid and highly automatable program for processing powder - diffraction data into total scattering pair distribution functions - `__, - *J. Appl. Crystallogr.* **46**, 560-566 (2013) - |downloadJuhasJac13| - -.. |downloadJuhasJac13| image:: /images/pdficon_small.png - :target: /doc/pdfgetx/Juhas-jac-2013.pdf - - -.. |citeFarrowJpcm07| replace:: - 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 - `__, - *J. Phys.: Condens. Mat.* **19**, 335219 (2007) - |downloadFarrowJpcm07| - -.. |downloadFarrowJpcm07| image:: /images/pdficon_small.png - :target: /doc/pdfgui/Farrow-jpcm-2007.pdf - - -.. |citeProffenJac99| replace:: - Th. Proffen and S. J. L. Billinge, `PDFFIT a program for full profile - structural refinement of the atomic pair distribution function - `__, - *J. Appl. Crystallogr.* **32**, 572 (1999) - |downloadProffenJac99| - -.. |downloadProffenJac99| image:: /images/pdficon_small.png - :target: /doc/pdffit/Proffen-jac-1999.pdf - - -.. |DiffPyCMI| replace:: - :doc:`diffpy.cmi ` - -.. |citeShiPRL14| replace:: Chenyang Shi, Majid Beidaghi, Michael - Naguib, Olha Mashtalir, Yury Gogotsi, and Simon J. L. Billinge, - |ShiPRL14title|_, - *Phys. Rev. Lett.* **112**, 125501 (2014). - -.. |ShiPRL14title| replace:: - Structure of nanocrystalline Ti\ :sub:`3`\ C\ :sub:`2` MXene using - atomic pair distribution function -.. _ShiPRL14title: http://link.aps.org/doi/10.1103/PhysRevLett.112.125501 - -.. |citeFarrowJac14| replace:: - Christopher L. Farrow, Chenyang Shi, Pavol Juhás, Xiaogang Peng, and - Simon J. L. Billinge, `Robust structure and morphology parameters for - CdS nanoparticles by combining small angle X-ray scattering and atomic - pair distribution function data in a complex modeling framework - `__, - *J. Appl. Crystallogr.* **47**, 561-565 (2014). - -.. |citeAbeykoonArxiv14| replace:: - Milinda Abeykoon, Hefei Hu, Lijun Wu, Yimei Zhu, and Simon J. L. - Billinge, `Calibration and data collection protocols for reliable - lattice parameter values in electron pair distribution function (ePDF) - studies `__, *arXiv*, 1401.1850 (2014). - -.. |citeChoiNanol14| replace:: - Joshua J. Choi, Xiaohao Yang, Zachariah M. Norman, Simon J. L. - Billinge, and Jonathan S. Owen, `Structure of methylammonium lead - iodide on mesoporous titanium dioxide: active material in high - performance metal-organic solar cells - `__, *Nano Lett.* - **14**, 127 (2014). - - -.. |citeJacquesNc13| replace:: - Simon D. M. Jacques, Marco Di Michiel, Simon A. J. Kimber, Xiaohao - Yang, Robert J. Cernik, Andrew M. Beale, and Simon J. L. Billinge, - `Pair distribution function computed tomography - `__, - *Nat. Commun.* **4**, 2536 (2013). - - -.. |citeDavisCgd13| replace:: - Timur Davis, Matthew Johnson, and Simon J. L. Billinge, `Towards - phase quantification at the nanoscale using the total scattering pair - distribution function (TSPDF) method: recrystallization of cryomilled - sulfamerazine `__, - *Cryst. Growth Des.* **13**, 4239–4244 (2013). - -.. |citeYangPccp13| replace:: - Xiaohao Yang, Ahmad S. Masadeh, James R. McBride, Emil S. Bozin, - Sandra J. Rosenthal, and Simon J. L. Billinge, `Confirmation of - disordered structure of ultrasmall CdSe nanoparticles from X-ray - atomic pair distribution function analysis - `__, - *Phys. Chem. Chem. Phys.* **15**, 8480 (2013). - -.. |citeFarrowJacs13| replace:: - Christopher L. Farrow, D. Kwabena Bediako, Yogesh Surendranath, - Daniel G. Nocera, and Simon J. L. Billinge, `Intermediate-range - structure of self-assembled cobalt-based oxygen evolving catalysts - `__, - *J. Am. Chem. Soc.* **135**, 6403-6406 (2013). - -.. |citeTyrstedAcie12| replace:: - Christoffer Tyrsted, Kirsten M. Ø. Jensen, Espen D. Bøjesen, - Nina Lock, Mogens Christensen, Simon J. L. Billinge and Bo - B. Iversen, `Understanding the formation and evolution of ceria - nanoparticles under hydrothermal conditions - `__, - *Angew. Chem. Int. Edit.* **51**, 9030-9033 (2012). - -.. |citeJensenJacs12| replace:: - Kirsten M. Ø. Jensen, Mogens Christensen, Pavol Juhás, Christoffer - Tyrsted, Espen D. Bøjesen, Nina Lock, Simon J. L. Billinge, and Bo B. - Iversen, `Revealing the mechanisms behind SnO2 nanoparticle formation - and growth during hydrothermal synthesis: an in situ total scattering - study `__, - *J. Am. Chem. Soc.* **134**, 6785 (2012). - -.. |citeMengqiangZhuGca12| replace:: - Mengqiang Zhu, Christopher L. Farrow, Jeffrey E. Post, Kenneth J. T. - Livi, Simon J. L. Billinge, Matthew Ginder-Vogel and Donald L. - Sparks, `Structural study of biotic and abiotic poorly-crystalline - manganese oxides using atomic pair distribution function analysis - `__, - *Geochim. Cosmochim. Ac.* **81**, 39-55 (2012). - -.. |citeMengqiangZhuESTL14| replace:: - Mengqiang Zhu, Paul Northrup, Chenyang Shi, Simon J. L. Billinge, - Donald L. Sparks and Glenn A. Waychunas, - `The structure of sulfate adsorption complexes on ferrihydrite - `__, - *Environ. Sci. Technol. Lett.* **1**, 97-101 (2014). - -.. |citeGhidiuCC14| replace:: - Michael Ghidiu, Michael Naguib, Chenyang Shi, Olha Mashtalir, Limei - Pan, Bo Zhang, Jian Yang, Yury Gogotsi, Simon J. L. Billinge and - Michel W. Barsoum, - |GhidiuCC14title|_, - *Chem. Commun.* **50**, 9517-9520 (2014). - -.. |GhidiuCC14title| replace:: - Synthesis and charaterization of two-dimensional - Nb\ :sub:`4`\ C\ :sub:`3` (MXene) -.. _GhidiuCC14title: http://dx.doi.org/10.1039/C4CC03366C - -.. |citeBeecherJacs14| replace:: - Alexander N. Beecher, Xiaohao Yang, Joshua H. Palmer, Alexandra L. - LaGrassa, Pavol Juhás, Simon J. L. Billinge and Jonathan S. Owen, - `Atomic structures and gram scale synthesis of three tetrahedral - quantum dots - `__, - *J. Am. Chem. Soc.* **136**, 10645-10653 (2014). - -.. |citeDoanNguyenAcsn14| replace:: - Vicky V. T. Doan-Nguyen, Simon A. J. Kimber, Diego Pontoni, Danielle - Reifsnyder Hickey, Benjamin T. Diroll, Xiaohao Yang, Marcel - Miglierini, Christopher B. Murray and Simon J. L. Billinge, - `Bulk metallic glass-like scattering signal in small metallic - nanoparticles `__, - *ACS Nano* **8**, 6163–6170 (2014). - -.. |citePrillJac15| replace:: - Dragica Prill, Pavol Juhás, Martin U. Schmidt and Simon J. L. - Billinge, `Modeling pair distribution functions (PDF) of organic - compounds: describing both intra- and intermolecular correlation - functions in calculated PDFs - `__, - *J. Appl. Crystallogr.* **48**, 171-178 (2015). - -.. |citeTerbanNan15| replace:: - Maxwell W. Terban, Matthew Johnson, Marco Di Michiel and Simon J. L. - Billinge, `Detection and characterization of nanoparticles in suspension at - low concentrations using the X-ray total scattering pair distribution - function technique - `__, - *Nanoscale* **7**, 5480 (2015). - -.. |citeGranlundAca15| replace:: - L. Granlund, S. J. L. Billinge and P. M. Duxbury, - `Algorithm for systematic peak extraction from atomic pair distribution - functions - `__, - *Acta Crystallogr. A* **71**, 392-409 (2015). - |downloadGranlundAca15| - -.. |downloadGranlundAca15| image:: /images/pdficon_small.png - :target: /doc/srmise/Granlund-aca-2015.pdf - -.. |citePrillAca16| replace:: - Dragica Prill, Pavol Juhás, Simon J. L. Billinge and Martin U. Schmidt, - `Towards solution and refinement of organic crystal structures by - fitting to the atomic pair distribution function - `__, - *Acta Crystallogr. A* **72**, 62-72 (2016). - -.. |citeJuhasAca15| replace:: - P. Juhás, C. L. Farrow, X. Yang, K. R. Knox and S. J. L. Billinge, - `Complex modeling: a strategy and software program for combining - multiple information sources to solve ill posed structure and - nanostructure inverse problems - `__, - *Acta Crystallogr. A* **71**, 562-568 (2015). - |downloadJuhasJac15| - -.. |downloadJuhasJac15| image:: /images/pdficon_small.png - :target: /doc/diffpy-cmi/Juhas-aca-2015.pdf - -.. |citeTerbanCgd16| replace:: - Maxwell W. Terban, Eugene Y. Cheung, Paul Krolikowski, - Simon J. L. Billinge, - `Recrystallization, phase composition, and local structure of - amorphous lactose from the total scattering pair distribution - function - `__, - *Cryst. Growth Des.* **16**, 210-220 (2016). - - -.. |citeFrandsenPrl16| replace:: - Benjamin A. Frandsen, Michela Brunelli, Katharine Page, - Yasutomo J. Uemura, Julie B. Staunton, Simon J. L. Billinge, - |FrandsenPrl16title|_, - *Phys. Rev. Lett.* **116**, 197204 (2016). - -.. |FrandsenPrl16title| replace:: - Verification of Anderson Superexchange in MnO via magnetic pair - distribution function analysis and *ab initio* theory -.. _FrandsenPrl16title: http://link.aps.org/doi/10.1103/PhysRevLett.116.197204 - - -.. |citeJensenNc16| replace:: - Kirsten M. Ø. Jensen, Pavol Juhás, Marcus A. Tofanelli, - Christine L. Heinecke, Gavin Vaughan, Christopher J. Ackerson, - Simon J. L. Billinge, - |JensenNc16title|_, - *Nat. Commun.* **7**, 11859 (2016) - -.. |JensenNc16title| replace:: - Polymorphism in magic-sized Au\ :sub:`144`\ (SR)\ :sub:`60` clusters -.. _JensenNc16title: http://dx.doi.org/10.1038/ncomms11859 - - -.. |citeShiJac18| replace:: - C. Shi, - `xINTERPDF: a graphical user interface for analyzing - intermolecular pair distribution functions of organic compounds - from X-ray total scattering data - `__, - *J. Appl. Crystallogr.* **51**, 1498-1499 (2018) - |downloadShiJac18| - -.. |downloadShiJac18| image:: /images/pdficon_small.png - :target: /doc/xinterpdf/Shi-jac-2018.pdf - - -.. |citeJuhasJac18| replace:: - P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, S. J. L. Billinge, - `PDFgetN3: atomic pair distribution functions from - neutron powder diffraction data using ad hoc corrections - `__, - *J. Appl. Crystallogr.*, **51**, 1492--1497 (2018) - |downloadJuhasJac18| - -.. |downloadJuhasJac18| image:: /images/pdficon_small.png - :target: /doc/pdfgetx/Juhas-jac-2018.pdf - - -.. |citeLiuJac20| replace:: - CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, - S. J. L. Billinge, - `sasPDF: pair distribution function analysis of nanoparticle assemblies - from small-angle-scattering data - `__. - |downloadLiuJac20| - -.. |downloadLiuJac20| image:: /images/pdficon_small.png - :target: /doc/pdfgetx/Liu-jac-2020.pdf diff --git a/acknowledgements.rst b/acknowledgements.rst deleted file mode 100644 index 28b9336e..00000000 --- a/acknowledgements.rst +++ /dev/null @@ -1,37 +0,0 @@ -Acknowledgements -================ - - -Developers ----------- - -The active DiffPy development team is Pavol Juhas, Long Yang, Kevin Knox, -Xiaohao Yang, Michael McKerns, Chris Farrow, and Simon J. L. Billinge. -Former members of the project are Emil Bozin, Wenduo Zhou, Peng Tian, -Timur Davis, Jiwu Liu, and Dmitriy Bryndin. - - -Funding -------- - -The DiffPy project is currently supported by Laboratory Directed -Research and Development (LDRD) Program 12-007 (Complex Modeling) at -Brookhaven National Laboratory (BNL). BNL is funded by the US -Department of Energy Office of Science, Office of Basic Energy Sciences -under contract DE-AC02-98CH10886. Previous funding for DiffPy was -provided by the Distributed Data Analysis of Neutron Scattering -Experiments (DANSE) project funded by the US National Science Foundation -under award DMR-0520547. More information on DANSE can be found -`here `_. The early developments of PDFfit2 were funded by -NSF grant DMR-0304391 in the Billinge-group, and with support from -Michigan State University. 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 respective funding -bodies. - -Additional Contributions ------------------------- - -The DiffPy team would like to thank multiple users for their help and -comments during the development of this release: Dragica Podgorski, -Valentina Felsen, and Kirsten M. Ø. Jensen. diff --git a/static_root/bugreport/pdfgui/index.html b/bugreport/pdfgui/index.shtml similarity index 91% rename from static_root/bugreport/pdfgui/index.html rename to bugreport/pdfgui/index.shtml index 0ab3b4d5..882fad66 100644 --- a/static_root/bugreport/pdfgui/index.html +++ b/bugreport/pdfgui/index.shtml @@ -16,7 +16,7 @@

-
+ Reporter: diff --git a/static_root/bugreport/srrietveld/index.html b/bugreport/srrietveld/index.shtml similarity index 91% rename from static_root/bugreport/srrietveld/index.html rename to bugreport/srrietveld/index.shtml index 8afc1e48..71884760 100644 --- a/static_root/bugreport/srrietveld/index.html +++ b/bugreport/srrietveld/index.shtml @@ -16,7 +16,7 @@

- + Reporter: diff --git a/community.rst b/community.rst deleted file mode 100644 index 40db810d..00000000 --- a/community.rst +++ /dev/null @@ -1,31 +0,0 @@ -Community -========= - -To ensure a bright future for the DiffPy project it is essential to build a strong community -of users and contributing developers. News about updates and new releases will be made at the -`diffpy-users `__ Google group, -as well as it being a place to ask questions -and find answers about using all diffpy programs. -When you sign up, -please leave a short message about why you are requesting to join as we have had spam accounts requesting access -and so we want to know you are a legitimate user. - -.. raw:: html - - - - - - -You can also share your comments, suggestions, praise or complaints by sending email to -`Simon J. L. Billinge `_. - -To report or browse bugs, please visit https://github.com/diffpy -and continue to the relevant project and its Issues. - -Support and Contribute -======================== -We welcome and encourage contributions to the DiffPy project from all members of the community. -If you would like to report a bug, request a feature, or contribute code, please visit the -*Support and Contribute* section found in the README of each DiffPy project repository on GitHub. -All GitHub repositories for DiffPy projects can be found at ``_. \ No newline at end of file diff --git a/community.shtml b/community.shtml new file mode 100644 index 00000000..86ce16d4 --- /dev/null +++ b/community.shtml @@ -0,0 +1,65 @@ + + +

Community

+ +

+To ensure a bright future for the DiffPy project it is essential to build a strong +community of users and contributing developers. There are several +Google groups for support and development of DiffPy and related applications. +

+ + + + + + + + + + + + + + + + +
+ diffpy-users + +

+ Help on usage of PDFgui, PDFfit2 and other DiffPy components. + This group should become a knowledge base for PDFgui user tips, + tricks and troubleshooting. Feel free to ask your question here.
+

+
+ Subscribe email: + + +
+
+ diffpy-dev + +

+ For discussions about development and changes of PDFgui, PDFfit2 and + DiffPy library in general. Materials scientists, chemists physicists, + engineers - please contribute by telling us your needs or sharing your + suggestions here. +

+
+ Subscribe email: + + +
+
+ +

+You can also share your comments, suggestions, praise or complaints by +sending email to +Simon J. Billinge. +

+ +

+To report or browse bugs, please use the link at the sidebar of this page. +

+ + diff --git a/conf.py b/conf.py deleted file mode 100644 index 8d74899a..00000000 --- a/conf.py +++ /dev/null @@ -1,371 +0,0 @@ -# -*- coding: utf-8 -*- -# -# DiffPy documentation build configuration file, created by -# sphinx-quickstart on Fri Nov 8 15:28:37 2013. -# -# 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 os - - -# 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 os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.2.1' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The reST default prolog, included at the beginning of every source file. -rst_prolog = """ -.. include:: _includes/substitutions.rst -""" - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'DiffPy' -copyright = u'2013, Kevin Knox' - -# 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 = '' -# The full version, including alpha/beta/rc tags. -release = '' - -# 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 = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# 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 = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False - -# 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 = 'bootstrap' - -# 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 bar title. (Default: ``project`` value) - 'navbar_title': "DiffPy", - - # Tab name for entire site. (Default: "Site") - # 'navbar_site_name': "Products", - - # A list of tuples containing pages or urls to link to. - # Valid tuples should be in the following forms: - # (name, page) # a link to a page - # (name, "/aa/bb", 1) # a link to an arbitrary relative url - # (name, "http://example.com", True) # arbitrary absolute url - # Note the "1" or "True" value above as the third argument to indicate - # an arbitrary url. - 'navbar_links': [ - ("Community", "community"), - ("Publications", "publications") - ], - - # Render the next and previous page links in navbar. (Default: true) - 'navbar_sidebarrel': False, - - # Render the current pages TOC in the navbar. (Default: true) - 'navbar_pagenav': False, - - # Global TOC depth for "site" navbar tab. (Default: 1) - # Switching to -1 shows all levels. - 'globaltoc_depth': 1, - - # Include hidden TOCs in Site navbar? - # - # Note: If this is "false", you cannot have mixed ``:hidden:`` and - # non-hidden ``toctree`` directives in the same page, or else the build - # will break. - # - # Values: "true" (default) or "false" - # 'globaltoc_includehidden': "false", - - # HTML navbar class (Default: "navbar") to attach to
element. - # For black navbar, do "navbar navbar-inverse" - 'navbar_class': "navbar navbar-inverse", - - # Fix navigation bar to top of page? - # Values: "true" (default) or "false" - 'navbar_fixed_top': "true", - - # Location of link to source. - # Options are "nav" (default), "footer" or anything else to exclude. - 'source_link_position': "", - - # Bootswatch (http://bootswatch.com/) theme. - # - # Options are nothing with "" (default) or the name of a valid theme - # such as "amelia" or "cosmo". - 'bootswatch_theme': "cerulean", - - # Choose Bootstrap version. - # Values: "3" (default) or "2" (in quotes) - 'bootstrap_version': "3", -} - - -# Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ['themes'] - -# 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 = "diffpy_logo_header.png" - -# 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 = "diffpy_logo_header.ico" - -# 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. -# NOTE we use rsync in the Makefile to preserve symbolic links. -# html_extra_path = ['static_root'] - -# 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 = { - '**': [], - 'searchresults': [], - } - -# 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 = False - -# If false, no index is generated. -html_use_index = False - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, the reST sources are included in the HTML build as -# _sources/name. The default is True. -html_copy_source = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True -html_show_sourcelink = False - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -html_show_sphinx = False - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -html_show_copyright = False - -# 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. -htmlhelp_basename = 'DiffPydoc' - - -# -- 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.tex', u'DiffPy Documentation', - u'Kevin Knox', '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', u'DiffPy Documentation', - [u'Kevin Knox'], 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', u'DiffPy Documentation', - u'Kevin Knox', 'DiffPy', '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 - -# -- Final customizations ------------------------------------------------- - -from sphinx.transforms import SphinxTransform - -class MakeAbsoluteURIsRelative(SphinxTransform): - - '''Convert local root-anchored references to relative. - - Ensure PDF downloads defined in abbreviations.txt work from any document. - ''' - - default_priority = 750 - - def apply(self): - from sphinx.util.nodes import traverse_parent - from docutils.nodes import reference, document - from docutils.utils import relative_path - srcdir = self.env.srcdir - absolute_reference = lambda o: (isinstance(o, reference) and - o.get('refuri', '')[:1] == '/') - for node in self.document.traverse(absolute_reference): - target = srcdir + node['refuri'] - doc = next(traverse_parent(node, document)) - trel = relative_path(doc['source'], target) - node.replace_attr('refuri', trel) - return - -# end of class MakeAbsoluteURIsRelative - - -def setup(app): - app.add_transform(MakeAbsoluteURIsRelative) - ## uncomment in case we need style overrides - #app.add_css_file('diffpy-styles.css') - return diff --git a/diffpy_logo_header.ico b/diffpy_logo_header.ico deleted file mode 100644 index c5476aef..00000000 Binary files a/diffpy_logo_header.ico and /dev/null differ diff --git a/diffpy_logo_header.png b/diffpy_logo_header.png deleted file mode 100644 index 6cc8bd3b..00000000 Binary files a/diffpy_logo_header.png and /dev/null differ diff --git a/documentation.shtml b/documentation.shtml new file mode 100644 index 00000000..3ff3f5b3 --- /dev/null +++ b/documentation.shtml @@ -0,0 +1,139 @@ + + +

Documentation

+ +

User manuals

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ PDFgetX3 + + user manual formatted as + HTML, + PDF + and the + tutorial files +
+ PDFgui + + user manual formatted as + HTML, + PDF +
+ tutorial files in a + zip archive +
+ auto-generated + API documentation +
+ PDFfit2 + + user manual not available. + To get started, see + examples + in the source code tree and the help feature in pdffit2. + For a complete reference, consult auto-generated + API, + in particular for the class PdfFit. +

+ Functions and variables are quite similar as + in the old PDFFIT, so its + manual + and + command reference + should help as well. +

+
+ Structure + + user manual not available. + To get started, see + examples + in the source code tree and the auto-generated + API. + For more information contact the developers or ask at the + diffpy-dev Google group. +
+ +

Reports

+ +
    +
  • + 2007-08-27 - NSF nugget + describing PDFgui. +
  • +
+ +

Publications

+ +
    +
  1. +P. Juhás and T. Davis, C. L. Farrow, +S. J. L. Billinge, + +PDFgetX3: A rapid and highly automatable program for +processing powder diffraction data into total scattering pair +distribution functions, +eprint arXiv: 1211.7126, (2012) + + Farrow-jpcm-2007.pdf + +
  2. + +
  3. +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, +J. Phys.: Condens. Matter 19, 335219 (2007) + + Farrow-jpcm-2007.pdf + +
  4. + +
  5. +Th. Proffen and S. J. L. Billinge, + +PDFFIT a program for full profile structural refinement of the atomic pair +distribution function, J. Appl. Crystallogr. +32, 572 (1999) + + Proffen-jac-1999.pdf + +
  6. +
+ + diff --git a/download.shtml b/download.shtml new file mode 100644 index 00000000..6b3f0e84 --- /dev/null +++ b/download.shtml @@ -0,0 +1,199 @@ + + +

Download

+ +

PDFgetX3

+ +

+PDFgetX3-academic can be obtained from the + +Columbia flintbox, +provided it will be used for open academic research. +Installation instructions +

+ +

+If you plan to use PDFgetX3 in any other way, please contact +Beth Kauderer +at Columbia Technology Ventures. +

+ +

DiffPy Library

+ +Unix, Linux, Mac - +Windows - +Updates - +Subversion - +Releases + +

License

+ +

+By downloading and using this software you are agreeing to the following +conditions. +

+ +
+
+
+ + + +

Unix, Linux, Mac

+ +

+The installation of DiffPy requires several external libraries and applications. +Consult the +README.txt +file included with the distribution and make sure these requirements are all +in place. +

+ +

+The DiffPy components are registered at the Python Package Index (PyPI), +therefore the most straightforward way to install is to execute +easy_install MODULE_NAME. The easy_install command +downloads, unzips and installs the required package together with +its requirements, for example +

+ +
+    easy_install diffpy.pdfgui
+
+ +

+would install diffpy.pdfgui together with diffpy.pdffit2 and diffpy.Structure +that are required for its function. The programs can be then started +as pdfgui or pdffit2. +

+ +

+The easy_install command is a +part of the Python setuptools library. +If it is not available, install the "python-setuptools" +package with the system package manager or use the ".tgz" archive +below, which comes with easy_install included. +

+ +

+If you prefer to install from local files, download the latest +diffpy-VERSION.tgz archive list below, unpack +and run the enclosed easy_install script +

+ +
+    tar -xzf diffpy-VERSION.tgz
+    cd diffpy-VERSION
+    ./easy_install diffpy.pdfgui
+
+ +

+For more detailed installation instructions see +PDFgui manual. +

+ + + +

Windows

+ +

+DiffPy is provided as self-installing archive for Windows systems. Download +the latest diffpy-VERSION.exe file below, run it and follow +the prompts. +

+ +

+The self-installing archive includes a complete installation of Python +that is used to run PDFgui and PDFfit2. Nevertheless, PDFgui (and other +DiffPy components) can be also installed under existing Python tree. +This requires Python 2.5 with several external Python packages, +namely setuptools, numpy, wxPython and matplotlib. +To add PDFgui to an existing Python tree, start Windows command prompt +and run the easy_install script from the Python25/Scripts +directory +

+ +
+    cd c:\Python25\Scripts
+    ..\python.exe easy_install-script.py diffpy.pdfgui
+
+ +

+This installs library files under Python25/Lib/site-packages +and executable scripts for pdfgui and pdffit2 under +Python25/Scripts. +

+ + + +

DiffPy updates

+ +

+Both Unix and Windows platforms can use the easy_install command +to obtain the latest updates to the code. For example, to upgrade +PDFgui, run +

+ +
+    easy_install -U diffpy.pdfgui
+
+ +

+This installs only the changed DiffPy components as they become +available at the DiffPy +package repository. These packages +are smaller and will be updated more frequently than the complete +installation archives. +

+ + + +

Subversion repository

+ +

+The latest development sources of DiffPy packages are available in +a public subversion code repository. To install the latest development +version of a DiffPy component called MODULE_NAME, run +

+
+    easy_install -U \
+	svn://svn@danse.us/diffraction/diffraction/MODULE_NAME/trunk
+
+ +

+Another option is to install in a development mode, which is more +convenient for debugging and experimenting with the code. +This can be done as +

+ +
+    svn checkout \
+	svn://svn@danse.us/diffraction/diffraction/MODULE_NAME
+    cd MODULE_NAME/trunk
+    python setup.py develop
+
+ +

+The DiffPy subversion repository can be browsed online +here. +

+ + + +

DiffPy Releases

+ +

+Please, join in the +community +forum for tips and tricks and feedback. +

+ + + + + Older releases are available in the + downloads archive. + + + + diff --git a/download/.footer.html b/download/.footer.html new file mode 100644 index 00000000..cde7fb57 --- /dev/null +++ b/download/.footer.html @@ -0,0 +1,6 @@ + +Description column shows number of downloads. + + + + diff --git a/download/.header.html b/download/.header.html new file mode 100644 index 00000000..f017f24d --- /dev/null +++ b/download/.header.html @@ -0,0 +1,15 @@ + + + + + + + DiffPy releases + + + + + + +

DiffPy releases

+ diff --git a/download/archive/.footer.html b/download/archive/.footer.html new file mode 100644 index 00000000..cde7fb57 --- /dev/null +++ b/download/archive/.footer.html @@ -0,0 +1,6 @@ + +Description column shows number of downloads. + + + + diff --git a/download/archive/.header.html b/download/archive/.header.html new file mode 100644 index 00000000..6a62a01f --- /dev/null +++ b/download/archive/.header.html @@ -0,0 +1,15 @@ + + + + + + + DiffPy archived releases + + + + + + +

DiffPy archived releases

+ diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 00000000..b68814ec Binary files /dev/null and b/favicon.ico differ diff --git a/images/PDFgui_screenshot_707_500x369.png b/images/PDFgui_screenshot_707_500x369.png new file mode 100644 index 00000000..2c0130cd Binary files /dev/null and b/images/PDFgui_screenshot_707_500x369.png differ diff --git a/images/PDFgui_screenshot_small.png b/images/PDFgui_screenshot_small.png deleted file mode 100644 index b9d799ab..00000000 Binary files a/images/PDFgui_screenshot_small.png and /dev/null differ diff --git a/images/blank1x1.png b/images/blank1x1.png deleted file mode 100644 index 1914264c..00000000 Binary files a/images/blank1x1.png and /dev/null differ diff --git a/images/checkerboard.png b/images/checkerboard.png new file mode 100644 index 00000000..ac3f8176 Binary files /dev/null and b/images/checkerboard.png differ diff --git a/images/danse_logo.jpg b/images/danse_logo.jpg new file mode 100644 index 00000000..3db54fba Binary files /dev/null and b/images/danse_logo.jpg differ diff --git a/images/diffpy_icon.ico b/images/diffpy_icon.ico new file mode 100644 index 00000000..b68814ec Binary files /dev/null and b/images/diffpy_icon.ico differ diff --git a/logos/diffpy_logo.png b/images/diffpy_logo.png similarity index 100% rename from logos/diffpy_logo.png rename to images/diffpy_logo.png diff --git a/images/diffpycmi_screenshot.png b/images/diffpycmi_screenshot.png deleted file mode 100644 index 579cf113..00000000 Binary files a/images/diffpycmi_screenshot.png and /dev/null differ diff --git a/images/github_screenshot.png b/images/github_screenshot.png deleted file mode 100644 index b08eb345..00000000 Binary files a/images/github_screenshot.png and /dev/null differ diff --git a/images/labpdfproc.png b/images/labpdfproc.png deleted file mode 100644 index 63619f58..00000000 Binary files a/images/labpdfproc.png and /dev/null differ diff --git a/images/morph.png b/images/morph.png deleted file mode 100644 index 825ac9b4..00000000 Binary files a/images/morph.png and /dev/null differ diff --git a/images/mpdf_screenshot.png b/images/mpdf_screenshot.png deleted file mode 100644 index 3a0127ab..00000000 Binary files a/images/mpdf_screenshot.png and /dev/null differ diff --git a/images/nsf_logo.png b/images/nsf_logo.png new file mode 100644 index 00000000..a97925f2 Binary files /dev/null and b/images/nsf_logo.png differ diff --git a/images/pdficon_small.gif b/images/pdficon_small.gif new file mode 100644 index 00000000..bb5edcac Binary files /dev/null and b/images/pdficon_small.gif differ diff --git a/images/pdficon_small.png b/images/pdficon_small.png deleted file mode 100644 index 2a2fe6fa..00000000 Binary files a/images/pdficon_small.png and /dev/null differ diff --git a/images/pdfmorph.png b/images/pdfmorph.png deleted file mode 100644 index aad99dd4..00000000 Binary files a/images/pdfmorph.png and /dev/null differ diff --git a/images/pdfprimer.png b/images/pdfprimer.png deleted file mode 100644 index 0833dc73..00000000 Binary files a/images/pdfprimer.png and /dev/null differ diff --git a/images/spacer.png b/images/spacer.png new file mode 100644 index 00000000..8a7f9854 Binary files /dev/null and b/images/spacer.png differ diff --git a/images/srmise_screenshot.png b/images/srmise_screenshot.png deleted file mode 100644 index 03c9ab8e..00000000 Binary files a/images/srmise_screenshot.png and /dev/null differ diff --git a/images/xPDFsuite.png b/images/xPDFsuite.png deleted file mode 100644 index 91b52faf..00000000 Binary files a/images/xPDFsuite.png and /dev/null differ diff --git a/images/xinterpdf.png b/images/xinterpdf.png deleted file mode 100644 index f415044d..00000000 Binary files a/images/xinterpdf.png and /dev/null differ diff --git a/inc_footer.html b/inc_footer.html new file mode 100644 index 00000000..364b4c6b --- /dev/null +++ b/inc_footer.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + +
+ If you have questions or remarks about this site, please contact + Simon J. Billinge. +
+ + + diff --git a/inc_header.html b/inc_header.html new file mode 100644 index 00000000..ed5ff7db --- /dev/null +++ b/inc_header.html @@ -0,0 +1,116 @@ + + + + + + + DiffPy - Diffraction in Python + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + DANSE logo + + diffpy logo + DiffPy + + NSF logo + +
Python Libraries for Diffraction
+ + + + + + + + + + + + or other required elements. - thead: [ 1, "

+ + + or other required elements. - thead: [ 1, "
+ + diff --git a/index.rst b/index.rst deleted file mode 100644 index b91e6dbe..00000000 --- a/index.rst +++ /dev/null @@ -1,88 +0,0 @@ -.. sphinxTestRun documentation master file, created by - sphinx-quickstart on Fri Nov 8 15:28:37 2013. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -.. _home: - - -DiffPy - Atomic Structure Analysis in Python -============================================ -A free and open source software project to provide python software for -diffraction analysis and the study of the atomic structure of materials. - - -.. figure:: logos/CMI-logo.png - :align: center - -.. image:: images/blank1x1.png - -.. include:: abbreviations.txt - - -The project is currently maintained by the Billinge Group and DiffPy community members. - -Many parts of the code were developed under the diffraction part of the DANSE_ project, -a software construction project funded by the `National Science Foundation`_ to provide -data analysis software tools for neutron scattering experiments. The DiffPy project has -been a collaborative effort, centered in many institutions, including Brookhaven National -Laboratory, Columbia University, and Michigan State University. - - - - -.. _danse: https://www.its.caltech.edu/~matsci/btf/DANSE_web_page.html - -.. _national science foundation: https://www.nsf.gov/ - -.. _department of energy, office of basic energy sciences: https://science.energy.gov/bes/ - -.. _brookhaven national laboratory: https://www.bnl.gov/ - -About DiffPy ----------------- - -.. image:: images/pdfprimer.png - :align: right - :width: 200 - - -DiffPy is the home of a number of software products for atomic structure -analysis. A large portion of the DiffPy project consists of tools for atomic pair -distribution function (PDF) analysis. For detailed instructions -and in-depth examples of modeling Pair Distribution Function data, we highly recommend the book, - - -*Atomic Pair Distribution Function Analysis: A Primer* by Simon J. L. Billinge and Kirsten M. Ø. Jensen (Oxford University Press, 2023). - - -To purchase this book, please visit `this link `_. - -The DiffPy project is also home to many other software tools for analysis of scientific data. -One of which is diffpy.cmi, a general-purpose -complex modeling infrastructure for analysis of *any* type of data. -For more information about diffpy.cmi, please visit the -`diffpy.cmi documentation `_. - -.. toctree:: - :hidden: - - community - publications - NSFnugget - acknowledgements - products/diffpycmi/index - products/diffpycmi/install - products/diffpycmi/contents - products/diffpycmi/cmi_exchange - products/diffpycmi/license - products/diffpycmi/updatesources - products/diffpycmi/contributecode - products/xPDFsuite - products/pdfgui - products/pdfgetx - products/pythonpackages - products/SrMise - products/mPDF - products/xinterpdf - products/utils \ No newline at end of file diff --git a/index.shtml b/index.shtml new file mode 100644 index 00000000..0dd41720 --- /dev/null +++ b/index.shtml @@ -0,0 +1,157 @@ + + +

Welcome to the DiffPy project.

+ +

+This is an open-source project to develop python software modules +for diffraction and the study of atomic structure of materials. +DiffPy is developed as part of +DANSE, +a software construction project funded by the +National Science Foundation +to provide data +analysis software tools for neutron scattering experiments that +will be carried out at the + + Spallation Neutron Source + +at +Oak Ridge National Laboratory. +

+ + +

News

+ +
    +
  • + 2013-02-05 - initial release of the PDFgetX3 program. +
  • +
+ + +

Products

+ +

PDFgetX3

+ +

+PDFgetX3 is a command-line utility for +converting X-ray powder diffraction data to atomic pair +distribution functions (PDF). PDFgetX3 is easy to use, fast +and convenient for automated batch processing. The +interactive mode provides complete access to all parameters +and intermediate results, as well as live-plotting feature for +parameters tuning and visualization of their effects on the +results. PDFgetX3 can be used either as a standalone +application or as a Python library of PDF-processing +functions. +The software is free for open academic research, but requires +paid license for commercial use. +

+ + +

DiffPy library

+

+A library of Python modules for carrying out structure analysis tasks +from diffraction data. The modules are at different stages of development +and some are not yet ready for usage by non-experts. Nevertheless, the +components listed below should be stable enough and hopefully useful +to a broader non-expert community. +

+ + +

DiffPy components

+
    +
  • + PDFgui - a program for full-profile fitting of the atomic + pair distribution function (PDF) derived from x-ray or neutron diffraction data. + This is a graphical front end for the PDFfit2 refinement program, + with built in graphical and structure visualization capabilities. +
  • +
  • + PDFfit2 - the structure refinement engine for fitting + structural models to experimentally derived PDFs. It is used as calculation + engine for PDFgui, but can be used separately in simple Python scripts or + as a command-line program. +
  • + +
  • + Structure - simple storage and manipulation + of crystal structure data. Supports reading and writing in several structure + formats, coordinate transformations, symmetry expansion and generation of + symmetry constraints. +
  • +
+ +

References

+ +

+PDFgui and PDFfit2 are intended for scientific research that will be +published in the open literature and are free to use. +Please cite the following paper in your scientific publications +using one of these programs: +

+ +
+ 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, +J. Phys.: Condens. Matter 19, 335219 (2007) + + Farrow-jpcm-2007.pdf +. +

+
+ +

+For publications using the PDFgetX3 program please cite +

+ +
+P. Juhás and T. Davis, C. L. Farrow, +S. J. L. Billinge, + +PDFgetX3: A rapid and highly automatable program for +processing powder diffraction data into total scattering pair +distribution functions, +J. Appl. Cryst. 46, 560-566 (2013) + + Juhas-jac-2013.pdf +. +
+ +

Acknowledgements

+ +

Developers

+

+The active DiffPy team is Pavol Juhás, Chris Farrow, Emil Božin, Simon Billinge, +Wenduo Zhou, Peng Tian and Timur Davis. The project was started at the Department +of Physics and Astronomy, Michigan State University. The development team +has now mostly relocated to the Department of Applied Physics and Applied +Mathematics at Columbia University in the city of New York. The former members +of the project while at Michigan State were Jiwu Liu and Dmitriy Bryndin. +

+ +

Funding

+

+This software was developed as part of the +Distributed Data Analysis of Neutron Scattering Experiments (DANSE) +project funded by the US National Science Foundation under grant +DMR-0520547. More information on DANSE can be +found at http://danse.us. The early developments of PDFfit2 were funded +by NSF grant DMR-0304391 in the Billinge-group, and with support from +Michigan State University. 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 respective funding bodies. +

+ +

Other

+

+ www.vim.org + for splendid editor and inspiration for this website. +

+ + diff --git a/logos/BNL_logo.jpg b/logos/BNL_logo.jpg deleted file mode 100644 index 34cf2118..00000000 Binary files a/logos/BNL_logo.jpg and /dev/null differ diff --git a/logos/CMI-logo.png b/logos/CMI-logo.png deleted file mode 100644 index 12a98cb2..00000000 Binary files a/logos/CMI-logo.png and /dev/null differ diff --git a/logos/DOE_logo.png b/logos/DOE_logo.png deleted file mode 100644 index dea2af55..00000000 Binary files a/logos/DOE_logo.png and /dev/null differ diff --git a/logos/diffpy_logo_big.png b/logos/diffpy_logo_big.png deleted file mode 100644 index 6f8a571a..00000000 Binary files a/logos/diffpy_logo_big.png and /dev/null differ diff --git a/logos/diffpy_logo_header.png b/logos/diffpy_logo_header.png deleted file mode 100644 index 6cc8bd3b..00000000 Binary files a/logos/diffpy_logo_header.png and /dev/null differ diff --git a/logos/diffpy_logo_header_new.png b/logos/diffpy_logo_header_new.png deleted file mode 100644 index 86d39ee3..00000000 Binary files a/logos/diffpy_logo_header_new.png and /dev/null differ diff --git a/media/.htaccess b/media/.htaccess new file mode 100644 index 00000000..f480c2f0 --- /dev/null +++ b/media/.htaccess @@ -0,0 +1,2 @@ +IndexOptions FancyIndexing SuppressIcon NameWidth=* +# IndexIgnore .. diff --git a/nuggetDANSE0708.html b/nuggetDANSE0708.html new file mode 100644 index 00000000..af671412 --- /dev/null +++ b/nuggetDANSE0708.html @@ -0,0 +1,108 @@ + + + + + DANSE-diffraction NSF nugget, 2007-08-27 + + + + + + + + + +

+Enabling new science in nanoscale structure characterization of complex +materials +

+ +

+ C. L. Farrow, P. Juhás, J. W. Liu, D. Bryndin, E. S. Božin, J. Bloch, and + S. J. L. Billinge (Michigan State University) +

+ +

+

+To understand and +control the properties of materials it is necessary to have a +detailed knowledge of their atomic structure. Increasingly, we are +interested in exploiting materials with complex structures on the +nanoscale, which presents special experimental challenges as +crystallography, the standard approach to structure determination, +loses its power on these length-scales. Alternative methods +sensitive to nanoscale order are under development. The diffraction +sub-group of the DANSE project recently released a new software tool +that will have a large impact in nanostructure characterization using +x-ray and neutron diffraction. +

+

+ +
+ +PDFgui screenshot + +

+ Fig 1: Screen-shot of PDFgui during a refinement of multiple data-sets +

+
+ +

+The diffraction data are Fourier transformed to obtain the +atomic pair distribution function (PDF) and analyzed by +quantitatively fitting nanostructure models to the data. An example +of the tool, PDFgui [1], +is shown in the accompanying +flash movie. +It is being used to study the evolution of local structural +parameters through a structural phase transition. Neutron-derived +PDFs have been collected over a temperature range from room +temperature to 880 K for the strongly correlated electron material, +LaMnO3. PDFgui allows rapid setup of individual and +multiple refinements. The first refinement is initialized using the +intuitive gui (graphical user interface) tools, and the structure +visualized using the built-in structure visualizing tool. At this +point the temperature-series macro is chosen allowing multiple (in +this case, 10) structure refinements to be selected and refined +automatically. The flexible built-in plotting capabilities allows a +refined parameter to be plotted during this process as shown. The +structural phase transition is clearly visible as a cusp in this +parameter, which happens to be a thermal factor on oxygen ions in the +structure. This program will be implemented at the POWGEN3 and NOMAD +diffractometers at SNS with macros to allow real-time parametric +refinements similar to those shown, allowing researchers to make +scientific discoveries during data collection, at the beam-time, and +not a-posteriori after the beamtime is over. PDFgui has +numerous extensions, beyond those shown in the movie that are +described in more detail in Ref. [1]. +The beta version of PDFgui is +now in public release, available for Windows, Linux and Mac OSX +platforms, and in the first month has been downloaded 220 times. More +information can be found at +http://www.diffpy.org. +

+ +

+
    +
  1. + 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, + J. Phys.: Condens. Matter 19, 335219 (2007). +
  2. +
+ + + diff --git a/packages/.footer.html b/packages/.footer.html new file mode 100644 index 00000000..cde7fb57 --- /dev/null +++ b/packages/.footer.html @@ -0,0 +1,6 @@ + +Description column shows number of downloads. + + + + diff --git a/packages/.header.html b/packages/.header.html new file mode 100644 index 00000000..ed3dd58f --- /dev/null +++ b/packages/.header.html @@ -0,0 +1,15 @@ + + + + + + + DiffPy package repository + + + + + + +

DiffPy package repository

+ diff --git a/packages/.htaccess b/packages/.htaccess new file mode 100644 index 00000000..c71aaac2 --- /dev/null +++ b/packages/.htaccess @@ -0,0 +1,10 @@ +IndexOptions FancyIndexing SuppressIcon NameWidth=* VersionSort +IndexOptions SuppressHTMLPreamble + +HeaderName .header.html +ReadmeName .footer.html + +# IndexIgnore .. + +# DESCRIPTIONS BEGIN +# DESCRIPTIONS END diff --git a/products/PDFgui_LICENSE.txt b/products/PDFgui_LICENSE.txt deleted file mode 100644 index 296489bb..00000000 --- a/products/PDFgui_LICENSE.txt +++ /dev/null @@ -1,74 +0,0 @@ -Copyright Policy - -This software was originally developed by the Billinge group as part -of the Distributed Data Analysis of Neutron Scattering Experiments -(DANSE) project funded by the US National Science Foundation under -grant DMR-0520547. Developments of PDFfit2 were funded by NSF grant -DMR-0304391 in the Billinge group, and with support from Michigan State -University and Columbia University. 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 respective funding bodies. -Subsequent development was done in the Billinge group at Columbia University -and then in collaboration between the Billinge group at Columbia and Pavol -Juhas at Brookhaven National Laboratory. Moving forward, PDFgui will be -maintained as a community project with contributions welcomed from many people. - -Up to the release 1.1.2 (February 2017) the copyright was held by -the institutions that hosted the work as follows: -Copyright 2006-2007, Board of Trustees of Michigan State University, -Copyright 2008-2012, Board of Trustees of Columbia University in the -city of New York. -Copyright 2013, Brookhaven National Laboratory (Copyright holder -indicated in each source file). - -As of February 2017, and the 1.1.2 release, PDFgui has moved to a shared copyright model. - -PDFgui uses a shared copyright model. Each contributor maintains copyright over their -contributions to PDFgui. But, it is important to note that these contributions are -typically only changes to the repositories. Thus, the PDFgui source code, in its entirety, -is not the copyright of any single person or institution. Instead, it is the collective -copyright of the entire PDFgui Development Team. If individual contributors want to -maintain a record of what changes/contributions they have specific copyright on, they -should indicate their copyright in the commit message of the change, when they commit -the change to one of the PDFgui repositories. - -The PDFgui Development Team is the set of all contributors to the PDFgui project. -A full list can be obtained from the git version control logs. - -For more information please visit the project web-page: - http://www.diffpy.org/ -or email Prof. Simon Billinge at sb2896@columbia.edu - - -License Agreement - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * 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. - - * 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 COPYRIGHT HOLDER "AS IS". COPYRIGHT HOLDER -EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EITHER -EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR SUITABILITY -FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM FROM -INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, TRADE -SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT SHALL -COPYRIGHT HOLDER BE LIABLE TO ANY PARTY 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 OR RELATING TO THIS AGREEMENT, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/products/SrMise.rst b/products/SrMise.rst deleted file mode 100644 index d4dc7e75..00000000 --- a/products/SrMise.rst +++ /dev/null @@ -1,188 +0,0 @@ -########## -SrMise -########## - -.. include:: ../abbreviations.txt - -SrMise is the DiffPy tool for peak extraction and peak fitting from atomic -pair distribution functions (PDFs). It implements a powerful -information-theoretic multimodeling approach based on the Akaike information -criterion (AIC) to generate and rank physically plausible sets of peaks even in -the absence of a constraining structural model. This approach to peak -extraction is premised upon PDFs reporting accurate experimentally-determined -uncertainties, and when these are unavailable results are contingent on a -user-specified *ad hoc* uncertainty. PDFs mixing positive and negative -peaks, such as some neutron PDFs, are compatible with the SrMise peak fitting, -but not peak extraction, capability. - -The software aids rapid analysis of crystalline and nanostructured -materials. Reasonable values for nearly all program parameters can be -estimated directly from the data, although the PDF baseline of non-crystalline -materials requires user judgment. Crystalline (linear) and spherical -nanoparticle baselines are included, and SrMise also supports arbitrary -polynomial and interpolated baselines. Other key features include peak -functions incorporating termination effects, standard uncertainty reporting, and -a framework enabling a flexible AIC-driven multimodeling analysis. A -command-line tool exposes basic peak extraction functionality, with full -functionality available through Python scripting. - - -.. figure:: ../images/srmise_screenshot.png - :align: center - -This is an alpha release of SrMise, and the capabilities and documentation of -the project will evolve. In particular, the multimodeling API is expected to -change significantly in a future version. The DiffPy team encourages -investigators to use the software even at this early stage, and invites -feedback and suggestions. - - -Getting Started -================= - -The diffpy.srmise package requires Python 2.6 or 2.7 and the following software: - -* ``setuptools`` - software distribution tools for Python -* ``NumPy`` - numerical mathematics and fast array operations for Python -* ``SciPy`` - scientific libraries for Python -* ``matplotlib`` - python plotting library - -See the :doc:`SrMise license ` for terms and conditions of use. -Detailed installation instructions for the :ref:`Windows `, -:ref:`Mac OS X `, and :ref:`Linux ` -platforms follow. - -.. _windows_install: - -Windows -------- - -Several prebuilt Python distributions for Windows include all the -prerequisite software required to run SrMise, and installing one of these is the -simplest way to get started. These distributions are usually free for -individual and/or academic use, but some also have commercial version. Links to -executables, installation instructions, and licensing information -for some popular options are listed below. - -* `Anaconda`_ -* `Enthought Canopy `_ -* `Python(x,y) `_ -* `WinPython `_ - -.. _Anaconda: anaconda-download_ - -Alternately, individual Windows executables for Python and the required -components can be downloaded and installed. The official Windows releases of -Numpy and SciPy do not currently support 64-bit Python installations, so be -sure to download the 32-bit versions of these packages. - -* `Python 2.6/2.7 `_ -* `NumPy `_ -* `SciPy `_ -* `matplotlib `_ - -After installing Python and the required packages, we can install SrMise. -The simplest way to obtain diffpy.srmise on Windows systems -is using ``pip`` to download and install the latest release from the -`Python Package Index `_ (PyPI). To do so, open a -command window by running ``cmd`` from the Start Menu's application search box -(Windows 7/8/10) or Run command (Windows Vista and earlier). Verify that the -``pip`` program is installed by running :: - - pip --version - -If this command is not found, download and run -`get-pip.py `_, which will install both it -and setuptools. For example, if your Windows user name is ``MyName`` and you -download the file to the desktop, you would run the following from the command -line: :: - - cd C:\Users\MyName\Desktop - python get-pip.py - -Finally, install the latest version of SrMise by running :: - - pip install diffpy.srmise - - -.. _macosx_install: - -Mac OS X --------- - -For Mac OS X systems with the MacPorts package manager, the required -software can be installed with :: - - sudo port install \ - python27 py27-setuptools py27-numpy py27-scipy py27-matplotlib - -When installing for MacPorts, make sure the MacPorts bin directory is the first -in the system PATH and that python27 is selected as the default Python version -in MacPorts:: - - sudo port select --set python python27 - -The simplest way to obtain diffpy.srmise on Mac OS X systems -is using ``pip`` to download and install the latest release from -`PyPI `_. :: - - sudo pip install diffpy.srmise - -If you prefer to install from sources, download them from the -`GitHub `__ or -`PyPI `__ pages for SrMise. -Uncompress them to a directory, and from that directory run :: - - sudo python setup.py install - -This installs diffpy.srmise for all users in the default system location. If -administrator (root) access is not available, see the usage info from -``python setup.py install --help`` for options to install to user-writable -directories. - -.. _linux_install: - -Linux ------ - -On Ubuntu and Debian Linux, the required software can easily be installed using -the system package manager:: - - sudo apt-get install \ - python-setuptools python-numpy python-scipy python-matplotlib - -Similarly, on Fedora:: - - sudo yum install python-setuptools numpy scipy python-matplotlib - -For other Linux distributions consult the appropriate package manager. - -The simplest way to obtain diffpy.srmise on Linux systems -is using ``pip`` to download and install the latest release from -`PyPI `_. :: - - sudo pip install diffpy.srmise - -If you prefer to install from sources, download them from the -`GitHub `__ or -`PyPI `__ pages for SrMise. -Uncompress them to a directory, and from that directory run :: - - sudo python setup.py install - -This installs diffpy.srmise for all users in the default system location. If -administrator (root) access is not available, see the usage info from -``python setup.py install --help`` for options to install to user-writable -directories. - - -What next? -============ - -Explore the SrMise -`tutorial `_! - -.. toctree:: - :hidden: - - SrMiselicense diff --git a/products/SrMise_LICENSE.txt b/products/SrMise_LICENSE.txt deleted file mode 100644 index 23b33313..00000000 --- a/products/SrMise_LICENSE.txt +++ /dev/null @@ -1,46 +0,0 @@ -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: - - L. Granlund, S.J.L. Billinge, P.M. Duxbury, Algorithm for - systematic peak extraction from atomic pair distribution - functions, Acta Crystallographica A 71(4), 392-409 (2015). - doi:10.1107/S2053273315005276 - -Copyright 2014-2015, Board of Trustees of Michigan State University - -For more information please visit the diffpy web-page at - http://www.diffpy.org -or email Luke Granlund at luke.r.granlund@gmail.com, or 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: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * 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. - - * 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 COPYRIGHT HOLDER "AS IS". COPYRIGHT -HOLDER EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, -EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR -SUITABILITY FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM -FROM INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, -TRADE SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT -SHALL COPYRIGHT HOLDER BE LIABLE TO ANY PARTY 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 OR RELATING TO -THIS AGREEMENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/products/SrMiselicense.rst b/products/SrMiselicense.rst deleted file mode 100644 index af833fb7..00000000 --- a/products/SrMiselicense.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. this page only contains the LICENSE text for SrMise - -.. title:: SrMise License - -.. literalinclude:: SrMise_LICENSE.txt - :language: text diff --git a/products/Utils_LICENSE.txt b/products/Utils_LICENSE.txt deleted file mode 100644 index 1a431d59..00000000 --- a/products/Utils_LICENSE.txt +++ /dev/null @@ -1,121 +0,0 @@ -OPEN SOURCE LICENSE AGREEMENT -============================= - -Copyright (c) 1989, 1991 Free Software Foundation, Inc. -Copyright (c) 2006, The Regents of the University of California through Lawrence Berkeley National Laboratory -Copyright (c) 2006-2007, Board of Trustees of Michigan State University -Copyright (c) 2008-2012, The Trustees of Columbia University in the City of New York -Copyright (c) 2009-2011, University of Tennessee -Copyright (c) 2014, Australian Synchrotron Research Program Inc., ("ASRP") -Copyright (c) 2014-2019, Brookhaven Science Associates, Brookhaven National Laboratory -Copyright (c) 2019-2024, The Trustees of Columbia University in the City of New York. -All rights reserved. - -The "DiffPy-CMI" is distributed subject to the following license conditions: - -SOFTWARE LICENSE AGREEMENT - -Software: DiffPy-CMI - -(1) The "Software", below, refers to the aforementioned DiffPy-CMI (in either -source code, or binary form and accompanying documentation). - -Part of the software was derived from the DANSE, ObjCryst++ (with permission), -PyCifRW, Python periodictable, CCTBX, and SasView open source projects, of -which the original Copyrights are contained in each individual file. - -Each licensee is addressed as "you" or "Licensee." - -(2) The copyright holders shown above and their third-party Licensors hereby -grant licensee a royalty-free nonexclusive license, subject to the limitations -stated herein and U.S. Government license rights. - -(3) You may modify and make a copy or copies of the software for use within -your organization, if you meet the following conditions: - - (a) Copies in source code must include the copyright notice and this - software license agreement. - - (b) Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other materials - provided with the copy. - -(4) You may modify a copy or copies of the Software or any portion of it, thus -forming a work based on the Software, and distribute copies of such work -outside your organization, if you meet all of the following conditions: - - (a) Copies in source code must include the copyright notice and this - Software License Agreement; - - (b) Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other materials - provided with the copy; - - (c) Modified copies and works based on the Software must carry prominent - notices stating that you changed specified portions of the Software; - - (d) Neither the name of Brookhaven Science Associates or Brookhaven - National Laboratory nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - written permission. - -(5) Portions of the Software resulted from work developed under a U.S. -Government contract and are subject to the following license: -The Government is granted for itself and others acting on its behalf a -paid-up, nonexclusive, irrevocable worldwide license in this computer software -to reproduce, prepare derivative works, and perform publicly and display -publicly. - -(6) WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT -WARRANTY OF ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY -LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND -THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL -LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF -THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT INFRINGE -PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION -UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED. - -(7) LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR -THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF -ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL, -CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, INCLUDING -BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, -WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING -NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS -BEEN WARNED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES. - -Brookhaven National Laboratory Notice -===================================== - -Acknowledgment of sponsorship ------------------------------ - -This software was produced by the Brookhaven National Laboratory, under -Contract DE-AC02-98CH10886 with the Department of Energy. - -Government disclaimer of liability ----------------------------------- - -Neither the United States nor the United States Department of Energy, nor -any of their employees, makes any warranty, express or implied, or assumes -any legal liability or responsibility for the accuracy, completeness, or -usefulness of any data, apparatus, product, or process disclosed, or -represents that its use would not infringe privately owned rights. - -Brookhaven disclaimer of liability ----------------------------------- - -Brookhaven National Laboratory makes no representations or warranties, -express or implied, nor assumes any liability for the use of this software. - -Maintenance of notice ---------------------- - -In the interest of clarity regarding the origin and status of this -software, Brookhaven National Laboratory requests that any recipient of it -maintain this notice affixed to any distribution by the recipient that -contains a copy or derivative of this software. - -END OF LICENSE diff --git a/products/Utilslicense.rst b/products/Utilslicense.rst deleted file mode 100644 index 034894ac..00000000 --- a/products/Utilslicense.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. this page only contains the LICENSE text for Utils - -.. title:: Utils License - -.. literalinclude:: Utils_LICENSE.txt - :language: text diff --git a/products/diffpycmi/LICENSE.txt b/products/diffpycmi/LICENSE.txt deleted file mode 100644 index f761aa49..00000000 --- a/products/diffpycmi/LICENSE.txt +++ /dev/null @@ -1,137 +0,0 @@ -OPEN SOURCE LICENSE AGREEMENT -============================= - -Copyright (c) 2009-2011, University of Tennessee -Copyright (c) 1989, 1991 Free Software Foundation, Inc. -Copyright (c) 2006, The Regents of the University of California through - Lawrence Berkeley National Laboratory -Copyright (c) 2014, Australian Synchrotron Research Program Inc., ("ASRP") -Copyright (c) 2006-2007, Board of Trustees of Michigan State University -Copyright (c) 2008-2012, The Trustees of Columbia University in the City - of New York - -Copyright (c) 2014-2019, Brookhaven Science Associates, Brookhaven National - Laboratory - - -The "diffpy.cmi" is distributed subject to the following license conditions: - - -SOFTWARE LICENSE AGREEMENT - - Software: diffpy.cmi - - -(1) The "Software", below, refers to the aforementioned diffpy.cmi (in either -source code, or binary form and accompanying documentation). - -Part of the software was derived from the DANSE, ObjCryst++ (with permission), -PyCifRW, Python periodictable, CCTBX, and SasView open source projects, of -which the original Copyrights are contained in each individual file. - -Each licensee is addressed as "you" or "Licensee." - - -(2) The copyright holders shown above and their third-party Licensors hereby -grant licensee a royalty-free nonexclusive license, subject to the limitations -stated herein and U.S. Government license rights. - - -(3) You may modify and make a copy or copies of the software for use within -your organization, if you meet the following conditions: - - (a) Copies in source code must include the copyright notice and this - software license agreement. - - (b) Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other materials - provided with the copy. - - -(4) You may modify a copy or copies of the Software or any portion of it, thus -forming a work based on the Software, and distribute copies of such work -outside your organization, if you meet all of the following conditions: - - (a) Copies in source code must include the copyright notice and this - Software License Agreement; - - (b) Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other materials - provided with the copy; - - (c) Modified copies and works based on the Software must carry prominent - notices stating that you changed specified portions of the Software. - - (d) Neither the name of Brookhaven Science Associates or Brookhaven - National Laboratory nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - written permission. - - -(5) Portions of the Software resulted from work developed under a U.S. -Government contract and are subject to the following license: -The Government is granted for itself and others acting on its behalf a -paid-up, nonexclusive, irrevocable worldwide license in this computer software -to reproduce, prepare derivative works, and perform publicly and display -publicly. - - -(6) WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT -WARRANTY OF ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY -LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND -THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL -LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF -THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT INFRINGE -PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION -UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED. - - -(7) LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR -THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF -ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL, -CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, INCLUDING -BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, -WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING -NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS -BEEN WARNED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES. - - -Brookhaven National Laboratory Notice -===================================== - -Acknowledgment of sponsorship ------------------------------ - -This software was produced by the Brookhaven National Laboratory, under -Contract DE-AC02-98CH10886 with the Department of Energy. - - -Government disclaimer of liability ----------------------------------- - -Neither the United States nor the United States Department of Energy, nor -any of their employees, makes any warranty, express or implied, or assumes -any legal liability or responsibility for the accuracy, completeness, or -usefulness of any data, apparatus, product, or process disclosed, or -represents that its use would not infringe privately owned rights. - - -Brookhaven disclaimer of liability ----------------------------------- - -Brookhaven National Laboratory makes no representations or warranties, -express or implied, nor assumes any liability for the use of this software. - - -Maintenance of notice ---------------------- - -In the interest of clarity regarding the origin and status of this -software, Brookhaven National Laboratory requests that any recipient of it -maintain this notice affixed to any distribution by the recipient that -contains a copy or derivative of this software. - - -END OF LICENSE diff --git a/products/diffpycmi/index.rst b/products/diffpycmi/index.rst deleted file mode 100644 index 70f49f50..00000000 --- a/products/diffpycmi/index.rst +++ /dev/null @@ -1,85 +0,0 @@ -########## -|diffpycmi| -########## - -Diffpy.cmi is designed as an extensible complex modeling infrastructure. -Users and developers can readily integrate novel data types and constraints -into custom workflows. While widely used for advanced analysis of structural -data, the framework is general and can be applied to any problem where model -parameters are refined to fit calculated quantities to data. - -Diffpy.cmi is a community-driven project that supports Unix, Linux, macOS, -and Windows platforms. It is designed to be used in Python scripts enabling -flexible scripting and automation for advanced and reproducible workflows. -Users are encouraged to leverage the software for their modeling needs and -to contribute feedback, use cases, and extensions through the project -community. - - -.. figure:: ../../images/diffpycmi_screenshot.png - :align: center - - - -Installation -============ -For the most up-to-date installation instructions, please refer to the installation section of the -`diffpy.cmi README page on GitHub `_. - -Pack and Profile Installation -============================= - -Diffpy.cmi is designed to be modular and extensible through the use of optional -dependencies known as `packs`. Additionally, users can define custom workflows -that combine multiple packs with optional post-installation steps, known as `profiles`. - -For more information on packs and profiles please refer to the -`diffpy.cmi overview page `_. - -For information how to install packs and profiles, please refer to the -`diffpy.cmi command-line interface page `_. - - -Tutorials -========= - -Many examples exist for diffpy.cmi. Using the command-line interface (CLI), these -examples can be copied directly to your computer. -For information on how to use the command-line interface to access the examples, -please refer to the -`diffpy.cmi CLI documentation `_. -Additionally, here are some direct links to other tutorials and examples, - -* A step-by-step tutorial on using diffpy.cmi to `fit a nickel PDF `_. - -* Examples and experimental data from the book *Atomic Pair Distribution Function Analysis: A Primer* are freely available at our - `GitHub repository `_. - -* Worked examples from ADD2019 school and conference -- - https://github.com/diffpy/add2019-diffpy-cmi. - -Documentation -============= - -Documentation for diffpy.cmi is available at https://www.diffpy.org/diffpy.cmi. - - -Reference -========= - -If you use this software in a research work which leads to publication, -we ask you to acknowledge the use of diffpy.cmi by citing the following -paper: - -* |citeJuhasAca15| - -.. URL definitions below ----------------------------------------------- - -.. |doc-diffpy.srfit| replace:: diffpy.srfit -.. |doc-diffpy.srreal| replace:: diffpy.srreal -.. |doc-diffpy.structure| replace:: diffpy.structure -.. |doc-diffpy.utils| replace:: diffpy.utils -.. |doc-pyobjcryst| replace:: pyobjcryst -.. |doc-libdiffpy| replace:: libdiffpy - -.. include:: ../../abbreviations.txt diff --git a/products/diffpycmi/license.rst b/products/diffpycmi/license.rst deleted file mode 100644 index 18fed07e..00000000 --- a/products/diffpycmi/license.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. this page only contains the LICENSE text for |diffpycmi| - -.. title:: |diffpycmi| License - -.. literalinclude:: LICENSE.txt - :language: text diff --git a/products/diffpycmi/updatesources.rst b/products/diffpycmi/updatesources.rst deleted file mode 100644 index 635a4a19..00000000 --- a/products/diffpycmi/updatesources.rst +++ /dev/null @@ -1,51 +0,0 @@ -How to Update to the Latest Sources -=================================== - -In order to update and build the source code you must have all the -dependencies installed. In addition to the dependencies listed in the -:doc:`installation instructions `, you will need ``mercurial`` -and ``wget``. On Ubuntu and Fedora, the required software can easily be -installed using the system package manager using the commands shown -below. - - For Ubuntu use ``apt-get``:: - - sudo apt-get install \ - libgsl0-dev libboost-all-dev python-dev \ - python-setuptools python-numpy python-scipy \ - python-matplotlib python-lxml ipython \ - scons git zsh mercurial wget - - For Fedora use ``yum``:: - - sudo yum install \ - gsl-devel boost-devel python-devel - python-setuptools numpy scipy \ - python-matplotlib python-lxml \ - python-ipython-notebook scons git zsh \ - mercurial wget - -The easiest way to update and recompile the latest sources is to use the -installation script that was packaged with the release bundle. - -To update the codes:: - - ./install --update[=steps] - -This will perform all or selected software updates from online source repositories. -Update steps are comma separated integers or ranges such as '1,3,5-6'. - -To rebuild the source code:: - - ./install --build[=steps] - -This will rebuild all or specified packages from sources in the src folder. In both -cases, you could use option -n to display the build steps. - -.. note:: - - If your installed version of Python came from a Python distribution - other than system Python (e.g. the Enthought Python Distribution) it - may be incompatible with the system boost library and the build may - fail. To resolve the problem, you should rebuild the boost library - against Enthought Python and then rebuild all diffpy.cmi modules. diff --git a/products/labpdfproc.rst b/products/labpdfproc.rst deleted file mode 100644 index 93735733..00000000 --- a/products/labpdfproc.rst +++ /dev/null @@ -1,47 +0,0 @@ -###################### -diffpy.labpdfproc -###################### - - -Tools for processing x-ray powder diffraction data from laboratory -sources. - -PDFgetX3 has revolutionized how pair distribution function (PDF) methods -can be applied to solve -nanostructure problems. However, the program was designed for use with -Rapid Acquisition PDF (RAPDF) data from synchrotron sources. A key -approximation inherent in the use of PDFgetX3 for RAPDF data is that -absorption effects are negligible. This is typically not the case for -laboratory x-ray diffractometers, where absorption effects can be -significant. - -This app is designed to preprocess data from laboratory x-ray -diffractometers before using PDFgetX3 to obtain PDFs. The app currently -carries out an absorption correction assuming a parallel beam capillary -geometry which is the most common geometry for lab PDF measurements. - -.. figure:: ../images/labpdfproc.png - :align: center - -Installation -============ - -For the most up-to-date installation instructions, please refer to the installation section of the -`diffpy.labpdfproc README page on GitHub `_. - -Running labpdfproc -====================== - -To run diffpy.labpdfproc after installation, type the command:: - - labpdfproc - -Tutorials -========= -Tutorials on how to use diffpy.labpdfproc can be found -at the `diffpy.labpdfproc documentation `_. - -Documentation -============= - -Documentation for diffpy.labpdfproc is available at https://www.diffpy.org/diffpy.labpdfproc. \ No newline at end of file diff --git a/products/mPDF.rst b/products/mPDF.rst deleted file mode 100644 index 1200206a..00000000 --- a/products/mPDF.rst +++ /dev/null @@ -1,51 +0,0 @@ -############# -diffpy.mpdf -############# - -.. include:: ../abbreviations.txt - -The diffpy.mpdf package provides a convenient method for computing the magnetic PDF -(mPDF) from magnetic structures and performing fits to neutron total scattering -data. The mPDF is calculated by an MPDFcalculator object, which extracts the spin -positions and spin vectors from a MagStructure object that the MPDFcalculator -takes as input. The MagStructure object in turn can contain multiple MagSpecies -objects, which generate magnetic configurations based on a diffpy.structure object -and a set of propagation vectors and basis vectors provided by the user. -Alternatively, the user can manually define a magnetic unit cell that will be used -to generate the magnetic structure, or the magnetic structure can be defined simply -as lists of spin positions and spin vectors provided by the user. - - - -.. figure:: ../images/mpdf_screenshot.png - :align: center - - Example usage of diffpy.mpdf - - -Reference -========= - -If you use diffpy.mpdf in scientific research, please acknowledge it by citing: - - Frandsen et al., "diffpy.mpdf: open-source software for magnetic pair distribution function analysis", - J. Appl. Cryst. (2022) 55, 1377-1382. https://doi.org/10.1107/S1600576722007257 - -Installation -============ - -For the most up-to-date installation instructions, please refer to the -`diffpy.mpdf README on GitHub `_. - -Tutorials -========= - -For tutorials on how to use diffpy.mpdf, please visit: https://github.com/FrandsenGroup/mPDF-tutorial. - -Documentation -============= - -Full documentation for diffpy.mpdf is available at: -`https://frandsengroup.github.io/diffpy.mpdf/index.html `_ - - diff --git a/products/mPDFlicense.rst b/products/mPDFlicense.rst deleted file mode 100644 index 22798bbd..00000000 --- a/products/mPDFlicense.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. this page only contains the LICENSE text for mPDF - -.. title:: mPDF License - -.. literalinclude:: diffpycmi/LICENSE.txt - :language: text diff --git a/products/morph.rst b/products/morph.rst deleted file mode 100644 index 3af42237..00000000 --- a/products/morph.rst +++ /dev/null @@ -1,57 +0,0 @@ -############ -diffpy.morph -############ - -Diffpy.morph is a Python software package designed to allow researchers -the ability to compare experimental datasets to identify structural changes. - -Diffpy.morph makes use of several data manipulation techniques to correct -for benign effects such as thermal expansion (peak shift) and increased -thermal motion (peak broadening) or a change in scale due to differences -in incident flux, for example. diffpy.morph will do its best to correct -for these benign effects before computing and plotting a difference -curve. - -One dataset is designated as the "target", while the second is morphed. -Such morphs include stretching (modifying the x-axis to simulate uniform expansion), -smearing (broadening peaks via uniform convolution), and scaling. In addition -to these operations, diffpy.morph offers other morphing transformations, though -stretching, smearing, and scaling are the most commonly used. The software -automatically varies the amplitudes of the selected transformations to obtain -the best fit between the morphed and target datasets, and then plots both -datasets along with the resulting difference curve shown below. - -Note that diffpy.morph works on other spectra, not just pair distribution functions (PDFs). - -.. diffpy.morph will soon be included in :doc:`xPDFsuite `, a powerful end-to-end software for X-ray PDF analysis. xPDFsuite is designed for flexible, high throughput PDF analyses and contains many features for interrogating, comparing, and modeling data as well as simply doing data reduction. - -.. figure:: ../images/morph.png - :align: center - - diffpy.morph transformation techniques applied to PDFs of IrTe\ :sub:`2` doped with - different atomic species at different temperatures. - The left column (a, b, and c) shows the unmorphed PDFs at 10K (blue) and 300K (red) and - their corresponding difference curves. The right column (d, e, and f) shows the same PDFs - after applying the stretch, smear, and scale transformations to the 10K PDFs. No phase transition - is observed for PDFs in d and e as the difference curves are flat (low R\ :sub:`w`). - However, a large difference curve (high R\ :sub:`w`) is observed in - f, signifying a structural phase transition between 10K and 300K. - - -Installation -============ - -For the most up-to-date installation instructions, please refer to the installation section of the -`diffpy.morph README page on GitHub `_. - -Tutorials -========= - -Tutorials on how to use diffpy.morph can be found -at the `diffpy.morph documentation `_. - - -Documentation -============= - -Documentation for diffpy.morph is available at https://www.diffpy.org/diffpy.morph. diff --git a/products/pdfgetx.rst b/products/pdfgetx.rst deleted file mode 100644 index a831bfb4..00000000 --- a/products/pdfgetx.rst +++ /dev/null @@ -1,220 +0,0 @@ -############################### -PDFgetX3, PDFgetN3 and PDFgetS3 -############################### - -.. include:: ../abbreviations.txt - -PDFgetX3, PDFgetN3 and PDFgetS3 are command-line utilities -for automated batch processing of 1D powder diffraction data to obtain -PDFs. For an affordable GUI that allows for high throughput conversion of -multiple files with interactive graphics, please consider purchasing -:doc:`xPDFsuite `. -A version of PDFgetX3 that processes electron diffraction data is available -by contacting NanoMegas (see `here `_ for more details) - -PDFgetX3, PDFgetN3 and PDFgetS3 are easy to use, fast and convenient for automated batch processing. The interactive mode provides complete access to all -parameters and intermediate results, as well as live-plotting feature -that helps to tune conversion parameters and visualize their effect on the results. -PDFgetX3, PDFgetN3 and PDFgetS3 are distributed together with -Python library diffpy.pdfgetx, which provides the -underlying PDF-processing functions and can be -utilized in custom PDF-conversion scripts. - -User PDFgetX3 for converting x-ray data, PDFgetN3 for neutron data (designed -for reactor data explicitly and not tested on neutron time-of-flight data), and -PDFgetS3 for converting correlation functions from nanoparticle assemblies in -small angle scattering data into superlattice assembly structures. - -*The software is free for open academic research, -but requires paid license for commercial use.* - - -Download -======== - -.. should be easier to use redirected URLs instead of - http://innovation.columbia.edu/technologies/m11-120 - -.. |m11-120| raw:: html - - - https://columbia.resoluteinnovation.com/technologies/M11-120 - -The PDFgetX3, PDFgetN3 and PDFgetS3 software can be obtained for free from -`Columbia Technology Ventures `__, -provided it will be used for open academic research -(please cite the relevant paper below). -If you plan to use the software in any other way, please contact -``_ at Columbia Technology Ventures. - -Use the following steps to obtain the academic license and download -the software: - -1. Open new browser window at the licensing page |m11-120|. - -2. Select "Request License" - -3. Click on the link for the free or paid license that is appropriate - for your needs and situation - -4. Follow the link to sign in (or sign up if you don't already have a login) - -5. Follow the prompts to submit the license request and wait for license confirmation email. - Make a note of the URL so you can easily navigate back to this page. - -6. Once the license is approved, the download link on the product page will become live and - you can download the software to your local computer. - -7. The download will be a zip file that contains versions of the software for all - available Python versions and platforms. Extract the files from the zip file, open - ``INSTRUCTIONS.txt`` in a text editor and follow the instructions for installation. - - -Documentation -============= - -Version 2.4.0 - Latest ----------------------- - -* `installation instructions <../doc/pdfgetx/2.4.0/install.html>`__ -* `user manual <../doc/pdfgetx/2.4.0/index.html>`__ -* `tutorial files <../doc/pdfgetx/2.4.0/pdfgetxn3-examples.zip>`__ - -**Added:** - -* New ``transformterminationfunctions`` infrastructure to allow non-trivial termination functions -* Added ``Lorch`` termination function option -* Description of terminationfunctions to docs - -**Fixed:** - -* Build docs using the correct scikit-package script name -* Reapply the Sphinx dependency `m2r` to `m2r2` fix that seems to have inadvertently been lost - -Previous Versions -================= -Please reach out to ``_ if you need one of these versions - -Version 2.3.0 -------------- - -**Added:** - -* Support for Python 3.11, 3.12, 3.13. -* Added Cython build support. -* Added `.gitattribute` for github release export. -* Use bg-mpl-stylesheets as a style for matplotlib plots. -* test for the Q-array issue -* Added instructions in wheels bundle. -* Added `pdfgetx3 --list-examples` and `pdfgetx3 --example` commands to list available examples and copy example dir into pwd. - -**Changed:** - -* Changed build process. Now build `*.c` sdist and c binary wheels for each platform and python version. -* Updated :code:`tuneconfig.py` to use the latest api from matplotlib. -* Renamed get_atol() to get_atol_from_rtol() in test_pdfgetter.py -* Standardized checking if a variable is an iterable. -* Removed `docs/source` directory and makefiles in installation. -* Changed `twothetazerofit.ipy` to output `.png` files instead of `.pdf`and `.svgz` files. - -**Fixed:** - -* Refactored code for prefer_nodisplay_backend and suppress warnings. -* Support scikit-package Level 5 standard (https://scikit-package.github.io/scikit-package/). -* Replaced :code:`setup.py` with :code:`pyproject.toml` for releases. -* Fixed example import errors `diffpy.structure` because of `Structure` deprecation. -* Fixed tutorial missing image file. - -**Removed:** - -* Removed deprecated support for `loadData`, `pdfgetxApplication.processFiles`, `pdfgetxApplication.clearSession`, `pdfgetxApplication.loadData`. -* Removed unused `.coveragerc`, `.gitarchive.cfg`, `.gitattributes`. -* Support for Python 2.7, and Python <= 3.10 -* :code:`six`, and other Py2 legacy code\ -* Removed pre-commit run in merge-to-main workflow - -Version 2.2.1 - latest ----------------------- - -* `installation instructions <../doc/pdfgetx/2.2.1/install.html>`__ -* `user manual <../doc/pdfgetx/2.2.1/index.html>`__, - `printable manual <../doc/pdfgetx/2.2.1/PDFgetXNS3_manual.pdf>`__ -* `tutorial files <../doc/pdfgetx/2.2.1/pdfgetxn3-examples.zip>`__ -* `release notes <../doc/pdfgetx/2.2.1/release.html>`__ - -Version 2.2.0 ----------------------- - -* `installation instructions <../doc/pdfgetx/2.2.0/install.html>`__ -* `user manual <../doc/pdfgetx/2.2.0/index.html>`__, - `printable manual <../doc/pdfgetx/2.2.0/PDFgetXNS3_manual.pdf>`__ -* `tutorial files <../doc/pdfgetx/2.2.0/pdfgetxn3-examples.zip>`__ -* `release notes <../doc/pdfgetx/2.2.0/release.html>`__ - -Version 2.1.2 ----------------------- - -* `installation instructions <../doc/pdfgetx/2.1.2/install.html>`__ -* `user manual <../doc/pdfgetx/2.1.2/index.html>`__, - `printable manual <../doc/pdfgetx/2.1.2/PDFgetXNS3_manual.pdf>`__ -* `tutorial files <../doc/pdfgetx/2.1.2/pdfgetxn3-examples.zip>`__ -* `release notes <../doc/pdfgetx/2.1.2/release.html>`__ - - -Version 2.1.1 ----------------------- - -* `installation instructions <../doc/pdfgetx/2.1.1/install.html>`__ -* `user manual <../doc/pdfgetx/2.1.1/index.html>`__, - `printable manual <../doc/pdfgetx/2.1.1/PDFgetXNS3_manual.pdf>`__ -* `tutorial files <../doc/pdfgetx/2.1.1/pdfgetxn3-examples.zip>`__ -* `release notes <../doc/pdfgetx/2.1.1/release.html>`__ - - -Version 2.1.0 ----------------------- - -* `installation instructions <../doc/pdfgetx/2.1.0/install.html>`__ -* `user manual <../doc/pdfgetx/2.1.0/index.html>`__, - `printable manual <../doc/pdfgetx/2.1.0/PDFgetXNS3_manual.pdf>`__ -* `tutorial files <../doc/pdfgetx/2.1.0/pdfgetxn3-examples.zip>`__ -* `release notes <../doc/pdfgetx/2.1.0/release.html>`__ - - -Version 2.0.0 -------------- - -* `installation instructions <../doc/pdfgetx/2.0.0/install.html>`__ -* `user manual <../doc/pdfgetx/2.0.0/index.html>`__, - `printable manual <../doc/pdfgetx/2.0.0/PDFgetXN3_manual.pdf>`__ -* `tutorial files <../doc/pdfgetx/2.0.0/pdfgetxn3-examples.zip>`__ -* `release notes <../doc/pdfgetx/2.0.0/release.html>`__ - - -Version 1.2 ------------ - -* `user manual <../doc/pdfgetx/1.2/index.html>`__, - `printable manual <../doc/pdfgetx/1.2/PDFgetX3_manual.pdf>`__ -* `tutorial files <../doc/pdfgetx/1.2/pdfgetx3-examples.zip>`__ -* `release notes <../doc/pdfgetx/1.2/release.html>`__ - - -References -========== - -If you use this software for a scientific research that leads -to publication, we ask that you acknowledge the use of the software -by citing the following paper in your publication: - -* |citeJuhasJac13| - -For publications that use this software to process neutron -diffraction data we ask you to also cite: - -* |citeJuhasJac18| - -For publication that use this software to process small-angle -scattering data we ask you to also cite: - -* |citeLiuJac20| \ No newline at end of file diff --git a/products/pdfgui.rst b/products/pdfgui.rst deleted file mode 100644 index 6e30684a..00000000 --- a/products/pdfgui.rst +++ /dev/null @@ -1,107 +0,0 @@ -.. highlight:: bash -.. include:: ../abbreviations.txt - -############# -diffpy.pdfgui -############# - - -For users who do not have the expertise or necessity for command line analysis, diffpy.pdfgui is -a convenient and easy to use graphical front end for the PDFfit2 refinement program. It is -capable of full-profile fitting of the atomic pair distribution function (PDF) -derived from x-ray or neutron diffraction data -and comes with built in graphical and structure visualization capabilities. - -.. figure:: ../images/PDFgui_screenshot_small.png - :align: center - - Screen-shot of diffpy.pdfgui during a refinement of multiple data-sets - - -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 Juhas, 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 `_, - J. Phys.: Condens. Matter 19 (2007) 335219. - - -Installation -============ -For the most up-to-date installation instructions, please refer to the installation section of the -`diffpy.pdfgui README page on GitHub `_. - -Running pdfgui -=============== - -To run diffpy.pdfgui after installation, type the command:: - - pdfgui - -Tutorials -========= - -Search "PDFgui" on YouTube for some video tutorials on how to use diffpy.pdfgui. - -For in-depth help in using diffpy.pdfgui to solve scientific problems please -see the book "Atomic Pair Distribution Function Analysis: A primer" by -Simon Billinge, Kirsten Jensen, and past and present Billinge group members, -published by Oxford University Press. Data for the worked examples can -be found here: https://github.com/Billingegroup/pdfttp_data. - -Please, join the :doc:`community forum <../community>` for tips, tricks, and feedback. - -Documentation -============= - -Documentation for diffpy.pdfgui is available at https://www.diffpy.org/diffpy.pdfgui. - -Legacy versions -=============== - -v1.1.2 is the last python 2 version of PDFgui. It is no longer supported, -but may be needed to open python 2 generated `.ddp` project files. It can -be installed in a python2 anaconda environment using the commands:: - - conda config --set restore_free_channel true - conda config --add channels diffpy - conda create --name=py27 python=2.7 - conda activate py27 - conda install -c diffpy "diffpy.pdfgui==1.1.2" - -When Anaconda Python is not available, PDFgui can be installed from -sources. The latest source package is at the `Python Package -Index `__ and the -prior versions are at -https://github.com/diffpy/diffpy.pdfgui/releases. See the `README -`__ document -for further details on installation from sources, - -Finally, here are the previous single-file installers. Although -quite outdated, they might be handy if there is some problem with -Anaconda or if one needs to install without Internet connection. - -======================== ================== ============ ===================================== -Name Date Size Description -======================== ================== ============ ===================================== -`diffpy-1.0-r3067.exe`_ 2009-04-10 21.5 M Windows self extracting installer -`diffpy-1.0-r3067.tgz`_ 2009-04-10 6.4 M Linux and Mac tarball -======================== ================== ============ ===================================== - -.. _diffpy-1.0-r3067.exe: - https://github.com/diffpy/diffpy.pdfgui/releases/download/svn3067/diffpy-1.0-r3067.exe -.. _diffpy-1.0-r3067.tgz: - https://github.com/diffpy/diffpy.pdfgui/releases/download/svn3067/diffpy-1.0-r3067.tgz - -MD5 check sums for these installer files are available -`here `__. - -.. toctree:: - :hidden: - - pdfguilicense diff --git a/products/pdfguilicense.rst b/products/pdfguilicense.rst deleted file mode 100644 index a2fae790..00000000 --- a/products/pdfguilicense.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. this page only contains the LICENSE text for PDFgui - -.. title:: PDFgui License - -.. literalinclude:: PDFgui_LICENSE.txt - :language: text diff --git a/products/pythonpackages.rst b/products/pythonpackages.rst deleted file mode 100644 index 4ae79236..00000000 --- a/products/pythonpackages.rst +++ /dev/null @@ -1,32 +0,0 @@ -Python Packages -=============== - -This is a complete list of all Python packages developed by the DiffPy -team. For more information about a specific package, follow the link to -the corresponding documentation page. - -.. list-table:: - :widths: 2 8 - :header-rows: 1 - :class: wrap-text - - * - Module - - Description - * - `diffpy.srfit `_ - - Setup and control of general fitting problems. - * - `diffpy.srmise `_ - - Python tool for peak extraction and peak fitting of atomic pair distribution functions. - * - `diffpy.srreal `_ - - Python library for calculation of pair-based quantities such as the pair distribution function (PDF), bond lengths, and bond valence sums. - * - `diffpy.structure `_ - - Handles storage of crystal structure data. - * - `diffpy.utils `_ - - General purpose shared utilities for the diffpy libraries. - * - `pyobjcryst `_ - - Python bindings to the ObjCryst++ Object-Oriented Crystallographic Library. - * - `diffpy.pdffit2 `_ - - Atomic structure refinement and PDF fitting (this is the computational engine used by PDFgui). - * - `diffpy.mpdf `_ - - Tools for calculating and refining magnetic PDFs. - -.. include:: ../abbreviations.txt diff --git a/products/utils.rst b/products/utils.rst deleted file mode 100644 index 069bb83f..00000000 --- a/products/utils.rst +++ /dev/null @@ -1,121 +0,0 @@ -############ -diffpy.utils -############ - -.. include:: ../abbreviations.txt - -General utilities for analyzing diffraction data - -The diffpy.utils package provides a number of functions and classes designed to help -researchers analyze their diffraction data. It also includes some functionality for -carrying out PDF analysis. Examples are parsers for reading common format diffraction -data files, ``DiffractionObjects`` that allow you to do algebra on diffraction patterns, -tools for better capture and propagation of metadata, -diffraction-friendly interpolation routines, as well as some other tools used across -diffpy libraries. - -Citation --------- - -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: - - P. Juhás, C. L. Farrow, X. Yang, K. R. Knox and S. J. L. Billinge, - `Complex modeling: a strategy and software program for combining - multiple information sources to solve ill posed structure and - nanostructure inverse problems - `__, - *Acta Crystallogr. A* **71**, 562-568 (2015). - -Documentation -------------- - -Documentation may be found at, https://diffpy.github.io/diffpy.utils - -Installation ------------- - -The preferred method is to use `Miniconda Python -`_ -and install from the "conda-forge" channel of Conda packages. - -To add "conda-forge" to the conda channels, run the following in a terminal. :: - - conda config --add channels conda-forge - -We want to install our packages in a suitable conda environment. -The following creates and activates a new environment named ``diffpy.utils_env`` :: - - conda create -n diffpy.utils_env diffpy.utils - conda activate diffpy.utils_env - -To confirm that the installation was successful, type :: - - python -c "import diffpy.utils; print(diffpy.utils.__version__)" - -The output should print the latest version displayed on the badges above. - -If the above does not work, you can use ``pip`` to download and install the latest release from -`Python Package Index `_. -To install using ``pip`` into your ``diffpy.utils_env`` environment, type :: - - pip install diffpy.utils - -If you prefer to install from sources, after installing the dependencies, obtain the source archive from -`GitHub `_. Once installed, ``cd`` into your ``diffpy.utils`` directory -and run the following :: - - pip install . - -Getting Started ---------------- - -You may consult our `online documentation `_ for tutorials and API references. - -Support and Contribute ----------------------- - -`Diffpy user group `_ is the discussion forum for general questions and discussions about the use of diffpy.utils. Please join the diffpy.utils users community by joining the Google group. The diffpy.utils 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.utils -in a development mode, with its sources being directly used by Python -rather than copied to a package directory, use the following in the root -directory :: - - pip install -e . - -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.utils please visit the project `web-page `_ or email Simon Billinge at sb2896@columbia.edu. - - -What next? -============ - -Explore the diffpy.utils -`tutorials `_! - -.. toctree:: - :hidden: - - Utilslicense diff --git a/products/xPDFsuite.rst b/products/xPDFsuite.rst deleted file mode 100644 index 745dc90b..00000000 --- a/products/xPDFsuite.rst +++ /dev/null @@ -1,58 +0,0 @@ -########## -xPDFsuite -########## - -An easy to use end-to-end software solution for atomic pair distribution function analysis with x-rays. - -.. include:: ../abbreviations.txt -.. figure:: ../images/xPDFsuite.png - :align: center - -Overview -======== - -This suite of algorithms and software, named xPDFsuite, is an easy to use graphical user interface (GUI) to a number of Diffpy programs. -It provides a raw-data-to-modelled-PDF solution for X-ray PDFs. It is specially convenient for handling high throughput data with many -(hundreds to thousands) of datatsets, such as come from modern synchrotron experiments with 2D detectors. It is equally useful for data -from laboratory x-rays. The software runs on laptops and workstations running windows, mac OSX and linux. - -Within the same GUI you can: - * visualize the 2D raw data from large numbers of files - * integrate 2D data to 1D diffraction patterns - * plot and manipulate plots of large numbers of patterns - * rapidly and easily process the 1D data to obtain S(Q), F(Q) and G(r) (PDF) functions using the power of the PDFgetX3 engine - * use the powerful interactive plotting capabilities to explore these reduced data functions - * use built in tools for comparing datasets using Pearson correlations etc. - * the widely used PDFgui PDF fitting program is also included in xPDFsuite and is straightforwardly incorporated into your workflow - -Features -======== - -xPDFsuite is exceptionally easy to learn and use and lowers the barrier to using atomic pair distribution function (PDF) methods, -increasing the range of people who can use it, decreasing training costs, and speeding up workflow. xPDFsuite permits users to run -multiple data sets using the same input file, allowing for batch processing of large numbers of datasets in fractions of a second. - -Key features: - * Full featured, easy-to-use GUI - * Real time PDF transformation and plotting - * Flexible plotting and analysis for single and mulitple data sets - * Optimized for high throughput data processing - * 2D powder diffraction image integration - * Static and dynamic mask editing on 2D image - * Pearson correlation analysis on selected data-sets - * Written in Python and on Windows, Linux, and MacOSX - -Explore xPDFsuite -================= -xPDFsuite is available for purchase for either academic or commercial applications. - * To help you explore xPDFsuite on your own data we have made a free evaluation version of the software available at |CTV_link|_. This has all the xPDFsuite functionality, but you will not be able to save your results. - * To purchase xPDFsuite (separate academic and commercial license options), please go to |CTV_link|_. - -.. |CTV_link| replace:: Columbia Technology Ventures -.. _CTV_link: ctv-xpdfsuite_ - -**Thank you for purchasing xPDFsuite. Funds we raise from sales help us to develop user interfaces and useful features on top of our -free for academics and open source Diffpy products, such as diffpy.cmi, diffpy.pdfgui, and PDFgetX3.** - -**We hope you enjoy xPDFsuite and that it supercharges your PDF analyses.** Please contact us with feedback and questions by -emailing `Prof. Simon Billinge `_ diff --git a/products/xinterpdf.rst b/products/xinterpdf.rst deleted file mode 100644 index fc67dea7..00000000 --- a/products/xinterpdf.rst +++ /dev/null @@ -1,99 +0,0 @@ -######### -xINTERPDF -######### - -xINTERPDF is a Python GUI program for analyzing X-ray pair distribution -function (PDF) data of organic compounds collected at synchrotron and/or -laboratory X-ray sources. It uses |diffpycmi| as a backend for simulation -of PDFs. - -Currently it supports: - -* The study of intermolecular interaction (e.g. hydrogen bonds) by - subtracting out the scattering signal(s) of single molecule(s) in real - space. -* The PDF model fit of the crystalline organic compound using the method - proposed by Prill *et al*. (`J. Appl. Crystallogr., 48, 171-178, 2015 - `__). -* The phase quantification of physical mixtures of organics. -* Generate Score/Scree plots based on Principle Component Analysis (PCA). - -A video demo about installation and usage is available at -https://www.youtube.com/watch?v=lAFZ5VYEH1g. The code for xINTERPDF -is hosted on `GitHub `__. - -.. figure:: ../images/xinterpdf.png - :align: center - -This is a first release of the program (v.0.1.0). Comments and -suggestions are welcome. Please send an email to Chenyang Shi at -cs3000@columbia.edu or post your questions to `diffpy-users`_ -Google Group. - -Getting Started -=============== - -The xINTERPDF package requires Python 2.7 and the following dependency packages: - -* ``NumPy`` - Numerical mathematics and fast array operations for Python -* ``SciPy`` - Scientific libraries for Python -* ``matplotlib`` - Python plotting library -* ``Scikit-Learn`` - Python machine learning library; its PCA module is called. -* ``diffpy.cmi`` - Versatile Python packages for simulation of atomic pair distribution functions -* ``Tkinter`` - Python default library for creation of graphical user interface - -See the :doc:`xINTERPDF license ` for terms and conditions of use. - -Installation ------------- - -xINTERPDF can be installed on Linux and Mac OS machines. The recommended -way to install this package is through conda. Please visit -|anaconda-download|, and select Python 2.7 version -to download and install. Once conda is installed, you can follow the -steps below to install xINTERPDF. - -*Step 1: Add the diffpy conda channel to your conda configuration.* :: - - conda config --add channels diffpy - -*Step 2: Create a virtural environment and install the program there.* :: - - conda create –c curieshicy –n xinterpdf xinterpdf - -This command first adds a *curieshicy* channel, then creates a virtual -environment *xinterpdf*, before finally install the *xinterpdf* program. -Note that you can name the environment anything you choose by passing it -a different name after the *-n* flag in the command. - -*Step 3: Activate the virtual environment and start the program.* :: - - source activate xinterpdf - xinterpdf - -The first command starts the virtual environment and the second invokes -the main GUI window of the xINTERPDF program. - -User Guide ----------- - -Please see `user manual <../doc/xinterpdf/xINTERPDF_User_Guide_20180615.pdf>`__ -for more details. - -References ----------- - -If you use this software in a research work which leads to publication, -we ask you to acknowledge the use of xINTERPDF by citing the following -papers: - -* |citeShiJac18| -* |citeJuhasAca15| - - -.. include:: ../abbreviations.txt - -.. toctree:: - :hidden: - - xinterpdflicense diff --git a/products/xinterpdflicense.rst b/products/xinterpdflicense.rst deleted file mode 100644 index a87b07c5..00000000 --- a/products/xinterpdflicense.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. this page only contains the LICENSE text for xINTERPDF - -.. title:: xINTERPDF License - -.. literalinclude:: xinterpdflicense.txt - :language: text diff --git a/products/xinterpdflicense.txt b/products/xinterpdflicense.txt deleted file mode 100644 index ac280b3d..00000000 --- a/products/xinterpdflicense.txt +++ /dev/null @@ -1,60 +0,0 @@ -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 papers in your publication: - - * Chenyang Shi, "xINTERPDF: a graphical use interface for - analyzing intermolecular pair distribution functions of - organic compounds from X-ray total scattering data", - J. Appl. Crystallogr. 51, 1498-1499 (2018). - - * Pavol Juhás, Christopher L. Farrow, Xiaohao Yang, Kevin R. Knox, - and Simon J. L. Billinge, "Complex modeling: a strategy and software - program for combining multiple information sources to solve ill posed - structure and nanostructure inverse problems", - Acta Crystallogr. A, 71, 562-568, 2015. - -Copyright (c) 2009-2011, University of Tennessee -Copyright (c) 1989, 1991 Free Software Foundation, Inc. -Copyright (c) 2014, Australian Synchrotron Research Program Inc., ("ASRP") -Copyright (c) 2006-2007, Board of Trustees of Michigan State University -Copyright (c) 2008-2012, The Trustees of Columbia University in the City - of New York -Copyright (c) 2014-2016, Brookhaven Science Associates, Brookhaven National - Laboratory -Copyright (c) 2014-2018, AbbVie Inc. - -For more information please visit the diffpy web-page at - http://www.diffpy.org -or email Chenyang Shi at cs3000@columbia.edu, or 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: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * 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. - - * 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 COPYRIGHT HOLDER "AS IS". COPYRIGHT -HOLDER EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, -EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR -SUITABILITY FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM -FROM INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, -TRADE SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT -SHALL COPYRIGHT HOLDER BE LIABLE TO ANY PARTY 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 OR RELATING TO -THIS AGREEMENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/publications.rst b/publications.rst deleted file mode 100644 index 66895414..00000000 --- a/publications.rst +++ /dev/null @@ -1,39 +0,0 @@ -.. include:: abbreviations.txt - -References -========== - -The following publications describe DiffPy software packages. -Please cite the appropriate papers if you use these tools in your research. -For other DiffPy packages not listed here, please refer to the respective -`GitHub repository `_ for any relevant publications to cite. - -**diffpy.cmi** - -|citeJuhasAca15| - -**diffpy.pdfgui, diffpy.pdffit2** - -|citeFarrowJpcm07| - -**PDFgetX3, PDFgetN3** - -|citeJuhasJac13| - -|citeJuhasJac18| - -**diffpy.srmise** - -|citeGranlundAca15| - -**PDFfit** - -|citeProffenJac99| - -**sasPDF** - -|citeLiuJac20| - -**xINTERPDF** - -|citeShiJac18| diff --git a/pybin/download_index.py b/pybin/download_index.py new file mode 100644 index 00000000..c5133c01 --- /dev/null +++ b/pybin/download_index.py @@ -0,0 +1,96 @@ +import os +import re +import time + +# Constants + +_thisdir = os.path.dirname(os.path.abspath(__file__)) +_diffpydir = os.path.dirname(_thisdir) +_statsfile = os.path.join(_diffpydir, 'stats.txt') + + +def _getDownloadList(drel): + """Obtain data needed for creating download table for a directory. + + drel -- directory path relative to _diffpydir + + Return dictionary with items + ('mtime', 'name', 'dcount', 'fmtsize', 'size', 'fmtmtime') + """ + downloaddir = os.path.join(_diffpydir, drel) + ignore = re.compile(r'^[.]|stats.txt') + lst = [] + for f in os.listdir(downloaddir): + relpath = os.path.join(drel, f) + fullpath = os.path.join(downloaddir, f) + if not os.path.isfile(fullpath) or ignore.match(f): continue + lst.append({ + 'name' : f, + 'relpath' : relpath, + 'fullpath' : fullpath, + 'mtime' : os.path.getmtime(fullpath), + 'size' : os.path.getsize(fullpath), + }) + # reverse sort by mtime then by name + lsort = [(-d['mtime'], d['name'], d) for d in lst] + lsort.sort() + lst = [ tpl[-1] for tpl in lsort ] + # add the dcount field + dcount = {} + if os.path.isfile(_statsfile): + for line in open(_statsfile): + w = line.lstrip('/').split() + if len(w) != 2: continue + dcount[w[0]] = int(w[1]) + for d in lst: + d['dcount'] = dcount.get(d['relpath'], 0) + # add fmtsize and fmtmtime fields + from pathutils import formatbytes + for d in lst: + d['fmtsize'] = formatbytes(d['size'], + bytename='', kiloname='K', meganame='M') + d['fmtmtime'] = time.strftime('%Y-%m-%d %H:%M', + time.localtime(d['mtime']) ) + return lst + + +def _getNameWidth(lst): + width = max([len(d['name']) for d in lst] + [0]) + width = 4 * (width/4 + 1) + return width + + +def _getDownloadHTMLCode(drel): + lst = _getDownloadList(drel) + nw = _getNameWidth(lst) + fmt = "%-@NWs%-20s%-8s%s".replace('@NW', str(nw)) + header = ("
" + fmt + '
') % \ + ('Name', 'Date', 'Size', 'Downloads') + bodylines = [] + for d in lst: + anchor = '%(name)s' % d + anchor += (nw - len(d['name'])) * " " + bline = fmt % (anchor, d['fmtmtime'], d['fmtsize'], d['dcount']) + bodylines.append(bline) + footer = '
' + code = header + "\n".join(bodylines) + footer + return code + + +# Published items + +def index(req): + return download(req) + +def download(req): + return _getDownloadHTMLCode('download') + +def packages(req): + return _getDownloadHTMLCode('packages') + + +#
Name                    Last modified      Size  Description
diffpy-1.0b.1232.tgz 14-May-2007 21:00 6.9M +# diffpy-1.0b.1232.exe 14-May-2007 21:00 20M +# diffpy-1.0b.1218.tgz 07-May-2007 11:00 7.3M +# diffpy-1.0b.1218.exe 07-May-2007 11:00 20M +#
diff --git a/pybin/pathutils.py b/pybin/pathutils.py new file mode 100644 index 00000000..85a7268d --- /dev/null +++ b/pybin/pathutils.py @@ -0,0 +1,644 @@ +# 2005/12/06 +# Version 0.2.5 +# pathutils.py +# Functions useful for working with files and paths. +# http://www.voidspace.org.uk/python/recipebook.shtml#utils + +# Copyright Michael Foord 2004 +# Released subject to the BSD License +# Please see http://www.voidspace.org.uk/python/license.shtml + +# For information about bugfixes, updates and support, please join the Pythonutils mailing list. +# http://groups.google.com/group/pythonutils/ +# Comments, suggestions and bug reports welcome. +# Scripts maintained at http://www.voidspace.org.uk/python/index.shtml +# E-mail fuzzyman@voidspace.org.uk + +""" +This module contains convenience functions for working with files and paths. +""" + +from __future__ import generators +import os +import sys +import time + +__version__ = '0.2.5' + +__all__ = ( + 'readlines', + 'writelines', + 'readbinary', + 'writebinary', + 'readfile', + 'writefile', + 'tslash', + 'relpath', + 'splitall', + 'walkfiles', + 'walkdirs', + 'walkemptydirs', + 'formatbytes', + 'fullcopy', + 'import_path', + 'onerror', + 'get_main_dir', + 'main_is_frozen', + 'Lock', + 'LockError', + 'LockFile', + '__version__', + ) + +###################################### +# Functions to read and write files in text and binary mode. + +def readlines(filename): + """Passed a filename, it reads it, and returns a list of lines. (Read in text mode)""" + filehandle = open(filename, 'r') + outfile = filehandle.readlines() + filehandle.close() + return outfile + +def writelines(filename, infile, newline=False): + """ + Given a filename and a list of lines it writes the file. (In text mode) + + If ``newline`` is ``True`` (default is ``False``) it adds a newline to each + line. + """ + filehandle = open(filename, 'w') + if newline: + infile = [line + '\n' for line in infile] + filehandle.writelines(infile) + filehandle.close() + +def readbinary(filename): + """Given a filename, read a file in binary mode. It returns a single string.""" + filehandle = open(filename, 'rb') + thisfile = filehandle.read() + filehandle.close() + return thisfile + +def writebinary(filename, infile): + """Given a filename and a string, write the file in binary mode. """ + filehandle = open(filename, 'wb') + filehandle.write(infile) + filehandle.close() + +def readfile(filename): + """Given a filename, read a file in text mode. It returns a single string.""" + filehandle = open(filename, 'r') + outfile = filehandle.read() + filehandle.close() + return outfile + +def writefile(filename, infile): + """Given a filename and a string, write the file in text mode.""" + filehandle = open(filename, 'w') + filehandle.write(infile) + filehandle.close() + +#################################################################### +# Some functions for dealing with paths + +def tslash(apath): + """ + Add a trailing slash (``/``) to a path if it lacks one. + + It doesn't use ``os.sep`` because you end up in trouble on windoze, when you + want separators for URLs. + """ + if apath and apath != '.' and not apath.endswith('/') and not apath.endswith('\\'): + return apath + '/' + else: + return apath + +def relpath(origin, dest): + """ + Return the relative path between origin and dest. + + If it's not possible return dest. + + + If they are identical return ``os.curdir`` + + Adapted from `path.py `_ by Jason Orendorff. + """ + origin = os.path.abspath(origin).replace('\\', '/') + dest = os.path.abspath(dest).replace('\\', '/') + # + orig_list = splitall(os.path.normcase(origin)) + # Don't normcase dest! We want to preserve the case. + dest_list = splitall(dest) + # + if orig_list[0] != os.path.normcase(dest_list[0]): + # Can't get here from there. + return dest + # + # Find the location where the two paths start to differ. + i = 0 + for start_seg, dest_seg in zip(orig_list, dest_list): + if start_seg != os.path.normcase(dest_seg): + break + i += 1 + # + # Now i is the point where the two paths diverge. + # Need a certain number of "os.pardir"s to work up + # from the origin to the point of divergence. + segments = [os.pardir] * (len(orig_list) - i) + # Need to add the diverging part of dest_list. + segments += dest_list[i:] + if len(segments) == 0: + # If they happen to be identical, use os.curdir. + return os.curdir + else: + return os.path.join(*segments).replace('\\', '/') + +def splitall(loc): + """ + Return a list of the path components in loc. (Used by relpath_). + + The first item in the list will be either ``os.curdir``, ``os.pardir``, empty, + or the root directory of loc (for example, ``/`` or ``C:\\). + + The other items in the list will be strings. + + Adapted from *path.py* by Jason Orendorff. + """ + parts = [] + while loc != os.curdir and loc != os.pardir: + prev = loc + loc, child = os.path.split(prev) + if loc == prev: + break + parts.append(child) + parts.append(loc) + parts.reverse() + return parts + +####################################################################### +# a pre 2.3 walkfiles function - adapted from the path module by Jason Orendorff + +join = os.path.join +isdir = os.path.isdir +isfile = os.path.isfile + +def walkfiles(thisdir): + """ + walkfiles(D) -> iterator over files in D, recursively. Yields full file paths. + + Adapted from path.py by Jason Orendorff. + """ + for child in os.listdir(thisdir): + thischild = join(thisdir, child) + if isfile(thischild): + yield thischild + elif isdir(thischild): + for f in walkfiles(thischild): + yield f + +def walkdirs(thisdir): + """ + Walk through all the subdirectories in a tree. Recursively yields directory + names (full paths). + """ + for child in os.listdir(thisdir): + thischild = join(thisdir, child) + if isfile(thischild): + continue + elif isdir(thischild): + for f in walkdirs(thischild): + yield f + yield thischild + +def walkemptydirs(thisdir): + """ + Recursively yield names of *empty* directories. + + These are the only paths omitted when using ``walkfiles``. + """ + if not os.listdir(thisdir): + # if the directory is empty.. then yield it + yield thisdir + for child in os.listdir(thisdir): + thischild = join(thisdir, child) + if isdir(thischild): + for emptydir in walkemptydirs(thischild): + yield emptydir + +############################################################### +# formatbytes takes a filesize (as returned by os.getsize() ) +# and formats it for display in one of two ways !! + +def formatbytes(sizeint, configdict=None, **configs): + """ + Given a file size as an integer, return a nicely formatted string that + represents the size. Has various options to control it's output. + + You can pass in a dictionary of arguments or keyword arguments. Keyword + arguments override the dictionary and there are sensible defaults for options + you don't set. + + Options and defaults are as follows : + + * ``forcekb = False`` - If set this forces the output to be in terms + of kilobytes and bytes only. + + * ``largestonly = True`` - If set, instead of outputting + ``1 Mbytes, 307 Kbytes, 478 bytes`` it outputs using only the largest + denominator - e.g. ``1.3 Mbytes`` or ``17.2 Kbytes`` + + * ``kiloname = 'Kbytes'`` - The string to use for kilobytes + + * ``meganame = 'Mbytes'`` - The string to use for Megabytes + + * ``bytename = 'bytes'`` - The string to use for bytes + + * ``nospace = True`` - If set it outputs ``1Mbytes, 307Kbytes``, + notice there is no space. + + Example outputs : :: + + 19Mbytes, 75Kbytes, 255bytes + 2Kbytes, 0bytes + 23.8Mbytes + + .. note:: + + It currently uses the plural form even for singular. + """ + defaultconfigs = { 'forcekb' : False, + 'largestonly' : True, + 'kiloname' : 'Kbytes', + 'meganame' : 'Mbytes', + 'bytename' : 'bytes', + 'nospace' : True} + if configdict is None: + configdict = {} + for entry in configs: + # keyword parameters override the dictionary passed in + configdict[entry] = configs[entry] + # + for keyword in defaultconfigs: + if not configdict.has_key(keyword): + configdict[keyword] = defaultconfigs[keyword] + # + if configdict['nospace']: + space = '' + else: + space = ' ' + # + mb, kb, rb = bytedivider(sizeint) + if configdict['largestonly']: + if mb and not configdict['forcekb']: + return stringround(mb, kb)+ space + configdict['meganame'] + elif kb or configdict['forcekb']: + if mb and configdict['forcekb']: + kb += 1024*mb + return stringround(kb, rb) + space+ configdict['kiloname'] + else: + return str(rb) + space + configdict['bytename'] + else: + outstr = '' + if mb and not configdict['forcekb']: + outstr = str(mb) + space + configdict['meganame'] +', ' + if kb or configdict['forcekb'] or mb: + if configdict['forcekb']: + kb += 1024*mb + outstr += str(kb) + space + configdict['kiloname'] +', ' + return outstr + str(rb) + space + configdict['bytename'] + +def stringround(main, rest): + """ + Given a file size in either (mb, kb) or (kb, bytes) - round it + appropriately. + """ + # divide an int by a float... get a float + value = main + rest/1024.0 + return str(round(value, 1)) + +def bytedivider(nbytes): + """ + Given an integer (probably a long integer returned by os.getsize() ) + it returns a tuple of (megabytes, kilobytes, bytes). + + This can be more easily converted into a formatted string to display the + size of the file. + """ + mb, remainder = divmod(nbytes, 1048576) + kb, rb = divmod(remainder, 1024) + return (mb, kb, rb) + +######################################## + +def fullcopy(src, dst): + """ + Copy file from src to dst. + + If the dst directory doesn't exist, we will attempt to create it using makedirs. + """ + import shutil + if not os.path.isdir(os.path.dirname(dst)): + os.makedirs(os.path.dirname(dst)) + shutil.copy(src, dst) + +####################################### + +def import_path(fullpath, strict=True): + """ + Import a file from the full path. Allows you to import from anywhere, + something ``__import__`` does not do. + + If strict is ``True`` (the default), raise an ``ImportError`` if the module + is found in the "wrong" directory. + + Taken from firedrop2_ by `Hans Nowak`_ + + .. _firedrop2: http://www.voidspace.org.uk/python/firedrop2/ + .. _Hans Nowak: http://zephyrfalcon.org + """ + path, filename = os.path.split(fullpath) + filename, ext = os.path.splitext(filename) + sys.path.insert(0, path) + try: + module = __import__(filename) + except ImportError: + del sys.path[0] + raise + del sys.path[0] + # + if strict: + path = os.path.split(module.__file__)[0] + # FIXME: doesn't *startswith* allow room for errors ? + if not fullpath.startswith(path): + raise ImportError, "Module '%s' found, but not in '%s'" % ( + filename, fullpath) + # + return module + +############################################################################## +# These functions get us our directory name +# Even if py2exe or another freeze tool has been used + +def main_is_frozen(): + """Return ``True`` if we're running from a frozen program.""" + import imp + return ( + # new py2exe + hasattr(sys, "frozen") or + # tools/freeze + imp.is_frozen("__main__")) + +def get_main_dir(): + """Return the script directory - whether we're frozen or not.""" + if main_is_frozen(): + return os.path.abspath(os.path.dirname(sys.executable)) + return os.path.abspath(os.path.dirname(sys.argv[0])) + +############################## + +def onerror(func, path, exc_info): + """ + Error handler for ``shutil.rmtree``. + + If the error is due to an access error (read only file) + it attempts to add write permission and then retries. + + If the error is for another reason it re-raises the error. + + Usage : ``shutil.rmtree(path, onerror=onerror)`` + """ + import stat + if not os.access(path, os.W_OK): + # Is the error an access error ? + os.chmod(path, stat.S_IWUSR) + func(path) + else: + raise + +########################################################## +# A set of object for providing simple, cross-platform file locking + +class LockError(IOError): + """The generic error for locking - it is a subclass of ``IOError``.""" + +class Lock(object): + """A simple file lock, compatible with windows and Unixes.""" + + def __init__(self, filename, timeout=5, step=0.1): + """ + Create a ``Lock`` object on file ``filename`` + + ``timeout`` is the time in seconds to wait before timing out, when + attempting to acquire the lock. + + ``step`` is the number of seconds to wait in between each attempt to + acquire the lock. + + """ + self.timeout = timeout + self.step = step + self.filename = filename + self.locked = False + + def lock(self, force=True): + """ + Lock the file for access by creating a directory of the same name (plus + a trailing underscore). + + The file is only locked if you use this class to acquire the lock + before accessing. + + If ``force`` is ``True`` (the default), then on timeout we forcibly + acquire the lock. + + If ``force`` is ``False``, then on timeout a ``LockError`` is raised. + """ + if self.locked: + raise LockError('%s is already locked' % self.filename) + t = 0 + name = self._mungedname() + while t < self.timeout: + t += self.step + try: + if os.apth.isdir(name): + raise os.error + else: + os.mkdir() + except os.error, err: + time.sleep(self.step) + else: + self.locked = True + return + if force: + self.locked = True + else: + raise LockError('Failed to acquire lock on %s' % self.filename) + + def unlock(self, ignore=True): + """ + Release the lock. + + If ``ignore`` is ``True`` and removing the lock directory fails, then + the error is surpressed. (This may happen if the lock was acquired + via a timeout.) + """ + if not self.locked: + raise LockError('%s is not locked' % self.filename) + self.locked = False + try: + os.rmdir(self._mungedname()) + except os.error, err: + if not ignore: + raise LockError('unlocking appeared to fail - %s' % + self.filename) + + def _mungedname(self): + """ + Override this in a subclass if you want to change the way ``Lock`` + creates the directory name. + """ + return self.filename + '_' + + def __del__(self): + """Auto unlock when object is deleted.""" + if self.locked: + self.unlock() + +class LockFile(Lock): + """ + A file like object with an exclusive lock, whilst it is open. + + The lock is provided by the ``Lock`` class, which creates a directory + with the same name as the file (plus a trailing underscore), to indicate + that the file is locked. + + This is simple and cross platform, with some limitations : + + * Unusual process termination could result in the directory + being left. + * The process acquiring the lock must have permission to create a + directory in the same location as the file. + * It only locks the file against other processes that attempt to + acquire a lock using ``LockFile`` or ``Lock``. + """ + + def __init__(self, filename, mode='r', bufsize=-1, timeout=5, step=0.1, + force=True): + """ + Create a file like object that is locked (using the ``Lock`` class) + until it is closed. + + The file is only locked against another process that attempts to + acquire a lock using ``Lock`` (or ``LockFile``). + + The lock is released automatically when the file is closed. + + The filename, mode and bufsize arguments have the same meaning as for + the built in function ``open``. + + The timeout and step arguments have the same meaning as for a ``Lock`` + object. + + The force argument has the same meaning as for the ``Lock.lock`` method. + + A ``LockFile`` object has all the normal ``file`` methods and + attributes. + """ + Lock.__init__(self, filename, timeout, step) + # may raise an error if lock is ``False`` + self.lock(force) + # may also raise an error + self._file = open(filename, mode, bufsize) + + def close(self, ignore=True): + """ + close the file and release the lock. + + ignore has the same meaning as for ``Lock.unlock`` + """ + self._file.close() + self.unlock(ignore) + + def __getattr__(self, name): + """delegate appropriate method/attribute calls to the file.""" + if name not in self.__dict__: + return getattr(self._file, name) + else: + return self.__dict__[self, name] + + def __setattr__(self, name, value): + """Only allow attribute setting that don't clash with the file.""" + if not '_file' in self.__dict__: + Lock.__setattr__(self, name, value) + elif hasattr(self._file, name): + return setattr(self._file, name, value) + else: + Lock.__setattr__(self, name, value) + + def __del__(self): + """Auto unlock (and close file) when object is deleted.""" + if self.locked: + self.unlock() + self._file.close() + +""" + +Changelog +========= + +2006/07/22 Version 0.2.5 +----------------------------- + +Bugfix for Python 2.5 compatibility. + +2005/12/06 Version 0.2.4 +----------------------------- + +Fixed bug in ``onerror``. (Missing stat import) + + +2005/11/26 Version 0.2.3 +----------------------------- + +Added ``Lock``, ``LockError``, and ``LockFile`` + +Added ``__version__`` + + +2005/11/13 Version 0.2.2 +----------------------------- + +Added the py2exe support functions. + +Added ``onerror``. + + +2005/08/28 Version 0.2.1 +----------------------------- + +* Added ``import_path`` +* Added ``__all__`` +* Code cleanup + + +2005/06/01 Version 0.2.0 +----------------------------- + +Added ``walkdirs`` generator. + + +2005/03/11 Version 0.1.1 +----------------------------- + +Added rounding to ``formatbytes`` and improved ``bytedivider`` with ``divmod``. + +Now explicit keyword parameters override the ``configdict`` in ``formatbytes``. + + +2005/02/18 Version 0.1.0 +----------------------------- + +The first numbered version. +""" diff --git a/pybin/postbugreport.py b/pybin/postbugreport.py new file mode 100644 index 00000000..f601f74a --- /dev/null +++ b/pybin/postbugreport.py @@ -0,0 +1,67 @@ +#!/usr/bin/python + +_BUGSENDER = "diffpy@diffpy.org" +_BUGEMAIL = "diffpy-dev@googlegroups.com" +_SMTP_SERVER = "localhost" + +_MSG = """\ +From: %(bugsender)s +Subject: [%(component)s bug] %(summary)s +To: %(bugemail)s + +reporter: %(reporter)s + +summary: %(summary)s + +description: %(description)s + +component: %(component)s + +version: %(version)s + +traceback: %(traceback)s +""" + +def email(req, **kwargs): + """Process bugreport form and submit it to _BUGEMAIL address. + """ + # process form arguments + flds = { + # hidden data entries + 'bugemail' : _BUGEMAIL, + 'bugsender' : _BUGSENDER, + # entries from the form + 'reporter' : 'anonymous', + 'summary' : '', + 'description' : '', + 'component' : '', + 'version' : '', + 'traceback' : '' + } + flds.update(kwargs) + # check required fields + required_fields = ('summary', 'description') + missing_fields = [f for f in required_fields if not flds.get(f)] + if missing_fields: + emsg = "\n".join([ + "Required fields(s) missing: %s." % ", ".join(missing_fields), + "Please go back and correct the error" + ]) + "\n" + return emsg + # build email message + msg = _MSG % flds + # send it out + import smtplib + conn = smtplib.SMTP(_SMTP_SERVER) + conn.sendmail(flds['bugsender'], [flds['bugemail']], msg) + conn.quit() + # show message that was sent: + out = "\n".join([ + "", + "

Bugreport emailed to %s" % flds['bugemail'], + "

", + "
" + msg + "
" + ]) + "\n" + return out + +# End of file diff --git a/requirements/docs.txt b/requirements/docs.txt deleted file mode 100644 index 871537c0..00000000 --- a/requirements/docs.txt +++ /dev/null @@ -1,5 +0,0 @@ -sphinx -sphinx_rtd_theme -doctr -m2r -make diff --git a/static_root/doc/diffpy-cmi/Juhas-aca-2015.pdf b/static_root/doc/diffpy-cmi/Juhas-aca-2015.pdf deleted file mode 100644 index 4439af32..00000000 Binary files a/static_root/doc/diffpy-cmi/Juhas-aca-2015.pdf and /dev/null differ diff --git a/static_root/doc/libdiffpy/index.html b/static_root/doc/libdiffpy/index.html deleted file mode 100644 index 208cd3b3..00000000 --- a/static_root/doc/libdiffpy/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - -Page Redirection - - -If you are not redirected automatically, follow the link diff --git a/static_root/doc/pdffit/Proffen-jac-1999.pdf b/static_root/doc/pdffit/Proffen-jac-1999.pdf deleted file mode 100644 index 3ed34895..00000000 Binary files a/static_root/doc/pdffit/Proffen-jac-1999.pdf and /dev/null differ diff --git a/static_root/doc/pdffit/pdf_cmd.pdf b/static_root/doc/pdffit/pdf_cmd.pdf deleted file mode 100644 index b1a0d6be..00000000 Binary files a/static_root/doc/pdffit/pdf_cmd.pdf and /dev/null differ diff --git a/static_root/doc/pdffit/pdf_man.pdf b/static_root/doc/pdffit/pdf_man.pdf deleted file mode 100644 index 076d79b5..00000000 Binary files a/static_root/doc/pdffit/pdf_man.pdf and /dev/null differ diff --git a/static_root/doc/pdffit2/api-objects.txt b/static_root/doc/pdffit2/api-objects.txt deleted file mode 100644 index 1149cfbd..00000000 --- a/static_root/doc/pdffit2/api-objects.txt +++ /dev/null @@ -1,482 +0,0 @@ -diffpy.pdffit2 diffpy.pdffit2-module.html -diffpy.pdffit2.__package__ diffpy.pdffit2-module.html#__package__ -diffpy.pdffit2.test diffpy.pdffit2-module.html#test -diffpy.pdffit2.ipy_ext diffpy.pdffit2.ipy_ext-module.html -diffpy.pdffit2.ipy_ext.load_ipython_extension diffpy.pdffit2.ipy_ext-module.html#load_ipython_extension -diffpy.pdffit2.ipy_ext.__package__ diffpy.pdffit2.ipy_ext-module.html#__package__ -diffpy.pdffit2.output diffpy.pdffit2.output-module.html -diffpy.pdffit2.output.redirect_stdout diffpy.pdffit2.output-module.html#redirect_stdout -diffpy.pdffit2.output.__package__ diffpy.pdffit2.output-module.html#__package__ -diffpy.pdffit2.pdffit diffpy.pdffit2.pdffit-module.html -diffpy.pdffit2.pdffit._format_bond_length diffpy.pdffit2.pdffit-module.html#_format_bond_length -diffpy.pdffit2.pdffit.__package__ diffpy.pdffit2.pdffit-module.html#__package__ -diffpy.pdffit2.pdffit._format_value_std diffpy.pdffit2.pdffit-module.html#_format_value_std -diffpy.pdffit2.pdffit.__intro_message__ diffpy.pdffit2.pdffit-module.html#__intro_message__ -diffpy.pdffit2.pdffit._convertCallable diffpy.pdffit2.pdffit-module.html#_convertCallable -diffpy.pdffit2.pdffit2 diffpy.pdffit2.pdffit2-module.html -diffpy.pdffit2.pdffit2.selectAll diffpy.pdffit2.pdffit2-module.html#selectAll -diffpy.pdffit2.pdffit2.num_datasets diffpy.pdffit2.pdffit2-module.html#num_datasets -diffpy.pdffit2.pdffit2.read_struct_string diffpy.pdffit2.pdffit2-module.html#read_struct_string -diffpy.pdffit2.pdffit2.selectAtomType diffpy.pdffit2.pdffit2-module.html#selectAtomType -diffpy.pdffit2.pdffit2.num_atoms diffpy.pdffit2.pdffit2-module.html#num_atoms -diffpy.pdffit2.pdffit2.redirect_stdout diffpy.pdffit2.pdffit2-module.html#redirect_stdout -diffpy.pdffit2.pdffit2.getcrw diffpy.pdffit2.pdffit2-module.html#getcrw -diffpy.pdffit2.pdffit2.rcut diffpy.pdffit2.pdffit2-module.html#rcut -diffpy.pdffit2.pdffit2.qbroad diffpy.pdffit2.pdffit2-module.html#qbroad -diffpy.pdffit2.pdffit2.getpdf_fit diffpy.pdffit2.pdffit2-module.html#getpdf_fit -diffpy.pdffit2.pdffit2.dscale diffpy.pdffit2.pdffit2-module.html#dscale -diffpy.pdffit2.pdffit2.refine diffpy.pdffit2.pdffit2-module.html#refine -diffpy.pdffit2.pdffit2.sratio diffpy.pdffit2.pdffit2-module.html#sratio -diffpy.pdffit2.pdffit2.getvar diffpy.pdffit2.pdffit2-module.html#getvar -diffpy.pdffit2.pdffit2.getR diffpy.pdffit2.pdffit2-module.html#getR -diffpy.pdffit2.pdffit2.save_pdf diffpy.pdffit2.pdffit2-module.html#save_pdf -diffpy.pdffit2.pdffit2.u33 diffpy.pdffit2.pdffit2-module.html#u33 -diffpy.pdffit2.pdffit2.setpar_dbl diffpy.pdffit2.pdffit2-module.html#setpar_dbl -diffpy.pdffit2.pdffit2.selectNone diffpy.pdffit2.pdffit2-module.html#selectNone -diffpy.pdffit2.pdffit2.copyright diffpy.pdffit2.pdffit2-module.html#copyright -diffpy.pdffit2.pdffit2.num_phases diffpy.pdffit2.pdffit2-module.html#num_phases -diffpy.pdffit2.pdffit2.create diffpy.pdffit2.pdffit2-module.html#create -diffpy.pdffit2.pdffit2.is_element diffpy.pdffit2.pdffit2-module.html#is_element -diffpy.pdffit2.pdffit2.set_scat diffpy.pdffit2.pdffit2-module.html#set_scat -diffpy.pdffit2.pdffit2.__package__ diffpy.pdffit2.pdffit2-module.html#__package__ -diffpy.pdffit2.pdffit2.save_res diffpy.pdffit2.pdffit2-module.html#save_res -diffpy.pdffit2.pdffit2.stepcut diffpy.pdffit2.pdffit2-module.html#stepcut -diffpy.pdffit2.pdffit2.read_struct diffpy.pdffit2.pdffit2-module.html#read_struct -diffpy.pdffit2.pdffit2.fixpar diffpy.pdffit2.pdffit2-module.html#fixpar -diffpy.pdffit2.pdffit2.read_data_arrays diffpy.pdffit2.pdffit2-module.html#read_data_arrays -diffpy.pdffit2.pdffit2.get_scat_string diffpy.pdffit2.pdffit2-module.html#get_scat_string -diffpy.pdffit2.pdffit2.constrain_str diffpy.pdffit2.pdffit2-module.html#constrain_str -diffpy.pdffit2.pdffit2.calc diffpy.pdffit2.pdffit2-module.html#calc -diffpy.pdffit2.pdffit2.setvar diffpy.pdffit2.pdffit2-module.html#setvar -diffpy.pdffit2.pdffit2.bond_length_atoms diffpy.pdffit2.pdffit2-module.html#bond_length_atoms -diffpy.pdffit2.pdffit2.delta1 diffpy.pdffit2.pdffit2-module.html#delta1 -diffpy.pdffit2.pdffit2.delta2 diffpy.pdffit2.pdffit2-module.html#delta2 -diffpy.pdffit2.pdffit2.reset_scat diffpy.pdffit2.pdffit2-module.html#reset_scat -diffpy.pdffit2.pdffit2.u22 diffpy.pdffit2.pdffit2-module.html#u22 -diffpy.pdffit2.pdffit2.getrw diffpy.pdffit2.pdffit2-module.html#getrw -diffpy.pdffit2.pdffit2.psel diffpy.pdffit2.pdffit2-module.html#psel -diffpy.pdffit2.pdffit2.getpar diffpy.pdffit2.pdffit2-module.html#getpar -diffpy.pdffit2.pdffit2.read_data diffpy.pdffit2.pdffit2-module.html#read_data -diffpy.pdffit2.pdffit2.get_atoms diffpy.pdffit2.pdffit2-module.html#get_atoms -diffpy.pdffit2.pdffit2.getpdf_diff diffpy.pdffit2.pdffit2-module.html#getpdf_diff -diffpy.pdffit2.pdffit2.u11 diffpy.pdffit2.pdffit2-module.html#u11 -diffpy.pdffit2.pdffit2.read_data_string diffpy.pdffit2.pdffit2-module.html#read_data_string -diffpy.pdffit2.pdffit2.get_atom_types diffpy.pdffit2.pdffit2-module.html#get_atom_types -diffpy.pdffit2.pdffit2.setpar_RV diffpy.pdffit2.pdffit2-module.html#setpar_RV -diffpy.pdffit2.pdffit2.qdamp diffpy.pdffit2.pdffit2-module.html#qdamp -diffpy.pdffit2.pdffit2.x diffpy.pdffit2.pdffit2-module.html#x -diffpy.pdffit2.pdffit2.lat diffpy.pdffit2.pdffit2-module.html#lat -diffpy.pdffit2.pdffit2.bond_angle diffpy.pdffit2.pdffit2-module.html#bond_angle -diffpy.pdffit2.pdffit2.spdiameter diffpy.pdffit2.pdffit2-module.html#spdiameter -diffpy.pdffit2.pdffit2.u13 diffpy.pdffit2.pdffit2-module.html#u13 -diffpy.pdffit2.pdffit2.z diffpy.pdffit2.pdffit2-module.html#z -diffpy.pdffit2.pdffit2.setdata diffpy.pdffit2.pdffit2-module.html#setdata -diffpy.pdffit2.pdffit2.reset diffpy.pdffit2.pdffit2-module.html#reset -diffpy.pdffit2.pdffit2.pscale diffpy.pdffit2.pdffit2-module.html#pscale -diffpy.pdffit2.pdffit2.alloc diffpy.pdffit2.pdffit2-module.html#alloc -diffpy.pdffit2.pdffit2.save_dif diffpy.pdffit2.pdffit2-module.html#save_dif -diffpy.pdffit2.pdffit2.constrain_int diffpy.pdffit2.pdffit2-module.html#constrain_int -diffpy.pdffit2.pdffit2.getpdf_obs diffpy.pdffit2.pdffit2-module.html#getpdf_obs -diffpy.pdffit2.pdffit2.bond_length_types diffpy.pdffit2.pdffit2-module.html#bond_length_types -diffpy.pdffit2.pdffit2.save_struct diffpy.pdffit2.pdffit2-module.html#save_struct -diffpy.pdffit2.pdffit2.pdesel diffpy.pdffit2.pdffit2-module.html#pdesel -diffpy.pdffit2.pdffit2.pdfrange diffpy.pdffit2.pdffit2-module.html#pdfrange -diffpy.pdffit2.pdffit2.selectAtomIndex diffpy.pdffit2.pdffit2-module.html#selectAtomIndex -diffpy.pdffit2.pdffit2.freepar diffpy.pdffit2.pdffit2-module.html#freepar -diffpy.pdffit2.pdffit2.phase_fractions diffpy.pdffit2.pdffit2-module.html#phase_fractions -diffpy.pdffit2.pdffit2.show_struct diffpy.pdffit2.pdffit2-module.html#show_struct -diffpy.pdffit2.pdffit2.u23 diffpy.pdffit2.pdffit2-module.html#u23 -diffpy.pdffit2.pdffit2.y diffpy.pdffit2.pdffit2-module.html#y -diffpy.pdffit2.pdffit2.u12 diffpy.pdffit2.pdffit2-module.html#u12 -diffpy.pdffit2.pdffit2.refine_step diffpy.pdffit2.pdffit2-module.html#refine_step -diffpy.pdffit2.pdffit2.occ diffpy.pdffit2.pdffit2-module.html#occ -diffpy.pdffit2.pdffit2.get_scat diffpy.pdffit2.pdffit2-module.html#get_scat -diffpy.pdffit2.pdffit2.setphase diffpy.pdffit2.pdffit2-module.html#setphase -diffpy.pdffit2.tests diffpy.pdffit2.tests-module.html -diffpy.pdffit2.tests.test diffpy.pdffit2.tests-module.html#test -diffpy.pdffit2.tests.testsuite diffpy.pdffit2.tests-module.html#testsuite -diffpy.pdffit2.tests.testdeps diffpy.pdffit2.tests-module.html#testdeps -diffpy.pdffit2.tests.__package__ diffpy.pdffit2.tests-module.html#__package__ -diffpy.pdffit2.tests.ExceptionsTest diffpy.pdffit2.tests.ExceptionsTest-module.html -diffpy.pdffit2.tests.ExceptionsTest.__package__ diffpy.pdffit2.tests.ExceptionsTest-module.html#__package__ -diffpy.pdffit2.tests.ExceptionsTest.datafile diffpy.pdffit2.tests.pdffit2testutils-module.html#datafile -diffpy.pdffit2.tests.TestPdfFit diffpy.pdffit2.tests.TestPdfFit-module.html -diffpy.pdffit2.tests.TestPdfFit.datafile diffpy.pdffit2.tests.pdffit2testutils-module.html#datafile -diffpy.pdffit2.tests.TestPdfFit.__package__ diffpy.pdffit2.tests.TestPdfFit-module.html#__package__ -diffpy.pdffit2.tests.TestPhaseFractions diffpy.pdffit2.tests.TestPhaseFractions-module.html -diffpy.pdffit2.tests.TestPhaseFractions.datafile diffpy.pdffit2.tests.pdffit2testutils-module.html#datafile -diffpy.pdffit2.tests.TestPhaseFractions.__package__ diffpy.pdffit2.tests.TestPhaseFractions-module.html#__package__ -diffpy.pdffit2.tests.TestShapeFactors diffpy.pdffit2.tests.TestShapeFactors-module.html -diffpy.pdffit2.tests.TestShapeFactors.datafile diffpy.pdffit2.tests.pdffit2testutils-module.html#datafile -diffpy.pdffit2.tests.TestShapeFactors.__package__ diffpy.pdffit2.tests.TestShapeFactors-module.html#__package__ -diffpy.pdffit2.tests.TestShapeFactors.spherefactor diffpy.pdffit2.tests.TestShapeFactors-module.html#spherefactor -diffpy.pdffit2.tests.pdffit2testutils diffpy.pdffit2.tests.pdffit2testutils-module.html -diffpy.pdffit2.tests.pdffit2testutils.datafile diffpy.pdffit2.tests.pdffit2testutils-module.html#datafile -diffpy.pdffit2.tests.pdffit2testutils.tests_dir diffpy.pdffit2.tests.pdffit2testutils-module.html#tests_dir -diffpy.pdffit2.tests.pdffit2testutils.__package__ diffpy.pdffit2.tests.pdffit2testutils-module.html#__package__ -diffpy.pdffit2.tests.pdffit2testutils.testdata_dir diffpy.pdffit2.tests.pdffit2testutils-module.html#testdata_dir -diffpy.pdffit2.tests.pdffit2testutils.thisfile diffpy.pdffit2.tests.pdffit2testutils-module.html#thisfile -diffpy.pdffit2.tests.run diffpy.pdffit2.tests.run-module.html -diffpy.pdffit2.tests.run.__package__ diffpy.pdffit2.tests.run-module.html#__package__ -diffpy.pdffit2.tests.rundeps diffpy.pdffit2.tests.rundeps-module.html -diffpy.pdffit2.tests.rundeps.__package__ diffpy.pdffit2.tests.rundeps-module.html#__package__ -diffpy.pdffit2.version diffpy.pdffit2.version-module.html -diffpy.pdffit2.version.__gitsha__ diffpy.pdffit2.version-module.html#__gitsha__ -diffpy.pdffit2.version.__package__ diffpy.pdffit2.version-module.html#__package__ -diffpy.pdffit2.version.__timestamp__ diffpy.pdffit2.version-module.html#__timestamp__ -diffpy.pdffit2.ipy_ext.EasyPDFPlotting diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html -diffpy.pdffit2.ipy_ext.EasyPDFPlotting.showRw diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html#showRw -diffpy.pdffit2.ipy_ext.EasyPDFPlotting.Gcalc diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html#Gcalc -diffpy.pdffit2.ipy_ext.EasyPDFPlotting._asarray diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html#_asarray -diffpy.pdffit2.ipy_ext.EasyPDFPlotting.Gobs diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html#Gobs -diffpy.pdffit2.ipy_ext.EasyPDFPlotting.r diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html#r -diffpy.pdffit2.ipy_ext.EasyPDFPlotting.Gdiff diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html#Gdiff -diffpy.pdffit2.ipy_ext.EasyPDFPlotting.__init__ diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html#__init__ -diffpy.pdffit2.ipy_ext.EasyPDFPlotting.showfit diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html#showfit -diffpy.pdffit2.pdffit.PdfFit diffpy.pdffit2.pdffit.PdfFit-class.html -diffpy.pdffit2.pdffit.PdfFit.spdiameter diffpy.pdffit2.pdffit.PdfFit-class.html#spdiameter -diffpy.pdffit2.pdffit.PdfFit.selalias diffpy.pdffit2.pdffit.PdfFit-class.html#selalias -diffpy.pdffit2.pdffit.PdfFit.sratio diffpy.pdffit2.pdffit.PdfFit-class.html#sratio -diffpy.pdffit2.pdffit.PdfFit.occ diffpy.pdffit2.pdffit.PdfFit-class.html#occ -diffpy.pdffit2.pdffit.PdfFit.bond_length_atoms diffpy.pdffit2.pdffit.PdfFit-class.html#bond_length_atoms -diffpy.pdffit2.pdffit.PdfFit.delta1 diffpy.pdffit2.pdffit.PdfFit-class.html#delta1 -diffpy.pdffit2.pdffit.PdfFit.delta2 diffpy.pdffit2.pdffit.PdfFit-class.html#delta2 -diffpy.pdffit2.pdffit.PdfFit.getpar diffpy.pdffit2.pdffit.PdfFit-class.html#getpar -diffpy.pdffit2.pdffit.PdfFit.bang diffpy.pdffit2.pdffit.PdfFit-class.html#bang -diffpy.pdffit2.pdffit.PdfFit.save_dif diffpy.pdffit2.pdffit.PdfFit-class.html#save_dif -diffpy.pdffit2.pdffit.PdfFit.qdamp diffpy.pdffit2.pdffit.PdfFit-class.html#qdamp -diffpy.pdffit2.pdffit.PdfFit.setdata diffpy.pdffit2.pdffit.PdfFit-class.html#setdata -diffpy.pdffit2.pdffit.PdfFit.read_data_string diffpy.pdffit2.pdffit.PdfFit-class.html#read_data_string -diffpy.pdffit2.pdffit.PdfFit.read_data diffpy.pdffit2.pdffit.PdfFit-class.html#read_data -diffpy.pdffit2.pdffit.PdfFit.get_structure diffpy.pdffit2.pdffit.PdfFit-class.html#get_structure -diffpy.pdffit2.pdffit.PdfFit.num_datasets diffpy.pdffit2.pdffit.PdfFit-class.html#num_datasets -diffpy.pdffit2.pdffit.PdfFit.getpdf_obs diffpy.pdffit2.pdffit.PdfFit-class.html#getpdf_obs -diffpy.pdffit2.pdffit.PdfFit.save_struct diffpy.pdffit2.pdffit.PdfFit-class.html#save_struct -diffpy.pdffit2.pdffit.PdfFit.x diffpy.pdffit2.pdffit.PdfFit-class.html#x -diffpy.pdffit2.pdffit.PdfFit.getpdf_fit diffpy.pdffit2.pdffit.PdfFit-class.html#getpdf_fit -diffpy.pdffit2.pdffit.PdfFit.save_struct_string diffpy.pdffit2.pdffit.PdfFit-class.html#save_struct_string -diffpy.pdffit2.pdffit.PdfFit.blen diffpy.pdffit2.pdffit.PdfFit-class.html#blen -diffpy.pdffit2.pdffit.PdfFit.save_pdf diffpy.pdffit2.pdffit.PdfFit-class.html#save_pdf -diffpy.pdffit2.pdffit.PdfFit.num_phases diffpy.pdffit2.pdffit.PdfFit-class.html#num_phases -diffpy.pdffit2.pdffit.PdfFit.save_res diffpy.pdffit2.pdffit.PdfFit-class.html#save_res -diffpy.pdffit2.pdffit.PdfFit.stepcut diffpy.pdffit2.pdffit.PdfFit-class.html#stepcut -diffpy.pdffit2.pdffit.PdfFit.set_scat diffpy.pdffit2.pdffit.PdfFit-class.html#set_scat -diffpy.pdffit2.pdffit.PdfFit.u33 diffpy.pdffit2.pdffit.PdfFit-class.html#u33 -diffpy.pdffit2.pdffit.PdfFit.reset_scat diffpy.pdffit2.pdffit.PdfFit-class.html#reset_scat -diffpy.pdffit2.pdffit.PdfFit.getrw diffpy.pdffit2.pdffit.PdfFit-class.html#getrw -diffpy.pdffit2.pdffit.PdfFit.get_atoms diffpy.pdffit2.pdffit.PdfFit-class.html#get_atoms -diffpy.pdffit2.pdffit.PdfFit.getpdf_diff diffpy.pdffit2.pdffit.PdfFit-class.html#getpdf_diff -diffpy.pdffit2.pdffit.PdfFit.__getRef diffpy.pdffit2.pdffit.PdfFit-class.html#__getRef -diffpy.pdffit2.pdffit.PdfFit.bond_length_types diffpy.pdffit2.pdffit.PdfFit-class.html#bond_length_types -diffpy.pdffit2.pdffit.PdfFit.pdesel diffpy.pdffit2.pdffit.PdfFit-class.html#pdesel -diffpy.pdffit2.pdffit.PdfFit.show_scat diffpy.pdffit2.pdffit.PdfFit-class.html#show_scat -diffpy.pdffit2.pdffit.PdfFit.pdfrange diffpy.pdffit2.pdffit.PdfFit-class.html#pdfrange -diffpy.pdffit2.pdffit.PdfFit.freepar diffpy.pdffit2.pdffit.PdfFit-class.html#freepar -diffpy.pdffit2.pdffit.PdfFit.u22 diffpy.pdffit2.pdffit.PdfFit-class.html#u22 -diffpy.pdffit2.pdffit.PdfFit.u23 diffpy.pdffit2.pdffit.PdfFit-class.html#u23 -diffpy.pdffit2.pdffit.PdfFit.FCON diffpy.pdffit2.pdffit.PdfFit-class.html#FCON -diffpy.pdffit2.pdffit.PdfFit.selectAll diffpy.pdffit2.pdffit.PdfFit-class.html#selectAll -diffpy.pdffit2.pdffit.PdfFit.add_structure diffpy.pdffit2.pdffit.PdfFit-class.html#add_structure -diffpy.pdffit2.pdffit.PdfFit.pscale diffpy.pdffit2.pdffit.PdfFit-class.html#pscale -diffpy.pdffit2.pdffit.PdfFit.Sctp diffpy.pdffit2.pdffit.PdfFit-class.html#Sctp -diffpy.pdffit2.pdffit.PdfFit.save_pdf_string diffpy.pdffit2.pdffit.PdfFit-class.html#save_pdf_string -diffpy.pdffit2.pdffit.PdfFit.selectNone diffpy.pdffit2.pdffit.PdfFit-class.html#selectNone -diffpy.pdffit2.pdffit.PdfFit.setpar diffpy.pdffit2.pdffit.PdfFit-class.html#setpar -diffpy.pdffit2.pdffit.PdfFit.u11 diffpy.pdffit2.pdffit.PdfFit-class.html#u11 -diffpy.pdffit2.pdffit.PdfFit.read_data_lists diffpy.pdffit2.pdffit.PdfFit-class.html#read_data_lists -diffpy.pdffit2.pdffit.PdfFit.calc diffpy.pdffit2.pdffit.PdfFit-class.html#calc -diffpy.pdffit2.pdffit.PdfFit._exportAll diffpy.pdffit2.pdffit.PdfFit-class.html#_exportAll -diffpy.pdffit2.pdffit.PdfFit.read_struct diffpy.pdffit2.pdffit.PdfFit-class.html#read_struct -diffpy.pdffit2.pdffit.PdfFit.psel diffpy.pdffit2.pdffit.PdfFit-class.html#psel -diffpy.pdffit2.pdffit.PdfFit.setphase diffpy.pdffit2.pdffit.PdfFit-class.html#setphase -diffpy.pdffit2.pdffit.PdfFit.read_struct_string diffpy.pdffit2.pdffit.PdfFit-class.html#read_struct_string -diffpy.pdffit2.pdffit.PdfFit.getvar diffpy.pdffit2.pdffit.PdfFit-class.html#getvar -diffpy.pdffit2.pdffit.PdfFit.u13 diffpy.pdffit2.pdffit.PdfFit-class.html#u13 -diffpy.pdffit2.pdffit.PdfFit.reset diffpy.pdffit2.pdffit.PdfFit-class.html#reset -diffpy.pdffit2.pdffit.PdfFit.u12 diffpy.pdffit2.pdffit.PdfFit-class.html#u12 -diffpy.pdffit2.pdffit.PdfFit.selectAtomIndex diffpy.pdffit2.pdffit.PdfFit-class.html#selectAtomIndex -diffpy.pdffit2.pdffit.PdfFit.z diffpy.pdffit2.pdffit.PdfFit-class.html#z -diffpy.pdffit2.pdffit.PdfFit.save_dif_string diffpy.pdffit2.pdffit.PdfFit-class.html#save_dif_string -diffpy.pdffit2.pdffit.PdfFit.num_atoms diffpy.pdffit2.pdffit.PdfFit-class.html#num_atoms -diffpy.pdffit2.pdffit.PdfFit.getcrw diffpy.pdffit2.pdffit.PdfFit-class.html#getcrw -diffpy.pdffit2.pdffit.PdfFit.rcut diffpy.pdffit2.pdffit.PdfFit-class.html#rcut -diffpy.pdffit2.pdffit.PdfFit.qbroad diffpy.pdffit2.pdffit.PdfFit-class.html#qbroad -diffpy.pdffit2.pdffit.PdfFit.intro diffpy.pdffit2.pdffit.PdfFit-class.html#intro -diffpy.pdffit2.pdffit.PdfFit.dscale diffpy.pdffit2.pdffit.PdfFit-class.html#dscale -diffpy.pdffit2.pdffit.PdfFit.refine diffpy.pdffit2.pdffit.PdfFit-class.html#refine -diffpy.pdffit2.pdffit.PdfFit.getR diffpy.pdffit2.pdffit.PdfFit-class.html#getR -diffpy.pdffit2.pdffit.PdfFit.__init__ diffpy.pdffit2.pdffit.PdfFit-class.html#__init__ -diffpy.pdffit2.pdffit.PdfFit.fixpar diffpy.pdffit2.pdffit.PdfFit-class.html#fixpar -diffpy.pdffit2.pdffit.PdfFit.get_scat_string diffpy.pdffit2.pdffit.PdfFit-class.html#get_scat_string -diffpy.pdffit2.pdffit.PdfFit.setvar diffpy.pdffit2.pdffit.PdfFit-class.html#setvar -diffpy.pdffit2.pdffit.PdfFit.show_struct diffpy.pdffit2.pdffit.PdfFit-class.html#show_struct -diffpy.pdffit2.pdffit.PdfFit.save_res_string diffpy.pdffit2.pdffit.PdfFit-class.html#save_res_string -diffpy.pdffit2.pdffit.PdfFit.get_atom_types diffpy.pdffit2.pdffit.PdfFit-class.html#get_atom_types -diffpy.pdffit2.pdffit.PdfFit.lat diffpy.pdffit2.pdffit.PdfFit-class.html#lat -diffpy.pdffit2.pdffit.PdfFit.bond_angle diffpy.pdffit2.pdffit.PdfFit-class.html#bond_angle -diffpy.pdffit2.pdffit.PdfFit.alloc diffpy.pdffit2.pdffit.PdfFit-class.html#alloc -diffpy.pdffit2.pdffit.PdfFit.selectAtomType diffpy.pdffit2.pdffit.PdfFit-class.html#selectAtomType -diffpy.pdffit2.pdffit.PdfFit.phase_fractions diffpy.pdffit2.pdffit.PdfFit-class.html#phase_fractions -diffpy.pdffit2.pdffit.PdfFit.y diffpy.pdffit2.pdffit.PdfFit-class.html#y -diffpy.pdffit2.pdffit.PdfFit.constrain diffpy.pdffit2.pdffit.PdfFit-class.html#constrain -diffpy.pdffit2.pdffit.PdfFit.refine_step diffpy.pdffit2.pdffit.PdfFit-class.html#refine_step -diffpy.pdffit2.pdffit.PdfFit.get_scat diffpy.pdffit2.pdffit.PdfFit-class.html#get_scat -diffpy.pdffit2.tests.ExceptionsTest.allocExceptions diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.allocExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.allocExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.allocExceptions.test_ValueError1 diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html#test_ValueError1 -diffpy.pdffit2.tests.ExceptionsTest.allocExceptions.test_ValueError2 diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html#test_ValueError2 -diffpy.pdffit2.tests.ExceptionsTest.allocExceptions.test_ValueError3 diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html#test_ValueError3 -diffpy.pdffit2.tests.ExceptionsTest.allocExceptions.test_ValueError4 diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html#test_ValueError4 -diffpy.pdffit2.tests.ExceptionsTest.allocExceptions.test_ValueError5 diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html#test_ValueError5 -diffpy.pdffit2.tests.ExceptionsTest.allocExceptions.test_ValueError6 diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html#test_ValueError6 -diffpy.pdffit2.tests.ExceptionsTest.allocExceptions.test_ValueError7 diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html#test_ValueError7 -diffpy.pdffit2.tests.ExceptionsTest.bangExceptions diffpy.pdffit2.tests.ExceptionsTest.bangExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.bangExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.bangExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.bangExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.bangExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.bangExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.bangExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.bangExceptions.test_ValueError1 diffpy.pdffit2.tests.ExceptionsTest.bangExceptions-class.html#test_ValueError1 -diffpy.pdffit2.tests.ExceptionsTest.bangExceptions.test_ValueError2 diffpy.pdffit2.tests.ExceptionsTest.bangExceptions-class.html#test_ValueError2 -diffpy.pdffit2.tests.ExceptionsTest.bangExceptions.test_ValueError3 diffpy.pdffit2.tests.ExceptionsTest.bangExceptions-class.html#test_ValueError3 -diffpy.pdffit2.tests.ExceptionsTest.blenExceptions diffpy.pdffit2.tests.ExceptionsTest.blenExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.blenExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.blenExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.blenExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.blenExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.blenExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.blenExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.blenExceptions.test_ValueError1 diffpy.pdffit2.tests.ExceptionsTest.blenExceptions-class.html#test_ValueError1 -diffpy.pdffit2.tests.ExceptionsTest.blenExceptions.test_ValueError2 diffpy.pdffit2.tests.ExceptionsTest.blenExceptions-class.html#test_ValueError2 -diffpy.pdffit2.tests.ExceptionsTest.blenExceptions.test_ValueError3 diffpy.pdffit2.tests.ExceptionsTest.blenExceptions-class.html#test_ValueError3 -diffpy.pdffit2.tests.ExceptionsTest.calcExceptions diffpy.pdffit2.tests.ExceptionsTest.calcExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.calcExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.calcExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.calcExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.calcExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.calcExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.calcExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions.test_constrainNonRefVar diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions-class.html#test_constrainNonRefVar -diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions.test_constraintError diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions-class.html#test_constraintError -diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions.test_ValueError diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions-class.html#test_ValueError -diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.getRExceptions diffpy.pdffit2.tests.ExceptionsTest.getRExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.getRExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.getRExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.getRExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.getRExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.getRExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.getRExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.getparExceptions diffpy.pdffit2.tests.ExceptionsTest.getparExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.getparExceptions.test_unassignedError1 diffpy.pdffit2.tests.ExceptionsTest.getparExceptions-class.html#test_unassignedError1 -diffpy.pdffit2.tests.ExceptionsTest.getparExceptions.test_unassignedError2 diffpy.pdffit2.tests.ExceptionsTest.getparExceptions-class.html#test_unassignedError2 -diffpy.pdffit2.tests.ExceptionsTest.getparExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.getparExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.getparExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.getparExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions.test_ValueError diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions-class.html#test_ValueError -diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions.test_unassignedError1 diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions-class.html#test_unassignedError1 -diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions.test_unassignedError2 diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions-class.html#test_unassignedError2 -diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions.test_ValueError1 diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions-class.html#test_ValueError1 -diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions.test_ValueError2 diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions-class.html#test_ValueError2 -diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions.test_ValueError3 diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions-class.html#test_ValueError3 -diffpy.pdffit2.tests.ExceptionsTest.pselExceptions diffpy.pdffit2.tests.ExceptionsTest.pselExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.pselExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.pselExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.pselExceptions.test_unassignedError2 diffpy.pdffit2.tests.ExceptionsTest.pselExceptions-class.html#test_unassignedError2 -diffpy.pdffit2.tests.ExceptionsTest.pselExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.pselExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.pselExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.pselExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions.test_dataError diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions-class.html#test_dataError -diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions.test_IOError diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions-class.html#test_IOError -diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions.test_dataError diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions-class.html#test_dataError -diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions.test_ValueError1 diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions-class.html#test_ValueError1 -diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions.test_ValueError2 diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions-class.html#test_ValueError2 -diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions.test_ValueError3 diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions-class.html#test_ValueError3 -diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions.test_structureErrorZeroVolume diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions-class.html#test_structureErrorZeroVolume -diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions-class.html#setUp -diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions.test_structureError diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions-class.html#test_structureError -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions.test_IOError diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions-class.html#test_IOError -diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions.test_IOError diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions-class.html#test_IOError -diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions.test_IOError diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions-class.html#test_IOError -diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions.test_IOError diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions-class.html#test_IOError -diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions.test_IOError diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions-class.html#test_IOError -diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions.test_unassignedError1 diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions-class.html#test_unassignedError1 -diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions.test_unassignedError2 diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions-class.html#test_unassignedError2 -diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions.test_unassignedError1 diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions-class.html#test_unassignedError1 -diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions.test_unassignedError2 diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions-class.html#test_unassignedError2 -diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions.test_ValueError diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions-class.html#test_ValueError -diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions.test_unassignedError1 diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions-class.html#test_unassignedError1 -diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions.test_unassignedError2 diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions-class.html#test_unassignedError2 -diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions.test_ijcharValueError diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions-class.html#test_ijcharValueError -diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions.test_unassignedError1 diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions-class.html#test_unassignedError1 -diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions.test_unassignedError2 diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions-class.html#test_unassignedError2 -diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions.test_ValueError diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions-class.html#test_ValueError -diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions-class.html -diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions.test_unassignedError diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions-class.html#test_unassignedError -diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions.tearDown diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions-class.html#tearDown -diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions.setUp diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions-class.html#setUp -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_get_atoms diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_get_atoms -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_num_phases diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_num_phases -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_bond_length_atoms diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_bond_length_atoms -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_bond_length_types diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_bond_length_types -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.tearDown diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#tearDown -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.setUp diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#setUp -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_reset_scat diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_reset_scat -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_psel diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_psel -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_add_structure diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_add_structure -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_get_scat diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_get_scat -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_get_structure diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_get_structure -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_getcrw diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_getcrw -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_set_scat diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_set_scat -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_getcrw_two_datasets diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_getcrw_two_datasets -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.places diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#places -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_bond_angle diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_bond_angle -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_get_atom_types diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_get_atom_types -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_num_atoms diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_num_atoms -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_alloc diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_alloc -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_pdesel diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_pdesel -diffpy.pdffit2.tests.TestPdfFit.TestPdfFit.test_num_datasets diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html#test_num_datasets -diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions-class.html -diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions.tearDown diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions-class.html#tearDown -diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions.setUp diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions-class.html#setUp -diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions.places diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions-class.html#places -diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions.test_neutron_fractions diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions-class.html#test_neutron_fractions -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions.test_xray_fractions diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions-class.html#test_xray_fractions -diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html -diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope.test_twophase_refinement diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html#test_twophase_refinement -diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope.tearDown diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html#tearDown -diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope.setUp diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html#setUp -diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope.test_refinement diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html#test_refinement -diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope.test_calculation diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html#test_calculation -diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope.test_spdiameter_io diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html#test_spdiameter_io -diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope.places diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html#places -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope.test_twophase_calculation diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html#test_twophase_calculation -diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope-class.html -diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope.test_twophase_stepcut_calculation diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope-class.html#test_twophase_stepcut_calculation -diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope.tearDown diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope-class.html#tearDown -diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope.setUp diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope-class.html#setUp -diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope.test_stepcut_calculation diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope-class.html#test_stepcut_calculation -diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope.places diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope-class.html#places -diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope.test_stepcut_io diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope-class.html#test_stepcut_io -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -exceptions.AssertionError exceptions.AssertionError-class.html -exceptions.AssertionError.__init__ exceptions.AssertionError-class.html#__init__ -exceptions.AssertionError.__new__ exceptions.AssertionError-class.html#__new__ diff --git a/static_root/doc/pdffit2/class-tree.html b/static_root/doc/pdffit2/class-tree.html deleted file mode 100644 index bef41b2e..00000000 --- a/static_root/doc/pdffit2/class-tree.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - Class Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
- [ Module Hierarchy - | Class Hierarchy ] -

-

Class Hierarchy

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/crarr.png b/static_root/doc/pdffit2/crarr.png deleted file mode 100644 index 26b43c52..00000000 Binary files a/static_root/doc/pdffit2/crarr.png and /dev/null differ diff --git a/static_root/doc/pdffit2/diffpy.pdffit2-module.html b/static_root/doc/pdffit2/diffpy.pdffit2-module.html deleted file mode 100644 index 0c568b71..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2-module.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - diffpy.pdffit2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Package pdffit2

source code

-
-PDFfit2 - real space structure refinement program.
-Classes:
-    PdfFit
-Routines:
-    redirect_stdout
-
-
- -
-

Version: - 1.1 -

-

Date: - 2016-02-23 15:21:36 -0500 -

-
- - - - - - -
- - - - - -
Submodules[hide private]
-
-
- -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test()
- Execute all unit tests for the diffpy.pdffit2 package.
- source code - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'diffpy.pdffit2' -
-

Imports: - PdfFit, - is_element, - output, - pdffit, - pdffit2, - redirect_stdout, - version -


- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

test() -

-
source code  -
- -
-Execute all unit tests for the diffpy.pdffit2 package.
-Return a unittest TestResult object.
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2-pysrc.html deleted file mode 100644 index 575780ce..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2-pysrc.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - diffpy.pdffit2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Package diffpy.pdffit2

-
- 1  #!/usr/bin/env python 
- 2  ############################################################################## 
- 3  # 
- 4  # pdffit2           by DANSE Diffraction group 
- 5  #                   Simon J. L. Billinge 
- 6  #                   (c) 2006 trustees of the Michigan State University. 
- 7  #                   All rights reserved. 
- 8  # 
- 9  # File coded by:    Pavol Juhas 
-10  # 
-11  # See AUTHORS.txt for a list of people who contributed. 
-12  # See LICENSE.txt for license information. 
-13  # 
-14  ############################################################################## 
-15   
-16  """PDFfit2 - real space structure refinement program. 
-17  Classes: 
-18      PdfFit 
-19  Routines: 
-20      redirect_stdout 
-21  """ 
-22   
-23   
-24  from diffpy.pdffit2.version import __version__, __date__ 
-25  from diffpy.pdffit2.pdffit import PdfFit 
-26  from diffpy.pdffit2.output import redirect_stdout 
-27  from diffpy.pdffit2.pdffit2 import is_element 
-28   
-29   
-30  # unit tests 
-
31 -def test(): -
32 '''Execute all unit tests for the diffpy.pdffit2 package. -33 Return a unittest TestResult object. -34 ''' -35 from diffpy.pdffit2.tests import test -36 return test() -
37 -38 # End of file -39 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.ipy_ext-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.ipy_ext-module.html deleted file mode 100644 index a8f40928..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.ipy_ext-module.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - diffpy.pdffit2.ipy_ext - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Module ipy_ext - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module ipy_ext

source code

-
-This module defines functions within IPython session to simulate
-the old pdffit2 interactive session.
-
-Usage: %load_ext diffpy.pdffit2.ipy_ext
-
-
- - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - EasyPDFPlotting
- Convenience functions for accessing and plotting PDFfit2 data. -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
load_ipython_extension(ipython) - source code - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = None -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.ipy_ext-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.ipy_ext-pysrc.html deleted file mode 100644 index e83e3e25..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.ipy_ext-pysrc.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - diffpy.pdffit2.ipy_ext - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Module ipy_ext - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module diffpy.pdffit2.ipy_ext

-
- 1  #!/usr/bin/env python 
- 2   
- 3  """This module defines functions within IPython session to simulate 
- 4  the old pdffit2 interactive session. 
- 5   
- 6  Usage: %load_ext diffpy.pdffit2.ipy_ext 
- 7  """ 
-
8 - 9 -10 -def load_ipython_extension(ipython): -
11 from diffpy.pdffit2 import PdfFit -12 pf = PdfFit() -13 pdf = EasyPDFPlotting(pf) -14 print(' Type help(pdffit) or help(topic) for information.') -15 print -16 ns = dict(pdffit=PdfFit, pdf=pdf) -17 pf._exportAll(ns) -18 ipython.user_ns.update(ns) -19 return -
20 -
21 -22 -class EasyPDFPlotting(object): -
23 """Convenience functions for accessing and plotting PDFfit2 data. -24 """ -25 -
26 - def __init__(self, pdffit_instance): -
27 self._pdffit = pdffit_instance -28 return -
29 -30 @property -
31 - def r(self): -
32 "R-grid for PDF simulation." -33 return self._asarray(self._pdffit.getR(), dtype=float) -
34 -35 @property -
36 - def Gobs(self): -
37 "Observed PDF data." -38 return self._asarray(self._pdffit.getpdf_obs(), dtype=float) -
39 -40 @property -
41 - def Gcalc(self): -
42 "Calculated PDF data." -43 return self._asarray(self._pdffit.getpdf_fit()) -
44 -45 @property -
46 - def Gdiff(self): -
47 "Difference between the observed and simulated PDF." -48 return self.Gobs - self.Gcalc -
49 -
50 - def showfit(self, offset=None): -
51 """Plot observed and simulated PDFs and the difference curve. -52 -53 offset -- offset for the difference curve. -54 -55 No return value. -56 """ -57 from matplotlib.pyplot import gca -58 from math import floor -59 cr = self.r -60 cGobs = self.Gobs -61 cGcalc = self.Gcalc -62 cGdiff = self.Gdiff -63 if offset is None: -64 offset = floor(min([min(cGobs), min(cGcalc)]) - max(cGdiff)) -65 ax = gca() -66 ax.plot(cr, cGobs, 'r.', cr, cGcalc, 'b-', cr, cGdiff + offset, 'g-') -67 xl = ax.xaxis.get_label().get_text() -68 yl = ax.yaxis.get_label().get_text() -69 if xl == "": -70 ax.set_xlabel('r (A)') -71 if yl == "": -72 ax.set_ylabel('G (A**-2)') -73 return -
74 -
75 - def showRw(self): -
76 "Plot cumulative Rw." -77 from matplotlib.pyplot import gca -78 cRw = self._asarray(self._pdffit.getcrw()) -79 ax = gca() -80 ax.plot(self.r, cRw) -81 ax.set_title('Cumulative Rw = %.4f' % cRw[-1]) -82 ax.set_xlabel('r') -83 ax.set_ylabel('Rw') -84 return -
85 -86 @staticmethod -
87 - def _asarray(x, dtype=None): -
88 import numpy -89 return numpy.asarray(x, dtype=dtype) -
90 -91 # End of class EasyPDFPlotting -92 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html deleted file mode 100644 index 0c03f77c..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.ipy_ext.EasyPDFPlotting-class.html +++ /dev/null @@ -1,475 +0,0 @@ - - - - - diffpy.pdffit2.ipy_ext.EasyPDFPlotting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Module ipy_ext :: - Class EasyPDFPlotting - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class EasyPDFPlotting

source code

-
-object --+
-         |
-        EasyPDFPlotting
-
- -
-
-Convenience functions for accessing and plotting PDFfit2 data.
-    
-
-
- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - pdffit_instance)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
showfit(self, - offset=None)
- Plot observed and simulated PDFs and the difference curve.
- source code - -
- -
-   - - - - - - -
showRw(self)
- Plot cumulative Rw.
- source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Static Methods[hide private]
-
-   - - - - - - -
_asarray(x, - dtype=None) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - r
- R-grid for PDF simulation. -
-   - - Gobs
- Observed PDF data. -
-   - - Gcalc
- Calculated PDF data. -
-   - - Gdiff
- Difference between the observed and simulated PDF. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - pdffit_instance) -
(Constructor) -

-
source code  -
- -
-x.__init__(...) initializes x; see help(type(x)) for signature
-
-
-
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

showfit(self, - offset=None) -

-
source code  -
- -
-Plot observed and simulated PDFs and the difference curve.
-
-offset   -- offset for the difference curve.
-
-No return value.
-
-
-
-
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

r

-
-R-grid for PDF simulation.
-
-
-
-
Get Method:
-
unreachable.r(self) - - R-grid for PDF simulation. -
-
-
-
- -
- -
-

Gobs

-
-Observed PDF data.
-
-
-
-
Get Method:
-
unreachable.Gobs(self) - - Observed PDF data. -
-
-
-
- -
- -
-

Gcalc

-
-Calculated PDF data.
-
-
-
-
Get Method:
-
unreachable.Gcalc(self) - - Calculated PDF data. -
-
-
-
- -
- -
-

Gdiff

-
-Difference between the observed and simulated PDF.
-
-
-
-
Get Method:
-
unreachable.Gdiff(self) - - Difference between the observed and simulated PDF. -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.output-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.output-module.html deleted file mode 100644 index 03bd5ddd..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.output-module.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - diffpy.pdffit2.output - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Module output - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module output

source code

-
-Take care of sending engine output to given file-like object.
-The output file is stored in local module variable stdout.
-
-
- - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
redirect_stdout(dst)
- Redirect PDFfit2 standard output to a file-like object dst.
- source code - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'diffpy.pdffit2' -
-

Imports: - stdout -


- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

redirect_stdout(dst) -

-
source code  -
- -
-Redirect PDFfit2 standard output to a file-like object dst.
-The dst value is stored in module variable stdout.
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.output-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.output-pysrc.html deleted file mode 100644 index 62672a87..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.output-pysrc.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - diffpy.pdffit2.output - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Module output - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module diffpy.pdffit2.output

-
- 1  #!/usr/bin/env python 
- 2  ############################################################################## 
- 3  # 
- 4  # pdffit2           by DANSE Diffraction group 
- 5  #                   Simon J. L. Billinge 
- 6  #                   (c) 2007 trustees of the Michigan State University. 
- 7  #                   All rights reserved. 
- 8  # 
- 9  # File coded by:    Pavol Juhas 
-10  # 
-11  # See AUTHORS.txt for a list of people who contributed. 
-12  # See LICENSE.txt for license information. 
-13  # 
-14  ############################################################################## 
-15   
-16  """Take care of sending engine output to given file-like object. 
-17  The output file is stored in local module variable stdout. 
-18  """ 
-19   
-20   
-21  # create module variable stdout 
-22   
-23  from sys import stdout as stdout 
-24   
-
25 -def redirect_stdout(dst): -
26 """Redirect PDFfit2 standard output to a file-like object dst. -27 The dst value is stored in module variable stdout. -28 """ -29 from pdffit2 import redirect_stdout -30 redirect_stdout(dst) -31 global stdout -32 stdout = dst -33 return -
34 -35 # End of file -36 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.pdffit-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.pdffit-module.html deleted file mode 100644 index 5f5272e0..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.pdffit-module.html +++ /dev/null @@ -1,414 +0,0 @@ - - - - - diffpy.pdffit2.pdffit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Module pdffit - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module pdffit

source code

-
-PdfFit class for fitting pdf data to a model.
-
-
- - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - PdfFit
- Create PdfFit object. -
- - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
_format_value_std(value, - stdev)
- Convert value to a string with standard deviation in brackets.
- source code - -
- -
-   - - - - - - -
_format_bond_length(dij, - ddij, - ij1, - symij)
- Return string with formatted bond length info for a pair of atoms.
- source code - -
- -
-   - - - - - - -
_convertCallable(var)
- Convert an object to the result of its call when callable.
- source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __intro_message__ = '\n***************************************... -
-   - - __package__ = 'diffpy.pdffit2' -
-

Imports: - types, - pdffit2, - output -


- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

_format_value_std(value, - stdev) -

-
source code  -
- -
-Convert value to a string with standard deviation in brackets.
-
-value -- a number
-stdev -- standard deviation.  Ignored when small compared to value.
-
-Return string.
-
-
-
-
-
-
- -
- -
- - -
-

_format_bond_length(dij, - ddij, - ij1, - symij) -

-
source code  -
- -
-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.
-
-
-
-
-
-
- -
- -
- - -
-

_convertCallable(var) -

-
source code  -
- -
-Convert an object to the result of its call when callable.
-
-var -- string or callable object that returns string
-
-Return var or var().
-
-
-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

__intro_message__

- -
-
-
-
Value:
-
-'''
-**********************************************************************\
-********
-*                      P D F F I T   Version   %(version)s            \
-       *
-*                                              %(date)s               \
-       *
-* --------------------------------------------------------------------\
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.pdffit-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.pdffit-pysrc.html deleted file mode 100644 index f9d2cf53..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.pdffit-pysrc.html +++ /dev/null @@ -1,1639 +0,0 @@ - - - - - diffpy.pdffit2.pdffit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Module pdffit - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module diffpy.pdffit2.pdffit

-
-   1  #!/usr/bin/env python 
-   2  ############################################################################## 
-   3  # 
-   4  # pdffit2           by DANSE Diffraction group 
-   5  #                   Simon J. L. Billinge 
-   6  #                   (c) 2006 trustees of the Michigan State University. 
-   7  #                   All rights reserved. 
-   8  # 
-   9  # File coded by:    Chris Farros, Pavol Juhas 
-  10  # 
-  11  # See AUTHORS.txt for a list of people who contributed. 
-  12  # See LICENSE.txt for license information. 
-  13  # 
-  14  ############################################################################## 
-  15   
-  16  """PdfFit class for fitting pdf data to a model.""" 
-  17   
-  18   
-  19  import types 
-  20   
-  21  # Load pdffit2 and output modules to the current namespace. 
-  22  # Note that "import diffpy.pdffit2.output as output" would 
-  23  # crash with AttributeError when executed during imports of 
-  24  # parent packages. 
-  25  from diffpy.pdffit2 import pdffit2 
-  26  from diffpy.pdffit2 import output 
-  27   
-  28  # helper routines 
-  29   
-
30 -def _format_value_std(value, stdev): -
31 """Convert value to a string with standard deviation in brackets. - 32 - 33 value -- a number - 34 stdev -- standard deviation. Ignored when small compared to value. - 35 - 36 Return string. - 37 """ - 38 if stdev > abs(value)*1e-8: - 39 s = "%g (%g)" % (value, stdev) - 40 elif str(stdev) == 'nan': - 41 s = "%g (NaN)" % value - 42 else: - 43 s = "%g" % value - 44 return s -
45 - 46 -
47 -def _format_bond_length(dij, ddij, ij1, symij): -
48 """Return string with formatted bond length info for a pair of atoms. - 49 - 50 dij -- distance between atoms i and j - 51 ddij -- standard deviation of dij. Ignored when small relative to dij. - 52 ij1 -- tuple of atom indices starting at 1 - 53 symij -- tuple of atom symbols - 54 - 55 Return formatted string. - 56 """ - 57 w_smbidx = 10 - 58 w_equals = 30 - 59 s0 = "%s (#%i)" % (symij[0], ij1[0]) - 60 s1 = "%s (#%i)" % (symij[1], ij1[1]) - 61 leader0 = " " + s0.ljust(w_smbidx) + " - " + s1 + " " - 62 leader1 = leader0.ljust(w_equals) + '= ' - 63 s = leader1 + _format_value_std(dij, ddij) + " A" - 64 return s -
65 - 66 -
67 -def _convertCallable(var): -
68 """Convert an object to the result of its call when callable. - 69 - 70 var -- string or callable object that returns string - 71 - 72 Return var or var(). - 73 """ - 74 if callable(var): - 75 rv = var() - 76 else: - 77 rv = var - 78 return rv -
79 - 80 - 81 # constants - 82 - 83 __intro_message__ = """ - 84 ****************************************************************************** - 85 * P D F F I T Version %(version)s * - 86 * %(date)s * - 87 * -------------------------------------------------------------------------- * - 88 * (c) 1998-2007 Trustees of the Michigan State University. * - 89 * (c) 2008-2016 Trustees of the Columbia University * - 90 * in the city of New York. * - 91 * * - 92 * Authors: * - 93 * Thomas Proffen - Email: tproffen@lanl.gov * - 94 * Jacques Bloch - Email: bloch@pa.msu.edu * - 95 * Christopher Farrow - Email: clf2121@columbia.edu * - 96 * Pavol Juhas - Email: pjuhas@bnl.gov - 97 * Simon Billinge - Email: sb2896@columbia.edu * - 98 ****************************************************************************** - 99 """ - 100 - 101 - 102 ############################################################################## - 103 - 104 -
105 -class PdfFit(object): -
106 """Create PdfFit object.""" - 107 - 108 # constants and enumerators from pdffit.h: - 109 # selection of all atoms - 110 selalias = { 'ALL' : -1 } - 111 # constraint type identifiers - 112 FCON = { 'USER' : 0, 'IDENT' : 1, 'FCOMP' : 2, 'FSQR' : 3 } - 113 # scattering type identifiers - 114 Sctp = { 'X' : 0, 'N' : 1 } - 115 -
116 - def _exportAll(self, namespace): -
117 """ _exportAll(self, namespace) --> Export all 'public' class methods - 118 into namespace. - 119 - 120 This function allows for a module-level PdfFit object which doesn't have - 121 to be referenced when calling a method. This function makes old (python) - 122 scripts compatible with this class. At the top of the script, create a - 123 pdffit object, and then call this method. Usually, namespace = locals(). - 124 """ - 125 # string aliases (var = "var") - 126 for a in self.selalias.keys() + self.FCON.keys() + self.Sctp.keys(): - 127 exec("%s = %r" % (a, a), namespace) - 128 public = [ a for a in dir(self) if "__" not in a and a not in - 129 ["_handle", "_exportAll", "selalias", "FCON", "Sctp" ] ] - 130 for funcname in public: - 131 namespace[funcname] = getattr(self, funcname) - 132 return -
133 -
134 - def intro(): -
135 """Show introductory message. - 136 """ - 137 import re - 138 from diffpy.pdffit2 import __version__, __date__ - 139 date = __date__[:10] - 140 d = {'version' : __version__, 'date' : date} - 141 msg = __intro_message__ % d - 142 filler = lambda mx : (mx.group(0).rstrip(' *').ljust(77) + '*') - 143 msg_ljust = re.sub('(?m)^(.{1,77}|.{79}.*)$', filler, msg) - 144 print >> output.stdout, msg_ljust - 145 return -
146 intro = staticmethod(intro) - 147 - 148 -
149 - def add_structure(self, stru): -
150 """add_structure(stru) --> Add new structure to PdfFit instance. - 151 - 152 stru -- instance of Structure class from diffpy.Structure. - 153 - 154 No return value. - 155 Raises pdffit2.structureError when stru contains unknown - 156 atom species. - 157 """ - 158 s = stru.writeStr('pdffit') - 159 self.read_struct_string(s) - 160 return -
161 - 162 -
163 - def read_struct(self, struct): -
164 """read_struct(struct) --> Read structure from file into memory. - 165 - 166 struct -- name of file from which to read structure - 167 - 168 Raises: - 169 pdffit2.calculationError when a lattice cannot be created from the - 170 given structure - 171 pdffit2.structureError when a structure file is malformed - 172 IOError when the file cannot be read from the disk - 173 """ - 174 pdffit2.read_struct(self._handle, struct) - 175 self.stru_files.append(struct) - 176 return -
177 - 178 -
179 - def read_struct_string(self, struct, name=""): -
180 """read_struct_string(struct, name = "") --> Read structure from - 181 a string into memory. - 182 - 183 struct -- string containing the contents of the structure file - 184 name -- tag with which to label structure - 185 - 186 Raises: - 187 pdffit2.calculationError when a lattice cannot be created from the - 188 given structure - 189 pdffit2.structureError when a structure file is malformed - 190 """ - 191 pdffit2.read_struct_string(self._handle, struct) - 192 self.stru_files.append(name) - 193 return -
194 - 195 -
196 - def read_data(self, data, stype, qmax, qdamp): -
197 """read_data(data, stype, qmax, qdamp) --> Read pdf data from file into - 198 memory. - 199 - 200 data -- name of file from which to read data - 201 stype -- 'X' (xray) or 'N' (neutron) - 202 qmax -- Q-value cutoff used in PDF calculation. - 203 Use qmax=0 to neglect termination ripples. - 204 qdamp -- instrumental Q-resolution factor - 205 - 206 Raises: IOError when the file cannot be read from disk - 207 """ - 208 pdffit2.read_data(self._handle, data, stype, qmax, qdamp) - 209 self.data_files.append(data) - 210 return -
211 - 212 -
213 - def read_data_string(self, data, stype, qmax, qdamp, name=""): -
214 """read_data_string(data, stype, qmax, qdamp, name = "") --> Read - 215 pdf data from a string into memory. - 216 - 217 data -- string containing the contents of the data file - 218 stype -- 'X' (xray) or 'N' (neutron) - 219 qmax -- Q-value cutoff used in PDF calculation. - 220 Use qmax=0 to neglect termination ripples. - 221 qdamp -- instrumental Q-resolution factor - 222 name -- tag with which to label data - 223 """ - 224 pdffit2.read_data_string(self._handle, data, stype, qmax, - 225 qdamp, name) - 226 name = data - 227 self.data_files.append(name) - 228 return -
229 - 230 -
231 - def read_data_lists(self, stype, qmax, qdamp, r_data, Gr_data, - 232 dGr_data = None, name = "list"): -
233 """read_data_lists(stype, qmax, qdamp, r_data, Gr_data, dGr_data = - 234 None, name = "list") --> Read pdf data into memory from lists. - 235 - 236 All lists must be of the same length. - 237 stype -- 'X' (xray) or 'N' (neutron) - 238 qmax -- Q-value cutoff used in PDF calculation. - 239 Use qmax=0 to neglect termination ripples. - 240 qdamp -- instrumental Q-resolution factor - 241 r_data -- list of r-values - 242 Gr_data -- list of G(r) values - 243 dGr_data -- list of G(r) uncertainty values - 244 name -- tag with which to label data - 245 - 246 Raises: ValueError when the data lists are of different length - 247 """ - 248 pdffit2.read_data_arrays(self._handle, stype, qmax, qdamp, - 249 r_data, Gr_data, dGr_data, name) - 250 self.data_files.append(name) - 251 return -
252 - 253 -
254 - def pdfrange(self, iset, rmin, rmax): -
255 """pdfrange(iset, rmin, rmax) --> Set the range of the fit. - 256 - 257 iset -- data set to consider - 258 rmin -- minimum r-value of fit - 259 rmax -- maximum r-value of fit - 260 - 261 Raises: ValueError for bad input values - 262 """ - 263 pdffit2.pdfrange(self._handle, iset, rmin, rmax) - 264 return -
265 - 266 -
267 - def reset(self): -
268 """reset() --> Clear all stored fit, structure, and parameter data.""" - 269 self.stru_files = [] - 270 self.data_files = [] - 271 pdffit2.reset(self._handle); - 272 return -
273 - 274 -
275 - def alloc(self, stype, qmax, qdamp, rmin, rmax, bin): -
276 """alloc(stype, qmax, qdamp, rmin, rmax, bin) --> Allocate space - 277 for a PDF calculation. - 278 - 279 The structure from which to calculate the PDF must first be imported - 280 with the read_struct() or read_struct_string() method. - 281 stype -- 'X' (xray) or 'N' (neutron) - 282 qmax -- Q-value cutoff used in PDF calculation. - 283 Use qmax=0 to neglect termination ripples. - 284 qdamp -- instrumental Q-resolution factor - 285 rmin -- minimum r-value of calculation - 286 rmax -- maximum r-value of calculation - 287 bin -- number of data points in calculation - 288 - 289 Raises: - 290 ValueError for bad input values - 291 pdffit.unassignedError when no structure has been loaded - 292 """ - 293 pdffit2.alloc(self._handle, stype, qmax, qdamp, rmin, - 294 rmax, bin) - 295 return -
296 - 297 -
298 - def calc(self): -
299 """calc() --> Calculate the PDF of the imported structure. - 300 - 301 Space for the calculation must first be allocated with the alloc() - 302 method. - 303 - 304 Raises: - 305 pdffit2.calculationError when allocated space cannot - 306 accomodate calculation - 307 pdffit.unassignedError when space for calculation has not been - 308 allocated - 309 """ - 310 pdffit2.calc(self._handle) - 311 return -
312 - 313 -
314 - def refine(self, toler=0.00000001): -
315 """refine(toler = 0.00000001) --> Fit the theory to the imported data. - 316 - 317 toler -- tolerance of the fit - 318 - 319 Raises: - 320 pdffit2.calculationError when the model pdf cannot be calculated - 321 pdffit2.constraintError when refinement fails due to bad - 322 constraint - 323 pdffit2.unassigedError when a constraint used but never initialized - 324 using setpar() - 325 """ - 326 step = 0 - 327 finished = 0 - 328 while not finished: - 329 finished = pdffit2.refine_step(self._handle, toler) - 330 step += 1 - 331 return -
332 - 333 -
334 - def refine_step(self, toler=0.00000001): -
335 """refine_step(toler = 0.00000001) --> Run a single step of the fit. - 336 - 337 toler -- tolerance of the fit - 338 - 339 Raises: - 340 pdffit2.calculationError when the model pdf cannot be calculated - 341 pdffit2.constraintError when refinement fails due to bad - 342 constraint - 343 pdffit2.unassigedError when a constraint used but never initialized - 344 using setpar() - 345 - 346 Returns: 1 (0) if refinement is (is not) finished - 347 """ - 348 self.finished = pdffit2.refine_step(self._handle, toler) - 349 return self.finished -
350 - 351 -
352 - def save_pdf(self, iset, fname): -
353 """save_pdf(iset, fname) --> Save calculated or fitted PDF to file. - 354 - 355 iset -- data set to save - 356 - 357 Raises: - 358 IOError if file cannot be saved - 359 pdffit2.unassignedError if the data set is undefined - 360 """ - 361 pdffit2.save_pdf(self._handle, iset, fname) - 362 return -
363 - 364 -
365 - def save_pdf_string(self, iset): -
366 """save_pdf_string(iset) --> Save calculated or fitted PDF to string. - 367 - 368 iset -- data set to save - 369 - 370 Raises: - 371 pdffit2.unassignedError if the data set is undefined - 372 - 373 Returns: string containing contents of save file - 374 """ - 375 pdffilestring = pdffit2.save_pdf(self._handle, iset, "") - 376 return pdffilestring -
377 - 378 -
379 - def save_dif(self, iset, fname): -
380 """save_dif(iset, fname) --> Save data and fitted PDF difference to - 381 file. - 382 - 383 iset -- data set to save - 384 - 385 Raises: - 386 IOError if file cannot be saved - 387 pdffit2.unassignedError if the data set is undefined - 388 """ - 389 pdffit2.save_dif(self._handle, iset, fname) - 390 return -
391 - 392 -
393 - def save_dif_string(self, iset): -
394 """save_dif_string(iset) --> Save data and fitted PDF difference to - 395 string. - 396 - 397 iset -- data set to save - 398 - 399 Raises: - 400 pdffit2.unassignedError if the data set is undefined - 401 - 402 Returns: string containing contents of save file - 403 """ - 404 diffilestring = pdffit2.save_dif(self._handle, iset, "") - 405 return diffilestring -
406 - 407 -
408 - def save_res(self, fname): -
409 """save_res(fname) --> Save fit-specific data to file. - 410 - 411 Raises: - 412 IOError if file cannot be saved - 413 pdffit2.unassignedError if there is no refinement data to save - 414 """ - 415 pdffit2.save_res(self._handle, fname) - 416 return -
417 - 418 -
419 - def save_res_string(self): -
420 """save_res_string() --> Save fit-specific data to a string. - 421 - 422 Raises: - 423 pdffit2.unassignedError if there is no refinement data to save - 424 - 425 Returns: string containing contents of save file - 426 """ - 427 resfilestring = pdffit2.save_res(self._handle, "") - 428 return resfilestring -
429 - 430 -
431 - def get_structure(self, ip): -
432 """get_structure(ip) --> Get a copy of specified phase data. - 433 - 434 ip -- index of existing PdfFit phase starting from 1 - 435 - 436 Return Structure object from diffpy.Structure. - 437 Raise pdffit2.unassignedError if phase ip is undefined. - 438 """ - 439 from diffpy.Structure import PDFFitStructure - 440 s = self.save_struct_string(ip) - 441 stru = PDFFitStructure() - 442 stru.readStr(s, 'pdffit') - 443 return stru -
444 - 445 -
446 - def save_struct(self, ip, fname): -
447 """save_struct(ip, fname) --> Save structure resulting from fit - 448 to file. - 449 - 450 ip -- phase to save - 451 - 452 Raises: - 453 IOError if file cannot be saved - 454 pdffit2.unassignedError if the data set is undefined - 455 """ - 456 pdffit2.save_struct(self._handle, ip, fname) - 457 return -
458 - 459 -
460 - def save_struct_string(self, ip): -
461 """save_struct(ip) --> Save structure resulting from fit to string. - 462 - 463 ip -- phase to save - 464 - 465 Raises: - 466 pdffit2.unassignedError if phase ip is undefined. - 467 - 468 Returns: string containing contents of save file - 469 """ - 470 structfilestring = pdffit2.save_struct(self._handle, ip, "") - 471 return structfilestring -
472 - 473 -
474 - def show_struct(self, ip): -
475 """show_struct(ip) --> Print structure resulting from fit. - 476 - 477 ip -- phase to display - 478 - 479 Raises: pdffit2.unassignedError if the phase is undefined - 480 """ - 481 pdffit2.show_struct(self._handle, ip) - 482 return -
483 - 484 -
485 - def constrain(self, var, par, fcon=None): -
486 """constrain(var, par[, fcon]) --> Constrain a variable to a parameter. - 487 - 488 A variable can be constrained to a number or equation string. - 489 var -- variable to constrain, such as x(1) - 490 par -- parameter which to constrain the variable. This can be - 491 an integer or an equation string containing a reference - 492 to another parameter. Equation strings use standard c++ - 493 syntax. The value of a constrained parameter is accessed - 494 as @p in an equation string, where p is the parameter. - 495 e.g. - 496 >>> constrain(x(1), 1) - 497 >>> constrain(x(2), "0.5+@1") - 498 fcon -- 'USER', 'IDENT', 'FCOMP', or 'FSQR' - 499 this is an optional parameter, and I don't know how it is - 500 used! - 501 - 502 Raises: - 503 pdffit2.constraintError if a constraint is bad - 504 pdffit2.unassignedError if variable does not yet exist - 505 ValueError if variable index does not exist (e.g. lat(7)) - 506 """ - 507 var_ref = self.__getRef(var) - 508 varnc = _convertCallable(var) - 509 if fcon: - 510 fc = self.FCON[fcon] - 511 pdffit2.constrain_int(self._handle, var_ref, varnc, par, fc) - 512 elif type(par) == types.StringType: - 513 pdffit2.constrain_str(self._handle, var_ref, varnc, par) - 514 else: - 515 pdffit2.constrain_int(self._handle, var_ref, varnc, par) - 516 return -
517 - 518 -
519 - def setpar(self, par, val): -
520 """setpar(par, val) --> Set value of constrained parameter. - 521 - 522 val -- Either a numerical value or a reference to a variable - 523 - 524 Raises: - 525 pdffit2.unassignedError when variable is yet to be assigned - 526 """ - 527 # people do not use parenthesis, e.g., "setpar(3, qdamp)" - 528 # in such case val is a reference to PdfFit method - 529 val = _convertCallable(val) - 530 try: - 531 val = float(val) - 532 pdffit2.setpar_dbl(self._handle, par, val) - 533 except ValueError: - 534 var_ref = self.__getRef(val) - 535 pdffit2.setpar_RV(self._handle, par, var_ref) - 536 return -
537 - 538 -
539 - def setvar(self, var, val): -
540 """setvar(var, val) --> Set the value of a variable. - 541 - 542 Raises: - 543 pdffit2.unassignedError if variable does not yet exist - 544 ValueError if variable index does not exist (e.g. lat(7)) - 545 """ - 546 var_ref = self.__getRef(var) - 547 pdffit2.setvar(self._handle, var_ref, val) - 548 return -
549 - 550 -
551 - def getvar(self, var): -
552 """getvar(var) --> Get stored value of a variable. - 553 - 554 Raises: - 555 pdffit2.unassignedError if variable does not yet exist - 556 ValueError if variable index does not exist (e.g. lat(7)) - 557 """ - 558 var_ref = self.__getRef(var) - 559 retval = pdffit2.getvar(self._handle, var_ref) - 560 return retval -
561 - 562 -
563 - def getrw(self): -
564 """getrw() --> Get normalized total error of the fit rw. - 565 - 566 getrw calculates total fit error summed for all datasets in the fit. - 567 - 568 Return float. - 569 """ - 570 rw = pdffit2.getrw(self._handle) - 571 return rw -
572 - 573 -
574 - def getcrw(self): -
575 """getcrw() --> Get cumulative Rw for the current dataset. - 576 - 577 Cumulative Rw is a list of Rw partial sums cost values evaluated against - 578 observed PDF data in the error sums evaluated against - 579 the r-points in the fit. - 580 - 581 Raises: pdffit2.unassignedError if no data exists - 582 - 583 Returns: List of crw points, equidistant in r or empty list - 584 if the refine function has not been called yet. - 585 """ - 586 crw = pdffit2.getcrw(self._handle) - 587 return crw -
588 - 589 -
590 - def getR(self): -
591 """getR() --> Get r-points used in the fit. - 592 - 593 This function should only be called after data has been loaded or - 594 calculated. Before a refinement, the list of r-points will reflect the - 595 data. Afterwords, they will reflect the fit range. - 596 - 597 Raises: pdffit2.unassignedError if no data exists - 598 - 599 Returns: List of equidistance r-points used in fit. - 600 """ - 601 R = pdffit2.getR(self._handle) - 602 return R -
603 - 604 -
605 - def getpdf_fit(self): -
606 """getpdf_fit() --> Get fitted PDF. - 607 - 608 This function should only be called after a refinement or refinement - 609 step has been done. - 610 - 611 Raises: pdffit2.unassignedError if no data exists - 612 - 613 Returns: List of fitted points, equidistant in r. - 614 """ - 615 pdfdata = pdffit2.getpdf_fit(self._handle) - 616 return pdfdata -
617 - 618 -
619 - def getpdf_obs(self): -
620 """getpdf_obs() --> Get observed PDF. - 621 - 622 This function should only be called after data has been loaded or - 623 calculated. Before a refinement, the list of r-points will reflect the - 624 data. Afterwords, they will reflect the fit range. - 625 - 626 Raises: pdffit2.unassignedError if no data exists - 627 - 628 Returns: List of data points, equidistant in r. - 629 """ - 630 pdfdata = pdffit2.getpdf_obs(self._handle) - 631 return pdfdata -
632 - 633 -
634 - def getpdf_diff(self): -
635 """Obtain difference between observed and fitted PDF. - 636 - 637 This function should only be called after data has been loaded or - 638 calculated. Before a refinement, the list of r-points will reflect the - 639 data. Afterwords, they will reflect the fit range. - 640 - 641 Raises: pdffit2.unassignedError if no data exists - 642 - 643 Returns: List of data points, equidistant in r. - 644 """ - 645 Gdiff = pdffit2.getpdf_diff(self._handle) - 646 return Gdiff -
647 - 648 -
649 - def get_atoms(self, ip=None): -
650 """get_atoms() --> Get element symbols of all atoms in the structure. - 651 - 652 ip -- index of phase to get the elements from (starting from 1) - 653 when ip is not given, use current phase - 654 - 655 This function should only be called after a structure has been loaded. - 656 - 657 Raises: pdffit2.unassignedError if no structure exists - 658 - 659 Returns: List of atom names in structure. - 660 """ - 661 if ip is None: rv = pdffit2.get_atoms(self._handle) - 662 else: rv = pdffit2.get_atoms(self._handle, ip) - 663 return rv -
664 - 665 -
666 - def get_atom_types(self, ip=None): -
667 """get_atom_types() --> Ordered unique element symbols in the structure. - 668 - 669 ip -- index of phase to get the elements from (starting from 1) - 670 when ip is not given, use current phase - 671 - 672 This function should only be called after a structure has been loaded. - 673 - 674 Raises: - 675 pdffit2.unassignedError if no structure exists - 676 - 677 Returns: List of unique atom symbols as they occur in structure. - 678 """ - 679 if ip is None: rv = pdffit2.get_atom_types(self._handle) - 680 else: rv = pdffit2.get_atom_types(self._handle, ip) - 681 return rv -
682 - 683 -
684 - def getpar(self, par): -
685 """getpar(par) --> Get value of parameter. - 686 - 687 Raises: ValueError if parameter does not exists - 688 """ - 689 return pdffit2.getpar(self._handle, par) -
690 - 691 -
692 - def fixpar(self, par): -
693 """fixpar(par) --> Fix a parameter. - 694 - 695 Fixed parameters are not fitted in a refinement. Passed parameter - 696 can be 'ALL', in which case all parameters are fixed. - 697 - 698 Raises: pdffit.unassignedError when parameter has not been assigned - 699 """ - 700 if type(par) in types.StringTypes and par.upper() in self.selalias: - 701 par = self.selalias[par.upper()] - 702 pdffit2.fixpar(self._handle, par) - 703 return -
704 - 705 -
706 - def freepar(self, par): -
707 """freepar(par) --> Free a parameter. - 708 - 709 Freed parameters are fitted in a refinement. Passed parameter - 710 can be 'ALL', in which case all parameters are freed. - 711 - 712 Raises: pdffit.unassignedError when parameter has not been assigned - 713 """ - 714 if type(par) in types.StringTypes and par.upper() in self.selalias: - 715 par = self.selalias[par.upper()] - 716 pdffit2.freepar(self._handle, par) - 717 return -
718 - 719 -
720 - def setphase(self, ip): -
721 """setphase(ip) --> Switch to phase ip. - 722 - 723 ip -- index of the phase starting at 1. - 724 - 725 All parameters assigned after this method is called refer only to the - 726 current phase. - 727 - 728 Raises: pdffit.unassignedError when phase does not exist - 729 """ - 730 pdffit2.setphase(self._handle, ip) - 731 return -
732 - 733 -
734 - def setdata(self, iset): -
735 """setdata(iset) --> Set the data set in focus. - 736 - 737 iset -- integer index of data set starting at 1. - 738 - 739 Raises: pdffit.unassignedError when data set does not exist - 740 """ - 741 pdffit2.setdata(self._handle, iset) - 742 return -
743 - 744 -
745 - def psel(self, ip): -
746 """psel(ip) --> Include phase ip in calculation of total PDF - 747 - 748 psel('ALL') selects all phases for PDF calculation. - 749 - 750 Raises: pdffit2.unassignedError if selected phase does not exist - 751 """ - 752 if type(ip) in types.StringTypes and ip.upper() in self.selalias: - 753 ip = self.selalias[ip.upper()] - 754 pdffit2.psel(self._handle, ip) - 755 return -
756 - 757 -
758 - def pdesel(self, ip): -
759 """pdesel(ip) --> Exclude phase ip from calculation of total PDF. - 760 - 761 pdesel('ALL') excludes all phases from PDF calculation. - 762 - 763 Raises: pdffit2.unassignedError if selected phase does not exist - 764 """ - 765 if type(ip) in types.StringTypes and ip.upper() in self.selalias: - 766 ip = self.selalias[ip.upper()] - 767 pdffit2.pdesel(self._handle, ip) - 768 return -
769 - 770 -
771 - def selectAtomType(self, ip, ijchar, symbol, flag): -
772 """Configure partial PDF - mark the specified atom type in phase ip - 773 as included or excluded as a first or second in pair for distance - 774 evaluation. - 775 - 776 ip -- phase index starting at 1 - 777 ijchar -- 'i' or 'j' for first or second in pair - 778 symbol -- element symbol - 779 flag -- bool flag, True for selection, False for exclusion - 780 - 781 Raises: - 782 pdffit2.unassignedError if selected phase does not exist - 783 ValueError for invalid value of ijchar - 784 """ - 785 pdffit2.selectAtomType(self._handle, ip, ijchar, symbol, flag) - 786 return -
787 - 788 -
789 - def selectAtomIndex(self, ip, ijchar, aidx, flag): -
790 """Configure partial PDF - mark the atom of given index in phase ip - 791 as included or excluded as a first or second in pair for distance - 792 evaluation. - 793 - 794 ip -- phase index starting at 1 - 795 ijchar -- 'i' or 'j' for first or second in pair - 796 aidx -- integer index of atom starting at 1 - 797 flag -- bool flag, True for selection, False for exclusion - 798 - 799 Raises: - 800 pdffit2.unassignedError if selected phase does not exist - 801 ValueError if atom index or ijchar are invalid - 802 """ - 803 pdffit2.selectAtomIndex(self._handle, ip, ijchar, aidx, flag) - 804 return -
805 - 806 -
807 - def selectAll(self, ip, ijchar): -
808 """Configure partial PDF - include all atoms of phase ip as first or - 809 second element in pair for distance evaluation. - 810 - 811 ip -- phase index starting at 1 - 812 ijchar -- 'i' or 'j' for first or second in pair - 813 - 814 Raises: - 815 pdffit2.unassignedError if selected phase does not exist - 816 ValueError if ijchar is invalid - 817 """ - 818 pdffit2.selectAll(self._handle, ip, ijchar) - 819 return -
820 - 821 -
822 - def selectNone(self, ip, ijchar): -
823 """Configure partial PDF - exclude all atoms of phase ip from first - 824 or second element of pair distance evaluation. - 825 - 826 ip -- phase index starting at 1 - 827 ijchar -- 'i' or 'j' for first or second in pair - 828 - 829 Raises: - 830 pdffit2.unassignedError if selected phase does not exist - 831 ValueError if ijchar is invalid - 832 """ - 833 pdffit2.selectNone(self._handle, ip, ijchar) - 834 return -
835 - 836 -
837 - def bang(self, i, j, k): -
838 """bang(i, j, k) --> Show bond angle defined by atoms i, j, k. - 839 - 840 No return value. Use bond_angle() to get the result. - 841 - 842 Raises: ValueError if selected atom(s) does not exist - 843 pdffit.unassignedError when no structure has been loaded - 844 """ - 845 angle, stdev = pdffit2.bond_angle(self._handle, i, j, k) - 846 # indices should be already checked here by bond_angle - 847 atom_symbols = self.get_atoms() - 848 leader = " %s (#%i) - %s (#%i) - %s (#%i) = " % \ - 849 (atom_symbols[i-1], i, atom_symbols[j-1], j, - 850 atom_symbols[k-1], k) - 851 s = leader + _format_value_std(angle, stdev) + " degrees" - 852 print >> output.stdout, s - 853 return -
854 - 855 -
856 - def bond_angle(self, i, j, k): -
857 """bond_angle(i, j, k) --> bond angle defined by atoms i, j, k. - 858 Angle is calculated using the shortest ji and jk lengths with - 859 respect to periodic boundary conditions. - 860 - 861 i, j, k -- atom indices starting at 1 - 862 - 863 Return a tuple of (angle, angle_error), both values are in degrees. - 864 - 865 Raises: ValueError if selected atom(s) does not exist - 866 pdffit.unassignedError when no structure has been loaded - 867 """ - 868 rv = pdffit2.bond_angle(self._handle, i, j, k) - 869 return rv -
870 - 871 -
872 - def blen(self, *args): -
873 """blen(i, j) --> Show bond length defined by atoms i and j. - 874 - 875 i -- index of the first atom starting at 1 - 876 j -- index of the second atom starting at 1 - 877 - 878 No return value. Use bond_length_atoms() to retrieve result. - 879 - 880 Second form: - 881 - 882 blen(a1, a2, lb, ub) --> Show sorted lengths of all a1-a2 bonds. - 883 - 884 a1 -- symbol of the first element in pair or "ALL" - 885 a2 -- symbol of the second element in pair or "ALL" - 886 lb -- lower bond length boundary - 887 ub -- upper bond length boundary - 888 - 889 No return value. Use bond_length_types() to retrieve results. - 890 - 891 Raises: ValueError if selected atom(s) does not exist - 892 pdffit.unassignedError when no structure has been loaded - 893 """ - 894 # first form - 895 if len(args)==2: - 896 dij, ddij = self.bond_length_atoms(*args[0:2]) - 897 atom_symbols = self.get_atoms() - 898 ij = (args[0], args[1]) - 899 # check ij - 900 if min(ij) - 1 < 0 or max(ij) - 1 >= len(atom_symbols): - 901 emsg = "Incorrect atom number(s): %i, %j" % ij - 902 raise ValueError, emsg - 903 symij = ( atom_symbols[ij[0] - 1].upper(), - 904 atom_symbols[ij[1] - 1].upper() ) - 905 print >> output.stdout, _format_bond_length(dij, ddij, ij, symij) - 906 # second form - 907 elif len(args)==4: - 908 a1, a2, lb, ub = args - 909 try: - 910 atom_types = self.get_atom_types() - 911 if type(a1) is types.IntType: a1 = atom_types[a1 - 1] - 912 if type(a2) is types.IntType: a2 = atom_types[a2 - 1] - 913 except IndexError: - 914 # index of non-existant atom type - 915 return - 916 # arguments are OK here, get bond length dictionary - 917 bld = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) - 918 s = "(%s,%s) bond lengths in [%gA,%gA] for current phase :" % \ - 919 (a1, a2, lb, ub) - 920 print >> output.stdout, s - 921 atom_symbols = self.get_atoms() - 922 npts = len(bld['dij']) - 923 for idx in range(npts): - 924 dij = bld['dij'][idx] - 925 ddij = bld['ddij'][idx] - 926 ij0 = bld['ij0'][idx] - 927 ij1 = bld['ij1'][idx] - 928 symij = (atom_symbols[ij0[0]], atom_symbols[ij0[1]]) - 929 s = _format_bond_length(dij, ddij, ij1, symij) - 930 print >> output.stdout, s - 931 print >> output.stdout - 932 if not bld['dij']: - 933 print >> output.stdout, " *** No pairs found ***" - 934 else: - 935 emsg = "blen() takes 2 or 4 arguments (%i given)" % len(args) - 936 raise TypeError, emsg - 937 # done - 938 return -
939 - 940 -
941 - def bond_length_atoms(self, i, j): -
942 """bond_length_atoms(i, j) --> shortest distance between atoms i, j. - 943 Periodic boundary conditions are applied to find the shortest bond. - 944 - 945 i -- index of the first atom starting at 1 - 946 j -- index of the second atom starting at 1 - 947 - 948 Return a tuple of (distance, distance_error). - 949 - 950 Raises: ValueError if selected atom(s) does not exist - 951 pdffit.unassignedError when no structure has been loaded. - 952 """ - 953 rv = pdffit2.bond_length_atoms(self._handle, i, j) - 954 return rv -
955 - 956 -
957 - def bond_length_types(self, a1, a2, lb, ub): -
958 """bond_length_types(a1, a2, lb, ub) --> get all a1-a2 distances. - 959 - 960 a1 -- symbol of the first element in pair or "ALL" - 961 a2 -- symbol of the second element in pair or "ALL" - 962 lb -- lower bond length boundary - 963 ub -- upper bond length boundary - 964 - 965 Return a dictionary of distance data containing - 966 - 967 dij : list of bond lenghts within given bounds - 968 ddij : list of bond legnth standard deviations - 969 ij0 : pairs of atom indices starting from 0 - 970 ij1 : pairs of atom indices starting from 1 - 971 - 972 Raises: ValueError if selected atom(s) does not exist - 973 pdffit.unassignedError when no structure has been loaded. - 974 """ - 975 rv = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) - 976 return rv -
977 - 978 -
979 - def show_scat(self, stype): -
980 """show_scat(stype) --> Print scattering length for all atoms in - 981 the current phase. - 982 - 983 stype -- 'X' (xray) or 'N' (neutron). - 984 - 985 Raises: pdffit2.unassignedError if no phase exists - 986 """ - 987 print >> output.stdout, self.get_scat_string(stype) - 988 return -
989 - 990 -
991 - def get_scat_string(self, stype): -
992 """get_scat_string(stype) --> Get string with scattering factors - 993 of all atoms in the current phase. - 994 - 995 stype -- 'X' (xray) or 'N' (neutron). - 996 - 997 Raises: - 998 pdffit2.unassignedError if no phase exists - 999 -1000 Returns: string with all scattering factors. -1001 """ -1002 return pdffit2.get_scat_string(self._handle, stype) -
1003 -1004 -
1005 - def get_scat(self, stype, element): -
1006 """get_scat(stype, element) --> Get active scattering factor for -1007 given element. If scattering factor has been changed using -1008 set_scat the result may depend on the active phase. When no -1009 phase has been loaded, return the standard value. -1010 -1011 stype -- 'X' (xray) or 'N' (neutron). -1012 element -- case-insensitive element symbol such as "Na" or "CL" -1013 -1014 Return float. -1015 -1016 Raises: -1017 ValueError if element is not known. -1018 """ -1019 rv = pdffit2.get_scat(self._handle, stype, element) -1020 return rv -
1021 -1022 -
1023 - def set_scat(self, stype, element, value): -
1024 """set_scat(stype, element, value) --> Set custom scattering factor -1025 for given element. The new scattering factor applies only for the -1026 current phase, in other phases it keeps its default value. -1027 -1028 stype -- 'X' (xray) or 'N' (neutron). -1029 element -- case-insensitive element symbol such as "Na" or "CL" -1030 value -- new value of scattering factor -1031 -1032 No return value. -1033 -1034 Raises: -1035 pdffit2.unassignedError if no phase exists. -1036 ValueError if element is not known. -1037 -1038 See also reset_scat, get_scat. -1039 """ -1040 pdffit2.set_scat(self._handle, stype, element, value) -1041 return -
1042 -1043 -
1044 - def reset_scat(self, element): -
1045 """reset_scat(stype, element) --> Reset scattering factors for -1046 given element to their standard values. The reset_scat applies -1047 only for the current phase. -1048 -1049 element -- case-insensitive element symbol such as "Na" or "CL" -1050 Raises: -1051 pdffit2.unassignedError if no phase exists -1052 ValueError if element is not known. -1053 """ -1054 pdffit2.reset_scat(self._handle, element) -1055 return -
1056 -1057 -
1058 - def num_atoms(self): -
1059 """num_atoms() --> Get number of atoms in current phase. -1060 -1061 Raises: pdffit2.unassignedError if no atoms exist -1062 """ -1063 return pdffit2.num_atoms(self._handle) -
1064 -1065 -
1066 - def num_phases(self): -
1067 """num_phases() --> Number of phases loaded in PdfFit instance. -1068 -1069 Use setphase to bring a specific phase in focus. -1070 -1071 Return integer. -1072 """ -1073 n = pdffit2.num_phases(self._handle) -1074 return n -
1075 -1076 -
1077 - def num_datasets(self): -
1078 """num_datasets() --> Number of datasets loaded in PdfFit instance. -1079 -1080 Use setdata to bring a specific dataset in focus. -1081 -1082 Return integer. -1083 """ -1084 n = pdffit2.num_datasets(self._handle) -1085 return n -
1086 -1087 -
1088 - def phase_fractions(self): -
1089 """phase_fractions() --> relative phase fractions for current dataset. -1090 Convert phase scale factors to relative phase fractions given the -1091 scattering type of current dataset. -1092 -1093 Return a dictionary of phase fractions with following keys: -1094 -1095 "atom" -- list of fractions normalized to atom count -1096 "stdatom" -- errors of atom count fractions -1097 "cell" -- list of fractions normalized to unit cell count -1098 "stdcell" -- errors of unit cell count fractions -1099 "mass" -- list of relative weight fractions -1100 "stdmass" -- errors of relative weight fractions -1101 -1102 Raises: pdffit2.unassignedError if no dataset exists. -1103 """ -1104 return pdffit2.phase_fractions(self._handle) -
1105 -1106 # Begin refinable variables. -1107 -
1108 - def lat(n): -
1109 """lat(n) --> Get reference to lattice variable n. -1110 -1111 n can be an integer or a string representing the lattice variable. -1112 1 <==> 'a' -1113 2 <==> 'b' -1114 3 <==> 'c' -1115 4 <==> 'alpha' -1116 5 <==> 'beta' -1117 6 <==> 'gamma' -1118 """ -1119 LatParams = { 'a':1, 'b':2, 'c':3, 'alpha':4, 'beta':5, 'gamma':6 } -1120 if type(n) is types.StringType: -1121 n = LatParams[n] -1122 return "lat(%i)" % n -
1123 lat = staticmethod(lat) -1124 -1125 -
1126 - def x(i): -
1127 """x(i) --> Get reference to x-value of atom i.""" -1128 return "x(%i)" % i -
1129 x = staticmethod(x) -1130 -1131 -
1132 - def y(i): -
1133 """y(i) --> Get reference to y-value of atom i.""" -1134 return "y(%i)" % i -
1135 y = staticmethod(y) -1136 -1137 -
1138 - def z(i): -
1139 """z(i) --> Get reference to z-value of atom i.""" -1140 return "z(%i)" % i -
1141 z = staticmethod(z) -1142 -1143 -
1144 - def u11(i): -
1145 """u11(i) --> Get reference to U(1,1) for atom i. -1146 -1147 U is the anisotropic thermal factor tensor. -1148 """ -1149 return "u11(%i)" % i -
1150 u11 = staticmethod(u11) -1151 -1152 -
1153 - def u22(i): -
1154 """u22(i) --> Get reference to U(2,2) for atom i. -1155 -1156 U is the anisotropic thermal factor tensor. -1157 """ -1158 return "u22(%i)" % i -
1159 u22 = staticmethod(u22) -1160 -1161 -
1162 - def u33(i): -
1163 """u33(i) --> Get reference to U(3,3) for atom i. -1164 -1165 U is the anisotropic thermal factor tensor. -1166 """ -1167 return "u33(%i)" % i -
1168 u33 = staticmethod(u33) -1169 -1170 -
1171 - def u12(i): -
1172 """u12(i) --> Get reference to U(1,2) for atom i. -1173 -1174 U is the anisotropic thermal factor tensor. -1175 """ -1176 return "u12(%i)" % i -
1177 u12 = staticmethod(u12) -1178 -1179 -
1180 - def u13(i): -
1181 """u13(i) --> Get reference to U(1,3) for atom i. -1182 -1183 U is the anisotropic thermal factor tensor. -1184 """ -1185 return "u13(%i)" % i -
1186 u13 = staticmethod(u13) -1187 -1188 -
1189 - def u23(i): -
1190 """u23(i) --> Get reference to U(2,3) for atom i. -1191 -1192 U is the anisotropic thermal factor tensor. -1193 """ -1194 return "u23(%i)" % i -
1195 u23 = staticmethod(u23) -1196 -1197 -
1198 - def occ(i): -
1199 """occ(i) --> Get reference to occupancy of atom i.""" -1200 return "occ(%i)" % i -
1201 occ = staticmethod(occ) -1202 -1203 -
1204 - def pscale(): -
1205 """pscale() --> Get reference to pscale. -1206 -1207 pscale is the fraction of the total structure that the current phase -1208 represents. -1209 """ -1210 return "pscale" -
1211 pscale = staticmethod(pscale) -1212 -1213 -
1214 - def sratio(): -
1215 """sratio() --> Get reference to sigma ratio. -1216 -1217 The sigma ratio determines the reduction in the Debye-Waller factor for -1218 distances below rcut. -1219 """ -1220 return "sratio" -
1221 sratio = staticmethod(sratio) -1222 -1223 -
1224 - def delta1(): -
1225 """delta1() --> Get reference to 1/R peak sharpening factor. -1226 """ -1227 return "delta1" -
1228 delta1 = staticmethod(delta1) -1229 -1230 -
1231 - def delta2(): -
1232 """delta2() --> Reference to (1/R^2) sharpening factor. -1233 The phenomenological correlation constant in the Debye-Waller factor. -1234 The (1/R^2) peak sharpening factor. -1235 """ -1236 return "delta2" -
1237 delta2 = staticmethod(delta2) -1238 -1239 -
1240 - def dscale(): -
1241 """dscale() --> Get reference to dscale. -1242 -1243 The data scale factor. -1244 """ -1245 return "dscale" -
1246 dscale = staticmethod(dscale) -1247 -1248 -
1249 - def qdamp(): -
1250 """qdamp() --> Get reference to qdamp. -1251 -1252 Qdamp controls PDF damping due to instrument Q-resolution. -1253 """ -1254 return "qdamp" -
1255 qdamp = staticmethod(qdamp) -1256 -1257 -
1258 - def qbroad(): -
1259 """qbroad() --> Get reference to qbroad. -1260 -1261 Quadratic peak broadening factor. -1262 """ -1263 return "qbroad" -
1264 qbroad = staticmethod(qbroad) -1265 -1266 -
1267 - def spdiameter(): -
1268 """spdiameter() --> Get reference to spdiameter (phase property). -1269 -1270 Diameter value for the spherical particle PDF correction. -1271 Spherical envelope is not applied when spdiameter equals 0. -1272 """ -1273 return "spdiameter" -
1274 spdiameter = staticmethod(spdiameter) -1275 -1276 -
1277 - def stepcut(): -
1278 """stepcut() --> Get reference to stepcut (phase property). -1279 -1280 stepcut is cutoff radius for empirical step-function PDF envelope. -1281 stepcut can be used to approximate loss of pair correlations -1282 in amorphous phase. stepcut cannot be refined. -1283 -1284 Step cutoff is not applied when stepcut equals 0. -1285 """ -1286 return "stepcut" -
1287 stepcut = staticmethod(stepcut) -1288 -1289 -
1290 - def rcut(): -
1291 """rcut() --> Get reference to rcut. -1292 -1293 rcut is the value of r below which peak sharpening, defined by -1294 the sigma ratio (sratio), applies. rcut cannot be refined. -1295 """ -1296 return "rcut" -
1297 rcut = staticmethod(rcut) -1298 -1299 -1300 # End refinable variables. -1301 -
1302 - def __init__(self): -
1303 -1304 self.stru_files = [] -1305 self.data_files = [] -1306 -1307 self._handle = pdffit2.create() -1308 self.intro() -1309 return -
1310 -1311 -
1312 - def __getRef(self, var_string): -
1313 """Return the actual reference to the variable in the var_string. -1314 -1315 This function must be called before trying to actually reference an -1316 internal variable. See the constrain method for an example. -1317 -1318 Raises: -1319 pdffit2.unassignedError if variable is not yet assigned -1320 ValueError if variable index does not exist (e.g. lat(7)) -1321 """ -1322 var_string = _convertCallable(var_string) -1323 arg_int = None -1324 try: -1325 method_string, arg_string = var_string.split("(") -1326 method_string = method_string.strip() -1327 arg_int = int(arg_string.strip(")").strip()) -1328 except ValueError: #There is no arg_string -1329 method_string = var_string.strip() -1330 -1331 f = getattr(pdffit2, method_string) -1332 if arg_int is None: -1333 retval = f(self._handle) -1334 else: -1335 retval = f(self._handle, arg_int) -1336 return retval -
1337 -1338 -1339 # End of class PdfFit -1340 -1341 -1342 # End of file -1343 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.pdffit.PdfFit-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.pdffit.PdfFit-class.html deleted file mode 100644 index abe69c47..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.pdffit.PdfFit-class.html +++ /dev/null @@ -1,4129 +0,0 @@ - - - - - diffpy.pdffit2.pdffit.PdfFit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Module pdffit :: - Class PdfFit - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class PdfFit

source code

-
-object --+
-         |
-        PdfFit
-
- -
-
-Create PdfFit object.
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
_exportAll(self, - namespace)
- _exportAll(self, namespace) --> Export all 'public' class methods - into namespace.
- source code - -
- -
-   - - - - - - -
add_structure(self, - stru)
- add_structure(stru) --> Add new structure to PdfFit instance.
- source code - -
- -
-   - - - - - - -
read_struct(self, - struct)
- read_struct(struct) --> Read structure from file into memory.
- source code - -
- -
-   - - - - - - -
read_struct_string(self, - struct, - name='')
- read_struct_string(struct, name = "") --> Read structure from -a string into memory.
- source code - -
- -
-   - - - - - - -
read_data(self, - data, - stype, - qmax, - qdamp)
- read_data(data, stype, qmax, qdamp) --> Read pdf data from file into -memory.
- source code - -
- -
-   - - - - - - -
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.
- source code - -
- -
-   - - - - - - -
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.
- source code - -
- -
-   - - - - - - -
pdfrange(self, - iset, - rmin, - rmax)
- pdfrange(iset, rmin, rmax) --> Set the range of the fit.
- source code - -
- -
-   - - - - - - -
reset(self)
- reset() --> Clear all stored fit, structure, and parameter data.
- source code - -
- -
-   - - - - - - -
alloc(self, - stype, - qmax, - qdamp, - rmin, - rmax, - bin)
- alloc(stype, qmax, qdamp, rmin, rmax, bin) --> Allocate space -for a PDF calculation.
- source code - -
- -
-   - - - - - - -
calc(self)
- calc() --> Calculate the PDF of the imported structure.
- source code - -
- -
-   - - - - - - -
refine(self, - toler=1e-08)
- refine(toler = 0.00000001) --> Fit the theory to the imported data.
- source code - -
- -
-   - - - - - - -
refine_step(self, - toler=1e-08)
- refine_step(toler = 0.00000001) --> Run a single step of the fit.
- source code - -
- -
-   - - - - - - -
save_pdf(self, - iset, - fname)
- save_pdf(iset, fname) --> Save calculated or fitted PDF to file.
- source code - -
- -
-   - - - - - - -
save_pdf_string(self, - iset)
- save_pdf_string(iset) --> Save calculated or fitted PDF to string.
- source code - -
- -
-   - - - - - - -
save_dif(self, - iset, - fname)
- save_dif(iset, fname) --> Save data and fitted PDF difference to -file.
- source code - -
- -
-   - - - - - - -
save_dif_string(self, - iset)
- save_dif_string(iset) --> Save data and fitted PDF difference to -string.
- source code - -
- -
-   - - - - - - -
save_res(self, - fname)
- save_res(fname) --> Save fit-specific data to file.
- source code - -
- -
-   - - - - - - -
save_res_string(self)
- save_res_string() --> Save fit-specific data to a string.
- source code - -
- -
-   - - - - - - -
get_structure(self, - ip)
- get_structure(ip) --> Get a copy of specified phase data.
- source code - -
- -
-   - - - - - - -
save_struct(self, - ip, - fname)
- save_struct(ip, fname) --> Save structure resulting from fit -to file.
- source code - -
- -
-   - - - - - - -
save_struct_string(self, - ip)
- save_struct(ip) --> Save structure resulting from fit to string.
- source code - -
- -
-   - - - - - - -
show_struct(self, - ip)
- show_struct(ip) --> Print structure resulting from fit.
- source code - -
- -
-   - - - - - - -
constrain(self, - var, - par, - fcon=None)
- constrain(var, par[, fcon]) --> Constrain a variable to a parameter.
- source code - -
- -
-   - - - - - - -
setpar(self, - par, - val)
- setpar(par, val) --> Set value of constrained parameter.
- source code - -
- -
-   - - - - - - -
setvar(self, - var, - val)
- setvar(var, val) --> Set the value of a variable.
- source code - -
- -
-   - - - - - - -
getvar(self, - var)
- getvar(var) --> Get stored value of a variable.
- source code - -
- -
-   - - - - - - -
getrw(self)
- getrw() --> Get normalized total error of the fit rw.
- source code - -
- -
-   - - - - - - -
getcrw(self)
- getcrw() --> Get cumulative Rw for the current dataset.
- source code - -
- -
-   - - - - - - -
getR(self)
- getR() --> Get r-points used in the fit.
- source code - -
- -
-   - - - - - - -
getpdf_fit(self)
- getpdf_fit() --> Get fitted PDF.
- source code - -
- -
-   - - - - - - -
getpdf_obs(self)
- getpdf_obs() --> Get observed PDF.
- source code - -
- -
-   - - - - - - -
getpdf_diff(self)
- Obtain difference between observed and fitted PDF.
- source code - -
- -
-   - - - - - - -
get_atoms(self, - ip=None)
- get_atoms() --> Get element symbols of all atoms in the structure.
- source code - -
- -
-   - - - - - - -
get_atom_types(self, - ip=None)
- get_atom_types() --> Ordered unique element symbols in the structure.
- source code - -
- -
-   - - - - - - -
getpar(self, - par)
- getpar(par) --> Get value of parameter.
- source code - -
- -
-   - - - - - - -
fixpar(self, - par)
- fixpar(par) --> Fix a parameter.
- source code - -
- -
-   - - - - - - -
freepar(self, - par)
- freepar(par) --> Free a parameter.
- source code - -
- -
-   - - - - - - -
setphase(self, - ip)
- setphase(ip) --> Switch to phase ip.
- source code - -
- -
-   - - - - - - -
setdata(self, - iset)
- setdata(iset) --> Set the data set in focus.
- source code - -
- -
-   - - - - - - -
psel(self, - ip)
- psel(ip) --> Include phase ip in calculation of total PDF
- source code - -
- -
-   - - - - - - -
pdesel(self, - ip)
- pdesel(ip) --> Exclude phase ip from calculation of total PDF.
- source code - -
- -
-   - - - - - - -
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.
- source code - -
- -
-   - - - - - - -
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.
- source code - -
- -
-   - - - - - - -
selectAll(self, - ip, - ijchar)
- Configure partial PDF - include all atoms of phase ip as first or -second element in pair for distance evaluation.
- source code - -
- -
-   - - - - - - -
selectNone(self, - ip, - ijchar)
- Configure partial PDF - exclude all atoms of phase ip from first -or second element of pair distance evaluation.
- source code - -
- -
-   - - - - - - -
bang(self, - i, - j, - k)
- bang(i, j, k) --> Show bond angle defined by atoms i, j, k.
- source code - -
- -
-   - - - - - - -
bond_angle(self, - i, - j, - k)
- bond_angle(i, j, k) --> bond angle defined by atoms i, j, k.
- source code - -
- -
-   - - - - - - -
blen(self, - *args)
- blen(i, j) --> Show bond length defined by atoms i and j.
- source code - -
- -
-   - - - - - - -
bond_length_atoms(self, - i, - j)
- bond_length_atoms(i, j) --> shortest distance between atoms i, j.
- source code - -
- -
-   - - - - - - -
bond_length_types(self, - a1, - a2, - lb, - ub)
- bond_length_types(a1, a2, lb, ub) --> get all a1-a2 distances.
- source code - -
- -
-   - - - - - - -
show_scat(self, - stype)
- show_scat(stype) --> Print scattering length for all atoms in -the current phase.
- source code - -
- -
-   - - - - - - -
get_scat_string(self, - stype)
- get_scat_string(stype) --> Get string with scattering factors -of all atoms in the current phase.
- source code - -
- -
-   - - - - - - -
get_scat(self, - stype, - element)
- get_scat(stype, element) --> Get active scattering factor for -given element.
- source code - -
- -
-   - - - - - - -
set_scat(self, - stype, - element, - value)
- set_scat(stype, element, value) --> Set custom scattering factor -for given element.
- source code - -
- -
-   - - - - - - -
reset_scat(self, - element)
- reset_scat(stype, element) --> Reset scattering factors for -given element to their standard values.
- source code - -
- -
-   - - - - - - -
num_atoms(self)
- num_atoms() --> Get number of atoms in current phase.
- source code - -
- -
-   - - - - - - -
num_phases(self)
- num_phases() --> Number of phases loaded in PdfFit instance.
- source code - -
- -
-   - - - - - - -
num_datasets(self)
- num_datasets() --> Number of datasets loaded in PdfFit instance.
- source code - -
- -
-   - - - - - - -
phase_fractions(self)
- phase_fractions() --> relative phase fractions for current dataset.
- source code - -
- -
-   - - - - - - -
__init__(self)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__getRef(self, - var_string)
- Return the actual reference to the variable in the var_string.
- source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Static Methods[hide private]
-
-   - - - - - - -
intro()
- Show introductory message.
- source code - -
- -
-   - - - - - - -
lat(n)
- lat(n) --> Get reference to lattice variable n.
- source code - -
- -
-   - - - - - - -
x(i)
- x(i) --> Get reference to x-value of atom i.
- source code - -
- -
-   - - - - - - -
y(i)
- y(i) --> Get reference to y-value of atom i.
- source code - -
- -
-   - - - - - - -
z(i)
- z(i) --> Get reference to z-value of atom i.
- source code - -
- -
-   - - - - - - -
u11(i)
- u11(i) --> Get reference to U(1,1) for atom i.
- source code - -
- -
-   - - - - - - -
u22(i)
- u22(i) --> Get reference to U(2,2) for atom i.
- source code - -
- -
-   - - - - - - -
u33(i)
- u33(i) --> Get reference to U(3,3) for atom i.
- source code - -
- -
-   - - - - - - -
u12(i)
- u12(i) --> Get reference to U(1,2) for atom i.
- source code - -
- -
-   - - - - - - -
u13(i)
- u13(i) --> Get reference to U(1,3) for atom i.
- source code - -
- -
-   - - - - - - -
u23(i)
- u23(i) --> Get reference to U(2,3) for atom i.
- source code - -
- -
-   - - - - - - -
occ(i)
- occ(i) --> Get reference to occupancy of atom i.
- source code - -
- -
-   - - - - - - -
pscale()
- pscale() --> Get reference to pscale.
- source code - -
- -
-   - - - - - - -
sratio()
- sratio() --> Get reference to sigma ratio.
- source code - -
- -
-   - - - - - - -
delta1()
- delta1() --> Get reference to 1/R peak sharpening factor.
- source code - -
- -
-   - - - - - - -
delta2()
- delta2() --> Reference to (1/R^2) sharpening factor.
- source code - -
- -
-   - - - - - - -
dscale()
- dscale() --> Get reference to dscale.
- source code - -
- -
-   - - - - - - -
qdamp()
- qdamp() --> Get reference to qdamp.
- source code - -
- -
-   - - - - - - -
qbroad()
- qbroad() --> Get reference to qbroad.
- source code - -
- -
-   - - - - - - -
spdiameter()
- spdiameter() --> Get reference to spdiameter (phase property).
- source code - -
- -
-   - - - - - - -
stepcut()
- stepcut() --> Get reference to stepcut (phase property).
- source code - -
- -
-   - - - - - - -
rcut()
- rcut() --> Get reference to rcut.
- source code - -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - selalias = {'ALL': -1} -
-   - - FCON = {'FCOMP': 2, 'FSQR': 3, 'IDENT': 1, 'USER': 0} -
-   - - Sctp = {'N': 1, 'X': 0} -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

_exportAll(self, - namespace) -

-
source code  -
- -
-_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().
-
-
-
-
-
-
- -
- -
- - -
-

add_structure(self, - stru) -

-
source code  -
- -
-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.
-
-
-
-
-
-
- -
- -
- - -
-

read_struct(self, - struct) -

-
source code  -
- -
-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(self, - struct, - name='') -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

read_data(self, - data, - stype, - qmax, - qdamp) -

-
source code  -
- -
-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_string(self, - data, - stype, - qmax, - qdamp, - name='') -

-
source code  -
- -
-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_data_lists(self, - stype, - qmax, - qdamp, - r_data, - Gr_data, - dGr_data=None, - name='list') -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

pdfrange(self, - iset, - rmin, - rmax) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

alloc(self, - stype, - qmax, - qdamp, - rmin, - rmax, - bin) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

calc(self) -

-
source code  -
- -
-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
-    accomodate calculation
-    pdffit.unassignedError when space for calculation has not been
-    allocated
-
-
-
-
-
-
- -
- -
- - -
-

refine(self, - toler=1e-08) -

-
source code  -
- -
-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(self, - toler=1e-08) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

save_pdf(self, - iset, - fname) -

-
source code  -
- -
-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(self, - iset) -

-
source code  -
- -
-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_dif(self, - iset, - fname) -

-
source code  -
- -
-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(self, - iset) -

-
source code  -
- -
-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_res(self, - fname) -

-
source code  -
- -
-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(self) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

get_structure(self, - ip) -

-
source code  -
- -
-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.
-
-
-
-
-
-
- -
- -
- - -
-

save_struct(self, - ip, - fname) -

-
source code  -
- -
-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(self, - ip) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

show_struct(self, - ip) -

-
source code  -
- -
-show_struct(ip) --> Print structure resulting from fit.
-
-ip    -- phase to display
-
-Raises: pdffit2.unassignedError if the phase is undefined
-
-
-
-
-
-
- -
- -
- - -
-

constrain(self, - var, - par, - fcon=None) -

-
source code  -
- -
-constrain(var, par[, fcon]) --> Constrain a variable to a parameter.
-
-A variable can be constrained to a number or equation string.
-var     -- variable to constrain, such as x(1)
-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.
-           e.g.
-           >>>  constrain(x(1), 1)
-           >>>  constrain(x(2), "0.5+@1")
-fcon    -- 'USER', 'IDENT', 'FCOMP', or 'FSQR'
-           this is an optional parameter, and I don't know how it is
-           used!
-
-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))
-
-
-
-
-
-
- -
- -
- - -
-

setpar(self, - par, - val) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

setvar(self, - var, - val) -

-
source code  -
- -
-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))
-
-
-
-
-
-
- -
- -
- - -
-

getvar(self, - var) -

-
source code  -
- -
-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))
-
-
-
-
-
-
- -
- -
- - -
-

getrw(self) -

-
source code  -
- -
-getrw() --> Get normalized total error of the fit rw.
-
-getrw calculates total fit error summed for all datasets in the fit.
-
-Return float.
-
-
-
-
-
-
- -
- -
- - -
-

getcrw(self) -

-
source code  -
- -
-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.
-
-
-
-
-
-
- -
- -
- - -
-

getR(self) -

-
source code  -
- -
-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. Afterwords, they will reflect the fit range.
-
-Raises: pdffit2.unassignedError if no data exists
-
-Returns: List of equidistance r-points used in fit.
-
-
-
-
-
-
- -
- -
- - -
-

getpdf_fit(self) -

-
source code  -
- -
-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(self) -

-
source code  -
- -
-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. Afterwords, they will reflect the fit range.
-
-Raises: pdffit2.unassignedError if no data exists
-
-Returns: List of data points, equidistant in r.
-
-
-
-
-
-
- -
- -
- - -
-

getpdf_diff(self) -

-
source code  -
- -
-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. Afterwords, they will reflect the fit range.
-
-Raises: pdffit2.unassignedError if no data exists
-
-Returns: List of data points, equidistant in r.
-
-
-
-
-
-
- -
- -
- - -
-

get_atoms(self, - ip=None) -

-
source code  -
- -
-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_atom_types(self, - ip=None) -

-
source code  -
- -
-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.
-
-
-
-
-
-
- -
- -
- - -
-

getpar(self, - par) -

-
source code  -
- -
-getpar(par) --> Get value of parameter.
-
-Raises: ValueError if parameter does not exists
-
-
-
-
-
-
- -
- -
- - -
-

fixpar(self, - par) -

-
source code  -
- -
-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(self, - par) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

setphase(self, - ip) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

setdata(self, - iset) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

psel(self, - ip) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

pdesel(self, - ip) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

selectAtomType(self, - ip, - ijchar, - symbol, - flag) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

selectAtomIndex(self, - ip, - ijchar, - aidx, - flag) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

selectAll(self, - ip, - ijchar) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

selectNone(self, - ip, - ijchar) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

bang(self, - i, - j, - k) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

bond_angle(self, - i, - j, - k) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

blen(self, - *args) -

-
source code  -
- -
-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_length_atoms(self, - i, - j) -

-
source code  -
- -
-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(self, - a1, - a2, - lb, - ub) -

-
source code  -
- -
-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 lenghts within given bounds
-ddij : list of bond legnth 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.
-
-
-
-
-
-
- -
- -
- - -
-

show_scat(self, - stype) -

-
source code  -
- -
-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
-
-
-
-
-
-
- -
- -
- - -
-

get_scat_string(self, - stype) -

-
source code  -
- -
-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_scat(self, - stype, - element) -

-
source code  -
- -
-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.
-
-
-
-
-
-
- -
- -
- - -
-

set_scat(self, - stype, - element, - value) -

-
source code  -
- -
-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.
-
-
-
-
-
-
- -
- -
- - -
-

reset_scat(self, - element) -

-
source code  -
- -
-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.
-
-
-
-
-
-
- -
- -
- - -
-

num_atoms(self) -

-
source code  -
- -
-num_atoms() --> Get number of atoms in current phase.
-
-Raises: pdffit2.unassignedError if no atoms exist
-
-
-
-
-
-
- -
- -
- - -
-

num_phases(self) -

-
source code  -
- -
-num_phases() --> Number of phases loaded in PdfFit instance.
-
-Use setphase to bring a specific phase in focus.
-
-Return integer.
-
-
-
-
-
-
- -
- -
- - -
-

num_datasets(self) -

-
source code  -
- -
-num_datasets() --> Number of datasets loaded in PdfFit instance.
-
-Use setdata to bring a specific dataset in focus.
-
-Return integer.
-
-
-
-
-
-
- -
- -
- - -
-

phase_fractions(self) -

-
source code  -
- -
-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.
-
-
-
-
-
-
- -
- -
- - -
-

lat(n) -
Static Method -

-
source code  -
- -
-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'
-
-
-
-
-
-
- -
- -
- - -
-

u11(i) -
Static Method -

-
source code  -
- -
-u11(i) --> Get reference to U(1,1) for atom i.
-
-U is the anisotropic thermal factor tensor.
-
-
-
-
-
-
- -
- -
- - -
-

u22(i) -
Static Method -

-
source code  -
- -
-u22(i) --> Get reference to U(2,2) for atom i.
-
-U is the anisotropic thermal factor tensor.
-
-
-
-
-
-
- -
- -
- - -
-

u33(i) -
Static Method -

-
source code  -
- -
-u33(i) --> Get reference to U(3,3) for atom i.
-
-U is the anisotropic thermal factor tensor.
-
-
-
-
-
-
- -
- -
- - -
-

u12(i) -
Static Method -

-
source code  -
- -
-u12(i) --> Get reference to U(1,2) for atom i.
-
-U is the anisotropic thermal factor tensor.
-
-
-
-
-
-
- -
- -
- - -
-

u13(i) -
Static Method -

-
source code  -
- -
-u13(i) --> Get reference to U(1,3) for atom i.
-
-U is the anisotropic thermal factor tensor.
-
-
-
-
-
-
- -
- -
- - -
-

u23(i) -
Static Method -

-
source code  -
- -
-u23(i) --> Get reference to U(2,3) for atom i.
-
-U is the anisotropic thermal factor tensor.
-
-
-
-
-
-
- -
- -
- - -
-

pscale() -
Static Method -

-
source code  -
- -
-pscale() --> Get reference to pscale.
-
-pscale is the fraction of the total structure that the current phase
-represents.
-
-
-
-
-
-
- -
- -
- - -
-

sratio() -
Static Method -

-
source code  -
- -
-sratio() --> Get reference to sigma ratio.
-
-The sigma ratio determines the reduction in the Debye-Waller factor for
-distances below rcut.
-
-
-
-
-
-
- -
- -
- - -
-

delta2() -
Static Method -

-
source code  -
- -
-delta2() --> Reference to (1/R^2) sharpening factor.
-The phenomenological correlation constant in the Debye-Waller factor.
-The (1/R^2) peak sharpening factor.
-
-
-
-
-
-
- -
- -
- - -
-

dscale() -
Static Method -

-
source code  -
- -
-dscale() --> Get reference to dscale.
-
-The data scale factor.
-
-
-
-
-
-
- -
- -
- - -
-

qdamp() -
Static Method -

-
source code  -
- -
-qdamp() --> Get reference to qdamp.
-
-Qdamp controls PDF damping due to instrument Q-resolution.
-
-
-
-
-
-
- -
- -
- - -
-

qbroad() -
Static Method -

-
source code  -
- -
-qbroad() --> Get reference to qbroad.
-
-Quadratic peak broadening factor.
-
-
-
-
-
-
- -
- -
- - -
-

spdiameter() -
Static Method -

-
source code  -
- -
-spdiameter() --> Get reference to spdiameter (phase property).
-
-Diameter value for the spherical particle PDF correction.
-Spherical envelope is not applied when spdiameter equals 0.
-
-
-
-
-
-
- -
- -
- - -
-

stepcut() -
Static Method -

-
source code  -
- -
-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.
-
-
-
-
-
-
- -
- -
- - -
-

rcut() -
Static Method -

-
source code  -
- -
-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.
-
-
-
-
-
-
- -
- -
- - -
-

__init__(self) -
(Constructor) -

-
source code  -
- -
-x.__init__(...) initializes x; see help(type(x)) for signature
-
-
-
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__getRef(self, - var_string) -

-
source code  -
- -
-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))
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.pdffit2-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.pdffit2-module.html deleted file mode 100644 index ad4c7179..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.pdffit2-module.html +++ /dev/null @@ -1,1563 +0,0 @@ - - - - - diffpy.pdffit2.pdffit2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Module pdffit2 - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module pdffit2

-
-pdffit2 - interface to the core calculation routines in C++
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
alloc(...)
- Allocate space for pdf data
- - -
- -
-   - - - - - - -
bond_angle(...)
- Return bond angle between three atoms.
- - -
- -
-   - - - - - - -
bond_length_atoms(...)
- Return a tuple of (dij, ddij) for distance between two atoms -and its standard deviation.
- - -
- -
-   - - - - - - -
bond_length_types(...)
- Return bond lengths between two elements within given bounds
- - -
- -
-   - - - - - - -
calc(...)
- calculate pdf from data
- - -
- -
-   - - - - - - -
constrain_int(...)
- Constrain refined variable to integer.
- - -
- -
-   - - - - - - -
constrain_str(...)
- Constrain refined variable to string.
- - -
- -
-   - - - - - - -
copyright(...) - - -
- -
-   - - - - - - -
create(...) - - -
- -
-   - - - - - - -
delta1(...)
- Pointer to variable delta1.
- - -
- -
-   - - - - - - -
delta2(...)
- Pointer to variable delta2.
- - -
- -
-   - - - - - - -
dscale(...)
- Pointer to variable dscale.
- - -
- -
-   - - - - - - -
fixpar(...)
- Fix value of parameter.
- - -
- -
-   - - - - - - -
freepar(...)
- Free parameter.
- - -
- -
-   - - - - - - -
getR(...)
- Get list of r-values for plotting.
- - -
- -
-   - - - - - - -
get_atom_types(...)
- Get ordered unique symbols of atoms in the phase.
- - -
- -
-   - - - - - - -
get_atoms(...)
- Get element symbols of atoms in the phase.
- - -
- -
-   - - - - - - -
get_scat(...)
- Return scattering factor for given element.
- - -
- -
-   - - - - - - -
get_scat_string(...)
- Return string with scatter details.
- - -
- -
-   - - - - - - -
getcrw(...)
- Get cumulative Rw for the current dataset.
- - -
- -
-   - - - - - - -
getpar(...)
- Get value of parameter
- - -
- -
-   - - - - - - -
getpdf_diff(...)
- Get list of differences between observed and fitted PDF points.
- - -
- -
-   - - - - - - -
getpdf_fit(...)
- Get list of calculated pdf points.
- - -
- -
-   - - - - - - -
getpdf_obs(...)
- Get list of observed (theory) pdf points.
- - -
- -
-   - - - - - - -
getrw(...)
- Get rw of fit.
- - -
- -
-   - - - - - - -
getvar(...)
- Get variable value.
- - -
- -
-   - - - - - - -
is_element(...)
- Check if element or isotope is defined in the built-in periodic table.
- - -
- -
-   - - - - - - -
lat(...)
- Pointer to refinable variable lat.
- - -
- -
-   - - - - - - -
num_atoms(...)
- Get the number of atoms in the current phase.
- - -
- -
-   - - - - - - -
num_datasets(...)
- Get the number of loaded datasets.
- - -
- -
-   - - - - - - -
num_phases(...)
- Get the number of loaded phases.
- - -
- -
-   - - - - - - -
occ(...)
- Pointer to refinable variable occ.
- - -
- -
-   - - - - - - -
pdesel(...)
- Deselect phase in focus.
- - -
- -
-   - - - - - - -
pdfrange(...)
- Set r-range of pdf.
- - -
- -
-   - - - - - - -
phase_fractions(...)
- Return relative phase fractions for current dataset scattering type
- - -
- -
-   - - - - - - -
pscale(...)
- Pointer to variable pscale.
- - -
- -
-   - - - - - - -
psel(...)
- Select phase in focus.
- - -
- -
-   - - - - - - -
qbroad(...)
- Pointer to variable qbroad.
- - -
- -
-   - - - - - - -
qdamp(...)
- Pointer to variable qdamp.
- - -
- -
-   - - - - - - -
rcut(...)
- Pointer to nonvariable rcut.
- - -
- -
-   - - - - - - -
read_data(...)
- Read data file into memory.
- - -
- -
-   - - - - - - -
read_data_arrays(...)
- Read data from arrays into memory.
- - -
- -
-   - - - - - - -
read_data_string(...)
- Read data from string into memory.
- - -
- -
-   - - - - - - -
read_struct(...)
- Read structure file into memory.
- - -
- -
-   - - - - - - -
read_struct_string(...)
- Read structure file into memory from a c-string.
- - -
- -
-   - - - - - - -
redirect_stdout(...)
- Redirect engine output to a file-like object.
- - -
- -
-   - - - - - - -
refine(...)
- refine model to pdf data
- - -
- -
-   - - - - - - -
refine_step(...)
- Make one step in the refinement process.
- - -
- -
-   - - - - - - -
reset(...)
- reset pdf data
- - -
- -
-   - - - - - - -
reset_scat(...)
- Reset scattering factor for given element.
- - -
- -
-   - - - - - - -
save_dif(...)
- Save pdf difference to file
- - -
- -
-   - - - - - - -
save_pdf(...)
- Save calculated pdf to file
- - -
- -
-   - - - - - - -
save_res(...)
- Save residual to file
- - -
- -
-   - - - - - - -
save_struct(...)
- Save refined structure to file
- - -
- -
-   - - - - - - -
selectAll(...)
- Include all atoms in 'i' or 'j' pair of PDF calculation.
- - -
- -
-   - - - - - - -
selectAtomIndex(...)
- Include atom of given index in 'i' or 'j' pair of PDF calculation.
- - -
- -
-   - - - - - - -
selectAtomType(...)
- Include element in 'i' or 'j' pair of PDF calculation.
- - -
- -
-   - - - - - - -
selectNone(...)
- Include all atoms in 'i' or 'j' pair of PDF calculation.
- - -
- -
-   - - - - - - -
set_scat(...)
- Set custom scattering factor for given element.
- - -
- -
-   - - - - - - -
setdata(...)
- Set data in focus.
- - -
- -
-   - - - - - - -
setpar_RV(...)
- Set parameter value via refined variable.
- - -
- -
-   - - - - - - -
setpar_dbl(...)
- Set parameter value.
- - -
- -
-   - - - - - - -
setphase(...)
- Set phase in focus.
- - -
- -
-   - - - - - - -
setvar(...)
- Set variable to value.
- - -
- -
-   - - - - - - -
show_struct(...)
- Show structure.
- - -
- -
-   - - - - - - -
spdiameter(...)
- Pointer to variable spdiameter.
- - -
- -
-   - - - - - - -
sratio(...)
- Pointer to variable sratio.
- - -
- -
-   - - - - - - -
stepcut(...)
- Pointer to nonvariable stepcut.
- - -
- -
-   - - - - - - -
u11(...)
- Pointer to refinable variable u11.
- - -
- -
-   - - - - - - -
u12(...)
- Pointer to refinable variable u12.
- - -
- -
-   - - - - - - -
u13(...)
- Pointer to refinable variable u13.
- - -
- -
-   - - - - - - -
u22(...)
- Pointer to refinable variable u22.
- - -
- -
-   - - - - - - -
u23(...)
- Pointer to refinable variable u23.
- - -
- -
-   - - - - - - -
u33(...)
- Pointer to refinable variable u33.
- - -
- -
-   - - - - - - -
x(...)
- Pointer to refinable variable x.
- - -
- -
-   - - - - - - -
y(...)
- Pointer to refinable variable y.
- - -
- -
-   - - - - - - -
z(...)
- Pointer to refinable variable z.
- - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = None -
-

Imports: - RuntimeException, - calculationError, - constraintError, - dataError, - structureError, - unassignedError -


- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

bond_length_types(...) -

-
  -
- -
-Return bond lengths between two elements within given bounds
-
-a1    -- symbol of the first element in pair or 'ALL'
-a2    -- symbol of the second element in pair or 'ALL'
-lb    -- lower bound for bond lengths
-ub    -- upper bound for bond lengths
-
-Return a dictionary of distance data containing:
-
-dij  : list of bond lenghts within given bounds
-ddij : list of bond legnth standard deviations
-ij0  : list of tupled pairs of indices starting at 0
-ij1  : list of tupled pairs of indices starting at 1
-
-
-
-
-
-
- -
- -
- - -
-

phase_fractions(...) -

-
  -
- -
-Return relative phase fractions for current dataset scattering type
-
-Return a dictionary of relative phase fractions:
-
-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
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests-module.html deleted file mode 100644 index f9274bee..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests-module.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - diffpy.pdffit2.tests - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Package tests

source code

-
-Unit tests for the diffpy.pdffit2 package.
-
-
- - - - - - - - -
- - - - - -
Submodules[hide private]
-
-
- -
- - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
testsuite()
- Build a unit tests suite for the diffpy.pdffit2 package.
- source code - -
- -
-   - - - - - - -
test()
- Execute all unit tests for the diffpy.pdffit2 package.
- source code - -
- -
-   - - - - - - -
testdeps()
- Execute all unit tests for diffpy.pdffit2 and its dependencies.
- source code - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = None -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

testsuite() -

-
source code  -
- -
-Build a unit tests suite for the diffpy.pdffit2 package.
-
-Return a unittest.TestSuite object.
-
-
-
-
-
-
- -
- -
- - -
-

test() -

-
source code  -
- -
-Execute all unit tests for the diffpy.pdffit2 package.
-Return a unittest TestResult object.
-
-
-
-
-
-
- -
- -
- - -
-

testdeps() -

-
source code  -
- -
-Execute all unit tests for diffpy.pdffit2 and its dependencies.
-
-Return a unittest TestResult object.
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests-pysrc.html deleted file mode 100644 index e8f6ca78..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests-pysrc.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - diffpy.pdffit2.tests - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Package diffpy.pdffit2.tests

-
- 1  #!/usr/bin/env python 
- 2  ############################################################################## 
- 3  # 
- 4  # diffpy.pdffit2    by DANSE Diffraction group 
- 5  #                   Simon J. L. Billinge 
- 6  #                   (c) 2012 Trustees of the Columbia University 
- 7  #                   in the City of New York.  All rights reserved. 
- 8  # 
- 9  # File coded by:    Pavol Juhas 
-10  # 
-11  # See AUTHORS.txt for a list of people who contributed. 
-12  # See LICENSE.txt for license information. 
-13  # 
-14  ############################################################################## 
-15   
-16  """Unit tests for the diffpy.pdffit2 package. 
-17  """ 
-18   
-19   
-
20 -def testsuite(): -
21 '''Build a unit tests suite for the diffpy.pdffit2 package. -22 -23 Return a unittest.TestSuite object. -24 ''' -25 import unittest -26 modulenames = ''' -27 diffpy.pdffit2.tests.ExceptionsTest -28 diffpy.pdffit2.tests.TestPdfFit -29 diffpy.pdffit2.tests.TestPhaseFractions -30 diffpy.pdffit2.tests.TestShapeFactors -31 '''.split() -32 suite = unittest.TestSuite() -33 loader = unittest.defaultTestLoader -34 mobj = None -35 for mname in modulenames: -36 exec ('import %s as mobj' % mname) -37 suite.addTests(loader.loadTestsFromModule(mobj)) -38 return suite -
39 -40 -
41 -def test(): -
42 '''Execute all unit tests for the diffpy.pdffit2 package. -43 Return a unittest TestResult object. -44 ''' -45 import unittest -46 suite = testsuite() -47 runner = unittest.TextTestRunner() -48 result = runner.run(suite) -49 return result -
50 -51 -
52 -def testdeps(): -
53 '''Execute all unit tests for diffpy.pdffit2 and its dependencies. -54 -55 Return a unittest TestResult object. -56 ''' -57 import unittest -58 modulenames = ''' -59 diffpy.pdffit2.tests -60 diffpy.Structure.tests -61 '''.split() -62 suite = unittest.TestSuite() -63 t = None -64 for mname in modulenames: -65 exec ('from %s import testsuite as t' % mname) -66 suite.addTests(t()) -67 runner = unittest.TextTestRunner() -68 result = runner.run(suite) -69 return result -
70 -71 -72 # End of file -73 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest-module.html deleted file mode 100644 index 8c58be02..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest-module.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module ExceptionsTest

source code

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - read_structExceptions -
-   - - read_dataExceptions -
-   - - read_data_listsExceptions -
-   - - pdfrangeExceptions -
-   - - allocExceptions -
-   - - calcExceptions -
-   - - save_pdfExceptions -
-   - - save_difExceptions -
-   - - save_resExceptions -
-   - - save_structExceptions -
-   - - constrainExceptions -
-   - - setvarExceptions -
-   - - getvarExceptions -
-   - - getRExceptions -
-   - - getpdf_fitExceptions -
-   - - getpdf_obsExceptions -
-   - - getpdf_diffExceptions -
-   - - get_atomsExceptions -
-   - - getparExceptions -
-   - - pselExceptions -
-   - - pdeselExceptions -
-   - - selectAtomTypeExceptions -
-   - - selectAtomIndexExceptions -
-   - - selectAllExceptions -
-   - - selectNoneExceptions -
-   - - bangExceptions -
-   - - blenExceptions -
-   - - show_scatExceptions -
-   - - num_atomsExceptions -
-   - - fixparExceptions -
-   - - freeparExceptions -
-   - - setphaseExceptions -
-   - - setdataExceptions -
-   - - getcrwExceptions -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'diffpy.pdffit2.tests' -
-

Imports: - unittest, - PdfFit, - pdffit2, - datafile -


- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest-pysrc.html deleted file mode 100644 index 0d9bc142..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest-pysrc.html +++ /dev/null @@ -1,1191 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module diffpy.pdffit2.tests.ExceptionsTest

-
-  1  #!/usr/bin/env python 
-  2  ############################################################################## 
-  3  # 
-  4  # pdffit2           by DANSE Diffraction group 
-  5  #                   Simon J. L. Billinge 
-  6  #                   (c) 2006 trustees of the Michigan State University. 
-  7  #                   All rights reserved. 
-  8  # 
-  9  # File coded by:    Chris Farrow 
- 10  # 
- 11  # See AUTHORS.txt for a list of people who contributed. 
- 12  # See LICENSE.txt for license information. 
- 13  # 
- 14  ############################################################################## 
- 15   
- 16   
- 17  import unittest 
- 18   
- 19  from diffpy.pdffit2 import PdfFit 
- 20  from diffpy.pdffit2 import pdffit2 
- 21  from pdffit2testutils import datafile 
- 22   
- 23   
-
24 -class read_structExceptions(unittest.TestCase): -
25 -
26 - def setUp(self): -
27 self.P = PdfFit() -
28 -
29 - def tearDown(self): -
30 del self.P -
31 -
32 - def test_IOError(self): -
33 """raise IOError when structure file does not exist""" - 34 self.assertRaises(IOError, self.P.read_struct, "Nofile.stru") -
35 -
36 - def test_structureError(self): -
37 """raise pdffit2.structureError when structure is malformed""" - 38 self.assertRaises(pdffit2.structureError, self.P.read_struct, - 39 datafile("badNi.stru")) -
40 -
42 """raise pdffit2.structureError when unit cell volume is negative""" - 43 #I don't know how to test for this, but it's in the library code - 44 self.assertRaises(pdffit2.structureError, - 45 self.P.read_struct, datafile("badNiZeroVolume.stru")) -
46 -
47 -class read_dataExceptions(unittest.TestCase): -
48 -
49 - def setUp(self): -
50 self.P = PdfFit() -
51 -
52 - def tearDown(self): -
53 del self.P -
54 -
55 - def test_IOError(self): -
56 """raise IOError when data file does not exist""" - 57 self.assertRaises(IOError, self.P.read_data, "Nofile.dat", - 58 'X', 25.0, 0.5) -
59 -
60 - def test_dataError(self): -
61 """raise pdffit2.dataError when data has improper spacing""" - 62 self.assertRaises(pdffit2.dataError, self.P.read_data, - 63 datafile("badNi.dat"), 'X', 25.0, 0.5) -
64 -
65 -class read_data_listsExceptions(unittest.TestCase): -
66 -
67 - def setUp(self): -
68 self.P = PdfFit() - 69 self.r_data = [0.1, 0.2] - 70 self.Gr_data = [1, 2, 3] - 71 self.qmax = 10 - 72 self.qdamp = 0.5 -
73 -
74 - def tearDown(self): -
75 del self.P -
76 -
77 - def test_ValueError1(self): -
78 """raise ValueError when lists are of different length""" - 79 self.assertRaises(ValueError, self.P.read_data_lists, 'X', self.qmax, - 80 self.qdamp, self.r_data, self.Gr_data) -
81 -
82 - def test_ValueError2(self): -
83 """raise ValueError when qmax < 0""" - 84 self.assertRaises(ValueError, self.P.read_data_lists, 'X', -self.qmax, - 85 self.qdamp, self.r_data, self.Gr_data) -
86 -
87 - def test_ValueError3(self): -
88 """raise ValueError when qdamp < 0""" - 89 self.assertRaises(ValueError, self.P.read_data_lists, 'X', self.qmax, - 90 -self.qdamp, self.r_data, self.Gr_data) -
91 -
92 - def test_dataError(self): -
93 """raise pdffit2.dataError when data has improper spacing""" - 94 r_data = [0.1, 0.52, 0.2] - 95 self.assertRaises(pdffit2.dataError, self.P.read_data_lists, 'X', self.qmax, - 96 self.qdamp, r_data, self.Gr_data) -
97 - 98 -
99 -class pdfrangeExceptions(unittest.TestCase): -
100 -
101 - def setUp(self): -
102 self.P = PdfFit() -103 self.iset = 1 -104 self.rmin = 4.0 -105 self.rmax = 10.0 -
106 -
107 - def tearDown(self): -
108 del self.P -
109 -
110 - def test_ValueError1(self): -
111 """raise ValueError when iset does not exist""" -112 self.assertRaises(ValueError, self.P.pdfrange, self.iset, self.rmin, -113 self.rmax) -
114 -
115 - def test_ValueError2(self): -
116 """raise ValueError when rmax < rmin""" -117 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.5) -118 self.assertRaises(ValueError, self.P.pdfrange, self.iset, self.rmax, -119 self.rmin) -
120 -
121 - def test_ValueError3(self): -
122 """raise ValueError when range outside of data""" -123 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.5) -124 self.assertRaises(ValueError, self.P.pdfrange, self.iset, -self.rmin, -125 self.rmax) -
126 -127 -
128 -class allocExceptions(unittest.TestCase): -
129 -
130 - def setUp(self): -
131 self.P = PdfFit() -132 self.qmax = 25 -133 self.qdamp = 0.5 -134 self.rmin = 4.0 -135 self.rmax = 10.0 -136 self.bin = 100 -
137 -
138 - def tearDown(self): -
139 del self.P -
140 -
141 - def test_ValueError1(self): -
142 """raise ValueError when qmax < 0""" -143 self.P.read_struct(datafile("Ni.stru")) -144 self.assertRaises(ValueError, self.P.alloc, 'X', -self.qmax, self.qdamp, -145 self.rmin, self.rmax, self.bin) -
146 -
147 - def test_ValueError2(self): -
148 """raise ValueError when qdamp < 0""" -149 self.P.read_struct(datafile("Ni.stru")) -150 self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, -self.qdamp, -151 self.rmin, self.rmax, self.bin) -
152 -
153 - def test_ValueError3(self): -
154 """raise ValueError when rmin < 0""" -155 self.P.read_struct(datafile("Ni.stru")) -156 self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, self.qdamp, -157 -self.rmin, self.rmax, self.bin) -
158 -
159 - def test_ValueError4(self): -
160 """raise ValueError when rmax < 0""" -161 self.P.read_struct(datafile("Ni.stru")) -162 self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, self.qdamp, -163 self.rmin, -self.rmax, self.bin) -
164 -
165 - def test_ValueError5(self): -
166 """raise ValueError when bin < 0""" -167 self.P.read_struct(datafile("Ni.stru")) -168 self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, self.qdamp, -169 self.rmin, self.rmax, -self.bin) -
170 -
171 - def test_ValueError6(self): -
172 """raise ValueError when rmax < rmin""" -173 self.P.read_struct(datafile("Ni.stru")) -174 self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, self.qdamp, -175 self.rmax, self.rmin, self.bin) -
176 -
177 - def test_ValueError7(self): -
178 """raise ValueError when qdamp < 0""" -179 self.P.read_struct(datafile("Ni.stru")) -180 self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, self.qdamp, -181 self.rmin, self.rmax, -self.bin) -
182 -183 -
184 -class calcExceptions(unittest.TestCase): -
185 -
186 - def setUp(self): -
187 self.P = PdfFit() -188 self.P.read_struct(datafile("Ni.stru")) -
189 -
190 - def tearDown(self): -
191 del self.P -
192 -
193 - def test_unassignedError(self): -
194 """raise pdffit2.unassignedError when no space has been allocated""" -195 self.assertRaises(pdffit2.unassignedError, self.P.calc) -
196 -197 # PJ 2006-03-06 -198 # -199 # test_calculationError raised exception, because for Qmax=0.5, rmax would -200 # increase to 4010A and this would throw exception when the size of bnd array -201 # would exceed MAXBND limit. However, bnd vector can now grow, thus rmax -202 # is not limited and the following test would hang indefinitely. -203 -204 # def test_calculationError(self): -205 # """raise pdffit2.calculationError when calculation cannot be done""" -206 # self.P.alloc('X', 0.01, 0.5, 2, 10, 100) -207 # self.assertRaises(pdffit2.calculationError, self.P.calc) -208 -209 -210 #class refineExceptions(unittest.TestCase): -211 #I'm not sure how to test these -212 -213 # def setUp(self): -214 # self.P = PdfFit() -215 # -216 # def test_calculationError(self): -217 # """raise pdffit2.calculationError when model pdf can't be calculated""" -218 # #self.assertRaises(pdffit2.calculationError, self.P.calc) -219 # -220 # def test_constraintError(self): -221 # """raise pdffit2.constraintError for bad constraint(s)""" -222 # #self.assertRaises(pdffit2.constraintError, self.P.calc) -223 -224 -225 #class refine_stepExceptions(unittest.TestCase): -226 #I'm not sure how to test these -227 -228 # def setUp(self): -229 # self.P = PdfFit() -230 # -231 # def test_calculationError(self): -232 # """raise pdffit2.calculationError when model pdf can't be calculated""" -233 # #self.assertRaises(pdffit2.calculationError, self.P.calc) -234 # -235 # def test_constraintError(self): -236 # """raise pdffit2.constraintError for bad constraint(s)""" -237 # #self.assertRaises(pdffit2.constraintError, self.P.calc) -238 -239 -
240 -class save_pdfExceptions(unittest.TestCase): -
241 -
242 - def setUp(self): -
243 self.P = PdfFit() -244 self.strufile = "temp.pdf" -
245 -
246 - def tearDown(self): -
247 del self.P -
248 -
249 - def test_IOError(self): -
250 """raise IOError when structure cannot be saved""" -251 self.P.read_struct(datafile("Ni.stru")) -252 self.P.alloc('X', 30.0, 0.05, 2, 10, 100) -253 self.P.calc() -254 self.assertRaises(IOError, self.P.save_pdf, 1, -255 "nodir183160/"+self.strufile) -
256 -
257 - def test_unassignedError(self): -
258 """raise pdffit2.unassignedError when structure is undefined""" -259 self.assertRaises(pdffit2.unassignedError, self.P.save_pdf, 1, -260 self.strufile) -
261 -262 -
263 -class save_difExceptions(unittest.TestCase): -
264 -
265 - def setUp(self): -
266 self.P = PdfFit() -267 self.strufile = "temp.dif" -
268 -
269 - def tearDown(self): -
270 del self.P -
271 -
272 - def test_IOError(self): -
273 """raise IOError when dif cannot be saved""" -274 self.P.read_struct(datafile("Ni.stru")) -275 self.P.alloc('X', 30.0, 0.05, 2, 10, 100) -276 self.P.calc() -277 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.5) -278 self.assertRaises(IOError, self.P.save_dif, 1, -279 "nodir183160/"+self.strufile) -
280 -
281 - def test_unassignedError(self): -
282 """raise pdffit2.unassignedError when structure is undefined""" -283 self.assertRaises(pdffit2.unassignedError, self.P.save_dif, 1, -284 self.strufile) -
285 -286 -
287 -class save_resExceptions(unittest.TestCase): -
288 -
289 - def setUp(self): -
290 self.P = PdfFit() -291 self.resfile = "temp.res" -
292 -
293 - def tearDown(self): -
294 del self.P -
295 -
296 - def test_IOError(self): -
297 """raise IOError when residual file cannot be saved""" -298 self.P.read_struct(datafile("Ni.stru")) -299 self.P.read_data(datafile("Ni.dat"), 'X', 30.0, 0.0) -300 self.P.constrain(self.P.lat(1), 1) -301 self.P.setpar(1, 3.0) -302 self.P.pdfrange(1,2.0,10.0) -303 self.P.refine_step() -304 self.assertRaises(IOError, self.P.save_res, -305 "nodir183160/"+self.resfile) -
306 -
307 - def test_unassignedError(self): -
308 """raise pdffit2.unassignedError when structure is undefined""" -309 self.assertRaises(pdffit2.unassignedError, self.P.save_res, -310 self.resfile) -
311 -312 -
313 -class save_structExceptions(unittest.TestCase): -
314 #Same code as show_struct -315 -
316 - def setUp(self): -
317 self.P = PdfFit() -318 self.strufile = "temp.stru" -
319 -
320 - def tearDown(self): -
321 del self.P -
322 -
323 - def test_IOError(self): -
324 """raise IOError when structure cannot be saved""" -325 self.P.read_struct(datafile("Ni.stru")) -326 self.assertRaises(IOError, self.P.save_struct, 1, -327 "nodir183160/"+self.strufile) -
328 -
329 - def test_unassignedError(self): -
330 """raise pdffit2.unassignedError when structure is undefined""" -331 self.assertRaises(pdffit2.unassignedError, self.P.save_struct, 1, -332 self.strufile) -
333 -334 -
335 -class constrainExceptions(unittest.TestCase): -
336 -
337 - def setUp(self): -
338 self.P = PdfFit() -339 self.par = 1 -340 return -
341 -
342 - def tearDown(self): -
343 self.P = None -344 return -
345 -
346 - def test_constraintError(self): -
347 """raise constraintError when constraint is bad""" -348 self.P.read_struct(datafile("Ni.stru")) -349 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -350 self.P.constrain('x(1)', 'junk+@1') -351 self.P.setpar(1, 0.01) -352 self.assertRaises(pdffit2.constraintError, self.P.calc) -353 self.assertRaises(pdffit2.constraintError, self.P.refine) -354 return -
355 -
356 - def test_unassignedError(self): -
357 """raise pdffit2.unassignedError when variable is undefined""" -358 self.assertRaises(pdffit2.unassignedError, self.P.constrain, self.P.x(1), -359 self.par) -360 return -
361 -
362 - def test_ValueError(self): -
363 """raise ValueError when a variable index does not exist""" -364 self.P.read_struct(datafile("Ni.stru")) -365 self.assertRaises(ValueError, self.P.constrain, self.P.x(6), -366 self.par) -367 return -
368 -
369 - def test_constrainNonRefVar(self): -
370 "raise constraintError when attempting to constrain non-refinables" -371 self.P.read_struct(datafile("Ni.stru")) -372 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -373 self.assertRaises(pdffit2.constraintError, -374 self.P.constrain, 'rcut', '@7') -375 self.assertRaises(pdffit2.constraintError, -376 self.P.constrain, 'rcut', 13) -377 self.assertRaises(pdffit2.constraintError, -378 self.P.constrain, 'stepcut', '@17') -379 return -
380 -381 -382 -
383 -class setvarExceptions(unittest.TestCase): -
384 -
385 - def setUp(self): -
386 self.P = PdfFit() -387 self.val = 3.0 -
388 -
389 - def tearDown(self): -
390 del self.P -
391 -
392 - def test_unassignedError(self): -
393 """raise pdffit2.unassignedError when variable is undefined""" -394 self.assertRaises(pdffit2.unassignedError, self.P.setvar, self.P.lat(1), -395 self.val) -
396 -
397 - def test_ValueError(self): -
398 """raise ValueError when a variable index does not exist""" -399 self.P.read_struct(datafile("Ni.stru")) -400 self.assertRaises(ValueError, self.P.setvar, self.P.lat(7), -401 self.val) -
402 -403 -
404 -class getvarExceptions(unittest.TestCase): -
405 -
406 - def setUp(self): -
407 self.P = PdfFit() -
408 -
409 - def tearDown(self): -
410 del self.P -
411 -
412 - def test_unassignedError(self): -
413 """raise pdffit2.unassignedError when variable is undefined""" -414 self.assertRaises(pdffit2.unassignedError, self.P.getvar, -415 self.P.pscale()) -
416 -
417 - def test_ValueError(self): -
418 """raise ValueError when a variable index does not exist""" -419 self.P.read_struct(datafile("Ni.stru")) -420 self.assertRaises(ValueError, self.P.getvar, self.P.lat(7)) -
421 -422 -
423 -class getRExceptions(unittest.TestCase): -
424 -
425 - def setUp(self): -
426 self.P = PdfFit() -
427 -
428 - def tearDown(self): -
429 del self.P -
430 -
431 - def test_unassignedError(self): -
432 """raise pdffit2.unassignedError when data does not exist""" -433 self.assertRaises(pdffit2.unassignedError, self.P.getR) -
434 -435 -
436 -class getpdf_fitExceptions(unittest.TestCase): -
437 -
438 - def setUp(self): -
439 self.P = PdfFit() -
440 -
441 - def tearDown(self): -
442 del self.P -
443 -
444 - def test_unassignedError(self): -
445 """raise pdffit2.unassignedError when data does not exist""" -446 self.assertRaises(pdffit2.unassignedError, self.P.getpdf_fit) -
447 -448 -
449 -class getpdf_obsExceptions(unittest.TestCase): -
450 -
451 - def setUp(self): -
452 self.P = PdfFit() -
453 -
454 - def tearDown(self): -
455 del self.P -
456 -
457 - def test_unassignedError(self): -
458 """raise pdffit2.unassignedError when data does not exist""" -459 self.assertRaises(pdffit2.unassignedError, self.P.getpdf_obs) -
460 -461 -
462 -class getpdf_diffExceptions(unittest.TestCase): -
463 -
464 - def setUp(self): -
465 self.P = PdfFit() -
466 -
467 - def tearDown(self): -
468 del self.P -
469 -
470 - def test_unassignedError(self): -
471 """raise pdffit2.unassignedError when data does not exist""" -472 self.assertRaises(pdffit2.unassignedError, self.P.getpdf_diff) -
473 -474 -
475 -class get_atomsExceptions(unittest.TestCase): -
476 -
477 - def setUp(self): -
478 self.P = PdfFit() -
479 -
480 - def tearDown(self): -
481 del self.P -
482 -
483 - def test_unassignedError(self): -
484 """raise pdffit2.unassignedError when data does not exist""" -485 self.assertRaises(pdffit2.unassignedError, self.P.get_atoms) -
486 -487 -
488 -class getparExceptions(unittest.TestCase): -
489 -
490 - def setUp(self): -
491 self.P = PdfFit() -
492 -
493 - def tearDown(self): -
494 del self.P -
495 -
496 - def test_unassignedError1(self): -
497 """raise pdffit2.unassignedError when parameter does not exist""" -498 self.assertRaises(pdffit2.unassignedError, self.P.getpar, 1) -
499 -
500 - def test_unassignedError2(self): -
501 """raise pdffit2.unassignedError when parameter does not exist""" -502 self.P.read_struct(datafile("Ni.stru")) -503 self.P.constrain(self.P.lat(1), 2) -504 self.assertRaises(pdffit2.unassignedError, self.P.getpar, 1) -
505 -506 -
507 -class pselExceptions(unittest.TestCase): -
508 -
509 - def setUp(self): -
510 self.P = PdfFit() -511 self.ip = 1 -
512 -
513 - def tearDown(self): -
514 del self.P -
515 -
516 - def test_unassignedError(self): -
517 """raise pdffit2.unassignedError when phase does not exist""" -518 self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) -
519 -
520 - def test_unassignedError2(self): -
521 """raise pdffit2.unassignedError when phase does not exist""" -522 self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) -
523 -524 -
525 -class pdeselExceptions(unittest.TestCase): -
526 -
527 - def setUp(self): -
528 self.P = PdfFit() -529 self.ip = 1 -
530 -
531 - def tearDown(self): -
532 del self.P -
533 -
534 - def test_unassignedError1(self): -
535 """raise pdffit2.unassignedError when phase does not exist""" -536 self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) -
537 -
538 - def test_unassignedError2(self): -
539 """raise pdffit2.unassignedError when phase does not exist""" -540 self.P.read_struct(datafile("Ni.stru")) -541 self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) -
542 -543 -
544 -class selectAtomTypeExceptions(unittest.TestCase): -
545 -
546 - def setUp(self): -
547 self.P = PdfFit() -548 self.iset = 1 -549 self.i = 1 -
550 -
551 - def tearDown(self): -
552 del self.P -
553 -
554 - def test_unassignedError1(self): -
555 """raise pdffit2.unassignedError when set does not exist""" -556 self.assertRaises(pdffit2.unassignedError, self.P.selectAtomType, -557 self.iset, 'i', 'Ni', True) -
558 -
559 - def test_unassignedError2(self): -
560 """raise pdffit2.unassignedError when set does not exist""" -561 self.P.read_struct(datafile("Ni.stru")) -562 # selectAtomType should pass with one phase defined -563 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -564 self.P.selectAtomType(self.iset, 'i', 'Ni', True) -565 self.P.selectAtomType(self.iset, 'j', 'Ni', False) -566 # but fail for phase 2 which is not present -567 self.assertRaises(pdffit2.unassignedError, self.P.selectAtomType, -568 2, 'i', 'Ca', True) -
569 -
570 - def test_ijcharValueError(self): -
571 """raise ValueError when ijchar is neither 'i' nor 'j'""" -572 self.P.read_struct(datafile("Ni.stru")) -573 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -574 self.P.selectAtomType(self.iset, 'i', 'Ni', True) -575 self.P.selectAtomType(self.iset, 'j', 'Ni', True) -576 self.assertRaises(ValueError, self.P.selectAtomType, -577 self.iset, 'k', 'Ni', True) -
578 -579 -
580 -class selectAtomIndexExceptions(unittest.TestCase): -
581 -
582 - def setUp(self): -
583 self.P = PdfFit() -584 self.iset = 1 -585 self.i = 1 -
586 -
587 - def tearDown(self): -
588 del self.P -
589 -
590 - def test_unassignedError1(self): -
591 """raise pdffit2.unassignedError when set does not exist""" -592 self.assertRaises(pdffit2.unassignedError, self.P.selectAtomIndex, -593 self.iset, 'i', self.i, True) -
594 -
595 - def test_unassignedError2(self): -
596 """raise pdffit2.unassignedError when set does not exist""" -597 self.P.read_struct(datafile("Ni.stru")) -598 # pass for phase 1 -599 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -600 self.P.selectAtomIndex(self.iset, 'i', 1, True) -601 self.P.selectAtomIndex(self.iset, 'i', 2, False) -602 # fail for phase 2 -603 self.assertRaises(pdffit2.unassignedError, self.P.selectAtomIndex, -604 2, 'i', 1, True) -
605 -
606 - def test_ValueError(self): -
607 """raise ValueError when selected atom does not exist""" -608 self.P.read_struct(datafile("Ni.stru")) -609 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -610 self.assertRaises(ValueError, self.P.selectAtomIndex, -611 self.iset, 'i', 6, True) -
612 -613 -
614 -class selectAllExceptions(unittest.TestCase): -
615 -
616 - def setUp(self): -
617 self.P = PdfFit() -618 self.iset = 1 -619 self.i = 1 -
620 -
621 - def tearDown(self): -
622 del self.P -
623 -
624 - def test_unassignedError1(self): -
625 """raise pdffit2.unassignedError when set does not exist""" -626 self.assertRaises(pdffit2.unassignedError, self.P.selectAll, -627 self.iset, 'i') -
628 -
629 - def test_unassignedError2(self): -
630 """raise pdffit2.unassignedError when set does not exist""" -631 self.P.read_struct(datafile("Ni.stru")) -632 # fail when there is no dataset -633 self.assertRaises(pdffit2.unassignedError, self.P.selectAll, -634 self.iset, 'i') -635 # pass with dataset -636 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -637 self.P.selectAll(self.iset, 'i') -638 self.P.selectAll(self.iset, 'j') -639 # fail for phase 2 -640 self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, 'i') -641 self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, 'j') -
642 -643 -
644 -class selectNoneExceptions(unittest.TestCase): -
645 -
646 - def setUp(self): -
647 self.P = PdfFit() -648 self.iset = 1 -649 self.i = 1 -
650 -
651 - def tearDown(self): -
652 del self.P -
653 -
654 - def test_unassignedError1(self): -
655 """raise pdffit2.unassignedError when set does not exist""" -656 self.assertRaises(pdffit2.unassignedError, self.P.selectNone, -657 self.iset, 'i') -
658 -
659 - def test_unassignedError2(self): -
660 """raise pdffit2.unassignedError when set does not exist""" -661 self.P.read_struct(datafile("Ni.stru")) -662 # fail when there is no dataset -663 self.assertRaises(pdffit2.unassignedError, self.P.selectNone, -664 self.iset, 'i') -665 # pass with dataset -666 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -667 self.P.selectNone(self.iset, 'i') -668 self.P.selectNone(self.iset, 'j') -669 # fail for phase 2 -670 self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, 'i') -671 self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, 'j') -
672 -673 -
674 -class bangExceptions(unittest.TestCase): -
675 -
676 - def setUp(self): -
677 self.P = PdfFit() -678 self.a1 = 1 -679 self.a2 = 2 -680 self.a3 = 3 -
681 -
682 - def tearDown(self): -
683 del self.P -
684 -
685 - def test_unassignedError(self): -
686 """raise pdffit2.unassignedError when phase does not exist""" -687 self.assertRaises(pdffit2.unassignedError, self.P.bang, self.a1, -688 self.a2, self.a3) -
689 -
690 - def test_ValueError1(self): -
691 """raise ValueError when selected atom(s) does not exist""" -692 self.P.read_struct(datafile('Ni.stru')) -693 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -694 self.assertRaises(ValueError, self.P.bang, 0, -695 self.a2, self.a3) -
696 -
697 - def test_ValueError2(self): -
698 """raise ValueError when selected atom(s) does not exist""" -699 self.P.read_struct(datafile('Ni.stru')) -700 self.assertRaises(ValueError, self.P.bang, self.a1, -701 -1, self.a3) -
702 -
703 - def test_ValueError3(self): -
704 """raise ValueError when selected atom(s) does not exist""" -705 self.P.read_struct(datafile('Ni.stru')) -706 self.assertRaises(ValueError, self.P.bang, self.a1, -707 self.a2, 6) -
708 -709 -
710 -class blenExceptions(unittest.TestCase): -
711 -
712 - def setUp(self): -
713 self.P = PdfFit() -714 self.a1 = 1 -715 self.a2 = 2 -
716 -
717 - def tearDown(self): -
718 del self.P -
719 -
720 - def test_unassignedError(self): -
721 """raise pdffit2.unassignedError when no data exists""" -722 self.assertRaises(pdffit2.unassignedError, self.P.blen, self.a1, -723 self.a2) -
724 -
725 - def test_ValueError1(self): -
726 """raise ValueError when selected atom(s) does not exist""" -727 self.P.read_struct(datafile('Ni.stru')) -728 self.assertRaises(ValueError, self.P.blen, 0, self.a2) -
729 -
730 - def test_ValueError2(self): -
731 """raise ValueError when selected atom(s) does not exist""" -732 self.P.read_struct(datafile('Ni.stru')) -733 self.assertRaises(ValueError, self.P.blen, self.a1, 6) -
734 -
735 - def test_ValueError3(self): -
736 """raise ValueError when selected atom(s) does not exist""" -737 self.P.read_struct(datafile('Ni.stru')) -738 self.assertRaises(ValueError, self.P.blen, 0, 6) -
739 -740 -
741 -class show_scatExceptions(unittest.TestCase): -
742 -
743 - def setUp(self): -
744 self.P = PdfFit() -
745 -
746 - def tearDown(self): -
747 del self.P -
748 -
749 - def test_unassignedError(self): -
750 """raise pdffit2.unassignedError when phase does not exist""" -751 self.assertRaises(pdffit2.unassignedError, self.P.show_scat, 'X') -
752 -753 -754 #class set_scatExceptions(unittest.TestCase): -755 #I'm not sure how to use this function -756 -757 # def setUp(self): -758 # self.P = PdfFit() -759 # -760 # def test_unassignedError1(self): -761 # """raise pdffit2.unassignedError when phase does not exist""" -762 # #self.assertRaises(pdffit2.constraintError, self.P.calc) -763 # -764 # def test_unassignedError2(self): -765 # """raise pdffit2.unassignedError when phase does not exist""" -766 # #self.assertRaises(pdffit2.constraintError, self.P.calc) -767 # -768 # def test_ValueError(self): -769 # """raise pdffit2.unassignedError when selected atom does not exist""" -770 # #self.assertRaises(pdffit2.constraintError, self.P.calc) -771 -772 -
773 -class num_atomsExceptions(unittest.TestCase): -
774 -
775 - def setUp(self): -
776 self.P = PdfFit() -
777 -
778 - def tearDown(self): -
779 del self.P -
780 -
781 - def test_unassignedError(self): -
782 """raise pdffit2.unassignedError when no atoms exist""" -783 self.assertRaises(pdffit2.unassignedError, self.P.num_atoms) -
784 -
785 -class fixparExceptions(unittest.TestCase): -
786 -
787 - def setUp(self): -
788 self.P = PdfFit() -
789 -
790 - def tearDown(self): -
791 del self.P -
792 -
793 - def test_unassignedError(self): -
794 """raise pdffit2.unassignedError when parameter does not exist""" -795 self.P.read_struct(datafile("Ni.stru")) -796 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -797 self.assertRaises(pdffit2.unassignedError, self.P.fixpar, 1) -
798 -799 -
800 -class freeparExceptions(unittest.TestCase): -
801 -
802 - def setUp(self): -
803 self.P = PdfFit() -
804 -
805 - def tearDown(self): -
806 del self.P -
807 -
808 - def test_unassignedError(self): -
809 """raise pdffit2.unassignedError when parameter does not exist""" -810 self.P.read_struct(datafile("Ni.stru")) -811 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -812 self.assertRaises(pdffit2.unassignedError, self.P.freepar, 1) -
813 -814 -
815 -class setphaseExceptions(unittest.TestCase): -
816 -
817 - def setUp(self): -
818 self.P = PdfFit() -
819 -
820 - def tearDown(self): -
821 del self.P -
822 -
823 - def test_unassignedError(self): -
824 """raise pdffit2.unassignedError when phase does not exist""" -825 self.P.read_struct(datafile("Ni.stru")) -826 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -827 self.assertRaises(pdffit2.unassignedError, self.P.setphase, 2) -
828 -829 -
830 -class setdataExceptions(unittest.TestCase): -
831 -
832 - def setUp(self): -
833 self.P = PdfFit() -
834 -
835 - def tearDown(self): -
836 del self.P -
837 -
838 - def test_unassignedError(self): -
839 """raise pdffit2.unassignedError when data set does not exist""" -840 self.P.read_struct(datafile("Ni.stru")) -841 self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) -842 self.assertRaises(pdffit2.unassignedError, self.P.setdata, 2) -
843 -
844 -class getcrwExceptions(unittest.TestCase): -
845 -
846 - def setUp(self): -
847 self.P = PdfFit() -
848 -
849 - def tearDown(self): -
850 del self.P -
851 -
852 - def test_unassignedError(self): -
853 """raise pdffit2.unassignedError when data does not exist""" -854 self.assertRaises(pdffit2.unassignedError, self.P.getcrw) -
855 -856 -857 -858 #main -859 if __name__ == '__main__': -860 #suite = unittest.makeSuite(num_atomsExceptions) -861 #unittest.TextTestRunner(verbosity=3).run(suite) -862 #testcase = calcExceptions('test_unassignedError') -863 #unittest.TextTestRunner(verbosity=3).run(testcase) -864 unittest.main() -865 -866 # End of file -867 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html deleted file mode 100644 index 54b0d598..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.allocExceptions-class.html +++ /dev/null @@ -1,559 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.allocExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class allocExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class allocExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        allocExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_ValueError1(self)
- raise ValueError when qmax < 0
- source code - -
- -
-   - - - - - - -
test_ValueError2(self)
- raise ValueError when qdamp < 0
- source code - -
- -
-   - - - - - - -
test_ValueError3(self)
- raise ValueError when rmin < 0
- source code - -
- -
-   - - - - - - -
test_ValueError4(self)
- raise ValueError when rmax < 0
- source code - -
- -
-   - - - - - - -
test_ValueError5(self)
- raise ValueError when bin < 0
- source code - -
- -
-   - - - - - - -
test_ValueError6(self)
- raise ValueError when rmax < rmin
- source code - -
- -
-   - - - - - - -
test_ValueError7(self)
- raise ValueError when qdamp < 0
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.bangExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.bangExceptions-class.html deleted file mode 100644 index 146b8acd..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.bangExceptions-class.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.bangExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class bangExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class bangExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        bangExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when phase does not exist
- source code - -
- -
-   - - - - - - -
test_ValueError1(self)
- raise ValueError when selected atom(s) does not exist
- source code - -
- -
-   - - - - - - -
test_ValueError2(self)
- raise ValueError when selected atom(s) does not exist
- source code - -
- -
-   - - - - - - -
test_ValueError3(self)
- raise ValueError when selected atom(s) does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.blenExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.blenExceptions-class.html deleted file mode 100644 index bf7e7f2c..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.blenExceptions-class.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.blenExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class blenExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class blenExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        blenExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when no data exists
- source code - -
- -
-   - - - - - - -
test_ValueError1(self)
- raise ValueError when selected atom(s) does not exist
- source code - -
- -
-   - - - - - - -
test_ValueError2(self)
- raise ValueError when selected atom(s) does not exist
- source code - -
- -
-   - - - - - - -
test_ValueError3(self)
- raise ValueError when selected atom(s) does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.calcExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.calcExceptions-class.html deleted file mode 100644 index 47f37db6..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.calcExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.calcExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class calcExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class calcExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        calcExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when no space has been allocated
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions-class.html deleted file mode 100644 index c9ff49c3..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions-class.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class constrainExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class constrainExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        constrainExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_constraintError(self)
- raise constraintError when constraint is bad
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when variable is undefined
- source code - -
- -
-   - - - - - - -
test_ValueError(self)
- raise ValueError when a variable index does not exist
- source code - -
- -
-   - - - - - - -
test_constrainNonRefVar(self)
- raise constraintError when attempting to constrain non-refinables
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions-class.html deleted file mode 100644 index e5301de1..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class fixparExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class fixparExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        fixparExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when parameter does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions-class.html deleted file mode 100644 index 7d5ed442..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class freeparExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class freeparExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        freeparExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when parameter does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getRExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getRExceptions-class.html deleted file mode 100644 index f1260d3e..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getRExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.getRExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class getRExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class getRExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        getRExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when data does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions-class.html deleted file mode 100644 index ca25d95f..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class get_atomsExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class get_atomsExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        get_atomsExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when data does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions-class.html deleted file mode 100644 index 0f2f550a..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class getcrwExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class getcrwExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        getcrwExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when data does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getparExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getparExceptions-class.html deleted file mode 100644 index 6bef032d..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getparExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.getparExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class getparExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class getparExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        getparExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError1(self)
- raise pdffit2.unassignedError when parameter does not exist
- source code - -
- -
-   - - - - - - -
test_unassignedError2(self)
- raise pdffit2.unassignedError when parameter does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions-class.html deleted file mode 100644 index 8c2afdce..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class getpdf_diffExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class getpdf_diffExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        getpdf_diffExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when data does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions-class.html deleted file mode 100644 index f68bf3d9..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class getpdf_fitExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class getpdf_fitExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        getpdf_fitExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when data does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions-class.html deleted file mode 100644 index 1d15c7e5..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class getpdf_obsExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class getpdf_obsExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        getpdf_obsExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when data does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions-class.html deleted file mode 100644 index 75b7125f..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class getvarExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class getvarExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        getvarExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when variable is undefined
- source code - -
- -
-   - - - - - - -
test_ValueError(self)
- raise ValueError when a variable index does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions-class.html deleted file mode 100644 index b13b236b..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class num_atomsExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class num_atomsExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        num_atomsExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when no atoms exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions-class.html deleted file mode 100644 index d8e923ac..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class pdeselExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class pdeselExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        pdeselExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError1(self)
- raise pdffit2.unassignedError when phase does not exist
- source code - -
- -
-   - - - - - - -
test_unassignedError2(self)
- raise pdffit2.unassignedError when phase does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions-class.html deleted file mode 100644 index b9570371..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions-class.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class pdfrangeExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class pdfrangeExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        pdfrangeExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_ValueError1(self)
- raise ValueError when iset does not exist
- source code - -
- -
-   - - - - - - -
test_ValueError2(self)
- raise ValueError when rmax < rmin
- source code - -
- -
-   - - - - - - -
test_ValueError3(self)
- raise ValueError when range outside of data
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.pselExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.pselExceptions-class.html deleted file mode 100644 index eb9881e6..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.pselExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.pselExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class pselExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class pselExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        pselExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when phase does not exist
- source code - -
- -
-   - - - - - - -
test_unassignedError2(self)
- raise pdffit2.unassignedError when phase does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions-class.html deleted file mode 100644 index 388218f2..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class read_dataExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class read_dataExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        read_dataExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_IOError(self)
- raise IOError when data file does not exist
- source code - -
- -
-   - - - - - - -
test_dataError(self)
- raise pdffit2.dataError when data has improper spacing
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions-class.html deleted file mode 100644 index fe9514b9..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions-class.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class read_data_listsExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class read_data_listsExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        read_data_listsExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_ValueError1(self)
- raise ValueError when lists are of different length
- source code - -
- -
-   - - - - - - -
test_ValueError2(self)
- raise ValueError when qmax < 0
- source code - -
- -
-   - - - - - - -
test_ValueError3(self)
- raise ValueError when qdamp < 0
- source code - -
- -
-   - - - - - - -
test_dataError(self)
- raise pdffit2.dataError when data has improper spacing
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions-class.html deleted file mode 100644 index 4f25173e..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions-class.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class read_structExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class read_structExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        read_structExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_IOError(self)
- raise IOError when structure file does not exist
- source code - -
- -
-   - - - - - - -
test_structureError(self)
- raise pdffit2.structureError when structure is malformed
- source code - -
- -
-   - - - - - - -
test_structureErrorZeroVolume(self)
- raise pdffit2.structureError when unit cell volume is negative
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions-class.html deleted file mode 100644 index 08a9e5dc..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class save_difExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class save_difExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        save_difExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_IOError(self)
- raise IOError when dif cannot be saved
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when structure is undefined
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions-class.html deleted file mode 100644 index 698725a7..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class save_pdfExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class save_pdfExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        save_pdfExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_IOError(self)
- raise IOError when structure cannot be saved
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when structure is undefined
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions-class.html deleted file mode 100644 index 998f7a47..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class save_resExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class save_resExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        save_resExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_IOError(self)
- raise IOError when residual file cannot be saved
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when structure is undefined
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions-class.html deleted file mode 100644 index 618fbdca..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class save_structExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class save_structExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        save_structExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_IOError(self)
- raise IOError when structure cannot be saved
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when structure is undefined
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions-class.html deleted file mode 100644 index af80fcc9..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class selectAllExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class selectAllExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        selectAllExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError1(self)
- raise pdffit2.unassignedError when set does not exist
- source code - -
- -
-   - - - - - - -
test_unassignedError2(self)
- raise pdffit2.unassignedError when set does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions-class.html deleted file mode 100644 index b102e7b0..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions-class.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class selectAtomIndexExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class selectAtomIndexExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        selectAtomIndexExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError1(self)
- raise pdffit2.unassignedError when set does not exist
- source code - -
- -
-   - - - - - - -
test_unassignedError2(self)
- raise pdffit2.unassignedError when set does not exist
- source code - -
- -
-   - - - - - - -
test_ValueError(self)
- raise ValueError when selected atom does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions-class.html deleted file mode 100644 index 8eed67e9..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions-class.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class selectAtomTypeExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class selectAtomTypeExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        selectAtomTypeExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError1(self)
- raise pdffit2.unassignedError when set does not exist
- source code - -
- -
-   - - - - - - -
test_unassignedError2(self)
- raise pdffit2.unassignedError when set does not exist
- source code - -
- -
-   - - - - - - -
test_ijcharValueError(self)
- raise ValueError when ijchar is neither 'i' nor 'j'
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions-class.html deleted file mode 100644 index c93f590a..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class selectNoneExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class selectNoneExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        selectNoneExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError1(self)
- raise pdffit2.unassignedError when set does not exist
- source code - -
- -
-   - - - - - - -
test_unassignedError2(self)
- raise pdffit2.unassignedError when set does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions-class.html deleted file mode 100644 index 4b4ab0d2..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class setdataExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class setdataExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        setdataExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when data set does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions-class.html deleted file mode 100644 index e5cdcd64..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class setphaseExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class setphaseExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        setphaseExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when phase does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions-class.html deleted file mode 100644 index d1714f0d..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions-class.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class setvarExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class setvarExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        setvarExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when variable is undefined
- source code - -
- -
-   - - - - - - -
test_ValueError(self)
- raise ValueError when a variable index does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions-class.html deleted file mode 100644 index bb644eeb..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions-class.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module ExceptionsTest :: - Class show_scatExceptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class show_scatExceptions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        show_scatExceptions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_unassignedError(self)
- raise pdffit2.unassignedError when phase does not exist
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPdfFit-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPdfFit-module.html deleted file mode 100644 index 176373a7..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPdfFit-module.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - diffpy.pdffit2.tests.TestPdfFit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module TestPdfFit - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module TestPdfFit

source code

-
-Unit tests for PdfFit.py
-
-
- - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - TestPdfFit -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'diffpy.pdffit2.tests' -
-

Imports: - unittest, - PdfFit, - pdffit2, - datafile -


- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPdfFit-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPdfFit-pysrc.html deleted file mode 100644 index d9ff62b6..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPdfFit-pysrc.html +++ /dev/null @@ -1,1073 +0,0 @@ - - - - - diffpy.pdffit2.tests.TestPdfFit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module TestPdfFit - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module diffpy.pdffit2.tests.TestPdfFit

-
-  1  #!/usr/bin/env python 
-  2   
-  3  """Unit tests for PdfFit.py 
-  4  """ 
-  5   
-  6   
-  7  import unittest 
-  8   
-  9  from diffpy.pdffit2 import PdfFit 
- 10  from diffpy.pdffit2 import pdffit2 
- 11  from pdffit2testutils import datafile 
- 12   
- 13  ############################################################################## 
-
14 -class TestPdfFit(unittest.TestCase): -
15 - 16 places = 6 - 17 -
18 - def setUp(self): -
19 self.P = PdfFit() - 20 return -
21 -
22 - def tearDown(self): -
23 del self.P - 24 return -
25 - 26 # def test_intro(self): - 27 # """check PdfFit.intro() - 28 # """ - 29 # return - 30 -
31 - def test_add_structure(self): -
32 """check PdfFit.add_structure() - 33 """ - 34 # skip test when diffpy.Structure is not installed - 35 try: - 36 from diffpy.Structure import Structure - 37 except ImportError: - 38 return - 39 ni = Structure(filename=datafile('Ni.stru')) - 40 self.P.add_structure(ni) - 41 self.assertEqual(4, self.P.num_atoms()) - 42 return -
43 - 44 # def test_read_struct(self): - 45 # """check PdfFit.read_struct() - 46 # """ - 47 # return - 48 # - 49 # def test_read_struct_string(self): - 50 # """check PdfFit.read_struct_string() - 51 # """ - 52 # return - 53 # - 54 # def test_read_data(self): - 55 # """check PdfFit.read_data() - 56 # """ - 57 # return - 58 # - 59 # def test_read_data_string(self): - 60 # """check PdfFit.read_data_string() - 61 # """ - 62 # return - 63 # - 64 # def test_read_data_lists(self): - 65 # """check PdfFit.read_data_lists() - 66 # """ - 67 # return - 68 # - 69 # def test_pdfrange(self): - 70 # """check PdfFit.pdfrange() - 71 # """ - 72 # return - 73 # - 74 # def test_reset(self): - 75 # """check PdfFit.reset() - 76 # """ - 77 # return - 78 -
79 - def test_alloc(self): -
80 """check PdfFit.alloc() - 81 """ - 82 # alloc and read_struct can be called in any order. - 83 self.P.alloc('X', 25, 0.0, 0.01, 10, 1000) - 84 # without a structure calculated PDF is all zero - 85 self.P.calc() - 86 Gzero = self.P.getpdf_fit() - 87 self.assertEqual(1000*[0.0], Gzero) - 88 self.P.read_struct(datafile('Ni.stru')) - 89 self.P.calc() - 90 # check r-values - 91 r = self.P.getR() - 92 self.assertEqual(1000, len(r)) - 93 for i in range(1000): - 94 self.assertAlmostEqual(0.01*(i + 1), r[i], self.places) - 95 Gfit_alloc_read = self.P.getpdf_fit() - 96 # now try the other order - 97 self.P.reset() - 98 self.P.read_struct(datafile('Ni.stru')) - 99 self.P.alloc('X', 25, 0.0, 0.01, 10, 1000) -100 self.P.calc() -101 Gfit_read_alloc = self.P.getpdf_fit() -102 # and they should be the same -103 self.assertEqual(Gfit_read_alloc, Gfit_alloc_read) -104 return -
105 -106 # def test_calc(self): -107 # """check PdfFit.calc() -108 # """ -109 # return -110 # -111 # def test_refine(self): -112 # """check PdfFit.refine() -113 # """ -114 # return -115 # -116 # def test_refine_step(self): -117 # """check PdfFit.refine_step() -118 # """ -119 # return -120 # -121 # def test_save_pdf(self): -122 # """check PdfFit.save_pdf() -123 # """ -124 # return -125 # -126 # def test_save_pdf_string(self): -127 # """check PdfFit.save_pdf_string() -128 # """ -129 # return -130 # -131 # def test_save_dif(self): -132 # """check PdfFit.save_dif() -133 # """ -134 # return -135 # -136 # def test_save_dif_string(self): -137 # """check PdfFit.save_dif_string() -138 # """ -139 # return -140 # -141 # def test_save_res(self): -142 # """check PdfFit.save_res() -143 # """ -144 # return -145 # -146 # def test_save_res_string(self): -147 # """check PdfFit.save_res_string() -148 # """ -149 # return -150 -
151 - def test_get_structure(self): -
152 """check PdfFit.get_structure() -153 """ -154 self.P.read_struct(datafile('Ni.stru')) -155 self.P.read_struct(datafile('PbScW25TiO3.stru')) -156 stru1 = self.P.get_structure(1) -157 self.assertEqual(4, len(stru1)) -158 self.assertEqual('Ni', stru1[0].element) -159 stru2 = self.P.get_structure(2) -160 self.assertEqual(56, len(stru2)) -161 self.assertEqual('Ti', stru2[-1].element) -162 return -
163 -164 # def test_save_struct(self): -165 # """check PdfFit.save_struct() -166 # """ -167 # return -168 # -169 # def test_save_struct_string(self): -170 # """check PdfFit.save_struct_string() -171 # """ -172 # return -173 # -174 # def test_show_struct(self): -175 # """check PdfFit.show_struct() -176 # """ -177 # return -178 # -179 # def test_constrain(self): -180 # """check PdfFit.constrain() -181 # """ -182 # return -183 # -184 # def test_setpar(self): -185 # """check PdfFit.setpar() -186 # """ -187 # return -188 # -189 # def test_setvar(self): -190 # """check PdfFit.setvar() -191 # """ -192 # return -193 # -194 # def test_getvar(self): -195 # """check PdfFit.getvar() -196 # """ -197 # return -198 # -199 # def test_getrw(self): -200 # """check PdfFit.getrw() -201 # """ -202 # return -203 # -204 # def test_getR(self): -205 # """check PdfFit.getR() -206 # """ -207 # return -208 # -209 # def test_getpdf_fit(self): -210 # """check PdfFit.getpdf_fit() -211 # """ -212 # return -213 # -214 # def test_getpdf_obs(self): -215 # """check PdfFit.getpdf_obs() -216 # """ -217 # return -218 # -219 # def test_getpdf_diff(self): -220 # """check PdfFit.getpdf_diff() -221 # """ -222 # return -223 -
224 - def test_get_atoms(self): -
225 """check PdfFit.get_atoms() -226 """ -227 self.P.read_struct(datafile('Ni.stru')) -228 self.P.read_struct(datafile('PbScW25TiO3.stru')) -229 self.P.setphase(1) -230 a1 = self.P.get_atoms() -231 a2 = self.P.get_atoms(2) -232 self.assertEqual(4*['NI'], a1) -233 self.assertEqual(8*['PB']+24*['O']+8*['SC']+8*['W']+8*['TI'], a2) -234 return -
235 -
236 - def test_get_atom_types(self): -
237 """check PdfFit.get_atom_types() -238 """ -239 self.P.read_struct(datafile('Ni.stru')) -240 self.P.read_struct(datafile('PbScW25TiO3.stru')) -241 self.P.setphase(1) -242 atp1 = self.P.get_atom_types() -243 atp2 = self.P.get_atom_types(2) -244 self.assertEqual(['NI'], atp1) -245 self.assertEqual(['PB', 'O', 'SC', 'W', 'TI'], atp2) -246 return -
247 -
248 - def test_num_phases(self): -
249 """check PdfFit.num_phases() -250 """ -251 self.assertEqual(0, self.P.num_phases()) -252 self.P.read_struct(datafile('Ni.stru')) -253 self.assertEqual(1, self.P.num_phases()) -254 self.P.read_struct(datafile('PbScW25TiO3.stru')) -255 self.assertEqual(2, self.P.num_phases()) -256 self.P.reset() -257 self.assertEqual(0, self.P.num_phases()) -258 return -
259 -
260 - def test_num_datasets(self): -
261 """check PdfFit.num_datasets() -262 """ -263 self.assertEqual(0, self.P.num_datasets()) -264 self.P.read_data(datafile('Ni.dat'), 'X', 25.0, 0.5) -265 self.assertEqual(1, self.P.num_datasets()) -266 # failed data should not increase num_datasets -267 try: -268 self.P.read_data(datafile('badNi.dat')) -269 except: -270 pass -271 self.assertEqual(1, self.P.num_datasets()) -272 # alloc should increase number of datasets -273 # alloc requires a loaded structure -274 self.P.read_struct(datafile('Ni.stru')) -275 self.P.alloc('X', 30.0, 0.05, 2, 10, 100) -276 self.assertEqual(2, self.P.num_datasets()) -277 self.P.reset() -278 self.assertEqual(0, self.P.num_datasets()) -279 return -
280 -
281 - def test_getcrw(self): -
282 """check PdfFit.getcrw() -283 """ -284 import numpy -285 self.assertEqual(0, self.P.num_datasets()) -286 # Setting qmax=0 so that partial crw are not disturbed by -287 # termination ripples. -288 self.P.read_data(datafile('Ni.dat'), 'X', 0.0, 0.0) -289 # crw is empty before data refinement -290 self.assertEqual([], self.P.getcrw()) -291 self.P.read_struct(datafile('Ni.stru')) -292 self.P.pdfrange(1, 2, 19) -293 self.P.refine() -294 crw19 = numpy.array(self.P.getcrw()) -295 self.failUnless(numpy.all(crw19 >= 0.0)) -296 # check that crw19 is non decreasing -297 self.failUnless(numpy.all(numpy.diff(crw19) >= 0.0)) -298 # check that crw19 and getrw give the same value -299 rw19 = crw19[-1] -300 self.assertAlmostEqual(self.P.getrw(), rw19, self.places) -301 # renormalize cumulative Rw and compare with Rw at r=15 -302 Gobs19 = numpy.array(self.P.getpdf_obs()) -303 Gnorm19 = numpy.sqrt(numpy.sum(Gobs19**2)) -304 r = numpy.array(self.P.getR()) -305 idx = numpy.nonzero(r <= 15)[0] -306 Gnorm15 = numpy.sqrt(numpy.sum(Gobs19[idx]**2)) -307 i15 = idx[-1] -308 rw15 = crw19[i15] * Gnorm19 / Gnorm15 -309 self.P.pdfrange(1, 2, r[i15] + 1e-5) -310 self.P.refine() -311 self.assertAlmostEqual(self.P.getrw(), rw15, self.places) -312 return -
313 -
314 - def test_getcrw_two_datasets(self): -
315 """check that getcrw() and getrw() are consistent for two datasets. -316 """ -317 self.P.read_data(datafile('Ni.dat'), 'X', 25.0, 0.0) -318 self.P.pdfrange(1, 2, 8) -319 self.P.read_data(datafile('300K.gr'), 'N', 32.0, 0.0) -320 self.P.pdfrange(2, 1, 11) -321 self.P.read_struct(datafile('Ni.stru')) -322 # mess lattice parameters to have comparable Rw contributions -323 self.P.setvar('lat(1)', 3) -324 self.P.setvar('lat(2)', 3) -325 self.P.setvar('lat(3)', 3) -326 self.P.refine() -327 rwtot = self.P.getrw() -328 self.failUnless(rwtot > 0.0) -329 self.P.setdata(1) -330 rw1 = self.P.getcrw()[-1] -331 self.P.setdata(2) -332 rw2 = self.P.getcrw()[-1] -333 self.assertAlmostEqual(rwtot**2, rw1**2 + rw2**2, self.places) -334 return -
335 -336 # def test_getpar(self): -337 # """check PdfFit.getpar() -338 # """ -339 # return -340 # -341 # def test_fixpar(self): -342 # """check PdfFit.fixpar() -343 # """ -344 # return -345 # -346 # def test_freepar(self): -347 # """check PdfFit.freepar() -348 # """ -349 # return -350 # -351 # def test_setphase(self): -352 # """check PdfFit.setphase() -353 # """ -354 # return -355 # -356 # def test_setdata(self): -357 # """check PdfFit.setdata() -358 # """ -359 # return -360 # -
361 - def test_psel(self): -
362 """check PdfFit.psel() -363 """ -364 def doalloc(): -365 self.P.alloc('X', 30.0, 0.05, 2, 10, 100) -366 return -
367 self.assertRaises(pdffit2.unassignedError, self.P.psel, 0) -368 self.assertRaises(pdffit2.unassignedError, self.P.psel, 1) -369 self.P.read_struct(datafile('Ni.stru')) -370 doalloc() -371 self.P.calc() -372 G1 = self.P.getpdf_fit() -373 self.P.reset() -374 self.P.read_struct(datafile('PbScW25TiO3.stru')) -375 doalloc() -376 self.P.calc() -377 G2 = self.P.getpdf_fit() -378 self.P.reset() -379 self.P.read_struct(datafile('Ni.stru')) -380 self.P.read_struct(datafile('PbScW25TiO3.stru')) -381 doalloc() -382 self.P.pdesel('ALL') -383 self.P.psel(1) -384 self.P.calc() -385 self.assertEqual(G1, self.P.getpdf_fit()) -386 self.P.pdesel('ALL') -387 self.P.psel(2) -388 self.P.calc() -389 self.assertEqual(G2, self.P.getpdf_fit()) -390 self.P.psel('ALL') -391 self.P.calc() -392 Gall = self.P.getpdf_fit() -393 dGmax = max([abs(g1 + g2 - gall) -394 for g1, g2, gall in zip(G1, G2, Gall)]) -395 self.assertAlmostEqual(0, dGmax, self.places) -396 self.assertRaises(pdffit2.unassignedError, self.P.psel, 10) -397 self.assertRaises(pdffit2.unassignedError, self.P.psel, 0) -398 self.assertRaises(pdffit2.unassignedError, self.P.psel, -100) -399 return -
400 -
401 - def test_pdesel(self): -
402 """check PdfFit.pdesel() -403 """ -404 def doalloc(): -405 self.P.alloc('X', 30.0, 0.05, 2, 10, 100) -406 return -
407 self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 0) -408 self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 1) -409 self.P.read_struct(datafile('Ni.stru')) -410 doalloc() -411 self.P.calc() -412 G1 = self.P.getpdf_fit() -413 self.P.reset() -414 self.P.read_struct(datafile('PbScW25TiO3.stru')) -415 doalloc() -416 self.P.calc() -417 G2 = self.P.getpdf_fit() -418 self.P.reset() -419 self.P.read_struct(datafile('Ni.stru')) -420 self.P.read_struct(datafile('PbScW25TiO3.stru')) -421 doalloc() -422 self.P.psel('ALL') -423 self.P.pdesel(2) -424 self.P.calc() -425 self.assertEqual(G1, self.P.getpdf_fit()) -426 self.P.psel('ALL') -427 self.P.pdesel(1) -428 self.P.calc() -429 self.assertEqual(G2, self.P.getpdf_fit()) -430 self.P.pdesel('ALL') -431 self.P.calc() -432 G0 = self.P.getpdf_fit() -433 self.assertEqual([0.0]*len(G0), G0) -434 self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 10) -435 self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 0) -436 self.assertRaises(pdffit2.unassignedError, self.P.pdesel, -100) -437 return -438 # -439 # def test_selectAtomType(self): -440 # """check PdfFit.selectAtomType() -441 # """ -442 # return -443 # -444 # def test_selectAtomIndex(self): -445 # """check PdfFit.selectAtomIndex() -446 # """ -447 # return -448 # -449 # def test_selectAll(self): -450 # """check PdfFit.selectAll() -451 # """ -452 # return -453 # -454 # def test_selectNone(self): -455 # """check PdfFit.selectNone() -456 # """ -457 # return -458 -
459 - def test_bond_angle(self): -
460 """check PdfFit.bond_angle() -461 """ -462 self.P.read_struct(datafile('Ni.stru')) -463 a, e = self.P.bond_angle(1, 2, 3) -464 self.assertAlmostEqual(60.0, a, self.places) -465 self.assertRaises(ValueError, self.P.bond_angle, 0, 1, 2) -466 self.assertRaises(ValueError, self.P.bond_angle, 1, 2, 7) -467 return -
468 -
469 - def test_bond_length_atoms(self): -
470 """check PdfFit.bond_length_atoms() -471 """ -472 self.P.read_struct(datafile('Ni.stru')) -473 self.P.read_struct(datafile('PbScW25TiO3.stru')) -474 dij, ddij = self.P.bond_length_atoms(1, 5) -475 self.assertAlmostEqual(4.03635, dij, self.places) -476 self.P.setphase(1) -477 self.assertRaises(ValueError, self.P.bond_length_atoms, 1, 5) -478 return -
479 -
480 - def test_bond_length_types(self): -
481 """check PdfFit.bond_length_types() -482 """ -483 self.P.read_struct(datafile('Ni.stru')) -484 self.P.read_struct(datafile('PbScW25TiO3.stru')) -485 dPbO = self.P.bond_length_types('Pb', 'O', 0.1, 3.0) -486 # check if keys are present -487 self.failUnless('dij' in dPbO) -488 self.failUnless('ddij' in dPbO) -489 self.failUnless('ij0' in dPbO) -490 self.failUnless('ij1' in dPbO) -491 # check if they have the same length -492 npts = len(dPbO['dij']) -493 self.assertEqual(npts, len(dPbO['ddij'])) -494 self.assertEqual(npts, len(dPbO['ij0'])) -495 self.assertEqual(npts, len(dPbO['ij1'])) -496 # 8 Pb atoms have coordination 12 in perovskite structure -497 self.assertEqual(8*12, len(dPbO['dij'])) -498 self.P.setphase(1) -499 dfcc = self.P.bond_length_types('ALL', 'ALL', 0.1, 2.6) -500 # 4 Ni atoms with coordination 12 -501 self.assertEqual(4*12, len(dfcc['dij'])) -502 # invalid element -503 self.assertRaises(ValueError, self.P.bond_length_types, 'Ni', 'Nix', 0.1, 5.0) -504 # check indices ij0 -505 allij0 = sum(dfcc['ij0'], tuple()) -506 self.assertEqual(0, min(allij0)) -507 self.assertEqual(3, max(allij0)) -508 # check indices ij1 -509 allij1 = sum(dfcc['ij1'], tuple()) -510 self.assertEqual(1, min(allij1)) -511 self.assertEqual(4, max(allij1)) -512 # check index values -513 ij0check = [(i1 - 1, j1 - 1) for i1, j1 in dfcc['ij1']] -514 self.assertEqual(ij0check, dfcc['ij0']) -515 # test valid element which is not present in the structure -516 dnone = self.P.bond_length_types('Ni', 'Au', 0.1, 5.0) -517 self.assertEqual(0, len(dnone['dij'])) -518 self.assertEqual(0, len(dnone['ddij'])) -519 self.assertEqual(0, len(dnone['ij0'])) -520 self.assertEqual(0, len(dnone['ij1'])) -521 return -
522 -523 # def test_show_scat(self): -524 # """check PdfFit.show_scat() -525 # """ -526 # return -527 # -528 # def test_get_scat_string(self): -529 # """check PdfFit.get_scat_string() -530 # """ -531 # return -532 -
533 - def test_get_scat(self): -
534 """check PdfFit.get_scat() -535 """ -536 # x-ray scattering factors -537 fPb = self.P.get_scat('X', 'Pb') -538 self.assertEqual(82.0, fPb) -539 fTi = self.P.get_scat('X', 'tI') -540 self.assertEqual(22.0, fTi) -541 # neutron scattering lengths -542 bPb = self.P.get_scat('N', 'PB') -543 self.assertAlmostEqual(9.401, bPb, 3) -544 bTi = self.P.get_scat('N', 'ti') -545 self.assertAlmostEqual(-3.370, bTi, 3) -546 # exceptions -547 self.assertRaises(ValueError, self.P.get_scat, 'N', 'zz') -548 self.assertRaises(ValueError, self.P.get_scat, 'Z', 'Ti') -549 return -
550 -
551 - def test_set_scat(self): -
552 """check PdfFit.set_scat() -553 """ -554 # raises exception when no phase exists -555 self.assertRaises(pdffit2.unassignedError, -556 self.P.set_scat, 'N', 'Ti', -11) -557 # check if it is local to phase -558 fPb = self.P.get_scat('X', 'Pb') -559 bPb = self.P.get_scat('N', 'Pb') -560 self.P.read_struct(datafile('PbScW25TiO3.stru')) -561 self.P.set_scat('X', 'Pb', 142) -562 self.assertEqual(142, self.P.get_scat('X', 'Pb')) -563 self.assertEqual(bPb, self.P.get_scat('N', 'Pb')) -564 self.P.read_struct(datafile('PbScW25TiO3.stru')) -565 self.assertEqual(fPb, self.P.get_scat('X', 'Pb')) -566 self.P.setphase(1) -567 self.assertEqual(142, self.P.get_scat('X', 'Pb')) -568 self.P.setphase(2) -569 self.assertEqual(fPb, self.P.get_scat('X', 'Pb')) -570 # check exception for invalid inputs -571 self.assertRaises(ValueError, self.P.set_scat, 'Z', 'C', 123) -572 self.assertRaises(ValueError, self.P.set_scat, 'X', 'ZZ', 123) -573 return -
574 -
575 - def test_reset_scat(self): -
576 """check PdfFit.reset_scat() -577 """ -578 # raises exception when no phase exists -579 self.assertRaises(pdffit2.unassignedError, self.P.reset_scat, 'Ti') -580 # check if it is local to phase -581 fPb = self.P.get_scat('X', 'Pb') -582 bPb = self.P.get_scat('N', 'Pb') -583 self.P.read_struct(datafile('PbScW25TiO3.stru')) -584 self.P.set_scat('X', 'Pb', 142) -585 self.P.read_struct(datafile('PbScW25TiO3.stru')) -586 self.P.set_scat('N', 'Pb', -17) -587 self.P.setphase(1) -588 self.assertNotEqual(fPb, self.P.get_scat('X', 'Pb')) -589 self.P.reset_scat('Pb') -590 self.assertEqual(fPb, self.P.get_scat('X', 'Pb')) -591 self.P.setphase(2) -592 self.assertNotEqual(bPb, self.P.get_scat('N', 'Pb')) -593 self.P.reset_scat('Pb') -594 self.assertEqual(bPb, self.P.get_scat('N', 'Pb')) -595 # check exception for invalid inputs -596 self.assertRaises(ValueError, self.P.reset_scat, 'Zz') -597 return -
598 -
599 - def test_num_atoms(self): -
600 """check PdfFit.num_atoms() -601 """ -602 self.P.read_struct(datafile('Ni.stru')) -603 self.assertEqual(4, self.P.num_atoms()) -604 self.P.read_struct(datafile('PbScW25TiO3.stru')) -605 self.assertEqual(56, self.P.num_atoms()) -606 self.P.setphase(1) -607 self.assertEqual(4, self.P.num_atoms()) -608 self.P.setphase(2) -609 self.assertEqual(56, self.P.num_atoms()) -610 return -
611 -612 # def test_lat(self): -613 # """check PdfFit.lat() -614 # """ -615 # return -616 # -617 # def test_x(self): -618 # """check PdfFit.x() -619 # """ -620 # return -621 # -622 # def test_y(self): -623 # """check PdfFit.y() -624 # """ -625 # return -626 # -627 # def test_z(self): -628 # """check PdfFit.z() -629 # """ -630 # return -631 # -632 # def test_u11(self): -633 # """check PdfFit.u11() -634 # """ -635 # return -636 # -637 # def test_u22(self): -638 # """check PdfFit.u22() -639 # """ -640 # return -641 # -642 # def test_u33(self): -643 # """check PdfFit.u33() -644 # """ -645 # return -646 # -647 # def test_u12(self): -648 # """check PdfFit.u12() -649 # """ -650 # return -651 # -652 # def test_u13(self): -653 # """check PdfFit.u13() -654 # """ -655 # return -656 # -657 # def test_u23(self): -658 # """check PdfFit.u23() -659 # """ -660 # return -661 # -662 # def test_occ(self): -663 # """check PdfFit.occ() -664 # """ -665 # return -666 # -667 # def test_pscale(self): -668 # """check PdfFit.pscale() -669 # """ -670 # return -671 # -672 # def test_pscale(self): -673 # """check PdfFit.pscale() -674 # """ -675 # return -676 # -677 # def test_sratio(self): -678 # """check PdfFit.sratio() -679 # """ -680 # return -681 # -682 # def test_delta1(self): -683 # """check PdfFit.delta1() -684 # """ -685 # return -686 # -687 # def test_delta2(self): -688 # """check PdfFit.delta2() -689 # """ -690 # return -691 # -692 # def test_dscale(self): -693 # """check PdfFit.dscale() -694 # """ -695 # return -696 # -697 # def test_qdamp(self): -698 # """check PdfFit.qdamp() -699 # """ -700 # return -701 # -702 # def test_qbroad(self): -703 # """check PdfFit.qbroad() -704 # """ -705 # return -706 # -707 # def test_rcut(self): -708 # """check PdfFit.rcut() -709 # """ -710 # return -711 # -712 # def test___init__(self): -713 # """check PdfFit.__init__() -714 # """ -715 # return -716 # -717 # def test__PdfFit__getRef(self): -718 # """check PdfFit._PdfFit__getRef() -719 # """ -720 # return -721 -722 # End of class TestPdfFit -723 -724 if __name__ == '__main__': -725 unittest.main() -726 -727 # End of file -728 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html deleted file mode 100644 index 8cd26a54..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPdfFit.TestPdfFit-class.html +++ /dev/null @@ -1,1144 +0,0 @@ - - - - - diffpy.pdffit2.tests.TestPdfFit.TestPdfFit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module TestPdfFit :: - Class TestPdfFit - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class TestPdfFit

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        TestPdfFit
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_add_structure(self)
- check PdfFit.add_structure()...
- source code - -
- -
-   - - - - - - -
test_alloc(self)
- check PdfFit.alloc()...
- source code - -
- -
-   - - - - - - -
test_get_structure(self)
- check PdfFit.get_structure()...
- source code - -
- -
-   - - - - - - -
test_get_atoms(self)
- check PdfFit.get_atoms()...
- source code - -
- -
-   - - - - - - -
test_get_atom_types(self)
- check PdfFit.get_atom_types()...
- source code - -
- -
-   - - - - - - -
test_num_phases(self)
- check PdfFit.num_phases()...
- source code - -
- -
-   - - - - - - -
test_num_datasets(self)
- check PdfFit.num_datasets()...
- source code - -
- -
-   - - - - - - -
test_getcrw(self)
- check PdfFit.getcrw()...
- source code - -
- -
-   - - - - - - -
test_getcrw_two_datasets(self)
- check that getcrw() and getrw() are consistent for two datasets.
- source code - -
- -
-   - - - - - - -
test_psel(self)
- check PdfFit.psel()...
- source code - -
- -
-   - - - - - - -
test_pdesel(self)
- check PdfFit.pdesel()...
- source code - -
- -
-   - - - - - - -
test_bond_angle(self)
- check PdfFit.bond_angle()...
- source code - -
- -
-   - - - - - - -
test_bond_length_atoms(self)
- check PdfFit.bond_length_atoms()...
- source code - -
- -
-   - - - - - - -
test_bond_length_types(self)
- check PdfFit.bond_length_types()...
- source code - -
- -
-   - - - - - - -
test_get_scat(self)
- check PdfFit.get_scat()...
- source code - -
- -
-   - - - - - - -
test_set_scat(self)
- check PdfFit.set_scat()...
- source code - -
- -
-   - - - - - - -
test_reset_scat(self)
- check PdfFit.reset_scat()...
- source code - -
- -
-   - - - - - - -
test_num_atoms(self)
- check PdfFit.num_atoms()...
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - places = 6 -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

test_add_structure(self) -

-
source code  -
- -
-check PdfFit.add_structure()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_alloc(self) -

-
source code  -
- -
-check PdfFit.alloc()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_get_structure(self) -

-
source code  -
- -
-check PdfFit.get_structure()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_get_atoms(self) -

-
source code  -
- -
-check PdfFit.get_atoms()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_get_atom_types(self) -

-
source code  -
- -
-check PdfFit.get_atom_types()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_num_phases(self) -

-
source code  -
- -
-check PdfFit.num_phases()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_num_datasets(self) -

-
source code  -
- -
-check PdfFit.num_datasets()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_getcrw(self) -

-
source code  -
- -
-check PdfFit.getcrw()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_psel(self) -

-
source code  -
- -
-check PdfFit.psel()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_pdesel(self) -

-
source code  -
- -
-check PdfFit.pdesel()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_bond_angle(self) -

-
source code  -
- -
-check PdfFit.bond_angle()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_bond_length_atoms(self) -

-
source code  -
- -
-check PdfFit.bond_length_atoms()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_bond_length_types(self) -

-
source code  -
- -
-check PdfFit.bond_length_types()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_get_scat(self) -

-
source code  -
- -
-check PdfFit.get_scat()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_set_scat(self) -

-
source code  -
- -
-check PdfFit.set_scat()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_reset_scat(self) -

-
source code  -
- -
-check PdfFit.reset_scat()
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_num_atoms(self) -

-
source code  -
- -
-check PdfFit.num_atoms()
-        
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPhaseFractions-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPhaseFractions-module.html deleted file mode 100644 index 2141e249..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPhaseFractions-module.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - diffpy.pdffit2.tests.TestPhaseFractions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module TestPhaseFractions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module TestPhaseFractions

source code

-
-Unit tests for phase fraction calculations.
-
-
- - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - TestPhaseFractions -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'diffpy.pdffit2.tests' -
-

Imports: - unittest, - PdfFit, - datafile -


- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPhaseFractions-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPhaseFractions-pysrc.html deleted file mode 100644 index 9ef33555..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPhaseFractions-pysrc.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - diffpy.pdffit2.tests.TestPhaseFractions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module TestPhaseFractions - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module diffpy.pdffit2.tests.TestPhaseFractions

-
-  1  #!/usr/bin/env python 
-  2   
-  3  """Unit tests for phase fraction calculations. 
-  4  """ 
-  5   
-  6   
-  7  import unittest 
-  8   
-  9  from diffpy.pdffit2 import PdfFit 
- 10  from pdffit2testutils import datafile 
- 11   
- 12  ############################################################################## 
-
13 -class TestPhaseFractions(unittest.TestCase): -
14 - 15 places = 4 - 16 -
17 - def setUp(self): -
18 self.P = PdfFit() - 19 self.P.read_struct(datafile('Ni.stru')) - 20 self.P.read_struct(datafile('PbScW25TiO3.stru')) - 21 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - 22 self.P.alloc('N', 0.0, 0.05, 0.1, 10, 200) - 23 return -
24 -
25 - def tearDown(self): -
26 del self.P - 27 return -
28 -
29 - def test_xray_fractions(self): -
30 """test_xray_fractions -- check phase fractions in x-ray dataset. - 31 """ - 32 self.P.setdata(1) - 33 ph = self.P.phase_fractions() - 34 bb1 = 28**2 - 35 bb2 = ((8*82 + 24*8 + 4*21 + 2*74 + 2*22) / 40.0)**2 - 36 self.assertAlmostEqual(1.0, sum(ph['atom']), self.places) - 37 self.assertAlmostEqual(1.0, sum(ph['cell']), self.places) - 38 self.assertAlmostEqual(1.0, sum(ph['mass']), self.places) - 39 self.assertAlmostEqual(bb2/bb1, - 40 ph['atom'][0]/ph['atom'][1], self.places) - 41 self.assertAlmostEqual(bb2/bb1 * 40.0/4.0, - 42 ph['cell'][0]/ph['cell'][1], self.places) - 43 mavg1 = 58.69 - 44 mavg2 = (8*207.19 + 24*15.994 + 4*44.956 + 2*183.85 + 2*47.90)/40.0 - 45 self.assertAlmostEqual(bb2/bb1 * mavg1/mavg2, - 46 ph['mass'][0]/ph['mass'][1], self.places) - 47 self.assertEqual(0.0, sum(ph['stdatom'])) - 48 self.assertEqual(0.0, sum(ph['stdcell'])) - 49 self.assertEqual(0.0, sum(ph['stdmass'])) - 50 self.P.setphase(1) - 51 self.P.setvar('pscale', 2.0) - 52 ph2 = self.P.phase_fractions() - 53 self.assertAlmostEqual(1.0, sum(ph2['atom']), self.places) - 54 self.assertAlmostEqual(1.0, sum(ph2['cell']), self.places) - 55 self.assertAlmostEqual(1.0, sum(ph2['mass']), self.places) - 56 self.assertAlmostEqual(2.0, ph2['atom'][0]/ph2['atom'][1] / - 57 (ph['atom'][0]/ph['atom'][1]), self.places) - 58 self.assertAlmostEqual(2.0, ph2['cell'][0]/ph2['cell'][1] / - 59 (ph['cell'][0]/ph['cell'][1]), self.places) - 60 self.assertAlmostEqual(2.0, ph2['mass'][0]/ph2['mass'][1] / - 61 (ph['mass'][0]/ph['mass'][1]), self.places) - 62 return -
63 -
64 - def test_neutron_fractions(self): -
65 """test_neutron_fractions -- check phase fractions in neutron dataset. - 66 """ - 67 self.P.setdata(2) - 68 ph = self.P.phase_fractions() - 69 bb1 = 10.31**2 - 70 bPb = 9.4012 - 71 bO = 5.8054 - 72 bSc = 12.11 - 73 bW = 4.75518 - 74 bTi = -3.37013 - 75 bb2 = ((8*bPb + 24*bO + 4*bSc + 2*bW + 2*bTi) / 40.0)**2 - 76 self.assertAlmostEqual(1.0, sum(ph['atom']), self.places) - 77 self.assertAlmostEqual(1.0, sum(ph['cell']), self.places) - 78 self.assertAlmostEqual(1.0, sum(ph['mass']), self.places) - 79 self.assertAlmostEqual(bb2/bb1, - 80 ph['atom'][0]/ph['atom'][1], self.places) - 81 self.assertAlmostEqual(bb2/bb1 * 40.0/4.0, - 82 ph['cell'][0]/ph['cell'][1], self.places) - 83 mavg1 = 58.69 - 84 mavg2 = (8*207.19 + 24*15.994 + 4*44.956 + 2*183.85 + 2*47.90)/40.0 - 85 self.assertAlmostEqual(bb2/bb1 * mavg1/mavg2, - 86 ph['mass'][0]/ph['mass'][1], self.places) - 87 self.assertEqual(0.0, sum(ph['stdatom'])) - 88 self.assertEqual(0.0, sum(ph['stdcell'])) - 89 self.assertEqual(0.0, sum(ph['stdmass'])) - 90 self.P.setphase(1) - 91 self.P.setvar('pscale', 2.0) - 92 ph2 = self.P.phase_fractions() - 93 self.assertAlmostEqual(1.0, sum(ph2['atom']), self.places) - 94 self.assertAlmostEqual(1.0, sum(ph2['cell']), self.places) - 95 self.assertAlmostEqual(1.0, sum(ph2['mass']), self.places) - 96 self.assertAlmostEqual(2.0, ph2['atom'][0]/ph2['atom'][1] / - 97 (ph['atom'][0]/ph['atom'][1]), self.places) - 98 self.assertAlmostEqual(2.0, ph2['cell'][0]/ph2['cell'][1] / - 99 (ph['cell'][0]/ph['cell'][1]), self.places) -100 self.assertAlmostEqual(2.0, ph2['mass'][0]/ph2['mass'][1] / -101 (ph['mass'][0]/ph['mass'][1]), self.places) -102 return -
103 -104 # End of class TestSphereEnvelope -105 -106 if __name__ == '__main__': -107 unittest.main() -108 -109 # End of file -110 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions-class.html deleted file mode 100644 index f96787e0..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions-class.html +++ /dev/null @@ -1,481 +0,0 @@ - - - - - diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module TestPhaseFractions :: - Class TestPhaseFractions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class TestPhaseFractions

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        TestPhaseFractions
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_xray_fractions(self)
- test_xray_fractions -- check phase fractions in x-ray dataset.
- source code - -
- -
-   - - - - - - -
test_neutron_fractions(self)
- test_neutron_fractions -- check phase fractions in neutron dataset.
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - places = 4 -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors-module.html deleted file mode 100644 index eec6c948..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors-module.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - diffpy.pdffit2.tests.TestShapeFactors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module TestShapeFactors - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module TestShapeFactors

source code

-
-Unit tests for particle shape envelope factors.
-
-
- - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - TestSphereEnvelope -
-   - - TestStepCutEnvelope -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
spherefactor(r, - d)
- Calculate spherical envelope correction
- source code - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'diffpy.pdffit2.tests' -
-

Imports: - unittest, - numpy, - PdfFit, - pdffit2, - datafile -


- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

spherefactor(r, - d) -

-
source code  -
- -
-Calculate spherical envelope correction
-
-r -- PDF radius
-d -- diameter of spherical particle
-
-Return numpy array of shape correction envelope.
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors-pysrc.html deleted file mode 100644 index 76e2b69f..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors-pysrc.html +++ /dev/null @@ -1,548 +0,0 @@ - - - - - diffpy.pdffit2.tests.TestShapeFactors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module TestShapeFactors - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module diffpy.pdffit2.tests.TestShapeFactors

-
-  1  #!/usr/bin/env python 
-  2   
-  3  """Unit tests for particle shape envelope factors. 
-  4  """ 
-  5   
-  6   
-  7  import unittest 
-  8  import numpy 
-  9   
- 10  from diffpy.pdffit2 import PdfFit 
- 11  from diffpy.pdffit2 import pdffit2 
- 12  from pdffit2testutils import datafile 
- 13   
- 14   
-
15 -def spherefactor(r, d): -
16 """Calculate spherical envelope correction - 17 - 18 r -- PDF radius - 19 d -- diameter of spherical particle - 20 - 21 Return numpy array of shape correction envelope. - 22 """ - 23 r1 = numpy.array(r) - 24 fsph = 1.0 - 1.5*r1/d + 0.5*(r1/d)**3 - 25 fsph[r1 > d] = 0.0 - 26 return fsph -
27 - 28 - 29 ############################################################################## -
30 -class TestSphereEnvelope(unittest.TestCase): -
31 - 32 places = 6 - 33 -
34 - def setUp(self): -
35 self.P = PdfFit() - 36 return -
37 -
38 - def tearDown(self): -
39 self.P = None - 40 return -
41 - 42 -
43 - def test_calculation(self): -
44 """check calculation of sphere envelope factor - 45 """ - 46 self.P.read_struct(datafile('Ni.stru')) - 47 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - 48 self.P.calc() - 49 d = 8.0 - 50 r = numpy.array(self.P.getR()) - 51 G0 = numpy.array(self.P.getpdf_fit()) - 52 self.P.setvar('spdiameter', d) - 53 self.P.calc() - 54 G1 = numpy.array(self.P.getpdf_fit()) - 55 dG = (G0*spherefactor(r, d) - G1) - 56 msd = numpy.dot(dG, dG)/len(r) - 57 self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) - 58 return -
59 - 60 -
61 - def test_refinement(self): -
62 """check refinement of sphere envelope factor - 63 """ - 64 dcheck = 8.0 - 65 dstart = 12.0 - 66 self.P.read_struct(datafile('Ni.stru')) - 67 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - 68 self.P.setvar('spdiameter', dcheck) - 69 self.P.calc() - 70 r = numpy.array(self.P.getR()) - 71 Gd8 = numpy.array(self.P.getpdf_fit()) - 72 Gd8noise = Gd8 - 73 Gd8noise[::2] += 0.01 - 74 Gd8noise[1::2] -= 0.01 - 75 self.P.reset() - 76 self.P.read_struct(datafile('Ni.stru')) - 77 self.P.read_data_lists('X', 0.0, 0.05, list(r), list(Gd8noise)) - 78 self.P.constrain('spdiameter', '@8') - 79 self.P.setpar(8, dstart) - 80 self.P.refine() - 81 dfinal = self.P.getvar('spdiameter') - 82 self.assertAlmostEqual(dcheck, dfinal, 3) - 83 return -
84 - 85 -
86 - def test_twophase_calculation(self): -
87 """check PDF calculation for 2 phases with different spdiameters - 88 """ - 89 d1 = 6 - 90 d2 = 9 - 91 self.P.read_struct(datafile('Ni.stru')) - 92 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - 93 self.P.setvar('spdiameter', d1) - 94 self.P.calc() - 95 G1 = numpy.array(self.P.getpdf_fit()) - 96 self.P.reset() - 97 self.P.read_struct(datafile('PbScW25TiO3.stru')) - 98 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - 99 self.P.setvar('spdiameter', d2) -100 self.P.calc() -101 G2 = numpy.array(self.P.getpdf_fit()) -102 self.P.reset() -103 self.P.read_struct(datafile('Ni.stru')) -104 self.P.read_struct(datafile('PbScW25TiO3.stru')) -105 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) -106 self.P.setphase(1) -107 self.P.setvar('spdiameter', d1) -108 self.P.setphase(2) -109 self.P.setvar('spdiameter', d2) -110 self.P.calc() -111 Gtot = numpy.array(self.P.getpdf_fit()) -112 dG = (G1 + G2 - Gtot) -113 r = numpy.array(self.P.getR()) -114 msd = numpy.dot(dG, dG)/len(r) -115 self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) -116 return -
117 -118 -
119 - def test_twophase_refinement(self): -
120 """check PDF refinement of 2 phases that have different spdiameter. -121 """ -122 dcheck1 = 8.0 -123 dstart1 = 8.2 -124 dcheck2 = 6.0 -125 dstart2 = 5.5 -126 self.P.read_struct(datafile('Ni.stru')) -127 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) -128 self.P.setvar('spdiameter', dcheck1) -129 self.P.calc() -130 G1 = numpy.array(self.P.getpdf_fit()) -131 self.P.reset() -132 self.P.read_struct(datafile('PbScW25TiO3.stru')) -133 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) -134 self.P.setvar('spdiameter', dcheck2) -135 self.P.calc() -136 G2 = numpy.array(self.P.getpdf_fit()) -137 r = numpy.array(self.P.getR()) -138 Gnoise = G1 + G2 -139 Gnoise[::2] += 0.01 -140 Gnoise[1::2] -= 0.01 -141 self.P.reset() -142 self.P.read_struct(datafile('Ni.stru')) -143 self.P.read_struct(datafile('PbScW25TiO3.stru')) -144 self.P.read_data_lists('X', 0.0, 0.05, list(r), list(Gnoise)) -145 self.P.setphase(1) -146 self.P.constrain('spdiameter', '@11') -147 self.P.setphase(2) -148 self.P.constrain('spdiameter', '@12') -149 self.P.setpar(11, dstart1) -150 self.P.setpar(12, dstart2) -151 self.P.refine() -152 dfinal2 = self.P.getvar('spdiameter') -153 self.P.setphase(1) -154 dfinal1 = self.P.getvar('spdiameter') -155 self.assertAlmostEqual(dcheck1, dfinal1, 3) -156 self.assertAlmostEqual(dcheck2, dfinal2, 3) -157 return -
158 -159 -
160 - def test_spdiameter_io(self): -
161 """Check reading and writing of spdiameter from structure file. -162 """ -163 import re -164 self.P.read_struct(datafile('Ni.stru')) -165 self.assertEqual(0.0, self.P.getvar('spdiameter')) -166 # engine should not write shape factor when not defined -167 spdnone = self.P.save_struct_string(1) -168 self.failUnless(not re.search('(?m)^shape +sphere,', spdnone)) -169 self.P.setvar('spdiameter', 7) -170 spd7 = self.P.save_struct_string(1) -171 # spd7 should contain shape factor data -172 self.failUnless(re.search('(?m)^shape +sphere,', spd7)) -173 self.P.reset() -174 self.P.read_struct_string(spd7) -175 self.assertEqual(7.0, self.P.getvar('spdiameter')) -176 # try to read without comma -177 spd14 = re.sub('(?m)^shape +sphere.*$', 'shape sphere 14.00', spd7) -178 self.P.read_struct_string(spd14) -179 self.assertEqual(14.0, self.P.getvar('spdiameter')) -180 # try to read invalid shape data -181 sinvalid = re.sub('(?m)^shape .*', 'shape invalid, 1', spd7) -182 self.assertRaises(pdffit2.structureError, -183 self.P.read_struct_string, sinvalid) -184 return -
185 -186 -187 # End of class TestSphereEnvelope -188 -189 -190 ############################################################################## -
191 -class TestStepCutEnvelope(unittest.TestCase): -
192 -193 places = 6 -194 -
195 - def setUp(self): -
196 self.P = PdfFit() -197 return -
198 -
199 - def tearDown(self): -
200 self.P = None -201 return -
202 -203 -
204 - def test_stepcut_calculation(self): -
205 """check calculation of sphere envelope factor -206 """ -207 self.P.read_struct(datafile('Ni.stru')) -208 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) -209 self.P.calc() -210 stepcut = 8.0 -211 r = numpy.array(self.P.getR()) -212 G0 = numpy.array(self.P.getpdf_fit()) -213 G0[r > stepcut] = 0.0 -214 self.P.setvar('stepcut', stepcut) -215 self.P.calc() -216 G1 = numpy.array(self.P.getpdf_fit()) -217 dG = (G0 - G1) -218 msd = numpy.dot(dG, dG)/len(r) -219 self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) -220 return -
221 -222 -
224 """check PDF calculation for 2 phases with different spdiameters -225 """ -226 d1 = 6 -227 d2 = 9 -228 self.P.read_struct(datafile('Ni.stru')) -229 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) -230 self.P.setvar('stepcut', d1) -231 self.P.calc() -232 G1 = numpy.array(self.P.getpdf_fit()) -233 self.P.reset() -234 self.P.read_struct(datafile('PbScW25TiO3.stru')) -235 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) -236 self.P.setvar('stepcut', d2) -237 self.P.calc() -238 G2 = numpy.array(self.P.getpdf_fit()) -239 self.P.reset() -240 self.P.read_struct(datafile('Ni.stru')) -241 self.P.read_struct(datafile('PbScW25TiO3.stru')) -242 self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) -243 self.P.setphase(1) -244 self.P.setvar('stepcut', d1) -245 self.P.setphase(2) -246 self.P.setvar('stepcut', d2) -247 self.P.calc() -248 Gtot = numpy.array(self.P.getpdf_fit()) -249 dG = (G1 + G2 - Gtot) -250 r = numpy.array(self.P.getR()) -251 msd = numpy.dot(dG, dG)/len(r) -252 self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) -253 # G after step should be zero -254 self.failUnless(numpy.all(0 == Gtot[r > max(d1, d2)])) -255 return -
256 -257 -
258 - def test_stepcut_io(self): -
259 """Check reading and writing of stepcut from structure file. -260 """ -261 import re -262 self.P.read_struct(datafile('Ni.stru')) -263 self.assertEqual(0.0, self.P.getvar('stepcut')) -264 # engine should not write shape factor when not defined -265 sscnone = self.P.save_struct_string(1) -266 self.failUnless(not re.search('(?m)^shape +stepcut,', sscnone)) -267 self.P.setvar('stepcut', 7) -268 ssc7 = self.P.save_struct_string(1) -269 # ssc7 should contain shape factor data -270 self.failUnless(re.search('(?m)^shape +stepcut,', ssc7)) -271 self.P.reset() -272 self.P.read_struct_string(ssc7) -273 self.assertEqual(7.0, self.P.getvar('stepcut')) -274 # try to read without comma -275 ssc14 = re.sub('(?m)^shape +stepcut.*$', 'shape stepcut 14.00', ssc7) -276 self.P.read_struct_string(ssc14) -277 self.assertEqual(14.0, self.P.getvar('stepcut')) -278 # try to read invalid shape data -279 sinvalid = re.sub('(?m)^shape .*', 'shape invalid, 1', ssc7) -280 self.assertRaises(pdffit2.structureError, -281 self.P.read_struct_string, sinvalid) -282 return -
283 -284 -285 # End of class TestStepCutEnvelope -286 -287 if __name__ == '__main__': -288 unittest.main() -289 -290 # End of file -291 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html deleted file mode 100644 index 7f8663f2..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope-class.html +++ /dev/null @@ -1,601 +0,0 @@ - - - - - diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module TestShapeFactors :: - Class TestSphereEnvelope - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class TestSphereEnvelope

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        TestSphereEnvelope
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_calculation(self)
- check calculation of sphere envelope factor...
- source code - -
- -
-   - - - - - - -
test_refinement(self)
- check refinement of sphere envelope factor...
- source code - -
- -
-   - - - - - - -
test_twophase_calculation(self)
- check PDF calculation for 2 phases with different spdiameters...
- source code - -
- -
-   - - - - - - -
test_twophase_refinement(self)
- check PDF refinement of 2 phases that have different spdiameter.
- source code - -
- -
-   - - - - - - -
test_spdiameter_io(self)
- Check reading and writing of spdiameter from structure file.
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - places = 6 -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

test_calculation(self) -

-
source code  -
- -
-check calculation of sphere envelope factor
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_refinement(self) -

-
source code  -
- -
-check refinement of sphere envelope factor
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_twophase_calculation(self) -

-
source code  -
- -
-check PDF calculation for 2 phases with different spdiameters
-        
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope-class.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope-class.html deleted file mode 100644 index 3ac811f4..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope-class.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - - diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module TestShapeFactors :: - Class TestStepCutEnvelope - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class TestStepCutEnvelope

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        TestStepCutEnvelope
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_stepcut_calculation(self)
- check calculation of sphere envelope factor...
- source code - -
- -
-   - - - - - - -
test_twophase_stepcut_calculation(self)
- check PDF calculation for 2 phases with different spdiameters...
- source code - -
- -
-   - - - - - - -
test_stepcut_io(self)
- Check reading and writing of stepcut from structure file.
- source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - places = 6 -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- -
-Hook method for setting up the test fixture before exercising it.
-
-
-
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- -
-Hook method for deconstructing the test fixture after testing it.
-
-
-
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

test_stepcut_calculation(self) -

-
source code  -
- -
-check calculation of sphere envelope factor
-        
-
-
-
-
-
-
- -
- -
- - -
-

test_twophase_stepcut_calculation(self) -

-
source code  -
- -
-check PDF calculation for 2 phases with different spdiameters
-        
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.pdffit2testutils-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.pdffit2testutils-module.html deleted file mode 100644 index b96e0972..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.pdffit2testutils-module.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - diffpy.pdffit2.tests.pdffit2testutils - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module pdffit2testutils - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module pdffit2testutils

source code

-
-Helper routines for running other unit tests.
-Import of this module suppresses the chatty output from the C++ extension.
-
-
- - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
datafile(filename)
- prepend testdata_dir to filename.
- source code - -
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - thisfile = '/Users/pjuhas/programs/github/diffpy/diffpy.pdffit... -
-   - - tests_dir = '/Users/pjuhas/programs/github/diffpy/diffpy.pdffi... -
-   - - testdata_dir = '/Users/pjuhas/programs/github/diffpy/diffpy.pd... -
-   - - __package__ = 'diffpy.pdffit2.tests' -
-

Imports: - os, - diffpy -


- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

thisfile

- -
-
-
-
Value:
-
-'/Users/pjuhas/programs/github/diffpy/diffpy.pdffit2/diffpy/pdffit2/te\
-sts/pdffit2testutils.pyc'
-
-
-
-
-
- -
- -
-

tests_dir

- -
-
-
-
Value:
-
-'/Users/pjuhas/programs/github/diffpy/diffpy.pdffit2/diffpy/pdffit2/te\
-sts'
-
-
-
-
-
- -
- -
-

testdata_dir

- -
-
-
-
Value:
-
-'/Users/pjuhas/programs/github/diffpy/diffpy.pdffit2/diffpy/pdffit2/te\
-sts/testdata'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.pdffit2testutils-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.pdffit2testutils-pysrc.html deleted file mode 100644 index 8798690e..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.pdffit2testutils-pysrc.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - diffpy.pdffit2.tests.pdffit2testutils - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module pdffit2testutils - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module diffpy.pdffit2.tests.pdffit2testutils

-
- 1  #!/usr/bin/env python 
- 2  ############################################################################## 
- 3  # 
- 4  # diffpy.srreal     by DANSE Diffraction group 
- 5  #                   Simon J. L. Billinge 
- 6  #                   (c) 2010 Trustees of the Columbia University 
- 7  #                   in the City of New York.  All rights reserved. 
- 8  # 
- 9  # File coded by:    Pavol Juhas 
-10  # 
-11  # See AUTHORS.txt for a list of people who contributed. 
-12  # See LICENSE.txt for license information. 
-13  # 
-14  ############################################################################## 
-15   
-16  """Helper routines for running other unit tests. 
-17  Import of this module suppresses the chatty output from the C++ extension. 
-18  """ 
-19   
-20   
-21  import os.path 
-22  import diffpy.pdffit2 
-23   
-24  # silence the C++ engine output 
-25  diffpy.pdffit2.redirect_stdout(open(os.path.devnull, 'w')) 
-26   
-27  # path variables 
-28  thisfile = locals().get('__file__', 'file.py') 
-29  tests_dir = os.path.dirname(os.path.abspath(thisfile)) 
-30  testdata_dir = os.path.join(tests_dir, 'testdata') 
-31   
-
32 -def datafile(filename): -
33 """prepend testdata_dir to filename. -34 """ -35 return os.path.join(testdata_dir, filename) -
36 -37 # End of file -38 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.run-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.run-module.html deleted file mode 100644 index 342350b6..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.run-module.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - diffpy.pdffit2.tests.run - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module run - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module run

source code

-
-Convenience module for executing all unit tests with
-
-python -m diffpy.pdffit2.tests.run
-
-
- - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = None -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.run-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.run-pysrc.html deleted file mode 100644 index 5d380de0..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.run-pysrc.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - diffpy.pdffit2.tests.run - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module run - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module diffpy.pdffit2.tests.run

-
- 1  #!/usr/bin/env python 
- 2  ############################################################################## 
- 3  # 
- 4  # diffpy.pdffit2    by DANSE Diffraction group 
- 5  #                   Simon J. L. Billinge 
- 6  #                   (c) 2012 Trustees of the Columbia University 
- 7  #                   in the City of New York.  All rights reserved. 
- 8  # 
- 9  # File coded by:    Pavol Juhas 
-10  # 
-11  # See AUTHORS.txt for a list of people who contributed. 
-12  # See LICENSE.txt for license information. 
-13  # 
-14  ############################################################################## 
-15   
-16  """Convenience module for executing all unit tests with 
-17   
-18  python -m diffpy.pdffit2.tests.run 
-19  """ 
-20   
-21   
-22  if __name__ == '__main__': 
-23      import sys 
-24      from diffpy.pdffit2.tests import test 
-25      # produce zero exit code for a successful test 
-26      sys.exit(not test().wasSuccessful()) 
-27   
-28  # End of file 
-29   
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.rundeps-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.rundeps-module.html deleted file mode 100644 index 11ef8e03..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.rundeps-module.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - diffpy.pdffit2.tests.rundeps - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module rundeps - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module rundeps

source code

-
-Convenience module for executing unit tests for all pdffit2 dependencies
-
-python -m diffpy.pdffit2.tests.rundeps
-
-
- - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = None -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.tests.rundeps-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.tests.rundeps-pysrc.html deleted file mode 100644 index aca21ebe..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.tests.rundeps-pysrc.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - diffpy.pdffit2.tests.rundeps - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Package tests :: - Module rundeps - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module diffpy.pdffit2.tests.rundeps

-
- 1  #!/usr/bin/env python 
- 2  ############################################################################## 
- 3  # 
- 4  # diffpy.pdffit2    by DANSE Diffraction group 
- 5  #                   Simon J. L. Billinge 
- 6  #                   (c) 2012 Trustees of the Columbia University 
- 7  #                   in the City of New York.  All rights reserved. 
- 8  # 
- 9  # File coded by:    Pavol Juhas 
-10  # 
-11  # See AUTHORS.txt for a list of people who contributed. 
-12  # See LICENSE.txt for license information. 
-13  # 
-14  ############################################################################## 
-15   
-16  """Convenience module for executing unit tests for all pdffit2 dependencies 
-17   
-18  python -m diffpy.pdffit2.tests.rundeps 
-19  """ 
-20   
-21   
-22  if __name__ == '__main__': 
-23      import sys 
-24      from diffpy.pdffit2.tests import testdeps 
-25      # produce zero exit code for a successful test 
-26      sys.exit(not testdeps().wasSuccessful()) 
-27   
-28  # End of file 
-29   
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.version-module.html b/static_root/doc/pdffit2/diffpy.pdffit2.version-module.html deleted file mode 100644 index 6c61614a..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.version-module.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - diffpy.pdffit2.version - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Module version - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module version

source code

-
-Definition of __version__, __date__, __gitsha__.
-
-
- -
-

Version: - 1.1 -

-

Date: - 2016-02-23 15:21:36 -0500 -

-
- - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __gitsha__ = '6e6f443adc884c6f8debde963d10829f5c5c325e' -
-   - - __timestamp__ = 1456258896 -
-   - - __package__ = 'diffpy.pdffit2' -
-

Imports: - resource_filename, - RawConfigParser, - warn -


- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/diffpy.pdffit2.version-pysrc.html b/static_root/doc/pdffit2/diffpy.pdffit2.version-pysrc.html deleted file mode 100644 index 855c9fc0..00000000 --- a/static_root/doc/pdffit2/diffpy.pdffit2.version-pysrc.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - diffpy.pdffit2.version - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package diffpy :: - Package pdffit2 :: - Module version - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module diffpy.pdffit2.version

-
- 1  #!/usr/bin/env python 
- 2  ############################################################################## 
- 3  # 
- 4  # pdffit2           by DANSE Diffraction group 
- 5  #                   Simon J. L. Billinge 
- 6  #                   (c) 2008 trustees of the Michigan State University. 
- 7  #                   All rights reserved. 
- 8  # 
- 9  # File coded by:    Pavol Juhas 
-10  # 
-11  # See AUTHORS.txt for a list of people who contributed. 
-12  # See LICENSE.txt for license information. 
-13  # 
-14  ############################################################################## 
-15   
-16   
-17  """Definition of __version__, __date__, __gitsha__. 
-18  """ 
-19   
-20  from pkg_resources import resource_filename 
-21  from ConfigParser import RawConfigParser 
-22   
-23  # obtain version information from the version.cfg file 
-24  cp = RawConfigParser(dict(version='', date='', commit='', timestamp=0)) 
-25  if not cp.read(resource_filename(__name__, 'version.cfg')): 
-26      from warnings import warn 
-27      warn('Package metadata not found, execute "./setup.py egg_info".') 
-28   
-29  __version__ = cp.get('DEFAULT', 'version') 
-30  __date__ = cp.get('DEFAULT', 'date') 
-31  __gitsha__ = cp.get('DEFAULT', 'commit') 
-32  __timestamp__ = cp.getint('DEFAULT', 'timestamp') 
-33   
-34  del cp 
-35   
-36  # End of file 
-37   
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/epydoc.css b/static_root/doc/pdffit2/epydoc.css deleted file mode 100644 index 86d41706..00000000 --- a/static_root/doc/pdffit2/epydoc.css +++ /dev/null @@ -1,322 +0,0 @@ - - -/* Epydoc CSS Stylesheet - * - * This stylesheet can be used to customize the appearance of epydoc's - * HTML output. - * - */ - -/* Default Colors & Styles - * - Set the default foreground & background color with 'body'; and - * link colors with 'a:link' and 'a:visited'. - * - Use bold for decision list terms. - * - The heading styles defined here are used for headings *within* - * docstring descriptions. All headings used by epydoc itself use - * either class='epydoc' or class='toc' (CSS styles for both - * defined below). - */ -body { background: #ffffff; color: #000000; } -p { margin-top: 0.5em; margin-bottom: 0.5em; } -a:link { color: #0000ff; } -a:visited { color: #204080; } -dt { font-weight: bold; } -h1 { font-size: +140%; font-style: italic; - font-weight: bold; } -h2 { font-size: +125%; font-style: italic; - font-weight: bold; } -h3 { font-size: +110%; font-style: italic; - font-weight: normal; } -code { font-size: 100%; } -/* N.B.: class, not pseudoclass */ -a.link { font-family: monospace; } - -/* Page Header & Footer - * - The standard page header consists of a navigation bar (with - * pointers to standard pages such as 'home' and 'trees'); a - * breadcrumbs list, which can be used to navigate to containing - * classes or modules; options links, to show/hide private - * variables and to show/hide frames; and a page title (using - *

). The page title may be followed by a link to the - * corresponding source code (using 'span.codelink'). - * - The footer consists of a navigation bar, a timestamp, and a - * pointer to epydoc's homepage. - */ -h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } -h2.epydoc { font-size: +130%; font-weight: bold; } -h3.epydoc { font-size: +115%; font-weight: bold; - margin-top: 0.2em; } -td h3.epydoc { font-size: +115%; font-weight: bold; - margin-bottom: 0; } -table.navbar { background: #a0c0ff; color: #000000; - border: 2px groove #c0d0d0; } -table.navbar table { color: #000000; } -th.navbar-select { background: #70b0ff; - color: #000000; } -table.navbar a { text-decoration: none; } -table.navbar a:link { color: #0000ff; } -table.navbar a:visited { color: #204080; } -span.breadcrumbs { font-size: 85%; font-weight: bold; } -span.options { font-size: 70%; } -span.codelink { font-size: 85%; } -td.footer { font-size: 85%; } - -/* Table Headers - * - Each summary table and details section begins with a 'header' - * row. This row contains a section title (marked by - * 'span.table-header') as well as a show/hide private link - * (marked by 'span.options', defined above). - * - Summary tables that contain user-defined groups mark those - * groups using 'group header' rows. - */ -td.table-header { background: #70b0ff; color: #000000; - border: 1px solid #608090; } -td.table-header table { color: #000000; } -td.table-header table a:link { color: #0000ff; } -td.table-header table a:visited { color: #204080; } -span.table-header { font-size: 120%; font-weight: bold; } -th.group-header { background: #c0e0f8; color: #000000; - text-align: left; font-style: italic; - font-size: 115%; - border: 1px solid #608090; } - -/* Summary Tables (functions, variables, etc) - * - Each object is described by a single row of the table with - * two cells. The left cell gives the object's type, and is - * marked with 'code.summary-type'. The right cell gives the - * object's name and a summary description. - * - CSS styles for the table's header and group headers are - * defined above, under 'Table Headers' - */ -table.summary { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin-bottom: 0.5em; } -td.summary { border: 1px solid #608090; } -code.summary-type { font-size: 85%; } -table.summary a:link { color: #0000ff; } -table.summary a:visited { color: #204080; } - - -/* Details Tables (functions, variables, etc) - * - Each object is described in its own div. - * - A single-row summary table w/ table-header is used as - * a header for each details section (CSS style for table-header - * is defined above, under 'Table Headers'). - */ -table.details { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin: .2em 0 0 0; } -table.details table { color: #000000; } -table.details a:link { color: #0000ff; } -table.details a:visited { color: #204080; } - -/* Fields */ -dl.fields { margin-left: 2em; margin-top: 1em; - margin-bottom: 1em; } -dl.fields dd ul { margin-left: 0em; padding-left: 0em; } -dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; } -div.fields { margin-left: 2em; } -div.fields p { margin-bottom: 0.5em; } - -/* Index tables (identifier index, term index, etc) - * - link-index is used for indices containing lists of links - * (namely, the identifier index & term index). - * - index-where is used in link indices for the text indicating - * the container/source for each link. - * - metadata-index is used for indices containing metadata - * extracted from fields (namely, the bug index & todo index). - */ -table.link-index { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; } -td.link-index { border-width: 0px; } -table.link-index a:link { color: #0000ff; } -table.link-index a:visited { color: #204080; } -span.index-where { font-size: 70%; } -table.metadata-index { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin: .2em 0 0 0; } -td.metadata-index { border-width: 1px; border-style: solid; } -table.metadata-index a:link { color: #0000ff; } -table.metadata-index a:visited { color: #204080; } - -/* Function signatures - * - sig* is used for the signature in the details section. - * - .summary-sig* is used for the signature in the summary - * table, and when listing property accessor functions. - * */ -.sig-name { color: #006080; } -.sig-arg { color: #008060; } -.sig-default { color: #602000; } -.summary-sig { font-family: monospace; } -.summary-sig-name { color: #006080; font-weight: bold; } -table.summary a.summary-sig-name:link - { color: #006080; font-weight: bold; } -table.summary a.summary-sig-name:visited - { color: #006080; font-weight: bold; } -.summary-sig-arg { color: #006040; } -.summary-sig-default { color: #501800; } - -/* Subclass list - */ -ul.subclass-list { display: inline; } -ul.subclass-list li { display: inline; } - -/* To render variables, classes etc. like functions */ -table.summary .summary-name { color: #006080; font-weight: bold; - font-family: monospace; } -table.summary - a.summary-name:link { color: #006080; font-weight: bold; - font-family: monospace; } -table.summary - a.summary-name:visited { color: #006080; font-weight: bold; - font-family: monospace; } - -/* Variable values - * - In the 'variable details' sections, each varaible's value is - * listed in a 'pre.variable' box. The width of this box is - * restricted to 80 chars; if the value's repr is longer than - * this it will be wrapped, using a backslash marked with - * class 'variable-linewrap'. If the value's repr is longer - * than 3 lines, the rest will be ellided; and an ellipsis - * marker ('...' marked with 'variable-ellipsis') will be used. - * - If the value is a string, its quote marks will be marked - * with 'variable-quote'. - * - If the variable is a regexp, it is syntax-highlighted using - * the re* CSS classes. - */ -pre.variable { padding: .5em; margin: 0; - background: #dce4ec; color: #000000; - border: 1px solid #708890; } -.variable-linewrap { color: #604000; font-weight: bold; } -.variable-ellipsis { color: #604000; font-weight: bold; } -.variable-quote { color: #604000; font-weight: bold; } -.variable-group { color: #008000; font-weight: bold; } -.variable-op { color: #604000; font-weight: bold; } -.variable-string { color: #006030; } -.variable-unknown { color: #a00000; font-weight: bold; } -.re { color: #000000; } -.re-char { color: #006030; } -.re-op { color: #600000; } -.re-group { color: #003060; } -.re-ref { color: #404040; } - -/* Base tree - * - Used by class pages to display the base class hierarchy. - */ -pre.base-tree { font-size: 80%; margin: 0; } - -/* Frames-based table of contents headers - * - Consists of two frames: one for selecting modules; and - * the other listing the contents of the selected module. - * - h1.toc is used for each frame's heading - * - h2.toc is used for subheadings within each frame. - */ -h1.toc { text-align: center; font-size: 105%; - margin: 0; font-weight: bold; - padding: 0; } -h2.toc { font-size: 100%; font-weight: bold; - margin: 0.5em 0 0 -0.3em; } - -/* Syntax Highlighting for Source Code - * - doctest examples are displayed in a 'pre.py-doctest' block. - * If the example is in a details table entry, then it will use - * the colors specified by the 'table pre.py-doctest' line. - * - Source code listings are displayed in a 'pre.py-src' block. - * Each line is marked with 'span.py-line' (used to draw a line - * down the left margin, separating the code from the line - * numbers). Line numbers are displayed with 'span.py-lineno'. - * The expand/collapse block toggle button is displayed with - * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not - * modify the font size of the text.) - * - If a source code page is opened with an anchor, then the - * corresponding code block will be highlighted. The code - * block's header is highlighted with 'py-highlight-hdr'; and - * the code block's body is highlighted with 'py-highlight'. - * - The remaining py-* classes are used to perform syntax - * highlighting (py-string for string literals, py-name for names, - * etc.) - */ -pre.py-doctest { padding: .5em; margin: 1em; - background: #e8f0f8; color: #000000; - border: 1px solid #708890; } -table pre.py-doctest { background: #dce4ec; - color: #000000; } -pre.py-src { border: 2px solid #000000; - background: #f0f0f0; color: #000000; } -.py-line { border-left: 2px solid #000000; - margin-left: .2em; padding-left: .4em; } -.py-lineno { font-style: italic; font-size: 90%; - padding-left: .5em; } -a.py-toggle { text-decoration: none; } -div.py-highlight-hdr { border-top: 2px solid #000000; - border-bottom: 2px solid #000000; - background: #d8e8e8; } -div.py-highlight { border-bottom: 2px solid #000000; - background: #d0e0e0; } -.py-prompt { color: #005050; font-weight: bold;} -.py-more { color: #005050; font-weight: bold;} -.py-string { color: #006030; } -.py-comment { color: #003060; } -.py-keyword { color: #600000; } -.py-output { color: #404040; } -.py-name { color: #000050; } -.py-name:link { color: #000050 !important; } -.py-name:visited { color: #000050 !important; } -.py-number { color: #005000; } -.py-defname { color: #000060; font-weight: bold; } -.py-def-name { color: #000060; font-weight: bold; } -.py-base-class { color: #000060; } -.py-param { color: #000060; } -.py-docstring { color: #006030; } -.py-decorator { color: #804020; } -/* Use this if you don't want links to names underlined: */ -/*a.py-name { text-decoration: none; }*/ - -/* Graphs & Diagrams - * - These CSS styles are used for graphs & diagrams generated using - * Graphviz dot. 'img.graph-without-title' is used for bare - * diagrams (to remove the border created by making the image - * clickable). - */ -img.graph-without-title { border: none; } -img.graph-with-title { border: 1px solid #000000; } -span.graph-title { font-weight: bold; } -span.graph-caption { } - -/* General-purpose classes - * - 'p.indent-wrapped-lines' defines a paragraph whose first line - * is not indented, but whose subsequent lines are. - * - The 'nomargin-top' class is used to remove the top margin (e.g. - * from lists). The 'nomargin' class is used to remove both the - * top and bottom margin (but not the left or right margin -- - * for lists, that would cause the bullets to disappear.) - */ -p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em; - margin: 0; } -.nomargin-top { margin-top: 0; } -.nomargin { margin-top: 0; margin-bottom: 0; } - -/* HTML Log */ -div.log-block { padding: 0; margin: .5em 0 .5em 0; - background: #e8f0f8; color: #000000; - border: 1px solid #000000; } -div.log-error { padding: .1em .3em .1em .3em; margin: 4px; - background: #ffb0b0; color: #000000; - border: 1px solid #000000; } -div.log-warning { padding: .1em .3em .1em .3em; margin: 4px; - background: #ffffb0; color: #000000; - border: 1px solid #000000; } -div.log-info { padding: .1em .3em .1em .3em; margin: 4px; - background: #b0ffb0; color: #000000; - border: 1px solid #000000; } -h2.log-hdr { background: #70b0ff; color: #000000; - margin: 0; padding: 0em 0.5em 0em 0.5em; - border-bottom: 1px solid #000000; font-size: 110%; } -p.log { font-weight: bold; margin: .5em 0 .5em 0; } -tr.opt-changed { color: #000000; font-weight: bold; } -tr.opt-default { color: #606060; } -pre.log { margin: 0; padding: 0; padding-left: 1em; } diff --git a/static_root/doc/pdffit2/epydoc.js b/static_root/doc/pdffit2/epydoc.js deleted file mode 100644 index e787dbcf..00000000 --- a/static_root/doc/pdffit2/epydoc.js +++ /dev/null @@ -1,293 +0,0 @@ -function toggle_private() { - // Search for any private/public links on this page. Store - // their old text in "cmd," so we will know what action to - // take; and change their text to the opposite action. - var cmd = "?"; - var elts = document.getElementsByTagName("a"); - for(var i=0; i...
"; - elt.innerHTML = s; - } -} - -function toggle(id) { - elt = document.getElementById(id+"-toggle"); - if (elt.innerHTML == "-") - collapse(id); - else - expand(id); - return false; -} - -function highlight(id) { - var elt = document.getElementById(id+"-def"); - if (elt) elt.className = "py-highlight-hdr"; - var elt = document.getElementById(id+"-expanded"); - if (elt) elt.className = "py-highlight"; - var elt = document.getElementById(id+"-collapsed"); - if (elt) elt.className = "py-highlight"; -} - -function num_lines(s) { - var n = 1; - var pos = s.indexOf("\n"); - while ( pos > 0) { - n += 1; - pos = s.indexOf("\n", pos+1); - } - return n; -} - -// Collapse all blocks that mave more than `min_lines` lines. -function collapse_all(min_lines) { - var elts = document.getElementsByTagName("div"); - for (var i=0; i 0) - if (elt.id.substring(split, elt.id.length) == "-expanded") - if (num_lines(elt.innerHTML) > min_lines) - collapse(elt.id.substring(0, split)); - } -} - -function expandto(href) { - var start = href.indexOf("#")+1; - if (start != 0 && start != href.length) { - if (href.substring(start, href.length) != "-") { - collapse_all(4); - pos = href.indexOf(".", start); - while (pos != -1) { - var id = href.substring(start, pos); - expand(id); - pos = href.indexOf(".", pos+1); - } - var id = href.substring(start, href.length); - expand(id); - highlight(id); - } - } -} - -function kill_doclink(id) { - var parent = document.getElementById(id); - parent.removeChild(parent.childNodes.item(0)); -} -function auto_kill_doclink(ev) { - if (!ev) var ev = window.event; - if (!this.contains(ev.toElement)) { - var parent = document.getElementById(this.parentID); - parent.removeChild(parent.childNodes.item(0)); - } -} - -function doclink(id, name, targets_id) { - var elt = document.getElementById(id); - - // If we already opened the box, then destroy it. - // (This case should never occur, but leave it in just in case.) - if (elt.childNodes.length > 1) { - elt.removeChild(elt.childNodes.item(0)); - } - else { - // The outer box: relative + inline positioning. - var box1 = document.createElement("div"); - box1.style.position = "relative"; - box1.style.display = "inline"; - box1.style.top = 0; - box1.style.left = 0; - - // A shadow for fun - var shadow = document.createElement("div"); - shadow.style.position = "absolute"; - shadow.style.left = "-1.3em"; - shadow.style.top = "-1.3em"; - shadow.style.background = "#404040"; - - // The inner box: absolute positioning. - var box2 = document.createElement("div"); - box2.style.position = "relative"; - box2.style.border = "1px solid #a0a0a0"; - box2.style.left = "-.2em"; - box2.style.top = "-.2em"; - box2.style.background = "white"; - box2.style.padding = ".3em .4em .3em .4em"; - box2.style.fontStyle = "normal"; - box2.onmouseout=auto_kill_doclink; - box2.parentID = id; - - // Get the targets - var targets_elt = document.getElementById(targets_id); - var targets = targets_elt.getAttribute("targets"); - var links = ""; - target_list = targets.split(","); - for (var i=0; i" + - target[0] + ""; - } - - // Put it all together. - elt.insertBefore(box1, elt.childNodes.item(0)); - //box1.appendChild(box2); - box1.appendChild(shadow); - shadow.appendChild(box2); - box2.innerHTML = - "Which "+name+" do you want to see documentation for?" + - ""; - } - return false; -} - -function get_anchor() { - var href = location.href; - var start = href.indexOf("#")+1; - if ((start != 0) && (start != href.length)) - return href.substring(start, href.length); - } -function redirect_url(dottedName) { - // Scan through each element of the "pages" list, and check - // if "name" matches with any of them. - for (var i=0; i-m" or "-c"; - // extract the portion & compare it to dottedName. - var pagename = pages[i].substring(0, pages[i].length-2); - if (pagename == dottedName.substring(0,pagename.length)) { - - // We've found a page that matches `dottedName`; - // construct its URL, using leftover `dottedName` - // content to form an anchor. - var pagetype = pages[i].charAt(pages[i].length-1); - var url = pagename + ((pagetype=="m")?"-module.html": - "-class.html"); - if (dottedName.length > pagename.length) - url += "#" + dottedName.substring(pagename.length+1, - dottedName.length); - return url; - } - } - } diff --git a/static_root/doc/pdffit2/exceptions.AssertionError-class.html b/static_root/doc/pdffit2/exceptions.AssertionError-class.html deleted file mode 100644 index 24fbbb6b..00000000 --- a/static_root/doc/pdffit2/exceptions.AssertionError-class.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - exceptions.AssertionError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - exceptions :: - AssertionError :: - Class AssertionError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class AssertionError

-
-   object --+            
-            |            
-BaseException --+        
-                |        
-        Exception --+    
-                    |    
-        StandardError --+
-                        |
-                       AssertionError
-
- -
-
-Assertion failed.
-
-
- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
-
-a new object with type S, a subtype of T
-
-
-
- - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- -
-x.__init__(...) initializes x; see help(type(x)) for signature
-
-
-
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- -
-
-
-
-
-
Returns:
-a new object with type S, a subtype of T
-
-
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/frames.html b/static_root/doc/pdffit2/frames.html deleted file mode 100644 index 825795c7..00000000 --- a/static_root/doc/pdffit2/frames.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diffpy.pdffit2 - - - - - - - - - diff --git a/static_root/doc/pdffit2/help.html b/static_root/doc/pdffit2/help.html deleted file mode 100644 index 5fa90559..00000000 --- a/static_root/doc/pdffit2/help.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - Help - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
- -

API Documentation

- -

This document contains the API (Application Programming Interface) -documentation for diffpy.pdffit2. Documentation for the Python -objects defined by the project is divided into separate pages for each -package, module, and class. The API documentation also includes two -pages containing information about the project as a whole: a trees -page, and an index page.

- -

Object Documentation

- -

Each Package Documentation page contains:

-
    -
  • A description of the package.
  • -
  • A list of the modules and sub-packages contained by the - package.
  • -
  • A summary of the classes defined by the package.
  • -
  • A summary of the functions defined by the package.
  • -
  • A summary of the variables defined by the package.
  • -
  • A detailed description of each function defined by the - package.
  • -
  • A detailed description of each variable defined by the - package.
  • -
- -

Each Module Documentation page contains:

-
    -
  • A description of the module.
  • -
  • A summary of the classes defined by the module.
  • -
  • A summary of the functions defined by the module.
  • -
  • A summary of the variables defined by the module.
  • -
  • A detailed description of each function defined by the - module.
  • -
  • A detailed description of each variable defined by the - module.
  • -
- -

Each Class Documentation page contains:

-
    -
  • A class inheritance diagram.
  • -
  • A list of known subclasses.
  • -
  • A description of the class.
  • -
  • A summary of the methods defined by the class.
  • -
  • A summary of the instance variables defined by the class.
  • -
  • A summary of the class (static) variables defined by the - class.
  • -
  • A detailed description of each method defined by the - class.
  • -
  • A detailed description of each instance variable defined by the - class.
  • -
  • A detailed description of each class (static) variable defined - by the class.
  • -
- -

Project Documentation

- -

The Trees page contains the module and class hierarchies:

-
    -
  • The module hierarchy lists every package and module, with - modules grouped into packages. At the top level, and within each - package, modules and sub-packages are listed alphabetically.
  • -
  • The class hierarchy lists every class, grouped by base - class. If a class has more than one base class, then it will be - listed under each base class. At the top level, and under each base - class, classes are listed alphabetically.
  • -
- -

The Index page contains indices of terms and - identifiers:

-
    -
  • The term index lists every term indexed by any object's - documentation. For each term, the index provides links to each - place where the term is indexed.
  • -
  • The identifier index lists the (short) name of every package, - module, class, method, function, variable, and parameter. For each - identifier, the index provides a short description, and a link to - its documentation.
  • -
- -

The Table of Contents

- -

The table of contents occupies the two frames on the left side of -the window. The upper-left frame displays the project -contents, and the lower-left frame displays the module -contents:

- - - - - - - - - -
- Project
Contents
...
- API
Documentation
Frame


-
- Module
Contents
 
...
  -

- -

The project contents frame contains a list of all packages -and modules that are defined by the project. Clicking on an entry -will display its contents in the module contents frame. Clicking on a -special entry, labeled "Everything," will display the contents of -the entire project.

- -

The module contents frame contains a list of every -submodule, class, type, exception, function, and variable defined by a -module or package. Clicking on an entry will display its -documentation in the API documentation frame. Clicking on the name of -the module, at the top of the frame, will display the documentation -for the module itself.

- -

The "frames" and "no frames" buttons below the top -navigation bar can be used to control whether the table of contents is -displayed or not.

- -

The Navigation Bar

- -

A navigation bar is located at the top and bottom of every page. -It indicates what type of page you are currently viewing, and allows -you to go to related pages. The following table describes the labels -on the navigation bar. Note that not some labels (such as -[Parent]) are not displayed on all pages.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LabelHighlighted when...Links to...
[Parent](never highlighted) the parent of the current package
[Package]viewing a packagethe package containing the current object -
[Module]viewing a modulethe module containing the current object -
[Class]viewing a class the class containing the current object
[Trees]viewing the trees page the trees page
[Index]viewing the index page the index page
[Help]viewing the help page the help page
- -

The "show private" and "hide private" buttons below -the top navigation bar can be used to control whether documentation -for private objects is displayed. Private objects are usually defined -as objects whose (short) names begin with a single underscore, but do -not end with an underscore. For example, "_x", -"__pprint", and "epydoc.epytext._tokenize" -are private objects; but "re.sub", -"__init__", and "type_" are not. However, -if a module defines the "__all__" variable, then its -contents are used to decide which objects are private.

- -

A timestamp below the bottom navigation bar indicates when each -page was last updated.

- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/identifier-index.html b/static_root/doc/pdffit2/identifier-index.html deleted file mode 100644 index e0d9ef32..00000000 --- a/static_root/doc/pdffit2/identifier-index.html +++ /dev/null @@ -1,1468 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

A

- - - - - - - - - - - - -

B

- - - - - - - - - - - - - - - - - - - - - - -

C

- - - - - - - - - - - - - - - - - -

D

- - - - - - - - - - - - - - - - - -

E

- - - - - - - - -

F

- - - - - - - - - - - - - - - - - -

G

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I

- - - - - - - - -

L

- - - - - - - - -

N

- - - - - - - - - - - - - - - - - -

O

- - - - - - - - -

P

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Q

- - - - - - - - - - - - -

R

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

S

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

T

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

U

- - - - - - - - - - - - - - - - - - - - - - -

V

- - - - - - - - -

X

- - - - - - - - -

Y

- - - - - - - - -

Z

- - - - - - - - -

_

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/index.html b/static_root/doc/pdffit2/index.html deleted file mode 100644 index 825795c7..00000000 --- a/static_root/doc/pdffit2/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diffpy.pdffit2 - - - - - - - - - diff --git a/static_root/doc/pdffit2/module-tree.html b/static_root/doc/pdffit2/module-tree.html deleted file mode 100644 index f3be99d2..00000000 --- a/static_root/doc/pdffit2/module-tree.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - Module Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
- [ Module Hierarchy - | Class Hierarchy ] -

-

Module Hierarchy

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/static_root/doc/pdffit2/redirect.html b/static_root/doc/pdffit2/redirect.html deleted file mode 100644 index f3828106..00000000 --- a/static_root/doc/pdffit2/redirect.html +++ /dev/null @@ -1,38 +0,0 @@ -Epydoc Redirect Page - - - - - - - - -

Epydoc Auto-redirect page

- -

When javascript is enabled, this page will redirect URLs of -the form redirect.html#dotted.name to the -documentation for the object with the given fully-qualified -dotted name.

-

 

- - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2-module.html deleted file mode 100644 index 81113fda..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - pdffit2 - - - - - -

Module pdffit2

-
-

Functions

- test

Variables

- __package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.ipy_ext-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.ipy_ext-module.html deleted file mode 100644 index a2c0e891..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.ipy_ext-module.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - ipy_ext - - - - - -

Module ipy_ext

-
-

Classes

- EasyPDFPlotting

Functions

- load_ipython_extension

Variables

- __package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.output-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.output-module.html deleted file mode 100644 index c9487c93..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.output-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - output - - - - - -

Module output

-
-

Functions

- redirect_stdout

Variables

- __package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.pdffit-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.pdffit-module.html deleted file mode 100644 index 6431648a..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.pdffit-module.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - pdffit - - - - - -

Module pdffit

-
-

Classes

- PdfFit

Functions

- - - -

Variables

- __intro_message__
__package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.pdffit2-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.pdffit2-module.html deleted file mode 100644 index 61896946..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.pdffit2-module.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - pdffit2 - - - - - -

Module pdffit2

-
-

Functions

- alloc
bond_angle
bond_length_atoms
bond_length_types
calc
constrain_int
constrain_str
copyright
create
delta1
delta2
dscale
fixpar
freepar
getR
get_atom_types
get_atoms
get_scat
get_scat_string
getcrw
getpar
getpdf_diff
getpdf_fit
getpdf_obs
getrw
getvar
is_element
lat
num_atoms
num_datasets
num_phases
occ
pdesel
pdfrange
phase_fractions
pscale
psel
qbroad
qdamp
rcut
read_data
read_data_arrays
read_data_string
read_struct
read_struct_string
redirect_stdout
refine
refine_step
reset
reset_scat
save_dif
save_pdf
save_res
save_struct
selectAll
selectAtomIndex
selectAtomType
selectNone
set_scat
setdata
setpar_RV
setpar_dbl
setphase
setvar
show_struct
spdiameter
sratio
stepcut
u11
u12
u13
u22
u23
u33
x
y
z

Variables

- __package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests-module.html deleted file mode 100644 index 18328086..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests-module.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - tests - - - - - -

Module tests

-
-

Functions

- test
testdeps
testsuite

Variables

- __package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.ExceptionsTest-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.ExceptionsTest-module.html deleted file mode 100644 index 5fb97e4f..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.ExceptionsTest-module.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - ExceptionsTest - - - - - -

Module ExceptionsTest

-
-

Classes

- allocExceptions
bangExceptions
blenExceptions
calcExceptions
constrainExceptions
fixparExceptions
freeparExceptions
getRExceptions
get_atomsExceptions
getcrwExceptions
getparExceptions
getpdf_diffExceptions
getpdf_fitExceptions
getpdf_obsExceptions
getvarExceptions
num_atomsExceptions
pdeselExceptions
pdfrangeExceptions
pselExceptions
read_dataExceptions
read_data_listsExceptions
read_structExceptions
save_difExceptions
save_pdfExceptions
save_resExceptions
save_structExceptions
selectAllExceptions
selectAtomIndexExceptions
selectAtomTypeExceptions
selectNoneExceptions
setdataExceptions
setphaseExceptions
setvarExceptions
show_scatExceptions

Variables

- __package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.TestPdfFit-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.TestPdfFit-module.html deleted file mode 100644 index bac52d03..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.TestPdfFit-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - TestPdfFit - - - - - -

Module TestPdfFit

-
-

Classes

- TestPdfFit

Variables

- __package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.TestPhaseFractions-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.TestPhaseFractions-module.html deleted file mode 100644 index 5429f5cc..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.TestPhaseFractions-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - TestPhaseFractions - - - - - -

Module TestPhaseFractions

-
-

Classes

- TestPhaseFractions

Variables

- __package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.TestShapeFactors-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.TestShapeFactors-module.html deleted file mode 100644 index d4f9398e..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.TestShapeFactors-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - TestShapeFactors - - - - - -

Module TestShapeFactors

-
-

Classes

- TestSphereEnvelope
TestStepCutEnvelope

Functions

- spherefactor

Variables

- __package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.pdffit2testutils-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.pdffit2testutils-module.html deleted file mode 100644 index ee4ca90d..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.pdffit2testutils-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - pdffit2testutils - - - - - -

Module pdffit2testutils

-
-

Functions

- datafile

Variables

- __package__
testdata_dir
tests_dir
thisfile

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.run-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.run-module.html deleted file mode 100644 index 00a8839c..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.run-module.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - run - - - - - -

Module run

-
-

Variables

- __package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.rundeps-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.rundeps-module.html deleted file mode 100644 index 8c5cc395..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.tests.rundeps-module.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - rundeps - - - - - -

Module rundeps

-
-

Variables

- __package__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-diffpy.pdffit2.version-module.html b/static_root/doc/pdffit2/toc-diffpy.pdffit2.version-module.html deleted file mode 100644 index 41955b8f..00000000 --- a/static_root/doc/pdffit2/toc-diffpy.pdffit2.version-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - version - - - - - -

Module version

-
-

Variables

- __gitsha__
__package__
__timestamp__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc-everything.html b/static_root/doc/pdffit2/toc-everything.html deleted file mode 100644 index 9f62f410..00000000 --- a/static_root/doc/pdffit2/toc-everything.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - Everything - - - - - -

Everything

-
-

All Classes

- diffpy.pdffit2.ipy_ext.EasyPDFPlotting
diffpy.pdffit2.pdffit.PdfFit
diffpy.pdffit2.tests.ExceptionsTest.allocExceptions
diffpy.pdffit2.tests.ExceptionsTest.bangExceptions
diffpy.pdffit2.tests.ExceptionsTest.blenExceptions
diffpy.pdffit2.tests.ExceptionsTest.calcExceptions
diffpy.pdffit2.tests.ExceptionsTest.constrainExceptions
diffpy.pdffit2.tests.ExceptionsTest.fixparExceptions
diffpy.pdffit2.tests.ExceptionsTest.freeparExceptions
diffpy.pdffit2.tests.ExceptionsTest.getRExceptions
diffpy.pdffit2.tests.ExceptionsTest.get_atomsExceptions
diffpy.pdffit2.tests.ExceptionsTest.getcrwExceptions
diffpy.pdffit2.tests.ExceptionsTest.getparExceptions
diffpy.pdffit2.tests.ExceptionsTest.getpdf_diffExceptions
diffpy.pdffit2.tests.ExceptionsTest.getpdf_fitExceptions
diffpy.pdffit2.tests.ExceptionsTest.getpdf_obsExceptions
diffpy.pdffit2.tests.ExceptionsTest.getvarExceptions
diffpy.pdffit2.tests.ExceptionsTest.num_atomsExceptions
diffpy.pdffit2.tests.ExceptionsTest.pdeselExceptions
diffpy.pdffit2.tests.ExceptionsTest.pdfrangeExceptions
diffpy.pdffit2.tests.ExceptionsTest.pselExceptions
diffpy.pdffit2.tests.ExceptionsTest.read_dataExceptions
diffpy.pdffit2.tests.ExceptionsTest.read_data_listsExceptions
diffpy.pdffit2.tests.ExceptionsTest.read_structExceptions
diffpy.pdffit2.tests.ExceptionsTest.save_difExceptions
diffpy.pdffit2.tests.ExceptionsTest.save_pdfExceptions
diffpy.pdffit2.tests.ExceptionsTest.save_resExceptions
diffpy.pdffit2.tests.ExceptionsTest.save_structExceptions
diffpy.pdffit2.tests.ExceptionsTest.selectAllExceptions
diffpy.pdffit2.tests.ExceptionsTest.selectAtomIndexExceptions
diffpy.pdffit2.tests.ExceptionsTest.selectAtomTypeExceptions
diffpy.pdffit2.tests.ExceptionsTest.selectNoneExceptions
diffpy.pdffit2.tests.ExceptionsTest.setdataExceptions
diffpy.pdffit2.tests.ExceptionsTest.setphaseExceptions
diffpy.pdffit2.tests.ExceptionsTest.setvarExceptions
diffpy.pdffit2.tests.ExceptionsTest.show_scatExceptions
diffpy.pdffit2.tests.TestPdfFit.TestPdfFit
diffpy.pdffit2.tests.TestPhaseFractions.TestPhaseFractions
diffpy.pdffit2.tests.TestShapeFactors.TestSphereEnvelope
diffpy.pdffit2.tests.TestShapeFactors.TestStepCutEnvelope
exceptions.AssertionError

All Functions

- diffpy.pdffit2.ipy_ext.load_ipython_extension
diffpy.pdffit2.output.redirect_stdout
- - - diffpy.pdffit2.pdffit2.alloc
diffpy.pdffit2.pdffit2.bond_angle
diffpy.pdffit2.pdffit2.bond_length_atoms
diffpy.pdffit2.pdffit2.bond_length_types
diffpy.pdffit2.pdffit2.calc
diffpy.pdffit2.pdffit2.constrain_int
diffpy.pdffit2.pdffit2.constrain_str
diffpy.pdffit2.pdffit2.copyright
diffpy.pdffit2.pdffit2.create
diffpy.pdffit2.pdffit2.delta1
diffpy.pdffit2.pdffit2.delta2
diffpy.pdffit2.pdffit2.dscale
diffpy.pdffit2.pdffit2.fixpar
diffpy.pdffit2.pdffit2.freepar
diffpy.pdffit2.pdffit2.getR
diffpy.pdffit2.pdffit2.get_atom_types
diffpy.pdffit2.pdffit2.get_atoms
diffpy.pdffit2.pdffit2.get_scat
diffpy.pdffit2.pdffit2.get_scat_string
diffpy.pdffit2.pdffit2.getcrw
diffpy.pdffit2.pdffit2.getpar
diffpy.pdffit2.pdffit2.getpdf_diff
diffpy.pdffit2.pdffit2.getpdf_fit
diffpy.pdffit2.pdffit2.getpdf_obs
diffpy.pdffit2.pdffit2.getrw
diffpy.pdffit2.pdffit2.getvar
diffpy.pdffit2.pdffit2.is_element
diffpy.pdffit2.pdffit2.lat
diffpy.pdffit2.pdffit2.num_atoms
diffpy.pdffit2.pdffit2.num_datasets
diffpy.pdffit2.pdffit2.num_phases
diffpy.pdffit2.pdffit2.occ
diffpy.pdffit2.pdffit2.pdesel
diffpy.pdffit2.pdffit2.pdfrange
diffpy.pdffit2.pdffit2.phase_fractions
diffpy.pdffit2.pdffit2.pscale
diffpy.pdffit2.pdffit2.psel
diffpy.pdffit2.pdffit2.qbroad
diffpy.pdffit2.pdffit2.qdamp
diffpy.pdffit2.pdffit2.rcut
diffpy.pdffit2.pdffit2.read_data
diffpy.pdffit2.pdffit2.read_data_arrays
diffpy.pdffit2.pdffit2.read_data_string
diffpy.pdffit2.pdffit2.read_struct
diffpy.pdffit2.pdffit2.read_struct_string
diffpy.pdffit2.pdffit2.redirect_stdout
diffpy.pdffit2.pdffit2.refine
diffpy.pdffit2.pdffit2.refine_step
diffpy.pdffit2.pdffit2.reset
diffpy.pdffit2.pdffit2.reset_scat
diffpy.pdffit2.pdffit2.save_dif
diffpy.pdffit2.pdffit2.save_pdf
diffpy.pdffit2.pdffit2.save_res
diffpy.pdffit2.pdffit2.save_struct
diffpy.pdffit2.pdffit2.selectAll
diffpy.pdffit2.pdffit2.selectAtomIndex
diffpy.pdffit2.pdffit2.selectAtomType
diffpy.pdffit2.pdffit2.selectNone
diffpy.pdffit2.pdffit2.set_scat
diffpy.pdffit2.pdffit2.setdata
diffpy.pdffit2.pdffit2.setpar_RV
diffpy.pdffit2.pdffit2.setpar_dbl
diffpy.pdffit2.pdffit2.setphase
diffpy.pdffit2.pdffit2.setvar
diffpy.pdffit2.pdffit2.show_struct
diffpy.pdffit2.pdffit2.spdiameter
diffpy.pdffit2.pdffit2.sratio
diffpy.pdffit2.pdffit2.stepcut
diffpy.pdffit2.pdffit2.u11
diffpy.pdffit2.pdffit2.u12
diffpy.pdffit2.pdffit2.u13
diffpy.pdffit2.pdffit2.u22
diffpy.pdffit2.pdffit2.u23
diffpy.pdffit2.pdffit2.u33
diffpy.pdffit2.pdffit2.x
diffpy.pdffit2.pdffit2.y
diffpy.pdffit2.pdffit2.z
diffpy.pdffit2.test
diffpy.pdffit2.tests.TestShapeFactors.spherefactor
diffpy.pdffit2.tests.pdffit2testutils.datafile
diffpy.pdffit2.tests.test
diffpy.pdffit2.tests.testdeps
diffpy.pdffit2.tests.testsuite

All Variables

- diffpy.pdffit2.__package__
diffpy.pdffit2.ipy_ext.__package__
diffpy.pdffit2.output.__package__
diffpy.pdffit2.pdffit.__intro_message__
diffpy.pdffit2.pdffit.__package__
diffpy.pdffit2.pdffit2.__package__
diffpy.pdffit2.tests.ExceptionsTest.__package__
diffpy.pdffit2.tests.TestPdfFit.__package__
diffpy.pdffit2.tests.TestPhaseFractions.__package__
diffpy.pdffit2.tests.TestShapeFactors.__package__
diffpy.pdffit2.tests.__package__
diffpy.pdffit2.tests.pdffit2testutils.__package__
diffpy.pdffit2.tests.pdffit2testutils.testdata_dir
diffpy.pdffit2.tests.pdffit2testutils.tests_dir
diffpy.pdffit2.tests.pdffit2testutils.thisfile
diffpy.pdffit2.tests.run.__package__
diffpy.pdffit2.tests.rundeps.__package__
diffpy.pdffit2.version.__gitsha__
diffpy.pdffit2.version.__package__
diffpy.pdffit2.version.__timestamp__

-[hide private] - - - - diff --git a/static_root/doc/pdffit2/toc.html b/static_root/doc/pdffit2/toc.html deleted file mode 100644 index 4a029f15..00000000 --- a/static_root/doc/pdffit2/toc.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - Table of Contents - - - - - -

Table of Contents

-
- Everything -
-

Modules

- diffpy.pdffit2
diffpy.pdffit2.ipy_ext
diffpy.pdffit2.output
diffpy.pdffit2.pdffit
diffpy.pdffit2.pdffit2
diffpy.pdffit2.tests
diffpy.pdffit2.tests.ExceptionsTest
diffpy.pdffit2.tests.TestPdfFit
diffpy.pdffit2.tests.TestPhaseFractions
diffpy.pdffit2.tests.TestShapeFactors
diffpy.pdffit2.tests.pdffit2testutils
diffpy.pdffit2.tests.run
diffpy.pdffit2.tests.rundeps
diffpy.pdffit2.version

- [hide private] - - - - diff --git a/static_root/doc/pdfgetx/1.2 b/static_root/doc/pdfgetx/1.2 deleted file mode 120000 index 335438a7..00000000 --- a/static_root/doc/pdfgetx/1.2 +++ /dev/null @@ -1 +0,0 @@ -../pdfgetx3 \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/.buildinfo b/static_root/doc/pdfgetx/2.0.0/.buildinfo deleted file mode 100644 index 19702a35..00000000 --- a/static_root/doc/pdfgetx/2.0.0/.buildinfo +++ /dev/null @@ -1,4 +0,0 @@ -# Sphinx build info version 1 -# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 5df1957cca98c5a25bbf93d80904b96e -tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/static_root/doc/pdfgetx/2.0.0/PDFgetXN3_manual.pdf b/static_root/doc/pdfgetx/2.0.0/PDFgetXN3_manual.pdf deleted file mode 100644 index dbae3ca7..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/PDFgetXN3_manual.pdf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_images/nickelfqgr.png b/static_root/doc/pdfgetx/2.0.0/_images/nickelfqgr.png deleted file mode 100644 index 3fbc12de..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_images/nickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_images/nickelfqgrnoisy.png b/static_root/doc/pdfgetx/2.0.0/_images/nickelfqgrnoisy.png deleted file mode 100644 index caab8cf3..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_images/nickelfqgrnoisy.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_images/tunenickelfqgr.png b/static_root/doc/pdfgetx/2.0.0/_images/tunenickelfqgr.png deleted file mode 100644 index 14accde4..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_images/tunenickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_images/tunenickelt4gr.png b/static_root/doc/pdfgetx/2.0.0/_images/tunenickelt4gr.png deleted file mode 100644 index c95278cd..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_images/tunenickelt4gr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_images/twothetazerofit.svg b/static_root/doc/pdfgetx/2.0.0/_images/twothetazerofit.svg deleted file mode 100644 index 2c98591b..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_images/twothetazerofit.svg +++ /dev/null @@ -1,6306 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static_root/doc/pdfgetx/2.0.0/_sources/files.rst.txt b/static_root/doc/pdfgetx/2.0.0/_sources/files.rst.txt deleted file mode 100644 index edc63d96..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_sources/files.rst.txt +++ /dev/null @@ -1,102 +0,0 @@ -Files used in PDF extraction -======================================================================== - -.. include:: abbreviations.txt -.. _my-configfile: -.. program:: pdfgetx3 - -Configuration file ------------------------------------------------------------------------- - -Configuration files may define the PDF processing parameters. -By default, the :program:`pdfgetx3` program attempts to read -:file:`.pdfgetx3.cfg` file from the user HOME directory, -then :file:`.pdfgetx3.cfg` and :file:`pdfgetx3.cfg` files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the :option:`-c, --config <-c>` option. -The :program:`pdfgetn3` program works in the same way, -except it checks for configuration files -:file:`~/.pdfgetn3.cfg`, :file:`.pdfgetn3.cfg` and :file:`pdfgetn3.cfg`. - -The easiest way of creating a configuration file is to generate -a template content using the :option:`--createconfig` option as :: - - pdfgetx3 --createconfig=test.cfg - -and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple "varname=value" syntax, -any lines starting with "#" are ignored as comments. - -The configuration file has several sections marked as ``[SECTIONNAME]``. -The ``[DEFAULT]`` section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the :option:`-s, --section <-s>` option on the -command line. Thus :: - - pdfgetx3 --config=test.cfg --section=nacl - -would read the parameters from the ``[nacl]`` section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section. - - -Input files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -|twotheta| in degrees, momentum transfer *Q* in inverse nanometers or *Q* -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the :confval:`dataformat` parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values. - -The input files are usually passed as command-line arguments to -:program:`pdfgetx3` or :program:`pdfgetn3` programs and must be paths -accessible from the current working directory. - -Input files can be also defined by setting the :confval:`inputfile` -value in the configuration file. The :option:`-d, --datapath <-d>` -option can be then used to provide additional data directories to -search for these inputs and for the :confval:`backgroundfile`. -This is to support configuration files located in a different -directory than the data. - -When the :option:`--find <-f>` option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory. - - -Output files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 can produce up to four different output data files: - -* .iq -- |IQ|, the background-corrected - intensities sampled on a regular *Q*-space grid in inverse ångströms, - -* .sq -- |SQ|, the total scattering structure function, - with intensities normalized by average scattering factors and - corrected by a polynomial fit, - -* .fq -- |FQ|, the reduced structure function equal to *Q*\ (|SQ| - 1), - -* .gr -- |Gr|, the resultant PDF, where the first column is the - separation *r* in ångströms and the second is the function *G* in - Å\ :sup:`-2`. - -You can specify what output files should be produced by setting the -:confval:`outputtypes` parameter in the configuration file or by -passing the :option:`-t, --outputtypes <-t>` on the command line. - -The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the :option:`--config <-c>` option, -the PDFgetX3 will reproduce the previous calculation. diff --git a/static_root/doc/pdfgetx/2.0.0/_sources/index.rst.txt b/static_root/doc/pdfgetx/2.0.0/_sources/index.rst.txt deleted file mode 100644 index 068bb525..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_sources/index.rst.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. PDFgetX3 documentation master file, created by - sphinx-quickstart on Tue Sep 21 18:35:11 2010. - You can adapt this file completely to your liking, - but it should at least contain the root `toctree` directive. - -######################################################################## -diffpy.pdfgetx -######################################################################## - -User manual for PDFgetX3, PDFgetN3, and Python package diffpy.pdfgetx. - -| Release |release| -| |today| - -======================================================================== -Table of contents -======================================================================== - - -.. toctree:: - :maxdepth: 2 - - intro - install - quick-start - tutorial - files - interact - options - plotdata - release - -======================================================================== -Indices -======================================================================== - -* :ref:`genindex` -* :ref:`search` diff --git a/static_root/doc/pdfgetx/2.0.0/_sources/install.rst.txt b/static_root/doc/pdfgetx/2.0.0/_sources/install.rst.txt deleted file mode 100644 index 03db4763..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_sources/install.rst.txt +++ /dev/null @@ -1,136 +0,0 @@ -Installation -======================================================================== - -.. include:: abbreviations.txt - -Software requirements ------------------------------------------------------------------------- - -This software is written in Python programming language, therefore -you must have Python 3.7, 3.6, 3.5, 3.4 or 2.7 installed. In addition, -the following third-party Python libraries are also required: - -* setuptools - tools for installing Python packages -* six - Python 2 and 3 compatibility library -* NumPy - library for scientific computing with Python -* matplotlib - Python plotting library -* IPython - enhanced interactive Python shell - -Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -`Python Package Index `__ -or using any Internet search engine. - -Another more convenient option is to obtain one of the science-oriented -Python distributions such as -`Anaconda Python`_, -`Enthought Canopy `_ or -`PythonXY `_, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step. - -On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command :: - - sudo apt-get install \ - python3-six python3-setuptools python3-numpy python3-matplotlib ipython3 - -This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above. - -On Windows operating system, it may be necessary to add the -``C:\Python37`` directory and the scripts directory -``C:\Python37\Scripts`` to the system :envvar:`!PATH`. -Some Python distributions already do so as a part of their -installation process. The easiest way to check is to start the -:program:`Command Prompt`, type there ``python`` and see if this -starts the Python interpreter. - - -Installation ------------------------------------------------------------------------- - -The diffpy.pdfgetx software is distributed as a Python egg package, -which can be obtained from the -`Columbia Technology Ventures -`__. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the egg file and -execute the following command:: - - python -m easy_install ./diffpy.pdfgetx-VERSION.egg - -Here VERSION needs to be replaced to match the actual filename. -It is critical to use one of the supported Python versions otherwise -the program would not work. On Linux and Mac operating systems the -installation may need to run with root user privileges, for example, -by prepending ``sudo`` to the command line above. -If root access is not available, use the -easy_install options :option:`!--user`, :option:`!--prefix` or -:option:`!--install-dir` to install the software to a user-writable -directory. - -This software provides two programs for PDF conversion, -:program:`pdfgetx3` and :program:`pdfgetn3`. -To check if they are correctly installed run :: - - pdfgetx3 --version - pdfgetn3 --version - -This should display the software version, which should equal -the VERSION string in the egg package name. -The installation also includes a :program:`plotdata` -command for an easy plotting of text data files. To verify -if plotdata works, run the ``plotdata --version`` command. -Finally, a comprehensive test of the installed software can -be executed using :: - - python -m diffpy.pdfgetx.tests.run - - -.. index:: %pdfgetx3 IPython magic -.. index:: %pdfgetn3 IPython magic - -IPython magic command ------------------------------------------------------------------------- - -These instructions are intended for `IPython`_ users who would like to -integrate PDFgetX3 and PDFgetN3 into their IPython environment. If -you don't plan to customize IPython in such way you can safely skip -this paragraph. - -When pdfgetx3 or pdfgetn3 are run in interactive mode, they start -IPython interactive shell and define an extra ``%pdfgetx3`` and -``%pdfgetn3`` magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The ``%pdfgetx3`` and ``%pdfgetn3`` -magics can be thus used with the same options and arguments as if run -from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session. - -The ``%pdfgetx3`` and ``%pdfgetn3`` magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up - -#. find the ``profile_default/ipython_config.py`` file and open it - in a text editor. If that file does not exists, - create it first by executing :: - - ipython profile create - -#. navigate to the paragraph that contains the - :py:data:`!c.InteractiveShellApp.extensions` and add there - the following line:: - - c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics'] - - There must be no leading indent, i.e., the text must start at the - very first column. diff --git a/static_root/doc/pdfgetx/2.0.0/_sources/interact.rst.txt b/static_root/doc/pdfgetx/2.0.0/_sources/interact.rst.txt deleted file mode 100644 index 0d4fb746..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_sources/interact.rst.txt +++ /dev/null @@ -1,154 +0,0 @@ -Interactive mode -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. py:currentmodule:: _interactive_ - -The interactive mode is activated by using either the -:option:`-i, --interact <-i>` option or a non-empty -:option:`--plot <-p>` option. In the interactive mode -the program starts an `IPython`_ interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands ``%pdfgetx3`` and ``%pdfgetn3``, which can be used with -the same syntax as the :program:`pdfgetx3` and :program:`pdfgetn3` in -system shell. -The interactive session is also initialized with all functions from the -:py:mod:`matplotlib.pyplot` module for convenient plotting. -The functions and variables related to PDF processing are: - -.. py:function:: pdfgetter(x=None, y=None, filename='', **kwargs) - - Instance of the :py:class:`!PDFGetter` class which serves as a - low-level function that calculates the PDF. This is a callable - object, which takes as an argument a pair of input arrays for - (*Q*, intensity) or (|twotheta|, intensity) depending on - :confval:`dataformat`. It can be also called with a keyword - argument ``filename=FILE``, which would read the input arrays - from the specified file. When called with no arguments, - it calculates PDF from the last input data. - - :parameters: - * **x** (*numpy.ndarray, optional*) -- - The *Q* or |twotheta| values in powder diffraction pattern. - - * **y** (*numpy.ndarray, optional*) -- - The scattered intensities in powder diffraction pattern - - * **filename** (*str, optional*) -- - The text data file for loading the `x`, `y` values when - they are not specified. - - * **kwargs** (*misc, optional*) -- - Extra keyword arguments that are applied to - the :data:`!config` object, for example ``qmax=20``. - - :return: - A pair of output arrays *(r, G)*. - -.. interactvar:: config - - Instance of the :py:class:`!PDFConfig` class that stores the - :ref:`parameters and input files ` for the program. - Use ``print(config)`` to display the current configuration values. - This is the same object as :data:`!pdfgetter.config`. Configuration - may be changed by setting a respective attribute of the - :interactvar:`!config` object, for example:: - - In [1]: config.qmax = 21 - - The :py:data:`!config` values may be also changed by calling the - :py:func:`pdfgetter` or :py:func:`processfiles` function with a - corresponding keyword argument, for example - ``processfiles(qmax=20, force="once")``. - -.. interactvar:: iraw - iq - sq - fq - gr - - These variables are assigned the input raw intensities and the - intermediate results, stored as matrix rows. The matrix rows - correspond to twotheta1, intensity1, twotheta2, intensity2, etc. - Because matrices are iterated row first, the raw intensities - from all input files can be plotted with the matplotlib plot - function as ``plot(*iraw)``. - - These variables should be considered read-only and are reset - with subsequent PDF calculations. - -.. py:function:: tuneconfig(plotids=None, pdfgetter=None, axeslist=None) - - Show a GUI dialog for interactive tuning of configuration variables. - - :arg plotids: - The string or iterable that specify what interactive plots should be - tuned. By default the same as ``config.plot``. It can be also an - integer index or name of a transformation in :py:func:`pdfgetter` or - a reference to a :py:class:`!Transformation` object. - - :arg pdfgetter: - The optional :py:class:`!PDFGetter` object to be tuned. - This is by default the interactive :py:func:`!pdfgetter` object. - - :arg axeslist: - An optional list of matplotlib Axes for showing interactive plots. - When None, use ``subplot(N, 1, i)`` to create any necessary axes. - - .. note:: - - Changes from :py:func:`!tuneconfig` apply only to the configuration - and results in memory. Use the :py:func:`processfiles` function - to save them to disk. - - .. seealso:: :ref:`my-tuneconfig` tutorial - -.. py:function:: processfiles(filename=None, **kwargs) - - Process all input files again with the current configuration values. - This is a higher-level function than :py:func:`pdfgetter`, as - it also saves output files and produces plots as specified by the - :interactvar:`config` object. - - :arg filename: - One or more input files to be converted to PDFs and saved or - plotted according to the :py:data:`!config` settings. Use the - previous list of input files when not specified. - - :arg kwargs: - An optional keyword arguments to set for the :py:data:`!config` - object, for example ``(force="once", qmax=18)``. - - This function updates the :interactvar:`config.inputfiles ` - list and the :interactvar:`iraw`, :interactvar:`iq`, - :interactvar:`sq`, :interactvar:`fq` and :interactvar:`gr` - interactive variables. - -.. py:function:: clearsession() - - Clear all elements from the :interactvar:`config.inputfiles ` - and also the - :interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, - :interactvar:`fq` and :interactvar:`gr` variables. - - :return: - No return value. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: loaddata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. - -.. py:currentmodule:: diffpy.pdfgetx.plotdata -.. autofunction:: plotdata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx.plotdata` module. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: findfiles - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. diff --git a/static_root/doc/pdfgetx/2.0.0/_sources/intro.rst.txt b/static_root/doc/pdfgetx/2.0.0/_sources/intro.rst.txt deleted file mode 100644 index ac240db4..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_sources/intro.rst.txt +++ /dev/null @@ -1,64 +0,0 @@ -Introduction -======================================================================== - -diffpy.pdfgetx is a simple yet powerful software for converting X-ray -or neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). The software includes command line programs PDFgetX3 and -PDFgetN3 for processing X-ray and constant-wavelength neutron -diffraction data respectively. PDFgetX3 and PDFgetN3 can be used in -a batch mode to convert a series of data files without user -intervention. The programs can be also run in an interactive -mode that allows to control process parameters and plot the PDFs -and any intermediate results. Users can interactively tune the -PDF processing parameters, visualize their effect on the results and -adjust them to their optimum values. The programs are bundled with -Python library diffpy.pdfgetx for PDF processing functions, which -can be used in custom Python scripts. - - -.. index:: license - -License notice ------------------------------------------------------------------------- - -.. include:: ../../LICENSENOTICE.txt - - -.. index:: authors - -Authors ------------------------------------------------------------------------- - -This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Christopher Wright, -Christopher Farrow, -Simon Billinge. - - -.. index:: citations, references - -References ------------------------------------------------------------------------- - -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: - - P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge - `PDFgetX3: A rapid and highly automatable program for processing - powder diffraction data into total scattering pair distribution - functions `__, - *J. Appl. Crystallogr.* **46**, 560-566 (2013) - -For research publications that use this software to process neutron -diffraction data we ask you to also cite: - - P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, - S. J. L. Billinge - `PDFgetN3: atomic pair distribution functions from neutron - powder diffraction data using ad hoc corrections - `__, - *J. Appl. Crystallogr.* **51** (2018) diff --git a/static_root/doc/pdfgetx/2.0.0/_sources/options.rst.txt b/static_root/doc/pdfgetx/2.0.0/_sources/options.rst.txt deleted file mode 100644 index c3d4a387..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_sources/options.rst.txt +++ /dev/null @@ -1,361 +0,0 @@ -Options and parameters -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -PDFgetX3 and PDFgetN3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program. - - -.. Note :: - - The command line options start with a leading "-" and can - be only used as command line arguments when starting the - :program:`pdfgetx3` program. Within configuration file the parameter - names are plain words without any leading dashes. Finally, - parameters can be also set in the interactive mode as attributes of - the :interactvar:`config` object, but the assignments must be valid - Python statements. Here are examples of setting composition of - a processed specimen using each of these forms: - - #. assigned in configuration file:: - - ... - composition = CaTiO3 - ... - - #. set as a command-line option when starting :program:`pdfgetx3` or - :program:`pdfgetn3`:: - - pdfgetx3 --composition=CaTiO3 - - #. set in the IPython interactive mode:: - - pdfgetx3 -i - ... - In [1]: config.composition = "CaTiO3" - - -Program operation ------------------------------------------------------------------------- - -.. option:: -h, --help - - Display a brief usage information with a list of command line options - and exit. - -.. option:: -V, --version - - Display the program version and exit. - -.. option:: --manual - - Open this manual in a Web browser and exit. - -.. option:: -f, --find -.. _my-findpatterns: - - Select input files that match all patterns. The command - line arguments are by default taken as input files. However, - with the :option:`!--find` option they are processed as - file patterns and the matching files are then used as inputs. - The input files are by default searched in the current directory - unless there is a path entry (e.g., :file:`data/`) that - selects a different search path. The search patterns are - interpreted as fixed strings, all of which must be present - in the file name. A single argument ``+`` starts - a new group of patterns to match more files that are not - covered by one set of patterns. Additional pattern - groups reuse the current search path unless they provide - their own path value. Pattern groups containing only - a path entry reuse file patterns from the last group. - When pattern groups overlap the repeated matches are ignored - to make the resulting list of files unique. Files starting - with ``.`` are ignored unless there is ``^.`` pattern - that explicitly matches them. The search - syntax provides the following special patterns: - - .. tabularcolumns:: |l|p{0.75\textwidth}| - - +---------+------------------------------------------------------------+ - | ^ | match at the beginning of the string, i.e., ``^start`` | - | | matches only filenames that start with "start". | - +---------+------------------------------------------------------------+ - | $ | match at the end of string, for example, ``.chi$`` selects | - | | file names ending with ".chi". A ``$`` on its own | - | | matches every string and can be used to select all files. | - +---------+------------------------------------------------------------+ - | | match number *N* preceded by any number of leading zeros, | - | | e.g., ``<7>`` would match in "f7.chi", "f007.chi", but not | - | | in "f77.chi". | - +---------+------------------------------------------------------------+ - | | match an integer range from *N* to *M* inclusive. | - | | The matched number may have one or more leading zeros. | - +---------+------------------------------------------------------------+ - | <7-> | match number 7 or larger. | - +---------+------------------------------------------------------------+ - | <-7> | match number 7 or smaller. | - +---------+------------------------------------------------------------+ - | <-> | match any integer number. | - +---------+------------------------------------------------------------+ - | \+ | start a new pattern group, for example, ``.chi$ + .dat$`` | - +---------+------------------------------------------------------------+ - | / | set search path. An argument containing the ``/`` symbol | - | | is taken as the search path, for example, ``data/`` or | - | | ``./``. Each pattern group may provide its own search | - | | path effective for that and any subsequent pattern group. | - +---------+------------------------------------------------------------+ - - The ``^$<>`` characters are often special to Unix or Windows - command shells, therefore they need to be enclosed in double - quotes (\\") when used on command line. - - .. seealso:: tutorial on :ref:`my-findexamples` - -.. option:: -l, --list - - List all input files and exit. This is useful with the - :option:`!--find` option to verify if input files - are matched as intended. - - -Configuration file options ------------------------------------------------------------------------- - -.. option:: -c CONFIG, --config=CONFIG - - Read custom configuration file after loading the default ones. - Do not load any configuration file when "NONE". - -.. option:: -s NAME, --section=NAME - - Load the custom configuration file section ``[SectionName]`` after - loading the ``[DEFAULT]`` section. This is useful for creating - several configuration variants in a single configuration file. - -.. option:: --createconfig=FILE - - Write template configuration to a new FILE and exit. Write - to the standard output when FILE is "-". - -See also the :ref:`configuration file ` section -for further details. - -.. _my-ioparameters: - -Input and output options ------------------------------------------------------------------------- - -.. confval:: inputfile - - This parameter allows to specify one or more input files in the - configuration file, one file per line. The :confval:`!inputfile` - is only used if no input files were provided on the - :program:`pdfgetx3` or :program:`pdfgetn3` command line. - -.. confval:: dataformat -.. option:: --format=FORMAT - - Format of input files. Available formats are: ``twotheta``, ``QA``, - ``Qnm`` corresponding to a two-column text data where the first - column is either the scattering angle |twotheta| in degrees, *Q* in - inverse ångströms or *Q* in inverse nanometers. - -.. confval:: backgroundfile -.. option:: -b FILE, --background=FILE - - Optional datafile with background intensities from an empty sample - holder. It must be in the same dataformat as other input files. - -.. _my-datapath: -.. confval:: datapath -.. option:: -d DATAPATH, --datapath=DATAPATH - - One or more extra directories to be searched for input or - background data files. The :option:`!-d` option can be specified - several times to add more directories, these are prepended in front - of any default value. Within configuration file the datapath - directories have to be listed each on a separate line. - - A special value "NONE" (or "none") clears any previously defined - paths and only the further paths, if any, would be searched for - inputs. - -.. confval:: output -.. option:: -o OUTPUT, --output=OUTPUT - - Output file name, write to the standard output when "-". The - :option:`-t, --outputtypes <-t>` option controls what results are - being saved. Normally the OUTPUT is used as a custom basename for - the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o - tokens, which are expanded as follows: - - ===== ================== ======================================= - token example definition - ===== ================== ======================================= - @h dir1/dir2 the input file directory or "." - @r dir1/dir2/filename the input path with extension removed - @e dat the input file extension without "." - @t filename.dat the tail component of the input file - @b filename the tail component with extension removed - @o gr the output extension iq, sq, fq or gr - ===== ================== ======================================= - - An empty value works the same as "@b.@o" and saves the data - in the current directory with a proper extension for the - saved results. When "@o" is not present in the OUTPUT, it is - appended as a default filename extension. - -.. confval:: outputtypes -.. option:: -t TYPES, --outputtypes=TYPES - - Result types to be saved, one or more comma separated values. - Supported values are "iq", "sq", "fq", "gr", corresponding to the - |IQ|, |SQ|, |FQ| and |Gr| curves; these are also used as output - file extensions. - - Result files are not written when empty, "none" or "NONE". - -.. confval:: force -.. option:: --force=FORCE - - Overwrite existing output files. By default the output - files are not written if they already exist. Possible values - in a configuration file are "true", "yes", "on", "1" or - "false", "no", "off", "0" or "once". The special value "once" - permits one overwrite and then resets ``config.force`` to - ``False``. Note that in interactive mode the values assigned - to ``config.force`` are converted to Python :py:class:`bool` - unless equal to "once". - - -.. _my-pdfparameters: - -PDF parameters ------------------------------------------------------------------------- - - -.. confval:: mode -.. option:: --mode=STRING - - The PDF conversion mode, i.e., the name of the - :py:func:`.pdfgetter` setup. The available modes correspond - to the radiation type used in powder diffraction experiment and can - be "xray" or "neutron". - -.. confval:: wavelength -.. option:: -w FLOAT, --wavelength=FLOAT - - X-ray wavelength in ångströms. This value is required - for the "twotheta" dataformat in order to convert the scattering - angles |twotheta| to a momentum transfer *Q*. For other data formats - the wavelength is not necessary and may be left undefined. - -.. confval:: twothetazero -.. option:: --twothetazero=FLOAT - - Position of the zero scattering angle in diffractometer degrees. - This parameter corrects for a constant offset in the - measured |twotheta| values. When loading configuration file - it is assumed 0 unless specified otherwise. This parameter - is only effective for the "twotheta" dataformat. - -.. confval:: composition -.. option:: --composition=STRING - - Chemical composition of the sample. Supported formats are - "PbTi0.5Zr0.5O3", "Pb 1 Ti 1/2 Zr 1/2 O 3" or "CH3 (CH2)3 OH". - Space characters are ignored, unit counts can be omitted, but it is - important to use a proper upper and lower case in atom symbols. - Elements can appear several times in the formula, e.g., "CH3 CH3", - and the formula may contain parentheses or fractional - stoichiometries. - -.. confval:: bgscale -.. option:: --bgscale=FLOAT - - Scaling of the background intensities loaded from the - :confval:`backgroundfile`, by default 1. - -.. confval:: rpoly -.. option:: --rpoly=FLOAT - - *r*-limit for the maximum frequency in the |FQ| correction polynomial. - The PDF is unreliable at shorter *r*, however a - very small :confval:`!rpoly` would disable polynomial correction and - give noisy PDF. - Larger values produce closer fits with a higher degree polynomial, - but when too large, they might smooth-out a useful signal in the - data. The default is 0.9. - -.. confval:: qmaxinst -.. option:: --qmaxinst - - The *Q* cutoff for the meaningful input intensities in inverse - ångströms. Some data files may contain trailing zeros - or unreliable intensities at the upper bound of the detector range. - The :confval:`!qmaxinst` defines a threshold for unreliable data. - The parameter is also used as an upper boundary for the polynomial - fit correction of the |SQ| data. - -.. confval:: qmin -.. option:: --qmin - - The lower *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. - -.. confval:: qmax -.. option:: --qmax - - The upper *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. This is essentially a limit, where sample - signal decays to the level of data noise. - -.. confval:: rmin -.. option:: --rmin=FLOAT - - Lower bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rmax -.. option:: --rmax=FLOAT - - Upper bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rstep -.. option:: --rstep=FLOAT - - Spacing of the *r*-grid for the calculated PDF in ångströms. - - -Other parameters ------------------------------------------------------------------------- - -.. confval:: plot -.. option:: -p TYPES, --plot=TYPES - - Plot the specified results. A comma separated list with one or - more items from "iq", "sq", "fq", "gr". No plot is produced when - empty, "none" or "NONE". Setting this option turns on the - interactive mode. - -.. confval:: interact -.. option:: -i, --interact - - Start an IPython interactive session after processing all files. - Useful for tuning the configuration parameters or interactive - plotting. This is always on when plot option has been set. - See also :doc:`interact` for further details. - -.. confval:: verbose -.. option:: --verbose=VALUE - - Level of detail for the program to report about its actions. - Possible values are "error", "warning", "info", "debug", "all" or an - integer number from 0 to 5. Messages are completely suppressed when - 0, all messages are printed when verbose is 5 ("all") or higher. - This option is useful for diagnostics of any unexpected behavior - in the program. diff --git a/static_root/doc/pdfgetx/2.0.0/_sources/plotdata.rst.txt b/static_root/doc/pdfgetx/2.0.0/_sources/plotdata.rst.txt deleted file mode 100644 index d1c02156..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_sources/plotdata.rst.txt +++ /dev/null @@ -1,161 +0,0 @@ -.. index:: plotdata (program) -.. _cmd-plotdata: - -The plotdata program -======================================================================== - -.. include:: abbreviations.txt -.. program:: plotdata - -The PDFgetX3 software includes a simple stand-alone utility -:program:`plotdata` for plotting text data files. In most cases -this program can be invoked from a command-shell as :: - - plotdata file1.dat file2.dat - -which plots the numerical data from the text files :file:`file1.dat`, -:file:`file2.dat` together in a single graph. By default the first -column is used as an *x* variable and the second column is used for the -*y* values. After displaying the plot the program starts an `IPython`_ -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the :data:`!filenames` variable -containing a list of plotted files. It also pre-loads the -|plotdata| and |findfiles| functions just as in PDFgetX3 -interactive session. The :py:func:`!plotdata` -function works in a similar way as the :program:`plotdata` program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -:py:func:`!plotdata` function would be:: - - In [1]: plotdata(['file1.dat', 'file2.dat']) - - -Selecting files ------------------------------------------------------------------------- - -The :program:`plotdata` program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as ``*.dat``. The file search feature is controlled by the -following options: - -.. option:: -f, --find - - Use command line arguments as filename patterns and plot all matching - files. This option works in the same way as for - :program:`pdfgetx3`, for full details see the - :option:`pdfgetx3 --find ` documentation. Note that - within command line the special patterns ``^$<>`` need to be quoted - in double quotes (\\") so they are not processed by command shell. - -.. option:: -l, --list - - List the input files and exit. This is useful in conjunction - with the :option:`!-f, --find` option to check if data files - are selected as intended. - -Assuming the current directory contains 20 files named -:file:`file1.dat`, :file:`file2.dat`, ..., :file:`file20.dat`, -the plotting of files 9 to 13 could be done (with a check listing) -as follows :: - - $ plotdata -fl "<9-13>.dat" - file9.dat - file10.dat - file11.dat - file12.dat - file13.dat - $ plotdata -f "<9-13>.dat" - -Within an interactive IPython session the equivalent plot could be -produced by combining the |plotdata| and |findfiles| functions as :: - - In [1]: plotdata(findfiles("<9-13>.dat")) - - -Selecting x and y data ------------------------------------------------------------------------- - -The :program:`plotdata` program provides several ways of selecting -columns for *x* or *y* data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is "0" -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function): - - -.. option:: -x X - - index or name of the *x*-column to plot. See the :option:`-y` option - for the supported syntax, but note that ``X`` may select only one - column. When set to "." use the data-row index for *x*. - -.. option:: -y Y - - index or name of the *y*-column or columns to plot. The ``Y`` column - specification can be a comma separated list of indices, column names - or Python-like ranges, for example "1,2", "G", "1:4" (START:STOP, - same as "1,2,3"), "1:4:2" (START:STOP:STEP, same as "1,3"), or - "-2:" (same as "-2,-1", i.e, the last 2 columns). Because column - indexing starts at "0" the second column must be specified as "1". - - The column names work if the data section in the file is preceded by - a headline of unique column names, for example:: - - x square cube - 1 1 1 - 2 4 8 - 3 9 27 - 4 16 64 - - For such data file the plotdata program will recognize column names - "x", "square" and "cube" and an implicit "." for row index. - -.. option:: -s STYLE, --style=STYLE - - optional plot format specification. See the - :func:`matplotlib.pyplot.plot` function - for a list of available formats. - -.. option:: -L LOG, --log=LOG - - axes to be plotted with logarithmic scaling, for example, "x", "y" or - "xy". Axes not listed in ``LOG`` will use linear scaling. - -.. option:: -h, --help - - display a brief usage info and exit. - -.. option:: -V, --version - - show program version and exit. - -.. option:: --manual - - Open this manual page in a Web browser and exit. - - -Examples ------------------------------------------------------------------------- - -The examples directory :file:`plotdata` contains a :file:`sincos.dat` -file that has 3-columns of values labeled as "x", "sin" and "cos". -Here are several examples of the :program:`plotdata` capabilities -when used from command line - the user is encouraged to try them out:: - - plotdata sincos.dat - plotdata -y 1,2 sincos.dat - plotdata -x . -y 0:3 sincos.dat - plotdata -y cos sincos.dat - plotdata -x sin -y cos -sr-- sincos.dat - -An equivalent usage from a general IPython session would be:: - - ipython --matplotlib=auto - In [1]: from diffpy.pdfgetx.plotdata import plotdata - In [2]: plotdata('sincos.dat') - In [3]: plotdata('sincos.dat', y=[1,2]) - In [4]: plotdata('sincos.dat', x='.', y=':3') - In [5]: plotdata('sincos.dat', y='cos') - In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--') diff --git a/static_root/doc/pdfgetx/2.0.0/_sources/quick-start.rst.txt b/static_root/doc/pdfgetx/2.0.0/_sources/quick-start.rst.txt deleted file mode 100644 index dc27fca1..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_sources/quick-start.rst.txt +++ /dev/null @@ -1,151 +0,0 @@ -Quick-start guide -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3 and PDFgetN3 can be executed by -typing :program:`pdfgetx3` or :program:`pdfgetn3` in a shell -window. Please, refer to the :doc:`installation ` section -if this is not working yet. - -.. index:: pdfgetx3 (program) -.. _cmd-pdfgetx3: - -pdfgetx3 command ------------------------------------------------------------------------- - -The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as :: - - pdfgetx3 [options] input1 input2 ... inputN - -The :file:`inputN` stands for an input powder diffraction data. The -:file:`inputN` file is a simple two-column text file, where the first -column corresponds to either the |twotheta| diffraction angle, or a -momentum transfer, *Q*, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -`FIT2D program `_ using -its "chi" output format, thus we will also refer to them as "chi-files". -A typical content of a "chi" file looks as folows: - -.. code-block:: none - - Pt_bulk-00055.tif: 2-theta Scan - 2-Theta Angle (Degrees) - - 1465 - 2.0003892E-02 0.0000000E+00 - 6.0011677E-02 0.0000000E+00 - 1.0001946E-01 0.0000000E+00 - 1.4002724E-01 0.0000000E+00 - 1.8003502E-01 0.0000000E+00 - ... - -The command-line options are arguments that start with a dash "-" and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash ``--``. Options may require values. For short options, -the value may be joined to the option string, for example -:option:`!-w0.142774`, while for the long options it has to be separated -with an equal sign, e.g., :option:`!--wavelength=0.142774`. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the :doc:`options` section of -this manual. A brief summary of options can be also displayed by -executing :: - - pdfgetx3 --help - -The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the :doc:`tutorial`. -In general, the first step is to create a commented configuration file -``pdfgetx3.cfg`` using:: - - pdfgetx3 --createconfig=pdfgetx3.cfg - -The configuration file can have any name, but it is preferable -to use either :file:`pdfgetx3.cfg` or :file:`.pdfgetx3.cfg`, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the :option:`-c, --config <-c>` option. - -Open the pdfgetx3.cfg file in a **text** editor. The lines that -start with a hash mark ``#`` are comments and are not used. The lines -starting with a right brace ``[`` denote sections in the configuration -file. The active lines are all formatted as -"NAME=VALUE". Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation: - -* :confval:`dataformat` -- specifies the input data format - -* :confval:`wavelength` -- radiation wavelength in Å required for the - "twotheta" format. - -* :confval:`composition` -- chemical composition of the sample - -* :confval:`qmaxinst` -- upper *Q* boundary for a meaningful measurement - intensities. - -* :confval:`qmax` -- *Q*-cutoff for the Fourier transformation that - yields the PDF. - -Save the updated configuration file and run pdfgetx3 on the input data -:file:`FILENAME.chi` as :: - - pdfgetx3 --verbose=info -t gr FILENAME.chi - -Here the :option:`--verbose=info <--verbose>` option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The :option:`-t gr <-t>` option -tells the program to save the final |Gr| curve as a -:file:`FILENAME.gr` file in the working directory. - -The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation :: - - pdfgetx3 -c FILENAME.gr --plot=fq,gr - -Note this command does not include any .chi file and this will as -a result process the previously used input :file:`FILENAME.chi`. -The :option:`--plot=fq,gr <-p>` option tells PDFgetX3 to -display 2 plots for the reduced structure function |FQ| and the -final PDF |Gr|. The :option:`!--plot` option also implies an -:doc:`interactive mode ` -therefore the program does not exit, but starts an -interactive `IPython`_ session. To exit the interactive mode, -type ``exit()`` and press Enter. - -.. index:: pdfgetn3 (program) -.. _cmd-pdfgetn3: - -pdfgetn3 command ------------------------------------------------------------------------- - -The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the -:option:`--mode` option. Running ``pdfgetn3`` is nearly identical -to executing ``pdfgetx3 --mode=neutron``. The only difference between -these commands is that pdfgetx3 checks for configuration files -:file:`pdfgetx3.cfg` and :file:`.pdfgetx3.cfg`, whereas -pdfgetn3 looks for :file:`pdfgetn3.cfg` and :file:`.pdfgetn3.cfg`. - -Please refer to the :doc:`tutorial section ` for -a step-by step processing of the example data files and for -demonstration of capabilities in PDFgetX3 and PDFgetN3. diff --git a/static_root/doc/pdfgetx/2.0.0/_sources/release.rst.txt b/static_root/doc/pdfgetx/2.0.0/_sources/release.rst.txt deleted file mode 100644 index 7ede93fa..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_sources/release.rst.txt +++ /dev/null @@ -1,3 +0,0 @@ -.. index:: release notes - -.. mdinclude:: ../../CHANGELOG.md diff --git a/static_root/doc/pdfgetx/2.0.0/_sources/tutorial.rst.txt b/static_root/doc/pdfgetx/2.0.0/_sources/tutorial.rst.txt deleted file mode 100644 index 0d5c6f09..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_sources/tutorial.rst.txt +++ /dev/null @@ -1,683 +0,0 @@ -Tutorial -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. index:: example files -.. py:currentmodule:: diffpy.pdfgetx - -In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the :file:`examples` -folder included with the PDFgetX3 distribution. The :file:`examples` -folder can be found in the parent "doc" directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -|zipped-examples|. - - -.. index:: examples - -Nickel X-ray PDF ------------------------------------------------------------------------- - -predefined configuration file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -Change to the :file:`Ni` directory. The file named -:file:`ni300mesh_300k_nor_1-5.chi` contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the |twotheta| scattering -angles and X-ray intensities. The second file -:file:`kapton_bgrd_300k_nor_2-3.chi` contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the :file:`pdfgetx3.cfg` contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -:ref:`pdfgetx3 ` program -with the powder data file as an argument:: - - $ pdfgetx3 ni300mesh_300k_nor_1-5.chi - -For the first run there should be no output on the screen, -however a new file, :file:`ni300mesh_300k_nor_1-5.gr` should appear -in the work directory. -We can use the :ref:`plotdata ` program, -included with this software, to plot the output data:: - - $ plotdata ni300mesh_300k_nor_1-5.gr - -This will open a graph window and start an `IPython`_ interactive session. -To exit and close the figure, type ``exit()`` on the IPython prompt. -Let's run the program again, but now with a -:option:`--verbose=info <--verbose>` -option, to show more details about the program actions. :: - - $ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi - - INFO:applying pdfgetx3 defaults - INFO:set config.mode = xray - INFO:searching for default config file /home/user/.pdfgetx3.cfg - INFO:searching for default config file .pdfgetx3.cfg - INFO:searching for default config file pdfgetx3.cfg - INFO:loaded default config file pdfgetx3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi - INFO:set config.outputtypes = gr - INFO:set config.wavelength = 0.142774 - INFO:set config.composition = Ni - INFO:set config.qmaxinst = 26.5 - INFO:set config.qmax = 26.0 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 30.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'xray' - INFO:calling config_xray - INFO:started PDF processing. - INFO:processing 'ni300mesh_300k_nor_1-5.chi' - INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr' - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - INFO:elapsed time: 0.095 - -Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the :option:`!--verbose` option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the :option:`--force=yes <--force>` option, upon -which pdfgetx3 would overwrite any existing files. - -PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the -:option:`-c` option. Another option, :option:`--plot=[iq,sq,fq,gr] -<-p>` turns on plotting of the final PDF or of some other result. A -side effect of the :option:`!--plot` option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function |FQ| and the PDF curve |Gr|. This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:: - - $ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr - - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - - Variables related to PDF processing: - - pdfgetter -- PDFGetter used for calculation. - config -- configuration data used by PDFGetter. - See config.inputfiles for a list of inputs. - iraw -- matrix of input raw intensities with 2 rows per file. - iq sq fq gr -- intermediate results per each input file stored - as matrix rows. - - Functions: - - tuneconfig -- dynamically tune configuration variables. - processfiles -- process specified data files. - clearsession -- clear all elements from the inputfiles, iraw, - iq, sq, fq and gr variables. - plotdata -- plot all or selected columns from a text data file. - loaddata -- load all or selected columns from a text data file. - findfiles -- search for files matching the specified patterns. - - Use "%pdfgetx3" for a fresh run without exiting IPython. - In [1]: - -This will open a plot figure similar to - -.. image:: images/nickelfqgr.png - -Because of the :doc:`interactive mode ` implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -:interactvar:`config` variable stores all the configuration parameters, -and its content can be displayed with the :py:func:`print` -function as :: - - In [1]: print(config) - - configfile = ni300mesh_300k_nor_1-5.gr - configsection = DEFAULT - dataformat = twotheta - ... - qmax = 26.0 - ... - -The :py:func:`.processfiles` function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the |FQ| and |Gr| -curves calculated at |Qmax| = 22 |Ainv|, we can call -:py:func:`!processfiles` and pass it a keyword argument for -the new qmax as follows:: - - In [2]: processfiles(qmax=22) - - # the qmax parameter was updated to a new value, thus - In [3]: config.qmax - Out[3]: 22 - -There should be now two lines in each plot axis corresponding to -the results at |Qmax| equal 26 and 22 |Ainv|. To exit the program, -type ``exit()``. - - -processing from scratch -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -We have already encountered the command-line :option:`option -c <-c>` -for specifying a custom configuration file. A special argument "NONE", -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi - - WARNING:Nothing to do, use "-t" or "--plot" options. - ERROR:Configuration error: wavelength not specified. - ERROR:See "--help" for more hints. - -There is an error, for the wavelength is necessary to convert -the scattering angle |twotheta| to momentum transfer *Q*. The -X-ray wavelength was 0.142774 Å, which can be passed with the -:option:`-w, --wavelength <-w>` option:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 - - ... - ERROR:Configuration error: Chemical composition not known. - ERROR:See "--help" for more hints. - -There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the :option:`--composition` option. The example -below uses a "\\\\" character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni - - WARNING:Nothing to do, use "-t" or "--plot" options. - ... - -There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the :option:`-t, --outputtypes <-t>` option. -The outputtypes option recognizes the following result types: -"iq", "sq", "fq", "gr". One or more of these type strings, -separated by a comma, can be included with the -:option:`!-t` option, which will produce the corresponding -output files. An empty string, such as ``-t ""``, or ``-t NONE`` -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings. - -At this point, we will not write any output files, but will use the -:option:`--plot <-p>` option to display the calculated curves. The -:option:`!--plot` accepts the same arguments as outputtypes, so to -display the |FQ| and |Gr| curves we shall run :: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni --plot=fq,gr - - WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161 - WARNING:qmax reset to the data boundary qmaxinst=28.0865680161 - -which should open the following plot window: - -.. image:: images/nickelfqgrnoisy.png - -The graphs look terrible. The PDF is very noisy and the |FQ| curve -shows a sudden break at about 27 |Ainv|. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -:interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, -:interactvar:`fq`, :interactvar:`gr` -variables for the original raw data and intermediate results. We -are going to plot the "iq" variable that has the input intensities -resampled on the *Q* grid. The matplotlib function -:py:func:`~matplotlib.pyplot.clf` clears the figure, -the iq variable is a two-row matrix with *Q* and *I* rows, and the -:py:func:`~matplotlib.pyplot.axis` -function lets us zoom to a given range:: - - In [1]: clf() - In [2]: plot(iq[0], iq[1]) - Out[2]: [] - In [3]: axis([20, 29, 0, 3000]) - Out[3]: [20, 29, 0, 3000] - -The graph shows a sudden drop in the raw intensities at 27 |Ainv|. -The :confval:`qmaxinst` variable defines a *Q* cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 |Ainv| :: - - In [4]: processfiles(qmaxinst=26.5) - WARNING:qmax reset to the data boundary qmaxinst=26.5 - -The updated curves looks reasonable without any oscillations and -breakpoints. The :py:func:`.tuneconfig` function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type ``tuneconfig()`` to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the |FQ| and |Gr| curves change. -The :confval:`rpoly` parameter controls the degree of data-correction -polynomial and is an approximate low-*r* bound of reliable *G* -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the |Gr| -curve and save it to an output file :file:`nicmd.gr`:: - - In [14]: config.qmax = 26 - In [15]: config.outputtypes = 'gr' - In [16]: config.output = 'nicmd' - In [17]: processfiles() - - -Platinum X-ray series ------------------------------------------------------------------------- - -PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(`z-shell `_ being a notable exception). - -.. _my-findexamples: - -matching input files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The :program:`pdfgetx3` program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the :option:`-f, --find <-f>` option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option -:option:`-l, --list <-l>` makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files. - -We will try out this file search on platinum example files. Open a -terminal and navigate to the :file:`Pt` directory. There should be a -:file:`series` subdirectory with 6 chi files indexed from 903 to 908. -At first, let's stay in the :file:`Pt` directory and run the following -command :: - - $ pdfgetx3 --list --find - - Pt_bulk-00055-pdfgetx2.gr - Pt_bulk-00055-pdfgetx3.gr - Pt_bulk-00055.chi - empty_capillary-00032.chi - pdfgetx3.cfg - plotpdfcomparison.py - -Without any patterns the file search matches all files in the current -directory. Now let's try to add name patterns. There are few special -patterns, for example ``^`` matches at the beginning of the filename, -``$`` at the end and ```` matches a range of integer values from -*N* to *M*. The patterns containing ``^$<>`` need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works. - -Filenames containing "y":: - - $ pdfgetx3 --list --find y - empty_capillary-00032.chi - plotpdfcomparison.py - -Filenames that containing both "y" and "chi", here we use the -options :option:`!--list` and :option:`!--find` in an abbreviated -form :option:`!-l` and :option:`!-f`:: - - $ pdfgetx3 -lf y chi - empty_capillary-00032.chi - -Filenames that start with "e":: - - $ pdfgetx3 --list --find "^e" - empty_capillary-00032.chi - -Filenames that contain *character* "2":: - - $ pdfgetx3 --list --find 2 - Pt_bulk-00055-pdfgetx2.gr - empty_capillary-00032.chi - -Filenames that contain *numeric value* "2":: - - $ pdfgetx3 -lf "<2>" - Pt_bulk-00055-pdfgetx2.gr - -The special argument ``+`` starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both "bulk" and "chi" substrings and then -also those that have "empty" and "chi" in their names, use:: - - $ pdfgetx3 -lf bulk chi + empty chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - -When pattern groups overlap the resulting matches are -made unique and each file is listed only once :: - - $ pdfgetx3 -lf bulk chi + chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - - -data search path -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Each group of PDFgetX3 patterns can have one entry containing -forward slash "/" to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered "903" to "905" and "908" from the -:file:`series` subdirectory can be therefore matched using :: - - $ pdfgetx3 -lf series/ "<903-905>" + 908 - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00908.chi - -The current directory can be selected using `./` :: - - $ pdfgetx3 -lf series/ 903 + ./ bulk chi - series/Pt_bulk_ramp03-00903.chi - Pt_bulk-00055.chi - -When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -".chi"-ending files in the current and :file:`series` -directories can be thus found using :: - - $ pdfgetx3 -lf ".chi$" + series/ - Pt_bulk-00055.chi - empty_capillary-00032.chi - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00906.chi - series/Pt_bulk_ramp03-00907.chi - series/Pt_bulk_ramp03-00908.chi - - -output file names -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -By default the output files are saved in the current directory. The -output path, can be changed with the :option:`-o, --output <-o>` option. -The :option:`!-o` recognizes several tokens that are replaced with -parts of the input file name, for example, "@b" expands to an -extension-stripped base name. In similar faction, "@o" is replaced -with the output type extension. Thus to generate PDFs for all files -in the :file:`series` directory and save them in the -:file:`series-gr` subfolder do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o - -The extension ".@o" is automatic when not included anywhere in the -output file name. Thus to process the Pt series at |Qmax| = 18 |Ainv| -while saving the results in the same folder, but with a "_qmax18" suffix -in their filenames do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18 - -For input file :file:`Pt_bulk_ramp03-00903.chi` the :option:`!-o` option -above expands to output path :file:`series-gr/Pt_bulk_ramp03-00903_qmax18.gr`. -The :file:`series-gr` directory should now contain 12 "gr" files, -6 of them processed at |Qmax| = 27 |Ainv| as given by configuration -file and 6 others processed at |Qmax| = 18 |Ainv|. - -.. seealso:: :option:`-o, --output <-o>` for a list of output tokens - -.. index:: tuneconfig (example) -.. _my-tuneconfig: - -Interactive tuning of parameters ------------------------------------------------------------------------- - -One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the :file:`Ni` directory in the shell and process -the nickel PDF while plotting the |FQ| and |Gr| curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -:py:func:`.tuneconfig` -function from the IPython environment :: - - $ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi - ... - In [1]: tuneconfig() - -The -:py:func:`!tuneconfig` -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot. - -.. image:: images/tunenickelfqgr.png - -The *constant data scale* check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -:ref:`PDF parameters section `. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the :confval:`bgscale` parameter -if PDF has been processed without any background data. - -By default the -:py:func:`!tuneconfig` -function displays the same curves as -specified by the :option:`--plot <-p>` option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the :py:meth:`!describe` method of the -:py:func:`.pdfgetter` object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object *t4* that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the :py:func:`!tuneconfig` function :: - - $ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi - ... - Use "%pdfgetx3" for a fresh run without exiting IPython. - - In [1]: fig, ax = subplots(2) - In [2]: pdfgetter.describe() - 0 TransformTwoThetaToQA - convert x data from twotheta to Q in 1/A - 1 TransformQGridRegular - Remove the data outside the (qmin, qmaxinst) range - 2 TransformBackground - subtract background intensity - 3 TransformXrayASFnormChris - scale and normalize intensities by x-ray scattering factors - 4 TransformSQnormRPoly - Normalize S(Q) by fitting a polynomial - 5 TransformSQToFQ - Convert S(Q) to F(Q). - 6 TransformFQgrid - Resample F(Q) to a regular grid suitable for FFT - 7 TransformFQToGr - Convert F(Q) to G(r). - In [3]: t4 = pdfgetter.getTransformation(4) - In [4]: tuneconfig([t4, 'gr'], axeslist=ax) - In [5]: ax[0].legend(loc=2) - -The :py:func:`~matplotlib.pyplot.subplots` function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window: - -.. image:: images/tunenickelt4gr.png - -The tuning can be finished by clicking the ``Done`` button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the :interactvar:`config` -object, for example:: - - In [5]: config.bgscale = 1.5 - -Finally, to save the new results, we shall first confirm -:confval:`outputtypes` have been correctly set and then use the -:py:func:`.processfiles` function to redo the calculations, plots and -data output for the updated configuration. Note that the -:py:func:`!processfiles` function accepts keyword arguments for -configuration parameters. This is used at line ``In [8]`` to -turn on the :confval:`force` flag and is in effect a shortcut -for an extra ``config.force = True`` statement. :: - - In [6]: config.outputtypes - Out[6]: ['gr'] - In [7]: processfiles() - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - In [8]: processfiles(force=True) - -:file:`ni300mesh_300k_nor_1-5.gr` was successfully saved at an -updated configuration for there were no warnings after the last call. - - -Neutron PDF ------------------------------------------------------------------------- - -This example illustrates PDF extraction from -neutron powder data using :ref:`pdfgetn3 `. -Navigate to the :file:`n-Sapphire` directory in the shell. -The :file:`sapphire755.dat` file contains powder diffraction data from -sapphire (α-Al\ :sub:`2`\ O\ :sub:`3`) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The :file:`pdfgetn3.cfg` configuration file specifies -processing parameters such as :confval:`wavelength`, -:confval:`twothetazero`, :confval:`composition`, and :confval:`mode`. - -To extract the sapphire neutron PDF run :: - - $ pdfgetn3 --verbose=info sapphire755.dat - - INFO:applying pdfgetn3 defaults - INFO:set config.mode = neutron - INFO:searching for default config file /home/user/.pdfgetn3.cfg - INFO:searching for default config file .pdfgetn3.cfg - INFO:searching for default config file pdfgetn3.cfg - INFO:loaded default config file pdfgetn3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = - INFO:set config.outputtypes = fq, gr - INFO:set config.mode = neutron - INFO:set config.wavelength = 1.0989 - INFO:set config.twothetazero = -0.38 - INFO:set config.composition = Al2O3 - INFO:set config.qmaxinst = 11.2 - INFO:set config.qmax = 11.2 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 20.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'neutron' - INFO:calling config_neutron - INFO:started PDF processing. - INFO:processing 'sapphire755.dat' - INFO:resolved output file '' as 'sapphire755.fq' - INFO:written outpufile sapphire755.fq - INFO:resolved output file '' as 'sapphire755.gr' - INFO:written outpufile sapphire755.gr - INFO:elapsed time: 0.097 - -This will produce two files :file:`sapphire755.fq`, :file:`sapphire755.gr` -for the |FQ| and |Gr| functions. -To compare them with expected results use :: - - $ plotdata sapphire755-expected.fq sapphire755.fq - $ plotdata sapphire755-expected.gr sapphire755.gr - - -Fit twothetazero ------------------------------------------------------------------------- - -For a good quality PDF it is essential to use powder patterns with -accurate values of *Q*. Some instruments may produce spectra with -a slightly offset scattering angle |twotheta| which -causes inaccurate *Q* and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the :confval:`twothetazero` correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples. - -This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -`diffpy.cmi `__, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use `Anaconda Python`_ and set up a dedicated -Anaconda environment *nbcmi* for this tutorial. -This can be accomplished using the following steps:: - - $ conda create -n nbcmi -c diffpy python=2 diffpy.cmi - $ conda activate nbcmi - $ python -m easy_install path/to/diffpy.pdfgetx-VERSION.egg - -When these prerequisites are in place, -change to the :file:`n-twothetazero-fit` directory -and open the self documented Jupyter notebook as follows :: - - $ jupyter notebook fit-twothetazero.ipynb - -.. |tthzero| replace:: :confval:`!twothetazero` - -The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted |tthzero|. -After running all cells the notebook should produce similar graphs -as in the figure below. - -.. figure:: images/twothetazerofit.* - - Refinement of nickel neutron PDF for **(a)** uncorrected data - and **(b)** with a refined zero correction. - The extracted PDFs are plotted as blue circles, - simulated PDFs as red lines and - the difference is plotted offset in green below. - -The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual R\ :sub:`w` which is lowered from (a) 0.18 to (b) 0.05. diff --git a/static_root/doc/pdfgetx/2.0.0/_static/ajax-loader.gif b/static_root/doc/pdfgetx/2.0.0/_static/ajax-loader.gif deleted file mode 100644 index 61faf8ca..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_static/ajax-loader.gif and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_static/basic.css b/static_root/doc/pdfgetx/2.0.0/_static/basic.css deleted file mode 100644 index 19ced105..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_static/basic.css +++ /dev/null @@ -1,665 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- 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 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: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.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: 450px; - 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; -} - -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, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 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; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - border: 0; - border-collapse: collapse; -} - -table.align-center { - 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; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -/* -- figures --------------------------------------------------------------- */ - -div.figure { - margin: 0.5em; - padding: 0.5em; -} - -div.figure p.caption { - padding: 0.3em; -} - -div.figure p.caption span.caption-number { - font-style: italic; -} - -div.figure p.caption 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; -} - -/* -- 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; -} - -dl { - margin-bottom: 15px; -} - -dd p { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, span.highlighted { - background-color: #fbe54e; -} - -rect.highlighted { - fill: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.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; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -span.pre { - -moz-hyphens: none; - -ms-hyphens: none; - -webkit-hyphens: none; - hyphens: none; -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -div.code-block-caption { - padding: 2px 5px; - font-size: small; -} - -div.code-block-caption code { - background-color: transparent; -} - -div.code-block-caption + div > div.highlight > pre { - margin-top: 0; -} - -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 { - padding: 1em 1em 0; -} - -div.literal-block-wrapper div.highlight { - margin: 0; -} - -code.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -code.descclassname { - background-color: transparent; -} - -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: relative; - left: 0px; - 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_root/doc/pdfgetx/2.0.0/_static/classic.css b/static_root/doc/pdfgetx/2.0.0/_static/classic.css deleted file mode 100644 index 68d66fa1..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_static/classic.css +++ /dev/null @@ -1,266 +0,0 @@ -/* - * classic.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- classic theme. - * - * :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; - font-size: 100%; - background-color: white; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: white; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: white; - color: #222222; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #555555; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #555555; - text-decoration: underline; -} - -div.related { - background-color: white; - line-height: 30px; - color: #666666; -} - -div.related a { - color: #444444; -} - -div.sphinxsidebar { -} - -div.sphinxsidebar h3 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #444444; -} - -div.sphinxsidebar h4 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #444444; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #444444; -} - -div.sphinxsidebar a { - color: #444444; -} - -div.sphinxsidebar input { - border: 1px solid #444444; - font-family: sans-serif; - font-size: 1em; -} - - -/* for collapsible sidebar */ -div#sidebarbutton { - background-color: #3c6e83; -} - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #00608f; - text-decoration: none; -} - -a:visited { - color: #30306f; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - background-color: white; - font-weight: normal; - color: #1a1a1a; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #aaaaaa; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #aaaaaa; - color: white; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: #eeffcc; - color: #333333; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -code { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th { - background-color: #ede; -} - -.warning code { - background: #efc2c2; -} - -.note code { - background: #d6d6d6; -} - -.viewcode-back { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -div.code-block-caption { - color: #efefef; - background-color: #1c4e63; -} \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/_static/comment-bright.png b/static_root/doc/pdfgetx/2.0.0/_static/comment-bright.png deleted file mode 100644 index 15e27edb..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_static/comment-bright.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_static/comment-close.png b/static_root/doc/pdfgetx/2.0.0/_static/comment-close.png deleted file mode 100644 index 4d91bcf5..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_static/comment-close.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_static/comment.png b/static_root/doc/pdfgetx/2.0.0/_static/comment.png deleted file mode 100644 index dfbc0cbd..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_static/comment.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_static/copybutton.js b/static_root/doc/pdfgetx/2.0.0/_static/copybutton.js deleted file mode 100644 index ca9f489f..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_static/copybutton.js +++ /dev/null @@ -1,57 +0,0 @@ -$(document).ready(function() { - /* Add a [>>>] button on the top-right corner of code samples to hide - * the >>> and ... prompts and the output and thus make the code - * copyable. */ - var div = $('.highlight-python .highlight,' + - '.highlight-pycon .highlight,' + - '.highlight-python3 .highlight') - var pre = div.find('pre'); - - // get the styles from the current theme - pre.parent().parent().css('position', 'relative'); - var hide_text = 'Hide the prompts and output'; - var show_text = 'Show the prompts and output'; - var border_width = pre.css('border-top-width'); - var border_style = pre.css('border-top-style'); - var border_color = pre.css('border-top-color'); - var button_styles = { - 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', - 'border-color': border_color, 'border-style': border_style, - 'border-width': border_width, 'color': border_color, 'text-size': '75%', - 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', - 'border-radius': '0 3px 0 0' - } - - // create and add the button to all the code blocks that contain >>> - div.each(function(index) { - var jthis = $(this); - if (jthis.find('.gp').length > 0) { - var button = $('>>>'); - button.css(button_styles) - button.attr('title', hide_text); - jthis.prepend(button); - } - // tracebacks (.gt) contain bare text elements that need to be - // wrapped in a span to work with .nextUntil() (see later) - jthis.find('pre:has(.gt)').contents().filter(function() { - return ((this.nodeType == 3) && (this.data.trim().length > 0)); - }).wrap(''); - }); - - // define the behavior of the button when it's clicked - $('.copybutton').toggle( - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').hide(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); - button.css('text-decoration', 'line-through'); - button.attr('title', show_text); - }, - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').show(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); - button.css('text-decoration', 'none'); - button.attr('title', hide_text); - }); -}); diff --git a/static_root/doc/pdfgetx/2.0.0/_static/doctools.js b/static_root/doc/pdfgetx/2.0.0/_static/doctools.js deleted file mode 100644 index 4a6e2368..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_static/doctools.js +++ /dev/null @@ -1,315 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(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 bbox = span.getBBox(); - var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); - 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); - var parentOfText = node.parentNode.parentNode; - 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; -} - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - - this.initOnKeyListeners(); - - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return 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 : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keyup(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box or textarea - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - } - } - }); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/_static/documentation_options.js b/static_root/doc/pdfgetx/2.0.0/_static/documentation_options.js deleted file mode 100644 index c18483d9..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_static/documentation_options.js +++ /dev/null @@ -1,9 +0,0 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '2.0.0', - LANGUAGE: 'None', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '.txt' -}; \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/_static/down-pressed.png b/static_root/doc/pdfgetx/2.0.0/_static/down-pressed.png deleted file mode 100644 index 5756c8ca..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_static/down-pressed.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_static/down.png b/static_root/doc/pdfgetx/2.0.0/_static/down.png deleted file mode 100644 index 1b3bdad2..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_static/down.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_static/favicon.png b/static_root/doc/pdfgetx/2.0.0/_static/favicon.png deleted file mode 100644 index 93e4a02c..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_static/favicon.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_static/file.png b/static_root/doc/pdfgetx/2.0.0/_static/file.png deleted file mode 100644 index a858a410..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/_static/file.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/_static/jquery-3.2.1.js b/static_root/doc/pdfgetx/2.0.0/_static/jquery-3.2.1.js deleted file mode 100644 index d2d8ca47..00000000 --- a/static_root/doc/pdfgetx/2.0.0/_static/jquery-3.2.1.js +++ /dev/null @@ -1,10253 +0,0 @@ -/*! - * jQuery JavaScript Library v3.2.1 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2017-03-20T18:59Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var document = window.document; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - - - - function DOMEval( code, doc ) { - doc = doc || document; - - var script = doc.createElement( "script" ); - - script.text = code; - doc.head.appendChild( script ).parentNode.removeChild( script ); - } -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.2.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android <=4.0 only - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - - if ( copyIsArray ) { - copyIsArray = false; - clone = src && Array.isArray( src ) ? src : []; - - } else { - clone = src && jQuery.isPlainObject( src ) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type( obj ) === "function"; - }, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - - // As of jQuery 3.0, isNumeric is limited to - // strings and numbers (primitives or objects) - // that can be coerced to finite numbers (gh-2662) - var type = jQuery.type( obj ); - return ( type === "number" || type === "string" ) && - - // parseFloat NaNs numeric-cast false positives ("") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - !isNaN( obj - parseFloat( obj ) ); - }, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - - /* eslint-disable no-unused-vars */ - // See https://github.com/eslint/eslint/issues/6125 - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - DOMEval( code ); - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE <=9 - 11, Edge 12 - 13 - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android <=4.0 only - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.3 - * https://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2016-08-08 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - disabledAncestor = addCombinator( - function( elem ) { - return elem.disabled === true && ("form" in elem || "label" in elem); - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !compilerCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - - if ( nodeType !== 1 ) { - newContext = context; - newSelector = selector; - - // qSA looks outside Element context, which is not what we want - // Thanks to Andrew Dupont for this workaround technique - // Support: IE <=8 - // Exclude object elements - } else if ( context.nodeName.toLowerCase() !== "object" ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[i] = "#" + nid + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement("fieldset"); - - try { - return !!fn( el ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || - - // Where there is no isDisabled, check manually - /* jshint -W018 */ - elem.isDisabled !== !disabled && - disabledAncestor( elem ) === disabled; - } - - return elem.disabled === disabled; - - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } - - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9-11, Edge - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - if ( preferredDoc !== document && - (subWindow = document.defaultView) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( el ) { - el.className = "i"; - return !el.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( el ) { - el.appendChild( document.createComment("") ); - return !el.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - }); - - // ID filter and find - if ( support.getById ) { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( (elem = elems[i++]) ) { - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( el ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement("input"); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll(":enabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll(":disabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( el ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === document ? -1 : - b === document ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - !compilerCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return (sel + "").replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - // Use previously-cached element index if available - if ( useCache ) { - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( (oldCache = uniqueCache[ key ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context === document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - if ( !context && elem.ownerDocument !== document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context || document, xml) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( el ) { - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( el ) { - return el.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -}; -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Simple selector that can be filtered directly, removing non-Elements - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - // Complex selector, compare the two sets, removing non-Elements - qualifier = jQuery.filter( qualifier, elements ); - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1; - } ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( nodeName( elem, "iframe" ) ) { - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && jQuery.isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && - - // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( jQuery.isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - jQuery.isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - jQuery.isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - jQuery.isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the master Deferred - master = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || - jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return master.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); - } - - return master.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ jQuery.camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ jQuery.camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( jQuery.camelCase ); - } else { - key = jQuery.camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && - - // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - jQuery.contains( elem.ownerDocument, elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - -var swap = function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, - scale = 1, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - do { - - // If previous iteration zeroed out, double until we get *something*. - // Use string for doubling so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - initialInUnit = initialInUnit / scale; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Update scale, tolerating zero or NaN from tween.cur() - // Break the loop if scale is unchanged or perfect, or if we've just had enough. - } while ( - scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations - ); - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); - -var rscriptType = ( /^$|\/(?:java|ecma)script/i ); - - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // Support: IE <=9 only - option: [ 1, "" ], - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting

", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] -}; - -// Support: IE <=9 only -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -} )(); -var documentElement = document.documentElement; - - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 only -// See #13393 for more info -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = {}; - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - // Make a writable jQuery.Event from the native event object - var event = jQuery.event.fix( nativeEvent ); - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or 2) have namespace(s) - // a subset or equal to those in the bound event (both can have no namespace). - if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && - - // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && - - // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: jQuery.isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } -}, jQuery.event.addProp ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - /* eslint-disable max-len */ - - // See https://github.com/eslint/eslint/issues/3229 - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, - - /* eslint-enable */ - - // Support: IE <=10 - 11, Edge 12 - 13 - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( ">tbody", elem )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.access( src ); - pdataCur = dataPriv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html.replace( rxhtmlTag, "<$1>" ); - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rmargin = ( /^margin/ ); - -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - div.style.cssText = - "box-sizing:border-box;" + - "position:relative;display:block;" + - "margin:auto;border:1px;padding:1px;" + - "top:1%;width:50%"; - div.innerHTML = ""; - documentElement.appendChild( container ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = divStyle.marginLeft === "2px"; - boxSizingReliableVal = divStyle.width === "4px"; - - // Support: Android 4.0 - 4.3 only - // Some styles come back with percentage values, even though they shouldn't - div.style.marginRight = "50%"; - pixelMarginRightVal = divStyle.marginRight === "4px"; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + - "padding:0;margin-top:1px;position:absolute"; - container.appendChild( div ); - - jQuery.extend( support, { - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelMarginRight: function() { - computeStyleTests(); - return pixelMarginRightVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }, - - cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style; - -// Return a css property mapped to a potentially vendor prefixed property -function vendorPropName( name ) { - - // Shortcut for names that are not vendor prefixed - if ( name in emptyStyle ) { - return name; - } - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a property mapped along what jQuery.cssProps suggests or to -// a vendor prefixed property. -function finalPropName( name ) { - var ret = jQuery.cssProps[ name ]; - if ( !ret ) { - ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; - } - return ret; -} - -function setPositiveNumber( elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i, - val = 0; - - // If we already have the right measurement, avoid augmentation - if ( extra === ( isBorderBox ? "border" : "content" ) ) { - i = 4; - - // Otherwise initialize for horizontal or vertical properties - } else { - i = name === "width" ? 1 : 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // At this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - - // At this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // At this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with computed style - var valueIsBorderBox, - styles = getStyles( elem ), - val = curCSS( elem, name, styles ), - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test( val ) ) { - return val; - } - - // Check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && - ( support.boxSizingReliable() || val === elem.style[ name ] ); - - // Fall back to offsetWidth/Height when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - if ( val === "auto" ) { - val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ]; - } - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - - // Use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - "float": "cssFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - if ( type === "number" ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = jQuery.camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && - - // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - } ) : - getWidthOrHeight( elem, name, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = extra && getStyles( elem ), - subtract = extra && augmentWidthOrHeight( - elem, - name, - extra, - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - styles - ); - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ name ] = value; - value = jQuery.css( elem, name ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || - elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && - ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || - jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = jQuery.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 13 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( jQuery.isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - jQuery.proxy( result.stop, result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = jQuery.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && - elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( jQuery.isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( typeof value === "string" && value ) { - classes = value.match( rnothtmlwhite ) || []; - - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( jQuery.isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - if ( typeof value === "string" && value ) { - classes = value.match( rnothtmlwhite ) || []; - - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value; - - if ( typeof stateVal === "boolean" && type === "string" ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( jQuery.isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( type === "string" ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = value.match( rnothtmlwhite ) || []; - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, isFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - - // Don't return options that are disabled or in a disabled optgroup - !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -jQuery.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( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; -} ); - -jQuery.fn.extend( { - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -} ); - - - - -support.focusin = "onfocusin" in window; - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = jQuery.now(); - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } - - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = jQuery.isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( jQuery.isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response - * Also sets the responseXXX fields on the jqXHR instance - */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /\bxml\b/, - html: /\bhtml/, - json: /\bjson\b/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": JSON.parse, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match == null ? null : match; - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 13 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available, append data to url - if ( s.data ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - - -jQuery._evalUrl = function( url ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - "throws": true - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( jQuery.isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( " - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Files used in PDF extraction

-
-

Configuration file

-

Configuration files may define the PDF processing parameters. -By default, the pdfgetx3 program attempts to read -.pdfgetx3.cfg file from the user HOME directory, -then .pdfgetx3.cfg and pdfgetx3.cfg files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the -c, --config option. -The pdfgetn3 program works in the same way, -except it checks for configuration files -~/.pdfgetn3.cfg, .pdfgetn3.cfg and pdfgetn3.cfg.

-

The easiest way of creating a configuration file is to generate -a template content using the --createconfig option as

-
pdfgetx3 --createconfig=test.cfg
-
-
-

and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple “varname=value” syntax, -any lines starting with “#” are ignored as comments.

-

The configuration file has several sections marked as [SECTIONNAME]. -The [DEFAULT] section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the -s, --section option on the -command line. Thus

-
pdfgetx3 --config=test.cfg --section=nacl
-
-
-

would read the parameters from the [nacl] section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section.

-
-
-

Input files

-

PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -2Θ in degrees, momentum transfer Q in inverse nanometers or Q -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the dataformat parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values.

-

The input files are usually passed as command-line arguments to -pdfgetx3 or pdfgetn3 programs and must be paths -accessible from the current working directory.

-

Input files can be also defined by setting the inputfile -value in the configuration file. The -d, --datapath -option can be then used to provide additional data directories to -search for these inputs and for the backgroundfile. -This is to support configuration files located in a different -directory than the data.

-

When the --find option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory.

-
-
-

Output files

-

PDFgetX3 and PDFgetN3 can produce up to four different output data files:

-
    -
  • .iq – I(Q), the background-corrected -intensities sampled on a regular Q-space grid in inverse ångströms,
  • -
  • .sq – S(Q), the total scattering structure function, -with intensities normalized by average scattering factors and -corrected by a polynomial fit,
  • -
  • .fq – F(Q), the reduced structure function equal to Q(S(Q) - 1),
  • -
  • .gr – G(r), the resultant PDF, where the first column is the -separation r in ångströms and the second is the function G in -Å-2.
  • -
-

You can specify what output files should be produced by setting the -outputtypes parameter in the configuration file or by -passing the -t, --outputtypes on the command line.

-

The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the --config option, -the PDFgetX3 will reproduce the previous calculation.

-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/genindex.html b/static_root/doc/pdfgetx/2.0.0/genindex.html deleted file mode 100644 index d60fb3b2..00000000 --- a/static_root/doc/pdfgetx/2.0.0/genindex.html +++ /dev/null @@ -1,668 +0,0 @@ - - - - - - - - Index — diffpy.pdfgetx 2.0.0 documentation - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - -

Index

- -
- Symbols - | A - | B - | C - | D - | E - | F - | G - | I - | L - | M - | O - | P - | Q - | R - | S - | T - | V - | W - -
-

Symbols

- - - -
- -

A

- - -
- -

B

- - - -
- -

C

- - - -
- -

D

- - - -
- -

E

- - - -
- -

F

- - - -
- -

G

- - -
- -

I

- - - -
- -

L

- - - -
- -

M

- - -
- -

O

- - - -
- -

P

- - - -
- -

Q

- - - -
- -

R

- - - -
- -

S

- - -
- -

T

- - - -
- -

V

- - -
- -

W

- - -
- - - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/index.html b/static_root/doc/pdfgetx/2.0.0/index.html deleted file mode 100644 index 7c5413e2..00000000 --- a/static_root/doc/pdfgetx/2.0.0/index.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - diffpy.pdfgetx — diffpy.pdfgetx 2.0.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/install.html b/static_root/doc/pdfgetx/2.0.0/install.html deleted file mode 100644 index 7d6f47bb..00000000 --- a/static_root/doc/pdfgetx/2.0.0/install.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - Installation — diffpy.pdfgetx 2.0.0 documentation - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Installation

-
-

Software requirements

-

This software is written in Python programming language, therefore -you must have Python 3.7, 3.6, 3.5, 3.4 or 2.7 installed. In addition, -the following third-party Python libraries are also required:

-
    -
  • setuptools - tools for installing Python packages
  • -
  • six - Python 2 and 3 compatibility library
  • -
  • NumPy - library for scientific computing with Python
  • -
  • matplotlib - Python plotting library
  • -
  • IPython - enhanced interactive Python shell
  • -
-

Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -Python Package Index -or using any Internet search engine.

-

Another more convenient option is to obtain one of the science-oriented -Python distributions such as -Anaconda Python, -Enthought Canopy or -PythonXY, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step.

-

On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command

-
sudo apt-get install \
-  python3-six python3-setuptools python3-numpy python3-matplotlib ipython3
-
-
-

This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above.

-

On Windows operating system, it may be necessary to add the -C:\Python37 directory and the scripts directory -C:\Python37\Scripts to the system PATH. -Some Python distributions already do so as a part of their -installation process. The easiest way to check is to start the -Command Prompt, type there python and see if this -starts the Python interpreter.

-
-
-

Installation

-

The diffpy.pdfgetx software is distributed as a Python egg package, -which can be obtained from the -Columbia Technology Ventures. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the egg file and -execute the following command:

-
python -m easy_install ./diffpy.pdfgetx-VERSION.egg
-
-
-

Here VERSION needs to be replaced to match the actual filename. -It is critical to use one of the supported Python versions otherwise -the program would not work. On Linux and Mac operating systems the -installation may need to run with root user privileges, for example, -by prepending sudo to the command line above. -If root access is not available, use the -easy_install options --user, --prefix or ---install-dir to install the software to a user-writable -directory.

-

This software provides two programs for PDF conversion, -pdfgetx3 and pdfgetn3. -To check if they are correctly installed run

-
pdfgetx3 --version
-pdfgetn3 --version
-
-
-

This should display the software version, which should equal -the VERSION string in the egg package name. -The installation also includes a plotdata -command for an easy plotting of text data files. To verify -if plotdata works, run the plotdata --version command. -Finally, a comprehensive test of the installed software can -be executed using

-
python -m diffpy.pdfgetx.tests.run
-
-
-
-
-

IPython magic command

-

These instructions are intended for IPython users who would like to -integrate PDFgetX3 and PDFgetN3 into their IPython environment. If -you don’t plan to customize IPython in such way you can safely skip -this paragraph.

-

When pdfgetx3 or pdfgetn3 are run in interactive mode, they start -IPython interactive shell and define an extra %pdfgetx3 and -%pdfgetn3 magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The %pdfgetx3 and %pdfgetn3 -magics can be thus used with the same options and arguments as if run -from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session.

-

The %pdfgetx3 and %pdfgetn3 magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up

-
    -
  1. find the profile_default/ipython_config.py file and open it -in a text editor. If that file does not exists, -create it first by executing

    -
    ipython profile create
    -
    -
    -
  2. -
  3. navigate to the paragraph that contains the -c.InteractiveShellApp.extensions and add there -the following line:

    -
    c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics']
    -
    -
    -

    There must be no leading indent, i.e., the text must start at the -very first column.

    -
  4. -
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/interact.html b/static_root/doc/pdfgetx/2.0.0/interact.html deleted file mode 100644 index 34ca6b3e..00000000 --- a/static_root/doc/pdfgetx/2.0.0/interact.html +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - Interactive mode — diffpy.pdfgetx 2.0.0 documentation - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Interactive mode

-

The interactive mode is activated by using either the --i, --interact option or a non-empty ---plot option. In the interactive mode -the program starts an IPython interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands %pdfgetx3 and %pdfgetn3, which can be used with -the same syntax as the pdfgetx3 and pdfgetn3 in -system shell. -The interactive session is also initialized with all functions from the -matplotlib.pyplot module for convenient plotting. -The functions and variables related to PDF processing are:

-
-
-pdfgetter(x=None, y=None, filename='', **kwargs)
-

Instance of the PDFGetter class which serves as a -low-level function that calculates the PDF. This is a callable -object, which takes as an argument a pair of input arrays for -(Q, intensity) or (2Θ, intensity) depending on -dataformat. It can be also called with a keyword -argument filename=FILE, which would read the input arrays -from the specified file. When called with no arguments, -it calculates PDF from the last input data.

- --- - - - - - -
Parameters:
    -
  • x (numpy.ndarray, optional) – -The Q or 2Θ values in powder diffraction pattern.
  • -
  • y (numpy.ndarray, optional) – -The scattered intensities in powder diffraction pattern
  • -
  • filename (str, optional) – -The text data file for loading the x, y values when -they are not specified.
  • -
  • kwargs (misc, optional) – -Extra keyword arguments that are applied to -the config object, for example qmax=20.
  • -
-
Returns:

A pair of output arrays (r, G).

-
-
- -
-
-config
-

Instance of the PDFConfig class that stores the -parameters and input files for the program. -Use print(config) to display the current configuration values. -This is the same object as pdfgetter.config. Configuration -may be changed by setting a respective attribute of the -config object, for example:

-
In [1]: config.qmax = 21
-
-
-

The config values may be also changed by calling the -pdfgetter() or processfiles() function with a -corresponding keyword argument, for example -processfiles(qmax=20, force="once").

-
- -
-
-iraw
-
-iq
-
-sq
-
-fq
-
-gr
-

These variables are assigned the input raw intensities and the -intermediate results, stored as matrix rows. The matrix rows -correspond to twotheta1, intensity1, twotheta2, intensity2, etc. -Because matrices are iterated row first, the raw intensities -from all input files can be plotted with the matplotlib plot -function as plot(*iraw).

-

These variables should be considered read-only and are reset -with subsequent PDF calculations.

-
- -
-
-tuneconfig(plotids=None, pdfgetter=None, axeslist=None)
-

Show a GUI dialog for interactive tuning of configuration variables.

- --- - - - -
Parameters:
    -
  • plotids – The string or iterable that specify what interactive plots should be -tuned. By default the same as config.plot. It can be also an -integer index or name of a transformation in pdfgetter() or -a reference to a Transformation object.
  • -
  • pdfgetter – The optional PDFGetter object to be tuned. -This is by default the interactive pdfgetter() object.
  • -
  • axeslist – An optional list of matplotlib Axes for showing interactive plots. -When None, use subplot(N, 1, i) to create any necessary axes.
  • -
-
-
-

Note

-

Changes from tuneconfig() apply only to the configuration -and results in memory. Use the processfiles() function -to save them to disk.

-
-
-

See also

-

Interactive tuning of parameters tutorial

-
-
- -
-
-processfiles(filename=None, **kwargs)
-

Process all input files again with the current configuration values. -This is a higher-level function than pdfgetter(), as -it also saves output files and produces plots as specified by the -config object.

- --- - - - -
Parameters:
    -
  • filename – One or more input files to be converted to PDFs and saved or -plotted according to the config settings. Use the -previous list of input files when not specified.
  • -
  • kwargs – An optional keyword arguments to set for the config -object, for example (force="once", qmax=18).
  • -
-
-

This function updates the config.inputfiles -list and the iraw, iq, -sq, fq and gr -interactive variables.

-
- -
-
-clearsession()
-

Clear all elements from the config.inputfiles -and also the -iraw, iq, sq, -fq and gr variables.

- --- - - - -
Returns:No return value.
-
- -
-
-loaddata(filename, minrows=10, usecols=None, **kwargs)
-

Find and load data from a text file.

-

The data reading starts at the first matrix block of at least minrows rows -and constant number of columns. This seems to work for most of the -datafiles including those generated by PDFGetX2.

- --- - - - - - -
Parameters:
    -
  • filename (str) – Name of the file to load the text data from.
  • -
  • minrows (int, optional) – Minimum number of rows in the first data block, by default 10. -All rows must have the same number of floating point values.
  • -
  • usecols (int, str, slice, iterable, optional) – Indices or names of the columns to be loaded from the data block, -the default is all columns. Data blocks that do not contain -sufficient number of columns are skipped. When usecols contain -string items, they are translated to column indices by looking -up a header line preceding the data block. String items formatted -as i:j:k are converted to slice objects. When usecols type -is string it is split to a list of names at comma and whitespace -characters.
  • -
  • unpack (bool, optional) – Return data as a sequence of columns that allows tuple unpacking -such as x, y = loaddata(FILENAME, unpack=True). Note that -transposing the loaded array as loaddata(FILENAME).T has -the same effect. The default is False.
  • -
  • kwargs (misc, optional) – Extra keyword arguments that are passed to numpy.loadtxt.
  • -
-
Returns:

data (numpy.ndarray) – The data block loaded from the text file.

-
-
-

See also

-

numpy.loadtxt()

-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
-
-plotdata(filenames, style=None, x=None, y=None, log=None, ax=None, **kwargs)
-

Plot one or more text data files.

-

The files are searched for data blocks which have enough columns -to satisfy both x and y selectors of the plotted data. This -may result in an empty plot when file has none wide-enough data -block (e.g., when y=100).

- --- - - - - - -
Parameters:
    -
  • filenames (str or an iterable of string file names) – One or more text data files to be plotted.
  • -
  • style (str) – Optional style argument for the matplotlib plot() function.
  • -
  • x (int, str, or iterable, optional) – The column to be used for the x data. This can be a zero-based -index of the desired column or a column name from data header. -A special symbol “.” can be used for a sequential data index. -When not specified, use the first column.
  • -
  • y (int, str, iterable, or slice, optional) – One or more columns to be used for the y data. This can be -a single zero-based index of the desired column or an iterable -of several indices. The y value can be also a string which -is split at commas and converted to integers, column names -or slice objects, e.g. “0,sine,4:7”. The slice instances -are applied to the entire data block from each loaded file. -Use the second column when not specified.
  • -
  • log ({‘x’, ‘y’}, optional) – Set logarithmic scaling for the specified axis and linear scaling -for all others. For example, log="y" applies linear scaling -to the x-axis and logarithmic to the y-axis. Keep the current -axis scaling when not specified.
  • -
  • ax (matplotlib.axes.Axes, optional) – The axes to plot to. The plotting will be performed using the -ax.plot method. The default is pyplot.gca().
  • -
  • kwargs (misc, optional) – Keyword arguments for the matplotlib plot() function.
  • -
-
Returns:

lines (list) – The matplotlib Line2D objects added to the current axis.

-
- -

This function can be imported from the -diffpy.pdfgetx.plotdata module.

-
- -
-
-findfiles(patterns=(), path='.', dotfiles=False)
-

Find files that match all specified patterns.

-

Pattern syntax:

-
    -
  • ^start - match “start” only at the beginning of the string.
  • -
  • end$ - match “end” only at the end of string.
  • -
  • <7> - match number 7 preceded by any number of leading zeros.
  • -
  • <1-34> - match an integer range from 1 to 34 inclusive.
  • -
  • <7-> - match an integer greater or equal 7.
  • -
  • <-> - match any integer.
  • -
  • + - start a new group of patterns to match more files.
  • -
  • dir/ - set search path effective from the current pattern group.
  • -
-

All integer ranges <N-M> above allow one or more leading zeros. -The range syntax does not support matching of negative numbers.

- --- - - - - - -
Parameters:
    -
  • patterns (iterable of strings or str, optional) – String patterns that must all match in returned filenames. -Can be also a single string with patterns separated by -whitespace characters. When empty match all files in the -current directory or in the path. A single + starts -a new pattern group for additional matches. Each pattern -group may have one entry containing /, for example, -dir/ or ./, which sets the search directory for -this and subsequent pattern groups. When pattern group -contains only the path entry it reuses file patterns from -the previous group.
  • -
  • path (str, optional) – Directory to be searched for the files. The default is “.” -to search the current directory.
  • -
  • dotfiles (bool, optional) – When True search also the hidden “.” starting files. These -files are by default ignored, but can be explicitly selected -by adding the ^. pattern.
  • -
-
Returns:

filenames (list) – The list of matching filenames. Return all files when -patterns are not specified.

-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/intro.html b/static_root/doc/pdfgetx/2.0.0/intro.html deleted file mode 100644 index 053460b9..00000000 --- a/static_root/doc/pdfgetx/2.0.0/intro.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - Introduction — diffpy.pdfgetx 2.0.0 documentation - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Introduction

-

diffpy.pdfgetx is a simple yet powerful software for converting X-ray -or neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). The software includes command line programs PDFgetX3 and -PDFgetN3 for processing X-ray and constant-wavelength neutron -diffraction data respectively. PDFgetX3 and PDFgetN3 can be used in -a batch mode to convert a series of data files without user -intervention. The programs can be also run in an interactive -mode that allows to control process parameters and plot the PDFs -and any intermediate results. Users can interactively tune the -PDF processing parameters, visualize their effect on the results and -adjust them to their optimum values. The programs are bundled with -Python library diffpy.pdfgetx for PDF processing functions, which -can be used in custom Python scripts.

-
-

License notice

-

Use of this software is subject to and permitted only under a separate, -written Use License granted by Columbia University. If you or your employer -is not a party to such an agreement, then your use of this software is -prohibited. If you don’t know whether or not your anticipated use is under -a license, you must contact Prof. Simon Billinge at sb2896@columbia.edu. -Use of this software without a license is prohibited.

-

Copyright 2009-2018, Trustees of Columbia University in the City of New York.

-

For more information please email Prof. Simon Billinge at sb2896@columbia.edu

-
-
-

Authors

-

This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Christopher Wright, -Christopher Farrow, -Simon Billinge.

-
-
-

References

-

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:

-
-
P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge -PDFgetX3: A rapid and highly automatable program for processing -powder diffraction data into total scattering pair distribution -functions, -J. Appl. Crystallogr. 46, 560-566 (2013)
-

For research publications that use this software to process neutron -diffraction data we ask you to also cite:

-
-
P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, -S. J. L. Billinge -PDFgetN3: atomic pair distribution functions from neutron -powder diffraction data using ad hoc corrections, -J. Appl. Crystallogr. 51 (2018)
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/objects.inv b/static_root/doc/pdfgetx/2.0.0/objects.inv deleted file mode 100644 index 229c25ae..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/objects.inv and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/options.html b/static_root/doc/pdfgetx/2.0.0/options.html deleted file mode 100644 index e9b19fce..00000000 --- a/static_root/doc/pdfgetx/2.0.0/options.html +++ /dev/null @@ -1,647 +0,0 @@ - - - - - - - Options and parameters — diffpy.pdfgetx 2.0.0 documentation - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Options and parameters

-

PDFgetX3 and PDFgetN3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program.

-
-

Note

-

The command line options start with a leading “-” and can -be only used as command line arguments when starting the -pdfgetx3 program. Within configuration file the parameter -names are plain words without any leading dashes. Finally, -parameters can be also set in the interactive mode as attributes of -the config object, but the assignments must be valid -Python statements. Here are examples of setting composition of -a processed specimen using each of these forms:

-
    -
  1. assigned in configuration file:

    -
    ...
    -composition = CaTiO3
    -...
    -
    -
    -
  2. -
  3. set as a command-line option when starting pdfgetx3 or -pdfgetn3:

    -
    pdfgetx3 --composition=CaTiO3
    -
    -
    -
  4. -
  5. set in the IPython interactive mode:

    -
    pdfgetx3 -i
    -...
    -In [1]: config.composition = "CaTiO3"
    -
    -
    -
  6. -
-
-
-

Program operation

-
-
--h, --help
-

Display a brief usage information with a list of command line options -and exit.

-
- -
-
--V, --version
-

Display the program version and exit.

-
- -
-
---manual
-

Open this manual in a Web browser and exit.

-
- -
-
--f, --find
-
- -
-

Select input files that match all patterns. The command -line arguments are by default taken as input files. However, -with the --find option they are processed as -file patterns and the matching files are then used as inputs. -The input files are by default searched in the current directory -unless there is a path entry (e.g., data/) that -selects a different search path. The search patterns are -interpreted as fixed strings, all of which must be present -in the file name. A single argument + starts -a new group of patterns to match more files that are not -covered by one set of patterns. Additional pattern -groups reuse the current search path unless they provide -their own path value. Pattern groups containing only -a path entry reuse file patterns from the last group. -When pattern groups overlap the repeated matches are ignored -to make the resulting list of files unique. Files starting -with . are ignored unless there is ^. pattern -that explicitly matches them. The search -syntax provides the following special patterns:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
^match at the beginning of the string, i.e., ^start -matches only filenames that start with “start”.
$match at the end of string, for example, .chi$ selects -file names ending with “.chi”. A $ on its own -matches every string and can be used to select all files.
<N>match number N preceded by any number of leading zeros, -e.g., <7> would match in “f7.chi”, “f007.chi”, but not -in “f77.chi”.
<N-M>match an integer range from N to M inclusive. -The matched number may have one or more leading zeros.
<7->match number 7 or larger.
<-7>match number 7 or smaller.
<->match any integer number.
+start a new pattern group, for example, .chi$ + .dat$
/set search path. An argument containing the / symbol -is taken as the search path, for example, data/ or -./. Each pattern group may provide its own search -path effective for that and any subsequent pattern group.
-

The ^$<> characters are often special to Unix or Windows -command shells, therefore they need to be enclosed in double -quotes (") when used on command line.

-
-

See also

-

tutorial on matching input files

-
-
-
-
--l, --list
-

List all input files and exit. This is useful with the ---find option to verify if input files -are matched as intended.

-
- -
-
-

Configuration file options

-
-
--c CONFIG, --config=CONFIG
-

Read custom configuration file after loading the default ones. -Do not load any configuration file when “NONE”.

-
- -
-
--s NAME, --section=NAME
-

Load the custom configuration file section [SectionName] after -loading the [DEFAULT] section. This is useful for creating -several configuration variants in a single configuration file.

-
- -
-
---createconfig=FILE
-

Write template configuration to a new FILE and exit. Write -to the standard output when FILE is “-“.

-
- -

See also the configuration file section -for further details.

-
-
-

Input and output options

-
-
-inputfile
-

This parameter allows to specify one or more input files in the -configuration file, one file per line. The inputfile -is only used if no input files were provided on the -pdfgetx3 or pdfgetn3 command line.

-
- -
-
-dataformat
-
- -
-
---format=FORMAT
-

Format of input files. Available formats are: twotheta, QA, -Qnm corresponding to a two-column text data where the first -column is either the scattering angle 2Θ in degrees, Q in -inverse ångströms or Q in inverse nanometers.

-
- -
-
-backgroundfile
-
- -
-
--b FILE, --background=FILE
-

Optional datafile with background intensities from an empty sample -holder. It must be in the same dataformat as other input files.

-
- -
-
-datapath
-
- -
-
--d DATAPATH, --datapath=DATAPATH
-

One or more extra directories to be searched for input or -background data files. The -d option can be specified -several times to add more directories, these are prepended in front -of any default value. Within configuration file the datapath -directories have to be listed each on a separate line.

-

A special value “NONE” (or “none”) clears any previously defined -paths and only the further paths, if any, would be searched for -inputs.

-
- -
-
-output
-
- -
-
--o OUTPUT, --output=OUTPUT
-

Output file name, write to the standard output when “-“. The --t, --outputtypes option controls what results are -being saved. Normally the OUTPUT is used as a custom basename for -the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o -tokens, which are expanded as follows:

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
tokenexampledefinition
@hdir1/dir2the input file directory or “.”
@rdir1/dir2/filenamethe input path with extension removed
@edatthe input file extension without “.”
@tfilename.datthe tail component of the input file
@bfilenamethe tail component with extension removed
@ogrthe output extension iq, sq, fq or gr
-

An empty value works the same as “@b.@o” and saves the data -in the current directory with a proper extension for the -saved results. When “@o” is not present in the OUTPUT, it is -appended as a default filename extension.

-
- -
-
-outputtypes
-
- -
-
--t TYPES, --outputtypes=TYPES
-

Result types to be saved, one or more comma separated values. -Supported values are “iq”, “sq”, “fq”, “gr”, corresponding to the -I(Q), S(Q), F(Q) and G(r) curves; these are also used as output -file extensions.

-

Result files are not written when empty, “none” or “NONE”.

-
- -
-
-force
-
- -
-
---force=FORCE
-

Overwrite existing output files. By default the output -files are not written if they already exist. Possible values -in a configuration file are “true”, “yes”, “on”, “1” or -“false”, “no”, “off”, “0” or “once”. The special value “once” -permits one overwrite and then resets config.force to -False. Note that in interactive mode the values assigned -to config.force are converted to Python bool -unless equal to “once”.

-
- -
-
-

PDF parameters

-
-
-mode
-
- -
-
---mode=STRING
-

The PDF conversion mode, i.e., the name of the -pdfgetter() setup. The available modes correspond -to the radiation type used in powder diffraction experiment and can -be “xray” or “neutron”.

-
- -
-
-wavelength
-
- -
-
--w FLOAT, --wavelength=FLOAT
-

X-ray wavelength in ångströms. This value is required -for the “twotheta” dataformat in order to convert the scattering -angles 2Θ to a momentum transfer Q. For other data formats -the wavelength is not necessary and may be left undefined.

-
- -
-
-twothetazero
-
- -
-
---twothetazero=FLOAT
-

Position of the zero scattering angle in diffractometer degrees. -This parameter corrects for a constant offset in the -measured 2Θ values. When loading configuration file -it is assumed 0 unless specified otherwise. This parameter -is only effective for the “twotheta” dataformat.

-
- -
-
-composition
-
- -
-
---composition=STRING
-

Chemical composition of the sample. Supported formats are -“PbTi0.5Zr0.5O3”, “Pb 1 Ti 1/2 Zr 1/2 O 3” or “CH3 (CH2)3 OH”. -Space characters are ignored, unit counts can be omitted, but it is -important to use a proper upper and lower case in atom symbols. -Elements can appear several times in the formula, e.g., “CH3 CH3”, -and the formula may contain parentheses or fractional -stoichiometries.

-
- -
-
-bgscale
-
- -
-
---bgscale=FLOAT
-

Scaling of the background intensities loaded from the -backgroundfile, by default 1.

-
- -
-
-rpoly
-
- -
-
---rpoly=FLOAT
-

r-limit for the maximum frequency in the F(Q) correction polynomial. -The PDF is unreliable at shorter r, however a -very small rpoly would disable polynomial correction and -give noisy PDF. -Larger values produce closer fits with a higher degree polynomial, -but when too large, they might smooth-out a useful signal in the -data. The default is 0.9.

-
- -
-
-qmaxinst
-
- -
-
---qmaxinst
-

The Q cutoff for the meaningful input intensities in inverse -ångströms. Some data files may contain trailing zeros -or unreliable intensities at the upper bound of the detector range. -The qmaxinst defines a threshold for unreliable data. -The parameter is also used as an upper boundary for the polynomial -fit correction of the S(Q) data.

-
- -
-
-qmin
-
- -
-
---qmin
-

The lower Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms.

-
- -
-
-qmax
-
- -
-
---qmax
-

The upper Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms. This is essentially a limit, where sample -signal decays to the level of data noise.

-
- -
-
-rmin
-
- -
-
---rmin=FLOAT
-

Lower bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rmax
-
- -
-
---rmax=FLOAT
-

Upper bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rstep
-
- -
-
---rstep=FLOAT
-

Spacing of the r-grid for the calculated PDF in ångströms.

-
- -
-
-

Other parameters

-
-
-plot
-
- -
-
--p TYPES, --plot=TYPES
-

Plot the specified results. A comma separated list with one or -more items from “iq”, “sq”, “fq”, “gr”. No plot is produced when -empty, “none” or “NONE”. Setting this option turns on the -interactive mode.

-
- -
-
-interact
-
- -
-
--i, --interact
-

Start an IPython interactive session after processing all files. -Useful for tuning the configuration parameters or interactive -plotting. This is always on when plot option has been set. -See also Interactive mode for further details.

-
- -
-
-verbose
-
- -
-
---verbose=VALUE
-

Level of detail for the program to report about its actions. -Possible values are “error”, “warning”, “info”, “debug”, “all” or an -integer number from 0 to 5. Messages are completely suppressed when -0, all messages are printed when verbose is 5 (“all”) or higher. -This option is useful for diagnostics of any unexpected behavior -in the program.

-
- -
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/pdfgetxn3-examples.zip b/static_root/doc/pdfgetx/2.0.0/pdfgetxn3-examples.zip deleted file mode 100644 index 29e09af7..00000000 Binary files a/static_root/doc/pdfgetx/2.0.0/pdfgetxn3-examples.zip and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.0.0/plotdata.html b/static_root/doc/pdfgetx/2.0.0/plotdata.html deleted file mode 100644 index 3e982ddc..00000000 --- a/static_root/doc/pdfgetx/2.0.0/plotdata.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - The plotdata program — diffpy.pdfgetx 2.0.0 documentation - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

The plotdata program

-

The PDFgetX3 software includes a simple stand-alone utility -plotdata for plotting text data files. In most cases -this program can be invoked from a command-shell as

-
plotdata file1.dat file2.dat
-
-
-

which plots the numerical data from the text files file1.dat, -file2.dat together in a single graph. By default the first -column is used as an x variable and the second column is used for the -y values. After displaying the plot the program starts an IPython -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the filenames variable -containing a list of plotted files. It also pre-loads the -plotdata() and findfiles() functions just as in PDFgetX3 -interactive session. The plotdata() -function works in a similar way as the plotdata program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -plotdata() function would be:

-
In [1]: plotdata(['file1.dat', 'file2.dat'])
-
-
-
-

Selecting files

-

The plotdata program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as *.dat. The file search feature is controlled by the -following options:

-
-
--f, --find
-

Use command line arguments as filename patterns and plot all matching -files. This option works in the same way as for -pdfgetx3, for full details see the -pdfgetx3 --find documentation. Note that -within command line the special patterns ^$<> need to be quoted -in double quotes (") so they are not processed by command shell.

-
- -
-
--l, --list
-

List the input files and exit. This is useful in conjunction -with the -f, --find option to check if data files -are selected as intended.

-
- -

Assuming the current directory contains 20 files named -file1.dat, file2.dat, …, file20.dat, -the plotting of files 9 to 13 could be done (with a check listing) -as follows

-
$ plotdata -fl "<9-13>.dat"
-file9.dat
-file10.dat
-file11.dat
-file12.dat
-file13.dat
-$ plotdata -f "<9-13>.dat"
-
-
-

Within an interactive IPython session the equivalent plot could be -produced by combining the plotdata() and findfiles() functions as

-
In [1]: plotdata(findfiles("<9-13>.dat"))
-
-
-
-
-

Selecting x and y data

-

The plotdata program provides several ways of selecting -columns for x or y data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is “0” -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function):

-
-
--x X
-

index or name of the x-column to plot. See the -y option -for the supported syntax, but note that X may select only one -column. When set to “.” use the data-row index for x.

-
- -
-
--y Y
-

index or name of the y-column or columns to plot. The Y column -specification can be a comma separated list of indices, column names -or Python-like ranges, for example “1,2”, “G”, “1:4” (START:STOP, -same as “1,2,3”), “1:4:2” (START:STOP:STEP, same as “1,3”), or -“-2:” (same as “-2,-1”, i.e, the last 2 columns). Because column -indexing starts at “0” the second column must be specified as “1”.

-

The column names work if the data section in the file is preceded by -a headline of unique column names, for example:

-
x     square      cube
-1     1           1
-2     4           8
-3     9           27
-4     16          64
-
-
-

For such data file the plotdata program will recognize column names -“x”, “square” and “cube” and an implicit “.” for row index.

-
- -
-
--s STYLE, --style=STYLE
-

optional plot format specification. See the -matplotlib.pyplot.plot() function -for a list of available formats.

-
- -
-
--L LOG, --log=LOG
-

axes to be plotted with logarithmic scaling, for example, “x”, “y” or -“xy”. Axes not listed in LOG will use linear scaling.

-
- -
-
--h, --help
-

display a brief usage info and exit.

-
- -
-
--V, --version
-

show program version and exit.

-
- -
-
---manual
-

Open this manual page in a Web browser and exit.

-
- -
-
-

Examples

-

The examples directory plotdata contains a sincos.dat -file that has 3-columns of values labeled as “x”, “sin” and “cos”. -Here are several examples of the plotdata capabilities -when used from command line - the user is encouraged to try them out:

-
plotdata sincos.dat
-plotdata -y 1,2 sincos.dat
-plotdata -x . -y 0:3 sincos.dat
-plotdata -y cos sincos.dat
-plotdata -x sin -y cos -sr-- sincos.dat
-
-
-

An equivalent usage from a general IPython session would be:

-
ipython --matplotlib=auto
-In [1]: from diffpy.pdfgetx.plotdata import plotdata
-In [2]: plotdata('sincos.dat')
-In [3]: plotdata('sincos.dat', y=[1,2])
-In [4]: plotdata('sincos.dat', x='.', y=':3')
-In [5]: plotdata('sincos.dat', y='cos')
-In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--')
-
-
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/quick-start.html b/static_root/doc/pdfgetx/2.0.0/quick-start.html deleted file mode 100644 index b2fefe30..00000000 --- a/static_root/doc/pdfgetx/2.0.0/quick-start.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - Quick-start guide — diffpy.pdfgetx 2.0.0 documentation - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Quick-start guide

-

This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3 and PDFgetN3 can be executed by -typing pdfgetx3 or pdfgetn3 in a shell -window. Please, refer to the installation section -if this is not working yet.

-
-

pdfgetx3 command

-

The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as

-
pdfgetx3 [options] input1 input2 ... inputN
-
-
-

The inputN stands for an input powder diffraction data. The -inputN file is a simple two-column text file, where the first -column corresponds to either the 2Θ diffraction angle, or a -momentum transfer, Q, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -FIT2D program using -its “chi” output format, thus we will also refer to them as “chi-files”. -A typical content of a “chi” file looks as folows:

-
Pt_bulk-00055.tif: 2-theta Scan
-2-Theta Angle (Degrees)
-
-       1465
- 2.0003892E-02  0.0000000E+00
- 6.0011677E-02  0.0000000E+00
- 1.0001946E-01  0.0000000E+00
- 1.4002724E-01  0.0000000E+00
- 1.8003502E-01  0.0000000E+00
- ...
-
-
-

The command-line options are arguments that start with a dash “-” and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash --. Options may require values. For short options, -the value may be joined to the option string, for example --w0.142774, while for the long options it has to be separated -with an equal sign, e.g., --wavelength=0.142774. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the Options and parameters section of -this manual. A brief summary of options can be also displayed by -executing

-
pdfgetx3 --help
-
-
-

The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the Tutorial. -In general, the first step is to create a commented configuration file -pdfgetx3.cfg using:

-
pdfgetx3 --createconfig=pdfgetx3.cfg
-
-
-

The configuration file can have any name, but it is preferable -to use either pdfgetx3.cfg or .pdfgetx3.cfg, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the -c, --config option.

-

Open the pdfgetx3.cfg file in a text editor. The lines that -start with a hash mark # are comments and are not used. The lines -starting with a right brace [ denote sections in the configuration -file. The active lines are all formatted as -“NAME=VALUE”. Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation:

-
    -
  • dataformat – specifies the input data format
  • -
  • wavelength – radiation wavelength in Å required for the -“twotheta” format.
  • -
  • composition – chemical composition of the sample
  • -
  • qmaxinst – upper Q boundary for a meaningful measurement -intensities.
  • -
  • qmaxQ-cutoff for the Fourier transformation that -yields the PDF.
  • -
-

Save the updated configuration file and run pdfgetx3 on the input data -FILENAME.chi as

-
pdfgetx3 --verbose=info -t gr FILENAME.chi
-
-
-

Here the --verbose=info option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The -t gr option -tells the program to save the final G(r) curve as a -FILENAME.gr file in the working directory.

-

The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation

-
pdfgetx3 -c FILENAME.gr --plot=fq,gr
-
-
-

Note this command does not include any .chi file and this will as -a result process the previously used input FILENAME.chi. -The --plot=fq,gr option tells PDFgetX3 to -display 2 plots for the reduced structure function F(Q) and the -final PDF G(r). The --plot option also implies an -interactive mode -therefore the program does not exit, but starts an -interactive IPython session. To exit the interactive mode, -type exit() and press Enter.

-
-
-

pdfgetn3 command

-

The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the ---mode option. Running pdfgetn3 is nearly identical -to executing pdfgetx3 --mode=neutron. The only difference between -these commands is that pdfgetx3 checks for configuration files -pdfgetx3.cfg and .pdfgetx3.cfg, whereas -pdfgetn3 looks for pdfgetn3.cfg and .pdfgetn3.cfg.

-

Please refer to the tutorial section for -a step-by step processing of the example data files and for -demonstration of capabilities in PDFgetX3 and PDFgetN3.

-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/release.html b/static_root/doc/pdfgetx/2.0.0/release.html deleted file mode 100644 index 9242c97b..00000000 --- a/static_root/doc/pdfgetx/2.0.0/release.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - Release notes — diffpy.pdfgetx 2.0.0 documentation - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Release notes

-
-

Version 2.0.0 – 2018-11-02

-
-

Added

-
    -
  • New mode neutron for processing constant-wavelength -neutron scattering data.
  • -
  • Correction for an offset of diffractometer zero angle.
  • -
  • Configuration parameter twothetazero and command-line option ---twothetazero for position of the actual zero angle -in diffractometer degrees.
  • -
  • New program pdfgetn3 and IPython magic %pdfgetn3.
  • -
  • Separate configuration file pdfgetn3.cfg for the pdfgetn3 program.
  • -
  • New sub-package diffpy.pdfgetx.apps for entry points to all programs.
  • -
  • The + operator for additive pattern groups when matching input files -with pdfgetx3 --find.
  • -
  • An optional slash-containing entry, e.g., dir/, to set the search path -for pdfgetx3 --find. Each pattern group may have one path entry which -affects the current and subsequent pattern groups. Pattern groups that -have only the path entry reuse the previous file patterns, for example, -dir1/ .dat$ + dir2/ + dir3/.
  • -
  • The dotfiles flag argument to functs.findfiles to also find -dot-starting files without an explicit pattern.
  • -
  • Support for Python 3.7.
  • -
  • Tutorial examples for constant-wavelength neutron diffraction data.
  • -
-
-
-

Changed

-
    -
  • Initialization arguments of PDFConfig to set initial configuration values.
  • -
  • path argument of functs.findfiles to give one search path instead -of a list of paths.
  • -
  • pdfgetx3 --find to search only the current directory and stop searching -in --datapath.
  • -
  • Improved PDF accuracy by removing repeated Q-grid interpolation.
  • -
  • Handling of dot files by pdfgetx3 --find and the functs.findfiles -function. The dotfiles are by default ignored unless explicitly selected -by a "^." pattern.
  • -
  • Return type of functs.findfiles from IPython SList to a simple list.
  • -
  • Rename camel case interactive functions to lowercase, i.e., to loaddata, -processfiles, clearsession.
  • -
  • Use config.datapath lookup in processfiles(filename).
  • -
-
-
-

Deprecated

-
    -
  • IPython extension module diffpy.pdfgetx.ipy_pdfgetx3. -Use diffpy.pdfgetx.ipy_magics instead.
  • -
  • Camel case functions loadData, processFiles, clearSession.
  • -
-
-
-

Removed

-
    -
  • Support for Python 2.6.
  • -
  • Processing of environment variable PDFGETX3PATH.
  • -
  • Support for IPython 0.x.
  • -
  • Obsolete variable __gitsha__ from the version module.
  • -
  • Processing of command line options in PDFConfig class.
  • -
  • Implicit loading of configuration files in PDFConfig instantiation.
  • -
-
-
-

Fixed

-
    -
  • Import of all objects from matplotlib.pyplot into -an interactive session started by plotdata.
  • -
  • Inaccurate G interpolation when rstep is comparable to pi / qmax.
  • -
  • Lone anchor patterns ^, $ to match everything.
  • -
-
-
-
-

Version 1.2 – 2018-01-12

-
-

Added

-
    -
  • Support for Python 3.4, 3.5, 3.6 in addition to Python 2.6 and 2.7.
  • -
  • Support for IPython 5.0 with preserved -compatibility with IPython 0.10 and later.
  • -
  • Support for matplotlib 2.0.
  • -
  • New option --log=LOG for the plotdata program to set logarithmic -scale for either of x or y axis. The plotdata() function learnt -a new log argument with the same purpose.
  • -
  • New argument ax for the plotdata() function that select a specific -matplotlib axis for plotting.
  • -
  • Support for Unicode filenames and values in the config -interactive variable.
  • -
  • Processing of parentheses and fractional stoichiometries in chemical -formulas as in Pb (Ti Zr)1/2 O3.
  • -
  • Explanatory error message when PDFgetX3 was installed for -unsupported Python.
  • -
-
-
-

Changed

-
    -
  • The egg package file was enhanced to support all Python -versions. The software is now distributed in a single -egg rather than multiple eggs per each Python version.
  • -
  • PDFgetX3 option --force to take a boolean argument -(yes, no, true, etc.) or once. The configuration -parameter force can be likewise set to a bool or to -a string "once". This enables a safer one-time -overwrite of existing output files.
  • -
  • Plot labels to use a proper Unicode “Å” (Ångström) symbols. -The “Å” symbol is also used within units in output files.
  • -
  • The usecols argument of the loadData() function to also -accept scalars, open-end slice objects and string-denoted -slices such as "1:3" or "1:".
  • -
  • The plotdata program and plotdata() function to accept -open-end slices for the y-columns selection.
  • -
  • The IPython magic function %pdfgetx3 to set the _exit_code -variable as do generic shell commands run from IPython.
  • -
  • Inline documentation to use NumPy-style Napoleon format, -which is human readable and can be included in the manual.
  • -
  • Release scripts to build software package bundles and -documentation in binary-reproducible way.
  • -
-
-
-

Deprecated

-
    -
  • Compatibility with Python 2.6.
  • -
  • Support for IPython 0.x.
  • -
  • Variable __gitsha__ in the version module which was renamed -to __git_commit__.
  • -
-
-
-

Removed

-
    -
  • The hold argument of the plotdata() function, -because it was deprecated in matplotlib.
  • -
  • Support for multiple x-columns in plotdata program and -plotdata() function.
  • -
  • Import of all objects from numpy module into the interactive -session. NumPy is available under the np name instead.
  • -
-
-
-

Fixed

-
    -
  • Avoid duplicate “.gr.gr” extension when pdfgetx3 is run -with option --output=f.gr.
  • -
  • Crash on loading custom configuration section from a local -file, when that section is missing in global configuration.
  • -
  • Missing checkbox in the tuneconfig() dialog caused by -matplotlib bug.
  • -
-
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/search.html b/static_root/doc/pdfgetx/2.0.0/search.html deleted file mode 100644 index cf363fbe..00000000 --- a/static_root/doc/pdfgetx/2.0.0/search.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - Search — diffpy.pdfgetx 2.0.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -

Search

-
- -

- Please activate JavaScript to enable the search - functionality. -

-
-

- From here you can search these documents. Enter your search - words into the box below and click "search". Note that the search - function will automatically search for all of the words. Pages - containing fewer words won't appear in the result list. -

-
- - - -
- -
- -
- -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/searchindex.js b/static_root/doc/pdfgetx/2.0.0/searchindex.js deleted file mode 100644 index 530cb9f1..00000000 --- a/static_root/doc/pdfgetx/2.0.0/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({docnames:["files","index","install","interact","intro","options","plotdata","quick-start","release","tutorial"],envversion:54,filenames:["files.rst","index.rst","install.rst","interact.rst","intro.rst","options.rst","plotdata.rst","quick-start.rst","release.rst","tutorial.rst"],objects:{"":{backgroundfile:[5,1,1,"-"],bgscale:[5,1,1,"-"],composition:[5,1,1,"-"],config:[3,2,1,"-"],dataformat:[5,1,1,"-"],datapath:[5,1,1,"-"],force:[5,1,1,"-"],fq:[3,2,1,"-"],gr:[3,2,1,"-"],inputfile:[5,1,1,"-"],interact:[5,1,1,"-"],iq:[3,2,1,"-"],iraw:[3,2,1,"-"],mode:[5,1,1,"-"],output:[5,1,1,"-"],outputtypes:[5,1,1,"-"],plot:[5,1,1,"-"],qmax:[5,1,1,"-"],qmaxinst:[5,1,1,"-"],qmin:[5,1,1,"-"],rmax:[5,1,1,"-"],rmin:[5,1,1,"-"],rpoly:[5,1,1,"-"],rstep:[5,1,1,"-"],sq:[3,2,1,"-"],twothetazero:[5,1,1,"-"],verbose:[5,1,1,"-"],wavelength:[5,1,1,"-"]},"diffpy.pdfgetx":{findfiles:[3,0,1,""],loaddata:[3,0,1,""]},"diffpy.pdfgetx.plotdata":{plotdata:[3,0,1,""]},_interactive_:{clearsession:[3,0,1,""],pdfgetter:[3,0,1,""],processfiles:[3,0,1,""],tuneconfig:[3,0,1,""]},pdfgetx3:{"--background":[5,3,1,"cmdoption-pdfgetx3-b"],"--bgscale":[5,3,1,"cmdoption-pdfgetx3-bgscale"],"--composition":[5,3,1,"cmdoption-pdfgetx3-composition"],"--config":[5,3,1,"cmdoption-pdfgetx3-c"],"--createconfig":[5,3,1,"cmdoption-pdfgetx3-createconfig"],"--datapath":[5,3,1,"cmdoption-pdfgetx3-d"],"--find":[5,3,1,"cmdoption-pdfgetx3-f"],"--force":[5,3,1,"cmdoption-pdfgetx3-force"],"--format":[5,3,1,"cmdoption-pdfgetx3-format"],"--help":[5,3,1,"cmdoption-pdfgetx3-h"],"--interact":[5,3,1,"cmdoption-pdfgetx3-i"],"--list":[5,3,1,"cmdoption-pdfgetx3-l"],"--manual":[5,3,1,"cmdoption-pdfgetx3-manual"],"--mode":[5,3,1,"cmdoption-pdfgetx3-mode"],"--output":[5,3,1,"cmdoption-pdfgetx3-o"],"--outputtypes":[5,3,1,"cmdoption-pdfgetx3-t"],"--plot":[5,3,1,"cmdoption-pdfgetx3-p"],"--qmax":[5,3,1,"cmdoption-pdfgetx3-qmax"],"--qmaxinst":[5,3,1,"cmdoption-pdfgetx3-qmaxinst"],"--qmin":[5,3,1,"cmdoption-pdfgetx3-qmin"],"--rmax":[5,3,1,"cmdoption-pdfgetx3-rmax"],"--rmin":[5,3,1,"cmdoption-pdfgetx3-rmin"],"--rpoly":[5,3,1,"cmdoption-pdfgetx3-rpoly"],"--rstep":[5,3,1,"cmdoption-pdfgetx3-rstep"],"--section":[5,3,1,"cmdoption-pdfgetx3-s"],"--twothetazero":[5,3,1,"cmdoption-pdfgetx3-twothetazero"],"--verbose":[5,3,1,"cmdoption-pdfgetx3-verbose"],"--version":[5,3,1,"cmdoption-pdfgetx3-v"],"--wavelength":[5,3,1,"cmdoption-pdfgetx3-w"],"-V":[5,3,1,"cmdoption-pdfgetx3-v"],"-b":[5,3,1,"cmdoption-pdfgetx3-b"],"-c":[5,3,1,"cmdoption-pdfgetx3-c"],"-d":[5,3,1,"cmdoption-pdfgetx3-d"],"-f":[5,3,1,"cmdoption-pdfgetx3-f"],"-h":[5,3,1,"cmdoption-pdfgetx3-h"],"-i":[5,3,1,"cmdoption-pdfgetx3-i"],"-l":[5,3,1,"cmdoption-pdfgetx3-l"],"-o":[5,3,1,"cmdoption-pdfgetx3-o"],"-p":[5,3,1,"cmdoption-pdfgetx3-p"],"-s":[5,3,1,"cmdoption-pdfgetx3-s"],"-t":[5,3,1,"cmdoption-pdfgetx3-t"],"-w":[5,3,1,"cmdoption-pdfgetx3-w"]},plotdata:{"--find":[6,3,1,"cmdoption-plotdata-f"],"--help":[6,3,1,"cmdoption-plotdata-h"],"--list":[6,3,1,"cmdoption-plotdata-l"],"--log":[6,3,1,"cmdoption-plotdata-log"],"--manual":[6,3,1,"cmdoption-plotdata-manual"],"--style":[6,3,1,"cmdoption-plotdata-s"],"--version":[6,3,1,"cmdoption-plotdata-v"],"-L":[6,3,1,"cmdoption-plotdata-log"],"-V":[6,3,1,"cmdoption-plotdata-v"],"-f":[6,3,1,"cmdoption-plotdata-f"],"-h":[6,3,1,"cmdoption-plotdata-h"],"-l":[6,3,1,"cmdoption-plotdata-l"],"-s":[6,3,1,"cmdoption-plotdata-s"],"-x":[6,3,1,"cmdoption-plotdata-x"],"-y":[6,3,1,"cmdoption-plotdata-y"]}},objnames:{"0":["py","function","Python function"],"1":["std","confval","configuration value"],"2":["std","interactvar","interactive variable"],"3":["std","cmdoption","program option"]},objtypes:{"0":"py:function","1":"std:confval","2":"std:interactvar","3":"std:cmdoption"},terms:{"0000000e":7,"0001946e":7,"0003892e":7,"0011677e":7,"00903_qmax18":9,"0x3e20f50":9,"4002724e":7,"5o3":5,"5zr0":5,"6id":9,"8003502e":7,"\u00e5ngstr\u00f6m":[0,5,7,8],"\u03b1":9,"boolean":8,"break":9,"case":[5,6,8,9],"class":[3,8],"default":[0,3,5,6,8,9],"final":[2,5,7,9],"float":[3,5],"function":[0,3,4,6,7,8,9],"import":[3,5,6,8,9],"int":3,"juh\u00e1":4,"long":[0,7],"new":[3,4,5,8,9],"public":4,"return":[3,8],"short":7,"true":[3,5,8,9],"try":[6,9],"while":[0,2,7,9],Axes:[3,6],For:[2,3,4,5,6,7,9],One:[3,5,9],Such:9,The:[0,1,2,3,4,5,7,8,9],There:[2,9],These:[2,3],Use:[3,4,6,8,9],Useful:5,With:9,__git_commit__:8,__gitsha__:8,_exit_cod:8,_qmax18:9,abbrevi:9,abil:9,about:[5,7,9],abov:[2,3,9],accept:[0,8,9],access:[0,2],accomplish:[2,9],accord:3,accur:9,accuraci:8,acknowledg:4,action:[5,9],activ:[0,3,7,9],actual:[0,2,8],add:[2,5,9],added:3,adding:3,addit:[0,2,3,5,8,9],adjust:[4,9],advanc:9,affect:[8,9],after:[0,5,6,9],again:[3,9],agreement:4,al2o3:9,all:[0,2,3,5,6,7,8,9],allow:[3,4,5,6,9],alon:6,alreadi:[2,5,9],also:[0,2,3,4,5,6,7,8,9],although:7,alwai:5,anaconda:[2,9],anchor:8,angl:[0,5,7,8,9],angular:9,ani:[0,2,3,4,5,7,9],anoth:[2,9],anticip:4,anywher:9,apart:7,app:8,appear:[5,9],append:5,appl:4,appli:[0,3,9],applic:7,approxim:9,apt:2,arbitrari:9,area:9,argument:[0,2,3,5,6,7,8,9],arrai:3,ask:4,assess:9,assign:[3,5,7],assum:[5,6,7],atom:[4,5],attempt:0,attribut:[3,5,9],author:1,auto:6,automat:[4,7,9],avail:[2,5,6,8,9],averag:[0,9],avoid:[8,9],axes:[3,6,9],axeslist:[3,9],axi:[3,8,9],b_qmax18:9,background:[0,5,9],backgroundfil:[0,5,9],base:[3,9],basenam:5,batch:4,beamlin:9,becaus:[3,6,8,9],been:[5,7,9],begin:[3,5,9],behavior:[5,7],being:[5,7,9],below:9,best:7,better:9,between:7,bgscale:[5,9],billing:4,binari:8,block:3,blue:9,bool:[3,5,8],both:[3,7,9],bound:[5,9],boundari:[5,7,9],box:9,brace:7,breakpoint:9,brief:[5,6,7],brookhaven:4,browser:[5,6],bug:8,build:8,built:9,bulk:9,bundl:[4,8],button:9,calcul:[0,3,5,7,9],calibr:9,call:[3,6,9],callabl:3,camel:8,can:[0,2,3,4,5,6,7,8,9],cannot:[6,9],canopi:2,capabl:[6,7],capillari:9,catio3:5,caus:[8,9],cell:9,cfg:[0,7,8,9],ch2:5,ch3:5,chain:9,chang:[0,3,9],charact:[3,5,7,9],check:[0,2,6,7,9],checkbox:8,chemic:[0,5,7,8,9],chi:[5,7,9],christoph:4,circl:9,cite:4,citi:4,clear:[3,5,9],clearsess:[3,8,9],clf:9,click:9,close:9,closer:5,cmi:9,code:[2,4,9],columbia:[2,4],column:[0,2,3,5,6,7,8,9],combin:6,comma:[3,5,6,9],command:[0,1,3,4,5,6,8,9],comment:[0,7],compar:[8,9],compat:[2,8],complain:9,complet:[5,9],compon:5,composit:[0,5,7,9],comprehens:2,comput:2,conda:9,conduct:9,config:[0,3,5,7,8,9],config_neutron:9,config_xrai:9,configfil:9,configsect:9,configur:[1,3,7,8],confirm:9,conjunct:6,consid:3,consist:7,constant:[3,4,5,8,9],contact:4,contain:[0,2,3,5,6,7,8,9],content:[0,7,9],continu:9,control:[4,5,6,9],conveni:[2,3,6,7],convent:6,convers:[2,5],convert:[3,4,5,9],copyright:4,correct:[0,4,5,8,9],correctli:[2,7,9],correspond:[0,3,5,7,9],cos:6,could:6,count:5,cours:2,cover:[5,9],crash:8,creat:[0,2,3,5,7,9],createconfig:[0,5,7],critic:[2,7],crystallogr:4,cube:6,current:[0,3,5,6,8,9],curv:[5,7,9],custom:[2,4,5,8,9],cutoff:[5,7,9],dash:[5,7],dat:[5,6,8,9],data:[0,1,2,3,4,5,7,8],datafil:[3,5],dataformat:[0,3,5,7,9],datapath:[0,5,8],davi:4,debug:5,decai:5,dedic:9,defin:[0,2,3,5,9],definit:5,degre:[0,5,7,8,9],delft:9,demonstr:[7,9],denot:[7,8],depend:[2,3],describ:[7,9],descript:[5,7],design:9,desir:[3,9],detail:[5,6,9],detector:[5,9],diagnost:5,dialog:[3,8,9],did:9,differ:[0,2,5,7,9],difficult:9,diffpi:[0,2,3,4,5,6,7,8,9],diffract:[0,3,4,5,7,8,9],diffractomet:[5,8,9],dir1:[5,8],dir2:[5,8],dir3:8,dir:[2,3,8],directori:[0,2,3,5,6,7,8,9],disabl:5,disk:3,displai:[2,3,5,6,7,9],distribut:[2,4,8,9],doc:[0,1,2,3,4,5,6,7,8,9],document:[6,8,9],doe:[2,3,7,9],don:[2,4],done:[6,9],dot:8,dotfil:[3,8],doubl:[5,6,7],download:2,driven:[2,9],drop:9,duplic:8,dynam:9,each:[0,3,5,8,9],easi:[2,9],easiest:[0,2],easy_instal:[2,9],editor:[0,2,7],edu:4,effect:[3,4,5,9],egg:[2,8,9],eijck:4,either:[0,3,5,7,8,9],elaps:9,element:[3,5,9],email:4,employ:4,empti:[3,5,9],empty_capillari:9,enabl:8,enclos:5,encount:9,encourag:6,end:[3,5,8,9],engin:2,enhanc:[2,8],enough:3,enter:[7,9],enthought:2,entir:3,entri:[3,5,8,9],environ:[2,8,9],equal:[0,2,3,5,7,9],equival:6,error:[5,8,9],essenti:[5,9],etc:[3,8],even:9,everi:5,everyth:8,exact:9,exampl:[0,1,2,3,4,5,7,8,9],except:[0,9],execut:[2,7,9],exist:[2,5,8,9],exit:[5,6,7,9],expand:[5,9],expans:6,expect:9,experi:5,experiment:9,explanatori:8,explicit:8,explicitli:[3,5,7,8],extens:[2,5,8,9],extra:[2,3,5,9],extract:[1,9],f007:5,f77:5,faction:9,factor:[0,9],fals:[3,5],familiar:7,farrow:4,fashion:[2,7],fast:9,favorit:0,featur:[6,9],few:[0,7,9],fft:9,fig:9,figur:9,file10:6,file11:6,file12:6,file13:6,file1:6,file20:6,file2:6,file9:6,file:[1,2,3,4,7,8],filenam:[0,2,3,5,6,7,8,9],find:[0,2,3,5,6,8,9],findfil:[0,2,3,5,6,7,8,9],finish:9,first:[0,2,3,5,6,7,9],fit2d:7,fit:[0,1,5],fix:5,flag:[8,9],fledg:9,flexibl:5,folder:9,follow:[0,2,4,5,6,9],folow:7,forc:[3,5,8,9],form:[0,5,7,9],format:[3,5,6,7,8],formula:[5,8],forward:9,found:[0,2,9],four:0,fourier:[5,7],fraction:[5,8],frequenc:5,fresh:9,from:[0,2,3,4,5,6,7,8],front:5,full:[6,9],funct:8,further:5,gca:3,gener:[0,3,6,7,8,9],get:[2,7,9],gettransform:9,give:[5,8],given:9,global:[0,8],going:9,good:9,grant:4,graph:[6,9],greater:3,green:9,grid:[0,5,8,9],group:[3,4,5,8,9],gui:[2,3,9],guid:1,handl:[8,9],happen:9,has:[0,3,5,6,7,9],hash:7,have:[0,2,3,5,7,8,9],header:[0,3,7,9],headlin:6,help:[5,6,7,9],here:[2,5,6,7,9],hidden:3,higher:[3,5],highli:4,hint:9,hoc:4,hold:8,holder:5,home:[0,9],how:9,howev:[5,9],http:[0,1,2,3,4,5,6,7,8,9],human:8,hundr:9,ident:7,identifi:[0,9],ignor:[0,3,5,7,8,9],illustr:9,immedi:9,impli:[7,9],implicit:[6,8],improv:8,inaccur:[8,9],includ:[2,3,4,6,7,8,9],inclus:[3,5],inde:7,indent:2,index:[1,2,3,6,9],indic:[3,6,9],info:[5,6,7,9],inform:[4,5,7],initi:[3,6,8],inlin:8,input1:7,input2:7,input:[1,3,6,7,8],inputfil:[0,3,5,9],inputn:7,instal:[1,7,8,9],instanc:3,instanti:8,instead:[6,8],instruct:[2,9],instrument:9,integ:[3,5,6,9],integr:2,intend:[2,5,6,7,9],intens:[0,3,5,7,9],intensity1:3,intensity2:3,interact:[1,2,4,5,6,7,8],interactiveshellapp:2,intermedi:[3,4,9],internet:2,interpol:8,interpret:[2,5],intervent:4,introduct:1,invers:[0,5,7],invok:6,involv:9,ipy_mag:[2,8],ipy_pdfgetx3:8,ipynb:9,ipython3:2,ipython:[1,3,5,6,7,8,9],ipython_config:2,iraw:[3,9],item:[3,5],iter:3,its:[5,6,7,9],itself:0,join:7,jupyt:9,just:[0,6,9],kapton_bgrd_300k_nor_2:9,keep:[3,6],keyword:[3,9],know:4,known:9,kwarg:3,label:[6,8],laboratori:4,lack:9,languag:2,larg:[5,6,9],larger:5,last:[3,5,6,9],later:8,lead:[2,3,4,5,7],learnt:8,least:3,left:5,legend:9,let:9,level:[3,5],librari:[2,4],licens:1,like:[2,6,9],likewis:8,limit:5,line2d:[0,2,3,5,6,7,9],line:[0,2,3,4,5,6,7,8,9],linear:[3,6],linux:[2,9],list:[3,5,6,8,9],live:9,load:[3,5,6,7,8,9],loaddata:[0,2,3,5,6,7,8,9],loadtxt:3,loc:9,local:8,locat:0,log:[3,6,8],logarithm:[3,6,8],lone:8,look:[3,7,9],lookup:8,louwen:4,low:[3,9],lower:[5,9],lowercas:8,mac:[2,9],made:9,magic:[1,8],mai:[0,2,3,5,6,7,8,9],make:[5,7,9],manag:2,mandatori:0,mani:7,manipul:9,manual:[1,5,6,7,8],mark:[0,7],marker:6,match:[2,3,5,6,8],materi:9,matplotlib:[2,3,6,8,9],matric:3,matrix:[3,9],max:[0,2,3,5,6,7,9],maximum:[5,9],mean:9,meaning:[5,7,9],measur:[0,5,7,9],member:4,memori:3,mention:9,messag:[5,8,9],metadata:[0,7],method:[3,9],might:5,mind:6,minimum:3,minrow:3,misc:3,miss:8,mode:[1,2,4,5,7,8,9],modifi:[6,7],modul:[3,8],momentum:[0,5,7,9],more:[2,3,4,5,7,9],most:[0,3,6,9],move:9,multipl:[0,8],must:[0,2,3,4,5,6,7],nacl:0,name:[0,2,3,5,6,7,8],nanomet:[0,5,7],napoleon:8,nation:4,navig:[2,9],nbcmi:9,ndarrai:3,nearli:7,necessari:[2,3,5,9],need:[0,2,5,6,9],neg:3,neutron:[1,4,5,7,8],next:9,ni300mesh_300k_nor_1:9,nickel:1,nicmd:9,nois:5,noisi:[5,9],non:[3,9],none:[3,5,9],nonzero:9,normal:[0,5,9],notabl:9,note:[1,3,5,6,7,9],notebook:9,noth:9,notic:[1,9],novemb:1,now:[8,9],number:[3,5,9],numer:[0,6,9],numpi:[2,3,8],object:[3,5,8,9],obsolet:8,obtain:[2,9],off:5,offset:[5,8,9],often:[5,7],omit:5,onc:[0,2,3,5,8,9],one:[2,3,5,6,8,9],ones:5,onli:[0,3,4,5,6,7,8,9],open:[2,5,6,7,8,9],oper:[1,2,6,7,8],optimum:4,option:[0,1,2,3,6,7,8,9],order:[5,7],org:[0,1,2,3,4,5,6,7,8,9],orient:2,origin:9,oscil:9,other:[0,1,2,3,7,9],otherwis:[2,5],out:[5,6,9],outpufil:9,output:[1,3,7,8],outputtyp:[0,5,9],outsid:9,overal:9,overlap:[5,9],overrul:9,overwrit:[5,8,9],own:[5,9],packag:[1,2,8],page:[1,6],pair:[3,4],paper:4,paragraph:2,paramet:[0,1,3,4,7,8],parent:9,parenthes:[5,8],pars:9,part:[2,9],parti:[2,4],pass:[0,3,6,7,9],path:[0,2,3,5,8],pattern:[0,3,5,6,8,9],pavol:4,pbti0:5,pdf:[1,2,3,4,7,8],pdfconfig:[3,8],pdfgetn3:[0,1,2,3,4,5,8,9],pdfgetter:[3,5,9],pdfgetx2:[3,9],pdfgetx3:[0,1,2,3,4,5,6,8,9],pdfgetx3path:8,pdfgetx:[0,2,3,4,5,6,7,8,9],pdfgetxn3:[0,1,2,3,4,5,6,7,8,9],pearl:9,per:[0,5,6,8,9],perform:3,perman:2,permit:[4,5],photon:9,place:[2,9],plain:5,plan:2,platform:9,platinum:1,pleas:[4,7],plot:[0,2,3,4,5,6,7,8,9],plotdata:[0,1,2,3,5,7,8,9],plotid:3,plotpdfcomparison:9,point:[3,8,9],polynomi:[0,5,9],posit:[5,8],possibl:5,powder:[0,3,4,5,7,9],power:[4,9],pre:[3,6],preced:[3,5,6,7],prefer:7,prefix:2,preload:9,prepend:[2,5],prerequisit:9,present:[5,7,9],preserv:[2,8],press:7,previou:[0,3,8],previous:[5,7],print:[3,5,7,9],privileg:2,problem:9,procedur:9,process:[0,2,3,4,5,6,7,8],processfil:[3,8,9],produc:[0,3,5,6,9],prof:4,profil:2,profile_default:2,program:[0,1,2,3,4,7,8,9],prohibit:4,prompt:[2,6,9],proper:[5,8],protocol:9,provid:[0,2,5,6,9],pt_bulk:[7,9],pt_bulk_ramp03:9,purpos:8,put:9,pyplot:[3,6,8],python37:2,python3:2,python:[1,2,4,5,6,8,9],pythonxi:2,qmax:[3,5,7,8,9],qmaxinst:[5,7,9],qmin:[5,9],qnm:5,qualiti:9,quick:1,quot:[5,6,9],radiat:[5,7],rai:[1,4,5,7],rang:[3,5,6,9],rapid:4,rather:8,raw:[3,9],read:[0,3,5],readabl:8,reason:9,recalcul:9,recogn:[6,9],recommend:9,red:9,redo:[7,9],reduc:[0,7,9],refer:[1,3,7,9],refin:9,regular:[0,9],rel:9,relat:[3,7,9],releas:[1,2],reliabl:9,remark:9,remov:[5,9],renam:8,repeat:[5,8],replac:[2,9],report:5,repositori:2,reproduc:[0,8],requir:[1,5,7,9],resampl:9,rescal:9,research:4,reset:[3,5,9],residu:9,resolv:9,respect:[3,4,7],result:[0,3,4,5,7,9],reus:[3,5,8,9],right:7,rmax:[5,9],rmin:[5,9],root:2,round:9,row:[3,6,9],rpoli:[5,9],rstep:[5,8,9],run:[2,4,7,8,9],safe:[2,9],safer:8,safeti:9,same:[0,2,3,5,6,7,8,9],sampl:[0,5,7,9],sapphir:9,sapphire755:9,satisfi:3,save:[3,5,6,7,9],sb2896:4,scalar:8,scale:[3,5,6,8,9],scan:[7,9],scatter:[0,3,4,5,7,8,9],scienc:2,scientif:[2,4],screen:9,script:[2,4,8],search:[0,1,2,3,5,6,8],second:[0,3,6,7,9],section:[0,5,6,7,8,9],sectionnam:[0,5],see:[2,5,6,9],seem:3,select:[0,1,3,5,8,9],selector:3,self:9,separ:[0,3,4,5,6,7,8,9],sequenc:3,sequenti:3,seri:[1,4],serv:3,session:[2,3,5,6,7,8,9],set:[0,2,3,5,6,7,8,9],setup:[5,9],setuptool:2,sever:[0,3,5,6,9],shall:9,shape:9,share:0,shell:[2,3,5,6,7,8,9],shortcut:9,shorter:5,should:[0,2,3,9],show:[3,6,9],side:9,sign:7,signal:5,similar:[2,6,7,9],simon:4,simpl:[0,4,6,7,8,9],simul:9,sin:6,sinc:9,sinco:6,sine:3,singl:[2,3,5,6,7,8,9],six:2,skip:[2,3],slash:[8,9],slice:[3,8],slider:9,slightli:9,slist:8,small:5,smaller:5,smooth:5,softwar:[1,4,6,7,8,9],solid:0,some:[2,5,9],sourc:9,space:[0,5],special:[3,5,6,9],specif:[6,8,9],specifi:[0,3,5,6,7,9],specimen:5,spectra:9,split:3,squar:6,stai:9,stand:[6,7],standard:[2,5,9],start:[0,1,2,3,5,6,8,9],state:9,statement:[5,9],step:[2,6,7,9],still:9,stoichiometri:[5,8],stop:[6,8],store:[3,9],str:3,string:[2,3,5,7,8,9],strip:9,structur:[0,7],style:[3,6,8],sub:8,subdirectori:9,subfold:9,subject:4,subplot:[3,9],subsequ:[3,5,8,9],substr:9,subtract:9,successfulli:9,sudden:9,sudo:2,suffici:3,suffix:9,suitabl:9,summari:7,suppli:7,support:[0,2,3,5,6,8],suppress:5,symbol:[3,5,8],synapt:2,syntax:[0,3,5,6,9],system:[2,3,6,9],tail:5,take:[3,7,8],taken:[5,9],technolog:[2,9],tell:7,temperatur:9,templat:[0,5],tend:9,termin:[2,9],terribl:9,test:[0,2],text:[0,2,3,5,6,7,9],than:[0,3,8],thei:[0,2,3,5,6,9],them:[0,3,4,5,6,7,9],thereaft:9,therefor:[2,5,7,9],theta:7,thi:[0,2,3,4,5,6,7,8,9],third:2,those:[2,3,9],threshold:5,through:7,thu:[0,2,6,7,9],tif:7,time:[5,8,9],timur:4,togeth:[6,9],token:[5,9],told:7,too:5,tool:2,top:9,total:[0,4,9],trail:5,transfer:[0,5,7,9],transform:[3,5,7,9],transformbackground:9,transformfqgrid:9,transformfqtogr:9,transformqgridregular:9,transformsqnormrpoli:9,transformsqtofq:9,transformtwothetatoqa:9,transformxrayasfnormchri:9,translat:3,transpos:3,truste:4,tunabl:9,tune:[1,3,4,5],tuneconfig:[3,8,9],tupl:3,turn:[5,9],tutori:[1,3,5,7,8],two:[0,2,5,7,9],twotheta1:3,twotheta2:3,twotheta:[5,7,9],twothetazero:[1,5,8],type:[0,2,3,5,7,8,9],typic:7,ubuntu:2,uncorrect:9,undefin:5,under:[4,8],understood:[0,9],unexpect:5,unicod:8,uniqu:[5,6,9],unit:[0,5,7,8],univers:[4,9],unix:[2,5,9],unless:[5,7,8,9],unpack:3,unreli:5,unseemli:9,unsupport:8,updat:[3,7,9],upon:9,upper:[5,7],usag:[5,6],use:[2,3,4,5,6,7,8,9],usecol:[3,8],used:[1,2,3,4,5,6,7,8,9],useful:[0,2,5,6,9],user:[0,1,2,4,5,6,9],uses:9,using:[0,2,3,4,5,6,7,9],usual:[0,2,9],util:6,valid:[0,2,5,9],valu:[0,3,4,5,6,7,8,9],van:4,variabl:[2,3,6,8,9],variant:5,varnam:0,ventur:2,verbos:[5,7,9],veri:[2,5,7,9],verifi:[2,5,7,9],version:[1,2,5,6,9],visual:[4,9],vogt:4,wai:[0,2,6,7,8,9],warn:[5,9],wavelength:[4,5,7,8,9],web:[5,6],well:2,were:[0,2,5,7,9],what:[0,3,5,9],when:[0,2,3,5,6,7,8,9],where:[0,5,6,7],wherea:7,whether:4,which:[2,3,4,5,6,8,9],whitespac:3,who:2,whole:9,wide:3,window:[2,5,6,7,9],within:[2,5,6,8],without:[4,5,8,9],word:5,work:[0,2,3,5,6,7,9],wors:9,would:[0,2,3,5,6,9],wright:4,writabl:2,write:[5,7,9],written:[2,4,5,9],www:[0,1,2,3,4,5,6,7,8,9],xrai:[5,9],yes:[5,8,9],yet:[4,7,9],yield:7,york:4,you:[0,2,4],your:[0,4,9],zero:[3,5,8,9],zip:[0,1,2,3,4,5,6,7,8,9],zoom:9},titles:["Files used in PDF extraction","diffpy.pdfgetx","Installation","Interactive mode","Introduction","Options and parameters","The plotdata program","Quick-start guide","Release notes","Tutorial"],titleterms:{Added:8,The:6,author:4,chang:8,command:[2,7],configur:[0,5,9],content:1,data:[6,9],deprec:8,diffpi:1,exampl:6,extract:0,file:[0,5,6,9],fit:9,fix:8,from:9,guid:7,indic:1,input:[0,5,9],instal:2,interact:[3,9],introduct:4,ipython:2,licens:4,magic:2,match:9,mode:3,name:9,neutron:9,nickel:9,note:8,notic:4,oper:5,option:5,other:5,output:[0,5,9],paramet:[5,9],path:9,pdf:[0,5,9],pdfgetn3:7,pdfgetx3:7,pdfgetx:1,platinum:9,plotdata:6,predefin:9,process:9,program:[5,6],quick:7,rai:9,refer:4,releas:8,remov:8,requir:2,scratch:9,search:9,select:6,seri:9,softwar:2,start:7,tabl:1,tune:9,tutori:9,twothetazero:9,used:0,version:8}}) \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.0.0/tutorial.html b/static_root/doc/pdfgetx/2.0.0/tutorial.html deleted file mode 100644 index 4fdebdcd..00000000 --- a/static_root/doc/pdfgetx/2.0.0/tutorial.html +++ /dev/null @@ -1,761 +0,0 @@ - - - - - - - Tutorial — diffpy.pdfgetx 2.0.0 documentation - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Tutorial

-

In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the examples -folder included with the PDFgetX3 distribution. The examples -folder can be found in the parent “doc” directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -https://www.diffpy.org/doc/pdfgetx/2.0.0/pdfgetxn3-examples.zip.

-
-

Nickel X-ray PDF

-
-

predefined configuration file

-

Change to the Ni directory. The file named -ni300mesh_300k_nor_1-5.chi contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the 2Θ scattering -angles and X-ray intensities. The second file -kapton_bgrd_300k_nor_2-3.chi contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the pdfgetx3.cfg contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -pdfgetx3 program -with the powder data file as an argument:

-
$ pdfgetx3 ni300mesh_300k_nor_1-5.chi
-
-
-

For the first run there should be no output on the screen, -however a new file, ni300mesh_300k_nor_1-5.gr should appear -in the work directory. -We can use the plotdata program, -included with this software, to plot the output data:

-
$ plotdata ni300mesh_300k_nor_1-5.gr
-
-
-

This will open a graph window and start an IPython interactive session. -To exit and close the figure, type exit() on the IPython prompt. -Let’s run the program again, but now with a ---verbose=info -option, to show more details about the program actions.

-
$ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi
-
-INFO:applying pdfgetx3 defaults
-INFO:set config.mode = xray
-INFO:searching for default config file /home/user/.pdfgetx3.cfg
-INFO:searching for default config file .pdfgetx3.cfg
-INFO:searching for default config file pdfgetx3.cfg
-INFO:loaded default config file pdfgetx3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi
-INFO:set config.outputtypes = gr
-INFO:set config.wavelength = 0.142774
-INFO:set config.composition = Ni
-INFO:set config.qmaxinst = 26.5
-INFO:set config.qmax = 26.0
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 30.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'xray'
-INFO:calling config_xray
-INFO:started PDF processing.
-INFO:processing 'ni300mesh_300k_nor_1-5.chi'
-INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr'
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-INFO:elapsed time: 0.095
-
-
-

Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the --verbose option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the --force=yes option, upon -which pdfgetx3 would overwrite any existing files.

-

PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the --c option. Another option, --plot=[iq,sq,fq,gr] turns on plotting of the final PDF or of some other result. A -side effect of the --plot option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function F(Q) and the PDF curve G(r). This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:

-
$ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr
-
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-
-Variables related to PDF processing:
-
-pdfgetter    -- PDFGetter used for calculation.
-config       -- configuration data used by PDFGetter.
-                See config.inputfiles for a list of inputs.
-iraw         -- matrix of input raw intensities with 2 rows per file.
-iq sq fq gr  -- intermediate results per each input file stored
-                as matrix rows.
-
-Functions:
-
-tuneconfig   -- dynamically tune configuration variables.
-processfiles -- process specified data files.
-clearsession -- clear all elements from the inputfiles, iraw,
-                iq, sq, fq and gr variables.
-plotdata     -- plot all or selected columns from a text data file.
-loaddata     -- load all or selected columns from a text data file.
-findfiles    -- search for files matching the specified patterns.
-
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-In [1]:
-
-
-

This will open a plot figure similar to

-_images/nickelfqgr.png -

Because of the interactive mode implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -config variable stores all the configuration parameters, -and its content can be displayed with the print() -function as

-
In [1]: print(config)
-
-configfile = ni300mesh_300k_nor_1-5.gr
-configsection = DEFAULT
-dataformat = twotheta
-...
-qmax = 26.0
-...
-
-
-

The processfiles() function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the F(Q) and G(r) -curves calculated at Qmax = 22 Å-1, we can call -processfiles() and pass it a keyword argument for -the new qmax as follows:

-
In [2]: processfiles(qmax=22)
-
-# the qmax parameter was updated to a new value, thus
-In [3]: config.qmax
-Out[3]: 22
-
-
-

There should be now two lines in each plot axis corresponding to -the results at Qmax equal 26 and 22 Å-1. To exit the program, -type exit().

-
-
-

processing from scratch

-

We have already encountered the command-line option -c -for specifying a custom configuration file. A special argument “NONE”, -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-ERROR:Configuration error: wavelength not specified.
-ERROR:See "--help" for more hints.
-
-
-

There is an error, for the wavelength is necessary to convert -the scattering angle 2Θ to momentum transfer Q. The -X-ray wavelength was 0.142774 Å, which can be passed with the --w, --wavelength option:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774
-
-...
-ERROR:Configuration error: Chemical composition not known.
-ERROR:See "--help" for more hints.
-
-
-

There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the --composition option. The example -below uses a “\” character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-...
-
-
-

There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the -t, --outputtypes option. -The outputtypes option recognizes the following result types: -“iq”, “sq”, “fq”, “gr”. One or more of these type strings, -separated by a comma, can be included with the --t option, which will produce the corresponding -output files. An empty string, such as -t "", or -t NONE -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings.

-

At this point, we will not write any output files, but will use the ---plot option to display the calculated curves. The ---plot accepts the same arguments as outputtypes, so to -display the F(Q) and G(r) curves we shall run

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni --plot=fq,gr
-
-WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161
-WARNING:qmax reset to the data boundary qmaxinst=28.0865680161
-
-
-

which should open the following plot window:

-_images/nickelfqgrnoisy.png -

The graphs look terrible. The PDF is very noisy and the F(Q) curve -shows a sudden break at about 27 Å-1. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -iraw, iq, sq, -fq, gr -variables for the original raw data and intermediate results. We -are going to plot the “iq” variable that has the input intensities -resampled on the Q grid. The matplotlib function -clf() clears the figure, -the iq variable is a two-row matrix with Q and I rows, and the -axis() -function lets us zoom to a given range:

-
In [1]: clf()
-In [2]: plot(iq[0], iq[1])
-Out[2]: [<matplotlib.lines.Line2D at 0x3e20f50>]
-In [3]: axis([20, 29, 0, 3000])
-Out[3]: [20, 29, 0, 3000]
-
-
-

The graph shows a sudden drop in the raw intensities at 27 Å-1. -The qmaxinst variable defines a Q cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 Å-1

-
In [4]: processfiles(qmaxinst=26.5)
-WARNING:qmax reset to the data boundary qmaxinst=26.5
-
-
-

The updated curves looks reasonable without any oscillations and -breakpoints. The tuneconfig() function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type tuneconfig() to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the F(Q) and G(r) curves change. -The rpoly parameter controls the degree of data-correction -polynomial and is an approximate low-r bound of reliable G -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the G(r) -curve and save it to an output file nicmd.gr:

-
In [14]: config.qmax = 26
-In [15]: config.outputtypes = 'gr'
-In [16]: config.output = 'nicmd'
-In [17]: processfiles()
-
-
-
-
-
-

Platinum X-ray series

-

PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(z-shell being a notable exception).

-
-

matching input files

-

The pdfgetx3 program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the -f, --find option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option --l, --list makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files.

-

We will try out this file search on platinum example files. Open a -terminal and navigate to the Pt directory. There should be a -series subdirectory with 6 chi files indexed from 903 to 908. -At first, let’s stay in the Pt directory and run the following -command

-
$ pdfgetx3 --list --find
-
-Pt_bulk-00055-pdfgetx2.gr
-Pt_bulk-00055-pdfgetx3.gr
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-pdfgetx3.cfg
-plotpdfcomparison.py
-
-
-

Without any patterns the file search matches all files in the current -directory. Now let’s try to add name patterns. There are few special -patterns, for example ^ matches at the beginning of the filename, -$ at the end and <N-M> matches a range of integer values from -N to M. The patterns containing ^$<> need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works.

-

Filenames containing “y”:

-
$ pdfgetx3 --list --find y
-empty_capillary-00032.chi
-plotpdfcomparison.py
-
-
-

Filenames that containing both “y” and “chi”, here we use the -options --list and --find in an abbreviated -form -l and -f:

-
$ pdfgetx3 -lf y chi
-empty_capillary-00032.chi
-
-
-

Filenames that start with “e”:

-
$ pdfgetx3 --list --find "^e"
-empty_capillary-00032.chi
-
-
-

Filenames that contain character “2”:

-
$ pdfgetx3 --list --find 2
-Pt_bulk-00055-pdfgetx2.gr
-empty_capillary-00032.chi
-
-
-

Filenames that contain numeric value “2”:

-
$ pdfgetx3 -lf "<2>"
-Pt_bulk-00055-pdfgetx2.gr
-
-
-

The special argument + starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both “bulk” and “chi” substrings and then -also those that have “empty” and “chi” in their names, use:

-
$ pdfgetx3 -lf bulk chi + empty chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-

When pattern groups overlap the resulting matches are -made unique and each file is listed only once

-
$ pdfgetx3 -lf bulk chi + chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-
-
-

data search path

-

Each group of PDFgetX3 patterns can have one entry containing -forward slash “/” to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered “903” to “905” and “908” from the -series subdirectory can be therefore matched using

-
$ pdfgetx3 -lf series/ "<903-905>" + 908
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-

The current directory can be selected using ./

-
$ pdfgetx3 -lf series/ 903 + ./ bulk chi
-series/Pt_bulk_ramp03-00903.chi
-Pt_bulk-00055.chi
-
-
-

When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -“.chi”-ending files in the current and series -directories can be thus found using

-
$ pdfgetx3 -lf ".chi$" + series/
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00906.chi
-series/Pt_bulk_ramp03-00907.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-
-
-

output file names

-

By default the output files are saved in the current directory. The -output path, can be changed with the -o, --output option. -The -o recognizes several tokens that are replaced with -parts of the input file name, for example, “@b” expands to an -extension-stripped base name. In similar faction, “@o” is replaced -with the output type extension. Thus to generate PDFs for all files -in the series directory and save them in the -series-gr subfolder do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o
-
-
-

The extension “.@o” is automatic when not included anywhere in the -output file name. Thus to process the Pt series at Qmax = 18 Å-1 -while saving the results in the same folder, but with a “_qmax18” suffix -in their filenames do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18
-
-
-

For input file Pt_bulk_ramp03-00903.chi the -o option -above expands to output path series-gr/Pt_bulk_ramp03-00903_qmax18.gr. -The series-gr directory should now contain 12 “gr” files, -6 of them processed at Qmax = 27 Å-1 as given by configuration -file and 6 others processed at Qmax = 18 Å-1.

-
-

See also

-

-o, --output for a list of output tokens

-
-
-
-
-

Interactive tuning of parameters

-

One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the Ni directory in the shell and process -the nickel PDF while plotting the F(Q) and G(r) curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -tuneconfig() -function from the IPython environment

-
$ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi
-...
-In [1]: tuneconfig()
-
-
-

The -tuneconfig() -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot.

-_images/tunenickelfqgr.png -

The constant data scale check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -PDF parameters section. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the bgscale parameter -if PDF has been processed without any background data.

-

By default the -tuneconfig() -function displays the same curves as -specified by the --plot option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the describe() method of the -pdfgetter() object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object t4 that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the tuneconfig() function

-
$ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi
-...
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-
-In [1]: fig, ax = subplots(2)
-In [2]: pdfgetter.describe()
-0   TransformTwoThetaToQA
-    convert x data from twotheta to Q in 1/A
-1   TransformQGridRegular
-    Remove the data outside the (qmin, qmaxinst) range
-2   TransformBackground
-    subtract background intensity
-3   TransformXrayASFnormChris
-    scale and normalize intensities by x-ray scattering factors
-4   TransformSQnormRPoly
-    Normalize S(Q) by fitting a polynomial
-5   TransformSQToFQ
-    Convert S(Q) to F(Q).
-6   TransformFQgrid
-    Resample F(Q) to a regular grid suitable for FFT
-7   TransformFQToGr
-    Convert F(Q) to G(r).
-In [3]: t4 = pdfgetter.getTransformation(4)
-In [4]: tuneconfig([t4, 'gr'], axeslist=ax)
-In [5]: ax[0].legend(loc=2)
-
-
-

The subplots() function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window:

-_images/tunenickelt4gr.png -

The tuning can be finished by clicking the Done button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the config -object, for example:

-
In [5]: config.bgscale = 1.5
-
-
-

Finally, to save the new results, we shall first confirm -outputtypes have been correctly set and then use the -processfiles() function to redo the calculations, plots and -data output for the updated configuration. Note that the -processfiles() function accepts keyword arguments for -configuration parameters. This is used at line In [8] to -turn on the force flag and is in effect a shortcut -for an extra config.force = True statement.

-
In [6]: config.outputtypes
-Out[6]: ['gr']
-In [7]: processfiles()
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-In [8]: processfiles(force=True)
-
-
-

ni300mesh_300k_nor_1-5.gr was successfully saved at an -updated configuration for there were no warnings after the last call.

-
-
-

Neutron PDF

-

This example illustrates PDF extraction from -neutron powder data using pdfgetn3. -Navigate to the n-Sapphire directory in the shell. -The sapphire755.dat file contains powder diffraction data from -sapphire (α-Al2O3) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The pdfgetn3.cfg configuration file specifies -processing parameters such as wavelength, -twothetazero, composition, and mode.

-

To extract the sapphire neutron PDF run

-
$ pdfgetn3 --verbose=info sapphire755.dat
-
-INFO:applying pdfgetn3 defaults
-INFO:set config.mode = neutron
-INFO:searching for default config file /home/user/.pdfgetn3.cfg
-INFO:searching for default config file .pdfgetn3.cfg
-INFO:searching for default config file pdfgetn3.cfg
-INFO:loaded default config file pdfgetn3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.mode = neutron
-INFO:set config.wavelength = 1.0989
-INFO:set config.twothetazero = -0.38
-INFO:set config.composition = Al2O3
-INFO:set config.qmaxinst = 11.2
-INFO:set config.qmax = 11.2
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 20.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'neutron'
-INFO:calling config_neutron
-INFO:started PDF processing.
-INFO:processing 'sapphire755.dat'
-INFO:resolved output file '' as 'sapphire755.fq'
-INFO:written outpufile sapphire755.fq
-INFO:resolved output file '' as 'sapphire755.gr'
-INFO:written outpufile sapphire755.gr
-INFO:elapsed time: 0.097
-
-
-

This will produce two files sapphire755.fq, sapphire755.gr -for the F(Q) and G(r) functions. -To compare them with expected results use

-
$ plotdata sapphire755-expected.fq sapphire755.fq
-$ plotdata sapphire755-expected.gr sapphire755.gr
-
-
-
-
-

Fit twothetazero

-

For a good quality PDF it is essential to use powder patterns with -accurate values of Q. Some instruments may produce spectra with -a slightly offset scattering angle 2Θ which -causes inaccurate Q and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the twothetazero correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples.

-

This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -diffpy.cmi, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use Anaconda Python and set up a dedicated -Anaconda environment nbcmi for this tutorial. -This can be accomplished using the following steps:

-
$ conda create -n nbcmi -c diffpy python=2 diffpy-cmi
-$ conda activate nbcmi
-$ python -m easy_install path/to/diffpy.pdfgetx-VERSION.egg
-
-
-

When these prerequisites are in place, -change to the n-twothetazero-fit directory -and open the self documented Jupyter notebook as follows

-
$ jupyter notebook fit-twothetazero.ipynb
-
-
-

The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted twothetazero. -After running all cells the notebook should produce similar graphs -as in the figure below.

-
-_images/twothetazerofit.svg

Refinement of nickel neutron PDF for (a) uncorrected data -and (b) with a refined zero correction. -The extracted PDFs are plotted as blue circles, -simulated PDFs as red lines and -the difference is plotted offset in green below.

-
-

The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual Rw which is lowered from (a) 0.18 to (b) 0.05.

-
-
- - -
-
-
- -
-
- - - - - diff --git a/static_root/doc/pdfgetx/2.1.0/PDFgetXNS3_manual.pdf b/static_root/doc/pdfgetx/2.1.0/PDFgetXNS3_manual.pdf deleted file mode 100644 index b74f204e..00000000 Binary files a/static_root/doc/pdfgetx/2.1.0/PDFgetXNS3_manual.pdf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.0/_images/nickelfqgr.png b/static_root/doc/pdfgetx/2.1.0/_images/nickelfqgr.png deleted file mode 100644 index 3fbc12de..00000000 Binary files a/static_root/doc/pdfgetx/2.1.0/_images/nickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.0/_images/nickelfqgrnoisy.png b/static_root/doc/pdfgetx/2.1.0/_images/nickelfqgrnoisy.png deleted file mode 100644 index caab8cf3..00000000 Binary files a/static_root/doc/pdfgetx/2.1.0/_images/nickelfqgrnoisy.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.0/_images/tunenickelfqgr.png b/static_root/doc/pdfgetx/2.1.0/_images/tunenickelfqgr.png deleted file mode 100644 index 14accde4..00000000 Binary files a/static_root/doc/pdfgetx/2.1.0/_images/tunenickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.0/_images/tunenickelt4gr.png b/static_root/doc/pdfgetx/2.1.0/_images/tunenickelt4gr.png deleted file mode 100644 index c95278cd..00000000 Binary files a/static_root/doc/pdfgetx/2.1.0/_images/tunenickelt4gr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.0/_images/twothetazerofit.svgz b/static_root/doc/pdfgetx/2.1.0/_images/twothetazerofit.svgz deleted file mode 100644 index 80e48d71..00000000 Binary files a/static_root/doc/pdfgetx/2.1.0/_images/twothetazerofit.svgz and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.0/_sources/files.rst.txt b/static_root/doc/pdfgetx/2.1.0/_sources/files.rst.txt deleted file mode 100644 index edc63d96..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_sources/files.rst.txt +++ /dev/null @@ -1,102 +0,0 @@ -Files used in PDF extraction -======================================================================== - -.. include:: abbreviations.txt -.. _my-configfile: -.. program:: pdfgetx3 - -Configuration file ------------------------------------------------------------------------- - -Configuration files may define the PDF processing parameters. -By default, the :program:`pdfgetx3` program attempts to read -:file:`.pdfgetx3.cfg` file from the user HOME directory, -then :file:`.pdfgetx3.cfg` and :file:`pdfgetx3.cfg` files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the :option:`-c, --config <-c>` option. -The :program:`pdfgetn3` program works in the same way, -except it checks for configuration files -:file:`~/.pdfgetn3.cfg`, :file:`.pdfgetn3.cfg` and :file:`pdfgetn3.cfg`. - -The easiest way of creating a configuration file is to generate -a template content using the :option:`--createconfig` option as :: - - pdfgetx3 --createconfig=test.cfg - -and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple "varname=value" syntax, -any lines starting with "#" are ignored as comments. - -The configuration file has several sections marked as ``[SECTIONNAME]``. -The ``[DEFAULT]`` section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the :option:`-s, --section <-s>` option on the -command line. Thus :: - - pdfgetx3 --config=test.cfg --section=nacl - -would read the parameters from the ``[nacl]`` section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section. - - -Input files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -|twotheta| in degrees, momentum transfer *Q* in inverse nanometers or *Q* -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the :confval:`dataformat` parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values. - -The input files are usually passed as command-line arguments to -:program:`pdfgetx3` or :program:`pdfgetn3` programs and must be paths -accessible from the current working directory. - -Input files can be also defined by setting the :confval:`inputfile` -value in the configuration file. The :option:`-d, --datapath <-d>` -option can be then used to provide additional data directories to -search for these inputs and for the :confval:`backgroundfile`. -This is to support configuration files located in a different -directory than the data. - -When the :option:`--find <-f>` option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory. - - -Output files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 can produce up to four different output data files: - -* .iq -- |IQ|, the background-corrected - intensities sampled on a regular *Q*-space grid in inverse ångströms, - -* .sq -- |SQ|, the total scattering structure function, - with intensities normalized by average scattering factors and - corrected by a polynomial fit, - -* .fq -- |FQ|, the reduced structure function equal to *Q*\ (|SQ| - 1), - -* .gr -- |Gr|, the resultant PDF, where the first column is the - separation *r* in ångströms and the second is the function *G* in - Å\ :sup:`-2`. - -You can specify what output files should be produced by setting the -:confval:`outputtypes` parameter in the configuration file or by -passing the :option:`-t, --outputtypes <-t>` on the command line. - -The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the :option:`--config <-c>` option, -the PDFgetX3 will reproduce the previous calculation. diff --git a/static_root/doc/pdfgetx/2.1.0/_sources/index.rst.txt b/static_root/doc/pdfgetx/2.1.0/_sources/index.rst.txt deleted file mode 100644 index c7bf373e..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_sources/index.rst.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. PDFgetX3 documentation master file, created by - sphinx-quickstart on Tue Sep 21 18:35:11 2010. - You can adapt this file completely to your liking, - but it should at least contain the root `toctree` directive. - -######################################################################## -diffpy.pdfgetx -######################################################################## - -User manual for PDFgetX3, PDFgetN3, PDFgetS3 and Python package diffpy.pdfgetx. - -| Release |release| -| |today| - -======================================================================== -Table of contents -======================================================================== - - -.. toctree:: - :maxdepth: 2 - - intro - install - quick-start - tutorial - files - interact - options - plotdata - release - -======================================================================== -Indices -======================================================================== - -* :ref:`genindex` -* :ref:`search` diff --git a/static_root/doc/pdfgetx/2.1.0/_sources/install.rst.txt b/static_root/doc/pdfgetx/2.1.0/_sources/install.rst.txt deleted file mode 100644 index 5545f943..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_sources/install.rst.txt +++ /dev/null @@ -1,135 +0,0 @@ -Installation -======================================================================== - -.. include:: abbreviations.txt - -Software requirements ------------------------------------------------------------------------- - -This software is written in Python programming language, therefore -you must have Python 3.7, 3.6, 3.5 or 2.7 installed. In addition, -the following third-party Python libraries are also required: - -* pip - Python package installer -* setuptools - tools for installing Python packages -* six - Python 2 and 3 compatibility library -* NumPy - library for scientific computing with Python -* matplotlib - Python plotting library -* IPython - enhanced interactive Python shell - -Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -`Python Package Index `__ -or using any Internet search engine. - -Another more convenient option is to obtain one of the science-oriented -Python distributions such as -`Anaconda Python`_, -`Enthought Canopy `_ or -`PythonXY `_, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step. - -On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command :: - - sudo apt-get install \ - python3-pip python3-setuptools python3-six \ - python3-numpy python3-matplotlib ipython3 - -This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above. - -On Windows operating system, it may be necessary to add the -``C:\Python37`` directory and the scripts directory -``C:\Python37\Scripts`` to the system :envvar:`!PATH`. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the :program:`Command Prompt`, type -there ``python`` and see if this starts the Python interpreter. - - -Installation ------------------------------------------------------------------------- - -The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -`Columbia Technology Ventures -`__. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:: - - pip install ./diffpy.pdfgetx-VERSION.whl - -Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending ``sudo`` to the command line above. If root access is not available, use the ``pip install`` options :option:`!--user` or :option:`!--prefix` to install the software to a user-writable directory. - -The package provides three programs for PDF conversion, :program:`pdfgetx3`, :program:`pdfgetn3` and :program:`pdfgets3`. To check if they are correctly installed run :: - - pdfgetx3 --version - pdfgetn3 --version - pdfgets3 --version - -This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a :program:`plotdata` -command for an easy plotting of text data files. To verify -if plotdata works, run the ``plotdata --version`` command. -Finally, a comprehensive test of the installed software can -be executed using :: - - python -m diffpy.pdfgetx.tests.run - -.. note:: - - Older versions of diffpy.pdfgetx use Python egg format - instead of Python wheel. - To install these use the easy_install command as follows:: - - python -m easy_install ./diffpy.pdfgetx-VERSION.egg - -.. index:: %pdfgetx3 IPython magic -.. index:: %pdfgetn3 IPython magic -.. index:: %pdfgets3 IPython magic - -IPython magic command ------------------------------------------------------------------------- - -These instructions are intended for `IPython`_ users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don't plan to customize IPython in such way you can safely skip -this paragraph. - -When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session. - -The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up - -#. find the ``profile_default/ipython_config.py`` file and open it - in a text editor. If that file does not exists, - create it first by executing :: - - ipython profile create - -#. navigate to the paragraph that contains the - :py:data:`!c.InteractiveShellApp.extensions` and add there - the following line :: - - c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics'] - - There must be no leading indent, i.e., the text must start at the - very first column. diff --git a/static_root/doc/pdfgetx/2.1.0/_sources/interact.rst.txt b/static_root/doc/pdfgetx/2.1.0/_sources/interact.rst.txt deleted file mode 100644 index 0d4fb746..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_sources/interact.rst.txt +++ /dev/null @@ -1,154 +0,0 @@ -Interactive mode -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. py:currentmodule:: _interactive_ - -The interactive mode is activated by using either the -:option:`-i, --interact <-i>` option or a non-empty -:option:`--plot <-p>` option. In the interactive mode -the program starts an `IPython`_ interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands ``%pdfgetx3`` and ``%pdfgetn3``, which can be used with -the same syntax as the :program:`pdfgetx3` and :program:`pdfgetn3` in -system shell. -The interactive session is also initialized with all functions from the -:py:mod:`matplotlib.pyplot` module for convenient plotting. -The functions and variables related to PDF processing are: - -.. py:function:: pdfgetter(x=None, y=None, filename='', **kwargs) - - Instance of the :py:class:`!PDFGetter` class which serves as a - low-level function that calculates the PDF. This is a callable - object, which takes as an argument a pair of input arrays for - (*Q*, intensity) or (|twotheta|, intensity) depending on - :confval:`dataformat`. It can be also called with a keyword - argument ``filename=FILE``, which would read the input arrays - from the specified file. When called with no arguments, - it calculates PDF from the last input data. - - :parameters: - * **x** (*numpy.ndarray, optional*) -- - The *Q* or |twotheta| values in powder diffraction pattern. - - * **y** (*numpy.ndarray, optional*) -- - The scattered intensities in powder diffraction pattern - - * **filename** (*str, optional*) -- - The text data file for loading the `x`, `y` values when - they are not specified. - - * **kwargs** (*misc, optional*) -- - Extra keyword arguments that are applied to - the :data:`!config` object, for example ``qmax=20``. - - :return: - A pair of output arrays *(r, G)*. - -.. interactvar:: config - - Instance of the :py:class:`!PDFConfig` class that stores the - :ref:`parameters and input files ` for the program. - Use ``print(config)`` to display the current configuration values. - This is the same object as :data:`!pdfgetter.config`. Configuration - may be changed by setting a respective attribute of the - :interactvar:`!config` object, for example:: - - In [1]: config.qmax = 21 - - The :py:data:`!config` values may be also changed by calling the - :py:func:`pdfgetter` or :py:func:`processfiles` function with a - corresponding keyword argument, for example - ``processfiles(qmax=20, force="once")``. - -.. interactvar:: iraw - iq - sq - fq - gr - - These variables are assigned the input raw intensities and the - intermediate results, stored as matrix rows. The matrix rows - correspond to twotheta1, intensity1, twotheta2, intensity2, etc. - Because matrices are iterated row first, the raw intensities - from all input files can be plotted with the matplotlib plot - function as ``plot(*iraw)``. - - These variables should be considered read-only and are reset - with subsequent PDF calculations. - -.. py:function:: tuneconfig(plotids=None, pdfgetter=None, axeslist=None) - - Show a GUI dialog for interactive tuning of configuration variables. - - :arg plotids: - The string or iterable that specify what interactive plots should be - tuned. By default the same as ``config.plot``. It can be also an - integer index or name of a transformation in :py:func:`pdfgetter` or - a reference to a :py:class:`!Transformation` object. - - :arg pdfgetter: - The optional :py:class:`!PDFGetter` object to be tuned. - This is by default the interactive :py:func:`!pdfgetter` object. - - :arg axeslist: - An optional list of matplotlib Axes for showing interactive plots. - When None, use ``subplot(N, 1, i)`` to create any necessary axes. - - .. note:: - - Changes from :py:func:`!tuneconfig` apply only to the configuration - and results in memory. Use the :py:func:`processfiles` function - to save them to disk. - - .. seealso:: :ref:`my-tuneconfig` tutorial - -.. py:function:: processfiles(filename=None, **kwargs) - - Process all input files again with the current configuration values. - This is a higher-level function than :py:func:`pdfgetter`, as - it also saves output files and produces plots as specified by the - :interactvar:`config` object. - - :arg filename: - One or more input files to be converted to PDFs and saved or - plotted according to the :py:data:`!config` settings. Use the - previous list of input files when not specified. - - :arg kwargs: - An optional keyword arguments to set for the :py:data:`!config` - object, for example ``(force="once", qmax=18)``. - - This function updates the :interactvar:`config.inputfiles ` - list and the :interactvar:`iraw`, :interactvar:`iq`, - :interactvar:`sq`, :interactvar:`fq` and :interactvar:`gr` - interactive variables. - -.. py:function:: clearsession() - - Clear all elements from the :interactvar:`config.inputfiles ` - and also the - :interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, - :interactvar:`fq` and :interactvar:`gr` variables. - - :return: - No return value. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: loaddata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. - -.. py:currentmodule:: diffpy.pdfgetx.plotdata -.. autofunction:: plotdata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx.plotdata` module. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: findfiles - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. diff --git a/static_root/doc/pdfgetx/2.1.0/_sources/intro.rst.txt b/static_root/doc/pdfgetx/2.1.0/_sources/intro.rst.txt deleted file mode 100644 index a112ee9a..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_sources/intro.rst.txt +++ /dev/null @@ -1,70 +0,0 @@ -Introduction -======================================================================== - -diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts. - - -.. index:: license - -License notice ------------------------------------------------------------------------- - -.. include:: ../../LICENSENOTICE.txt - - -.. index:: authors - -Authors ------------------------------------------------------------------------- - -This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Hung Vuong, -Songsheng Tao, -Simon Billinge. - - -.. index:: citations, references - -References ------------------------------------------------------------------------- - -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: - - P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge - `PDFgetX3: A rapid and highly automatable program for processing - powder diffraction data into total scattering pair distribution - functions `__, - *J. Appl. Crystallogr.* **46**, 560-566 (2013) - -For research publications that use this software to process neutron -diffraction data we ask you to also cite: - - P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, - S. J. L. Billinge - `PDFgetN3: atomic pair distribution functions from neutron - powder diffraction data using ad hoc corrections - `__, - *J. Appl. Crystallogr.* **51** (2018) - -For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication: - - CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge - `sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data `__. diff --git a/static_root/doc/pdfgetx/2.1.0/_sources/options.rst.txt b/static_root/doc/pdfgetx/2.1.0/_sources/options.rst.txt deleted file mode 100644 index c02220f2..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_sources/options.rst.txt +++ /dev/null @@ -1,370 +0,0 @@ -Options and parameters -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program. - - -.. Note :: - - The command line options start with a leading "-" and can - be only used as command line arguments when starting the - :program:`pdfgetx3` program. Within configuration file the parameter - names are plain words without any leading dashes. Finally, - parameters can be also set in the interactive mode as attributes of - the :interactvar:`config` object, but the assignments must be valid - Python statements. Here are examples of setting composition of - a processed specimen using each of these forms: - - #. assigned in configuration file:: - - ... - composition = CaTiO3 - ... - - #. set as a command-line option when starting :program:`pdfgetx3` or - :program:`pdfgetn3`:: - - pdfgetx3 --composition=CaTiO3 - - #. set in the IPython interactive mode:: - - pdfgetx3 -i - ... - In [1]: config.composition = "CaTiO3" - - -Program operation ------------------------------------------------------------------------- - -.. option:: -h, --help - - Display a brief usage information with a list of command line options - and exit. - -.. option:: -V, --version - - Display the program version and exit. - -.. option:: --manual - - Open this manual in a Web browser and exit. - -.. option:: -f, --find -.. _my-findpatterns: - - Select input files that match all patterns. The command - line arguments are by default taken as input files. However, - with the :option:`!--find` option they are processed as - file patterns and the matching files are then used as inputs. - The input files are by default searched in the current directory - unless there is a path entry (e.g., :file:`data/`) that - selects a different search path. The search patterns are - interpreted as fixed strings, all of which must be present - in the file name. A single argument ``+`` starts - a new group of patterns to match more files that are not - covered by one set of patterns. Additional pattern - groups reuse the current search path unless they provide - their own path value. Pattern groups containing only - a path entry reuse file patterns from the last group. - When pattern groups overlap the repeated matches are ignored - to make the resulting list of files unique. Files starting - with ``.`` are ignored unless there is ``^.`` pattern - that explicitly matches them. The search - syntax provides the following special patterns: - - .. tabularcolumns:: |l|p{0.75\textwidth}| - - +---------+------------------------------------------------------------+ - | ^ | match at the beginning of the string, i.e., ``^start`` | - | | matches only filenames that start with "start". | - +---------+------------------------------------------------------------+ - | $ | match at the end of string, for example, ``.chi$`` selects | - | | file names ending with ".chi". A ``$`` on its own | - | | matches every string and can be used to select all files. | - +---------+------------------------------------------------------------+ - | | match number *N* preceded by any number of leading zeros, | - | | e.g., ``<7>`` would match in "f7.chi", "f007.chi", but not | - | | in "f77.chi". | - +---------+------------------------------------------------------------+ - | | match an integer range from *N* to *M* inclusive. | - | | The matched number may have one or more leading zeros. | - +---------+------------------------------------------------------------+ - | <7-> | match number 7 or larger. | - +---------+------------------------------------------------------------+ - | <-7> | match number 7 or smaller. | - +---------+------------------------------------------------------------+ - | <-> | match any integer number. | - +---------+------------------------------------------------------------+ - | \+ | start a new pattern group, for example, ``.chi$ + .dat$`` | - +---------+------------------------------------------------------------+ - | / | set search path. An argument containing the ``/`` symbol | - | | is taken as the search path, for example, ``data/`` or | - | | ``./``. Each pattern group may provide its own search | - | | path effective for that and any subsequent pattern group. | - +---------+------------------------------------------------------------+ - - The ``^$<>`` characters are often special to Unix or Windows - command shells, therefore they need to be enclosed in double - quotes (\\") when used on command line. - - .. seealso:: tutorial on :ref:`my-findexamples` - -.. option:: -l, --list - - List all input files and exit. This is useful with the - :option:`!--find` option to verify if input files - are matched as intended. - - -Configuration file options ------------------------------------------------------------------------- - -.. option:: -c CONFIG, --config=CONFIG - - Read custom configuration file after loading the default ones. - Do not load any configuration file when "NONE". - -.. option:: -s NAME, --section=NAME - - Load the custom configuration file section ``[SectionName]`` after - loading the ``[DEFAULT]`` section. This is useful for creating - several configuration variants in a single configuration file. - -.. option:: --createconfig=FILE - - Write template configuration to a new FILE and exit. Write - to the standard output when FILE is "-". - -See also the :ref:`configuration file ` section -for further details. - -.. _my-ioparameters: - -Input and output options ------------------------------------------------------------------------- - -.. confval:: inputfile - - This parameter allows to specify one or more input files in the - configuration file, one file per line. The :confval:`!inputfile` - is only used if no input files were provided on the - :program:`pdfgetx3` or :program:`pdfgetn3` command line. - -.. confval:: dataformat -.. option:: --format=FORMAT - - Format of input files. Available formats are: ``twotheta``, ``QA``, - ``Qnm`` corresponding to a two-column text data where the first - column is either the scattering angle |twotheta| in degrees, *Q* in - inverse ångströms or *Q* in inverse nanometers. - -.. confval:: backgroundfile -.. option:: -b FILE, --background=FILE - - Optional datafile with background intensities from an empty sample - holder. It must be in the same dataformat as other input files. - -.. Note :: - - The following input is only used in ``sas`` mode. - -.. confval:: formfactorfile -.. option:: -ff FILE, --formfactorfile=FILE - - Form factor intensities of the scatterers. This is required for ``sas`` mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1. - -.. _my-datapath: -.. confval:: datapath -.. option:: -d DATAPATH, --datapath=DATAPATH - - One or more extra directories to be searched for input or - background data files. The :option:`!-d` option can be specified - several times to add more directories, these are prepended in front - of any default value. Within configuration file the datapath - directories have to be listed each on a separate line. - - A special value "NONE" (or "none") clears any previously defined - paths and only the further paths, if any, would be searched for - inputs. - -.. confval:: output -.. option:: -o OUTPUT, --output=OUTPUT - - Output file name, write to the standard output when "-". The - :option:`-t, --outputtypes <-t>` option controls what results are - being saved. Normally the OUTPUT is used as a custom basename for - the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o - tokens, which are expanded as follows: - - ===== ================== ======================================= - token example definition - ===== ================== ======================================= - @h dir1/dir2 the input file directory or "." - @r dir1/dir2/filename the input path with extension removed - @e dat the input file extension without "." - @t filename.dat the tail component of the input file - @b filename the tail component with extension removed - @o gr the output extension iq, sq, fq or gr - ===== ================== ======================================= - - An empty value works the same as "@b.@o" and saves the data - in the current directory with a proper extension for the - saved results. When "@o" is not present in the OUTPUT, it is - appended as a default filename extension. - -.. confval:: outputtypes -.. option:: -t TYPES, --outputtypes=TYPES - - Result types to be saved, one or more comma separated values. - Supported values are "iq", "sq", "fq", "gr", corresponding to the - |IQ|, |SQ|, |FQ| and |Gr| curves; these are also used as output - file extensions. - - Result files are not written when empty, "none" or "NONE". - -.. confval:: force -.. option:: --force=FORCE - - Overwrite existing output files. By default the output - files are not written if they already exist. Possible values - in a configuration file are "true", "yes", "on", "1" or - "false", "no", "off", "0" or "once". The special value "once" - permits one overwrite and then resets ``config.force`` to - ``False``. Note that in interactive mode the values assigned - to ``config.force`` are converted to Python :py:class:`bool` - unless equal to "once". - - -.. _my-pdfparameters: - -PDF parameters ------------------------------------------------------------------------- - - -.. confval:: mode -.. option:: --mode=STRING - - The PDF conversion mode, i.e., the name of the - :py:func:`.pdfgetter` setup. The available modes correspond - to the radiation type used in powder diffraction experiment and can - be "xray" or "neutron". - -.. confval:: wavelength -.. option:: -w FLOAT, --wavelength=FLOAT - - X-ray wavelength in ångströms. This value is required - for the "twotheta" dataformat in order to convert the scattering - angles |twotheta| to a momentum transfer *Q*. For other data formats - the wavelength is not necessary and may be left undefined. - -.. confval:: twothetazero -.. option:: --twothetazero=FLOAT - - Position of the zero scattering angle in diffractometer degrees. - This parameter corrects for a constant offset in the - measured |twotheta| values. When loading configuration file - it is assumed 0 unless specified otherwise. This parameter - is only effective for the "twotheta" dataformat. - -.. confval:: composition -.. option:: --composition=STRING - - Chemical composition of the sample. Supported formats are - "PbTi0.5Zr0.5O3", "Pb 1 Ti 1/2 Zr 1/2 O 3" or "CH3 (CH2)3 OH". - Space characters are ignored, unit counts can be omitted, but it is - important to use a proper upper and lower case in atom symbols. - Elements can appear several times in the formula, e.g., "CH3 CH3", - and the formula may contain parentheses or fractional - stoichiometries. - -.. confval:: bgscale -.. option:: --bgscale=FLOAT - - Scaling of the background intensities loaded from the - :confval:`backgroundfile`, by default 1. - -.. confval:: rpoly -.. option:: --rpoly=FLOAT - - *r*-limit for the maximum frequency in the |FQ| correction polynomial. - The PDF is unreliable at shorter *r*, however a - very small :confval:`!rpoly` would disable polynomial correction and - give noisy PDF. - Larger values produce closer fits with a higher degree polynomial, - but when too large, they might smooth-out a useful signal in the - data. The default is 0.9. - -.. confval:: qmaxinst -.. option:: --qmaxinst - - The *Q* cutoff for the meaningful input intensities in inverse - ångströms. Some data files may contain trailing zeros - or unreliable intensities at the upper bound of the detector range. - The :confval:`!qmaxinst` defines a threshold for unreliable data. - The parameter is also used as an upper boundary for the polynomial - fit correction of the |SQ| data. - -.. confval:: qmin -.. option:: --qmin - - The lower *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. - -.. confval:: qmax -.. option:: --qmax - - The upper *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. This is essentially a limit, where sample - signal decays to the level of data noise. - -.. confval:: rmin -.. option:: --rmin=FLOAT - - Lower bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rmax -.. option:: --rmax=FLOAT - - Upper bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rstep -.. option:: --rstep=FLOAT - - Spacing of the *r*-grid for the calculated PDF in ångströms. - - -Other parameters ------------------------------------------------------------------------- - -.. confval:: plot -.. option:: -p TYPES, --plot=TYPES - - Plot the specified results. A comma separated list with one or - more items from "iq", "sq", "fq", "gr". No plot is produced when - empty, "none" or "NONE". Setting this option turns on the - interactive mode. - -.. confval:: interact -.. option:: -i, --interact - - Start an IPython interactive session after processing all files. - Useful for tuning the configuration parameters or interactive - plotting. This is always on when plot option has been set. - See also :doc:`interact` for further details. - -.. confval:: verbose -.. option:: --verbose=VALUE - - Level of detail for the program to report about its actions. - Possible values are "error", "warning", "info", "debug", "all" or an - integer number from 0 to 5. Messages are completely suppressed when - 0, all messages are printed when verbose is 5 ("all") or higher. - This option is useful for diagnostics of any unexpected behavior - in the program. diff --git a/static_root/doc/pdfgetx/2.1.0/_sources/plotdata.rst.txt b/static_root/doc/pdfgetx/2.1.0/_sources/plotdata.rst.txt deleted file mode 100644 index d1c02156..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_sources/plotdata.rst.txt +++ /dev/null @@ -1,161 +0,0 @@ -.. index:: plotdata (program) -.. _cmd-plotdata: - -The plotdata program -======================================================================== - -.. include:: abbreviations.txt -.. program:: plotdata - -The PDFgetX3 software includes a simple stand-alone utility -:program:`plotdata` for plotting text data files. In most cases -this program can be invoked from a command-shell as :: - - plotdata file1.dat file2.dat - -which plots the numerical data from the text files :file:`file1.dat`, -:file:`file2.dat` together in a single graph. By default the first -column is used as an *x* variable and the second column is used for the -*y* values. After displaying the plot the program starts an `IPython`_ -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the :data:`!filenames` variable -containing a list of plotted files. It also pre-loads the -|plotdata| and |findfiles| functions just as in PDFgetX3 -interactive session. The :py:func:`!plotdata` -function works in a similar way as the :program:`plotdata` program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -:py:func:`!plotdata` function would be:: - - In [1]: plotdata(['file1.dat', 'file2.dat']) - - -Selecting files ------------------------------------------------------------------------- - -The :program:`plotdata` program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as ``*.dat``. The file search feature is controlled by the -following options: - -.. option:: -f, --find - - Use command line arguments as filename patterns and plot all matching - files. This option works in the same way as for - :program:`pdfgetx3`, for full details see the - :option:`pdfgetx3 --find ` documentation. Note that - within command line the special patterns ``^$<>`` need to be quoted - in double quotes (\\") so they are not processed by command shell. - -.. option:: -l, --list - - List the input files and exit. This is useful in conjunction - with the :option:`!-f, --find` option to check if data files - are selected as intended. - -Assuming the current directory contains 20 files named -:file:`file1.dat`, :file:`file2.dat`, ..., :file:`file20.dat`, -the plotting of files 9 to 13 could be done (with a check listing) -as follows :: - - $ plotdata -fl "<9-13>.dat" - file9.dat - file10.dat - file11.dat - file12.dat - file13.dat - $ plotdata -f "<9-13>.dat" - -Within an interactive IPython session the equivalent plot could be -produced by combining the |plotdata| and |findfiles| functions as :: - - In [1]: plotdata(findfiles("<9-13>.dat")) - - -Selecting x and y data ------------------------------------------------------------------------- - -The :program:`plotdata` program provides several ways of selecting -columns for *x* or *y* data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is "0" -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function): - - -.. option:: -x X - - index or name of the *x*-column to plot. See the :option:`-y` option - for the supported syntax, but note that ``X`` may select only one - column. When set to "." use the data-row index for *x*. - -.. option:: -y Y - - index or name of the *y*-column or columns to plot. The ``Y`` column - specification can be a comma separated list of indices, column names - or Python-like ranges, for example "1,2", "G", "1:4" (START:STOP, - same as "1,2,3"), "1:4:2" (START:STOP:STEP, same as "1,3"), or - "-2:" (same as "-2,-1", i.e, the last 2 columns). Because column - indexing starts at "0" the second column must be specified as "1". - - The column names work if the data section in the file is preceded by - a headline of unique column names, for example:: - - x square cube - 1 1 1 - 2 4 8 - 3 9 27 - 4 16 64 - - For such data file the plotdata program will recognize column names - "x", "square" and "cube" and an implicit "." for row index. - -.. option:: -s STYLE, --style=STYLE - - optional plot format specification. See the - :func:`matplotlib.pyplot.plot` function - for a list of available formats. - -.. option:: -L LOG, --log=LOG - - axes to be plotted with logarithmic scaling, for example, "x", "y" or - "xy". Axes not listed in ``LOG`` will use linear scaling. - -.. option:: -h, --help - - display a brief usage info and exit. - -.. option:: -V, --version - - show program version and exit. - -.. option:: --manual - - Open this manual page in a Web browser and exit. - - -Examples ------------------------------------------------------------------------- - -The examples directory :file:`plotdata` contains a :file:`sincos.dat` -file that has 3-columns of values labeled as "x", "sin" and "cos". -Here are several examples of the :program:`plotdata` capabilities -when used from command line - the user is encouraged to try them out:: - - plotdata sincos.dat - plotdata -y 1,2 sincos.dat - plotdata -x . -y 0:3 sincos.dat - plotdata -y cos sincos.dat - plotdata -x sin -y cos -sr-- sincos.dat - -An equivalent usage from a general IPython session would be:: - - ipython --matplotlib=auto - In [1]: from diffpy.pdfgetx.plotdata import plotdata - In [2]: plotdata('sincos.dat') - In [3]: plotdata('sincos.dat', y=[1,2]) - In [4]: plotdata('sincos.dat', x='.', y=':3') - In [5]: plotdata('sincos.dat', y='cos') - In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--') diff --git a/static_root/doc/pdfgetx/2.1.0/_sources/quick-start.rst.txt b/static_root/doc/pdfgetx/2.1.0/_sources/quick-start.rst.txt deleted file mode 100644 index 0b2fffd1..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_sources/quick-start.rst.txt +++ /dev/null @@ -1,163 +0,0 @@ -Quick-start guide -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing :program:`pdfgetx3`, :program:`pdfgetn3`, or -:program:`pdfgets3` in a shell window. Please, refer to the :doc:`installation ` section if this is not working yet. - -.. index:: pdfgetx3 (program) -.. _cmd-pdfgetx3: - -pdfgetx3 command ------------------------------------------------------------------------- - -The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as :: - - pdfgetx3 [options] input1 input2 ... inputN - -The :file:`inputN` stands for an input powder diffraction data. The -:file:`inputN` file is a simple two-column text file, where the first -column corresponds to either the |twotheta| diffraction angle, or a -momentum transfer, *Q*, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -`FIT2D program `_ using -its "chi" output format, thus we will also refer to them as "chi-files". -A typical content of a "chi" file looks as folows: - -.. code-block:: none - - Pt_bulk-00055.tif: 2-theta Scan - 2-Theta Angle (Degrees) - - 1465 - 2.0003892E-02 0.0000000E+00 - 6.0011677E-02 0.0000000E+00 - 1.0001946E-01 0.0000000E+00 - 1.4002724E-01 0.0000000E+00 - 1.8003502E-01 0.0000000E+00 - ... - -The command-line options are arguments that start with a dash "-" and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash ``--``. Options may require values. For short options, -the value may be joined to the option string, for example -:option:`!-w0.142774`, while for the long options it has to be separated -with an equal sign, e.g., :option:`!--wavelength=0.142774`. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the :doc:`options` section of -this manual. A brief summary of options can be also displayed by -executing :: - - pdfgetx3 --help - -The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the :doc:`tutorial`. -In general, the first step is to create a commented configuration file ``pdfgetx3.cfg`` using:: - - pdfgetx3 --createconfig=pdfgetx3.cfg - -The configuration file can have any name, but it is preferable -to use either :file:`pdfgetx3.cfg` or :file:`.pdfgetx3.cfg`, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the :option:`-c, --config <-c>` option. - -Open the pdfgetx3.cfg file in a **text** editor. The lines that -start with a hash mark ``#`` are comments and are not used. The lines -starting with a right brace ``[`` denote sections in the configuration -file. The active lines are all formatted as -"NAME=VALUE". Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation: - -* :confval:`dataformat` -- specifies the input data format - -* :confval:`wavelength` -- radiation wavelength in Å required for the - "twotheta" format. - -* :confval:`composition` -- chemical composition of the sample - -* :confval:`qmaxinst` -- upper *Q* boundary for a meaningful measurement - intensities. - -* :confval:`qmax` -- *Q*-cutoff for the Fourier transformation that - yields the PDF. - -Save the updated configuration file and run pdfgetx3 on the input data -:file:`FILENAME.chi` as :: - - pdfgetx3 --verbose=info -t gr FILENAME.chi - -Here the :option:`--verbose=info <--verbose>` option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The :option:`-t gr <-t>` option -tells the program to save the final |Gr| curve as a -:file:`FILENAME.gr` file in the working directory. - -The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation :: - - pdfgetx3 -c FILENAME.gr --plot=fq,gr - -Note this command does not include any .chi file and this will as -a result process the previously used input :file:`FILENAME.chi`. -The :option:`--plot=fq,gr <-p>` option tells PDFgetX3 to -display 2 plots for the reduced structure function |FQ| and the -final PDF |Gr|. The :option:`!--plot` option also implies an -:doc:`interactive mode ` -therefore the program does not exit, but starts an -interactive `IPython`_ session. To exit the interactive mode, -type ``exit()`` and press Enter. - -.. index:: pdfgetn3 (program) -.. _cmd-pdfgetn3: - -pdfgetn3 command ------------------------------------------------------------------------- - -The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the -:option:`--mode` option. Running ``pdfgetn3`` is nearly identical -to executing ``pdfgetx3 --mode=neutron``. The only difference between -these commands is that pdfgetx3 checks for configuration files -:file:`pdfgetx3.cfg` and :file:`.pdfgetx3.cfg`, whereas -pdfgetn3 looks for :file:`pdfgetn3.cfg` and :file:`.pdfgetn3.cfg`. - -.. index:: pdfgets3 (program) -.. _cmd-pdfgets3: - -pdfgets3 command ------------------------------------------------------------------------- - -The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying ``mode = sas`` in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named :file:`pdfgets3.cfg` and -:file:`.pdfgets3.cfg` in order, when no configuration file is specified. - -Please refer to the :doc:`tutorial section ` for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3. diff --git a/static_root/doc/pdfgetx/2.1.0/_sources/release.rst.txt b/static_root/doc/pdfgetx/2.1.0/_sources/release.rst.txt deleted file mode 100644 index 7ede93fa..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_sources/release.rst.txt +++ /dev/null @@ -1,3 +0,0 @@ -.. index:: release notes - -.. mdinclude:: ../../CHANGELOG.md diff --git a/static_root/doc/pdfgetx/2.1.0/_sources/tutorial.rst.txt b/static_root/doc/pdfgetx/2.1.0/_sources/tutorial.rst.txt deleted file mode 100644 index ee02754b..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_sources/tutorial.rst.txt +++ /dev/null @@ -1,744 +0,0 @@ -Tutorial -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. index:: example files -.. py:currentmodule:: diffpy.pdfgetx - -In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the :file:`examples` -folder included with the PDFgetX3 distribution. The :file:`examples` -folder can be found in the parent "doc" directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -|zipped-examples|. - - -.. index:: examples - -Nickel X-ray PDF ------------------------------------------------------------------------- - -predefined configuration file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -Change to the :file:`Ni` directory. The file named -:file:`ni300mesh_300k_nor_1-5.chi` contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the |twotheta| scattering -angles and X-ray intensities. The second file -:file:`kapton_bgrd_300k_nor_2-3.chi` contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the :file:`pdfgetx3.cfg` contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -:ref:`pdfgetx3 ` program -with the powder data file as an argument:: - - $ pdfgetx3 ni300mesh_300k_nor_1-5.chi - -For the first run there should be no output on the screen, -however a new file, :file:`ni300mesh_300k_nor_1-5.gr` should appear -in the work directory. -We can use the :ref:`plotdata ` program, -included with this software, to plot the output data:: - - $ plotdata ni300mesh_300k_nor_1-5.gr - -This will open a graph window and start an `IPython`_ interactive session. -To exit and close the figure, type ``exit()`` on the IPython prompt. -Let's run the program again, but now with a -:option:`--verbose=info <--verbose>` -option, to show more details about the program actions. :: - - $ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi - - INFO:applying pdfgetx3 defaults - INFO:set config.mode = xray - INFO:searching for default config file /home/user/.pdfgetx3.cfg - INFO:searching for default config file .pdfgetx3.cfg - INFO:searching for default config file pdfgetx3.cfg - INFO:loaded default config file pdfgetx3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi - INFO:set config.outputtypes = gr - INFO:set config.wavelength = 0.142774 - INFO:set config.composition = Ni - INFO:set config.qmaxinst = 26.5 - INFO:set config.qmax = 26.0 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 30.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'xray' - INFO:calling config_xray - INFO:started PDF processing. - INFO:processing 'ni300mesh_300k_nor_1-5.chi' - INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr' - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - INFO:elapsed time: 0.095 - -Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the :option:`!--verbose` option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the :option:`--force=yes <--force>` option, upon -which pdfgetx3 would overwrite any existing files. - -PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the -:option:`-c` option. Another option, :option:`--plot=[iq,sq,fq,gr] -<-p>` turns on plotting of the final PDF or of some other result. A -side effect of the :option:`!--plot` option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function |FQ| and the PDF curve |Gr|. This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:: - - $ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr - - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - - Variables related to PDF processing: - - pdfgetter -- PDFGetter used for calculation. - config -- configuration data used by PDFGetter. - See config.inputfiles for a list of inputs. - iraw -- matrix of input raw intensities with 2 rows per file. - iq sq fq gr -- intermediate results per each input file stored - as matrix rows. - - Functions: - - tuneconfig -- dynamically tune configuration variables. - processfiles -- process specified data files. - clearsession -- clear all elements from the inputfiles, iraw, - iq, sq, fq and gr variables. - plotdata -- plot all or selected columns from a text data file. - loaddata -- load all or selected columns from a text data file. - findfiles -- search for files matching the specified patterns. - - Use "%pdfgetx3" for a fresh run without exiting IPython. - In [1]: - -This will open a plot figure similar to - -.. image:: images/nickelfqgr.png - -Because of the :doc:`interactive mode ` implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -:interactvar:`config` variable stores all the configuration parameters, -and its content can be displayed with the :py:func:`print` -function as :: - - In [1]: print(config) - - configfile = ni300mesh_300k_nor_1-5.gr - configsection = DEFAULT - dataformat = twotheta - ... - qmax = 26.0 - ... - -The :py:func:`.processfiles` function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the |FQ| and |Gr| -curves calculated at |Qmax| = 22 |Ainv|, we can call -:py:func:`!processfiles` and pass it a keyword argument for -the new qmax as follows:: - - In [2]: processfiles(qmax=22) - - # the qmax parameter was updated to a new value, thus - In [3]: config.qmax - Out[3]: 22 - -There should be now two lines in each plot axis corresponding to -the results at |Qmax| equal 26 and 22 |Ainv|. To exit the program, -type ``exit()``. - - -processing from scratch -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -We have already encountered the command-line :option:`option -c <-c>` -for specifying a custom configuration file. A special argument "NONE", -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi - - WARNING:Nothing to do, use "-t" or "--plot" options. - ERROR:Configuration error: wavelength not specified. - ERROR:See "--help" for more hints. - -There is an error, for the wavelength is necessary to convert -the scattering angle |twotheta| to momentum transfer *Q*. The -X-ray wavelength was 0.142774 Å, which can be passed with the -:option:`-w, --wavelength <-w>` option:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 - - ... - ERROR:Configuration error: Chemical composition not known. - ERROR:See "--help" for more hints. - -There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the :option:`--composition` option. The example -below uses a "\\\\" character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni - - WARNING:Nothing to do, use "-t" or "--plot" options. - ... - -There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the :option:`-t, --outputtypes <-t>` option. -The outputtypes option recognizes the following result types: -"iq", "sq", "fq", "gr". One or more of these type strings, -separated by a comma, can be included with the -:option:`!-t` option, which will produce the corresponding -output files. An empty string, such as ``-t ""``, or ``-t NONE`` -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings. - -At this point, we will not write any output files, but will use the -:option:`--plot <-p>` option to display the calculated curves. The -:option:`!--plot` accepts the same arguments as outputtypes, so to -display the |FQ| and |Gr| curves we shall run :: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni --plot=fq,gr - - WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161 - WARNING:qmax reset to the data boundary qmaxinst=28.0865680161 - -which should open the following plot window: - -.. image:: images/nickelfqgrnoisy.png - -The graphs look terrible. The PDF is very noisy and the |FQ| curve -shows a sudden break at about 27 |Ainv|. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -:interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, -:interactvar:`fq`, :interactvar:`gr` -variables for the original raw data and intermediate results. We -are going to plot the "iq" variable that has the input intensities -resampled on the *Q* grid. The matplotlib function -:py:func:`~matplotlib.pyplot.clf` clears the figure, -the iq variable is a two-row matrix with *Q* and *I* rows, and the -:py:func:`~matplotlib.pyplot.axis` -function lets us zoom to a given range:: - - In [1]: clf() - In [2]: plot(iq[0], iq[1]) - Out[2]: [] - In [3]: axis([20, 29, 0, 3000]) - Out[3]: [20, 29, 0, 3000] - -The graph shows a sudden drop in the raw intensities at 27 |Ainv|. -The :confval:`qmaxinst` variable defines a *Q* cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 |Ainv| :: - - In [4]: processfiles(qmaxinst=26.5) - WARNING:qmax reset to the data boundary qmaxinst=26.5 - -The updated curves looks reasonable without any oscillations and -breakpoints. The :py:func:`.tuneconfig` function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type ``tuneconfig()`` to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the |FQ| and |Gr| curves change. -The :confval:`rpoly` parameter controls the degree of data-correction -polynomial and is an approximate low-*r* bound of reliable *G* -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the |Gr| -curve and save it to an output file :file:`nicmd.gr`:: - - In [14]: config.qmax = 26 - In [15]: config.outputtypes = 'gr' - In [16]: config.output = 'nicmd' - In [17]: processfiles() - - -Platinum X-ray series ------------------------------------------------------------------------- - -PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(`z-shell `_ being a notable exception). - -.. _my-findexamples: - -matching input files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The :program:`pdfgetx3` program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the :option:`-f, --find <-f>` option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option -:option:`-l, --list <-l>` makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files. - -We will try out this file search on platinum example files. Open a -terminal and navigate to the :file:`Pt` directory. There should be a -:file:`series` subdirectory with 6 chi files indexed from 903 to 908. -At first, let's stay in the :file:`Pt` directory and run the following -command :: - - $ pdfgetx3 --list --find - - Pt_bulk-00055-pdfgetx2.gr - Pt_bulk-00055-pdfgetx3.gr - Pt_bulk-00055.chi - empty_capillary-00032.chi - pdfgetx3.cfg - plotpdfcomparison.py - -Without any patterns the file search matches all files in the current -directory. Now let's try to add name patterns. There are few special -patterns, for example ``^`` matches at the beginning of the filename, ``$`` at the end and ```` matches a range of integer values from -*N* to *M*. The patterns containing ``^$<>`` need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works. - -Filenames containing "y":: - - $ pdfgetx3 --list --find y - empty_capillary-00032.chi - plotpdfcomparison.py - -Filenames that containing both "y" and "chi", here we use the -options :option:`!--list` and :option:`!--find` in an abbreviated -form :option:`!-l` and :option:`!-f`:: - - $ pdfgetx3 -lf y chi - empty_capillary-00032.chi - -Filenames that start with "e":: - - $ pdfgetx3 --list --find "^e" - empty_capillary-00032.chi - -Filenames that contain *character* "2":: - - $ pdfgetx3 --list --find 2 - Pt_bulk-00055-pdfgetx2.gr - empty_capillary-00032.chi - -Filenames that contain *numeric value* "2":: - - $ pdfgetx3 -lf "<2>" - Pt_bulk-00055-pdfgetx2.gr - -The special argument ``+`` starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both "bulk" and "chi" substrings and then -also those that have "empty" and "chi" in their names, use:: - - $ pdfgetx3 -lf bulk chi + empty chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - -When pattern groups overlap the resulting matches are -made unique and each file is listed only once :: - - $ pdfgetx3 -lf bulk chi + chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - - -data search path -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Each group of PDFgetX3 patterns can have one entry containing -forward slash "/" to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered "903" to "905" and "908" from the -:file:`series` subdirectory can be therefore matched using :: - - $ pdfgetx3 -lf series/ "<903-905>" + 908 - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00908.chi - -The current directory can be selected using `./` :: - - $ pdfgetx3 -lf series/ 903 + ./ bulk chi - series/Pt_bulk_ramp03-00903.chi - Pt_bulk-00055.chi - -When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -".chi"-ending files in the current and :file:`series` -directories can be thus found using :: - - $ pdfgetx3 -lf ".chi$" + series/ - Pt_bulk-00055.chi - empty_capillary-00032.chi - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00906.chi - series/Pt_bulk_ramp03-00907.chi - series/Pt_bulk_ramp03-00908.chi - - -output file names -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -By default the output files are saved in the current directory. The -output path, can be changed with the :option:`-o, --output <-o>` option. -The :option:`!-o` recognizes several tokens that are replaced with -parts of the input file name, for example, "@b" expands to an -extension-stripped base name. In similar faction, "@o" is replaced -with the output type extension. Thus to generate PDFs for all files -in the :file:`series` directory and save them in the -:file:`series-gr` subfolder do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o - -The extension ".@o" is automatic when not included anywhere in the -output file name. Thus to process the Pt series at |Qmax| = 18 |Ainv| -while saving the results in the same folder, but with a "_qmax18" suffix -in their filenames do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18 - -For input file :file:`Pt_bulk_ramp03-00903.chi` the :option:`!-o` option -above expands to output path :file:`series-gr/Pt_bulk_ramp03-00903_qmax18.gr`. -The :file:`series-gr` directory should now contain 12 "gr" files, -6 of them processed at |Qmax| = 27 |Ainv| as given by configuration -file and 6 others processed at |Qmax| = 18 |Ainv|. - -.. seealso:: :option:`-o, --output <-o>` for a list of output tokens - -.. index:: tuneconfig (example) -.. _my-tuneconfig: - -Interactive tuning of parameters ------------------------------------------------------------------------- - -One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the :file:`Ni` directory in the shell and process -the nickel PDF while plotting the |FQ| and |Gr| curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -:py:func:`.tuneconfig` -function from the IPython environment :: - - $ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi - ... - In [1]: tuneconfig() - -The -:py:func:`!tuneconfig` -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot. - -.. image:: images/tunenickelfqgr.png - -The *constant data scale* check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -:ref:`PDF parameters section `. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the :confval:`bgscale` parameter -if PDF has been processed without any background data. - -By default the -:py:func:`!tuneconfig` -function displays the same curves as -specified by the :option:`--plot <-p>` option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the :py:meth:`!describe` method of the -:py:func:`.pdfgetter` object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object *t4* that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the :py:func:`!tuneconfig` function :: - - $ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi - ... - Use "%pdfgetx3" for a fresh run without exiting IPython. - - In [1]: fig, ax = subplots(2) - In [2]: pdfgetter.describe() - 0 TransformTwoThetaToQA - convert x data from twotheta to Q in 1/A - 1 TransformQGridRegular - Remove the data outside the (qmin, qmaxinst) range - 2 TransformBackground - subtract background intensity - 3 TransformXrayASFnormChris - scale and normalize intensities by x-ray scattering factors - 4 TransformSQnormRPoly - Normalize S(Q) by fitting a polynomial - 5 TransformSQToFQ - Convert S(Q) to F(Q). - 6 TransformFQgrid - Resample F(Q) to a regular grid suitable for FFT - 7 TransformFQToGr - Convert F(Q) to G(r). - In [3]: t4 = pdfgetter.getTransformation(4) - In [4]: tuneconfig([t4, 'gr'], axeslist=ax) - In [5]: ax[0].legend(loc=2) - -The :py:func:`~matplotlib.pyplot.subplots` function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window: - -.. image:: images/tunenickelt4gr.png - -The tuning can be finished by clicking the ``Done`` button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the :interactvar:`config` -object, for example:: - - In [5]: config.bgscale = 1.5 - -Finally, to save the new results, we shall first confirm -:confval:`outputtypes` have been correctly set and then use the -:py:func:`.processfiles` function to redo the calculations, plots and -data output for the updated configuration. Note that the -:py:func:`!processfiles` function accepts keyword arguments for -configuration parameters. This is used at line ``In [8]`` to -turn on the :confval:`force` flag and is in effect a shortcut -for an extra ``config.force = True`` statement. :: - - In [6]: config.outputtypes - Out[6]: ['gr'] - In [7]: processfiles() - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - In [8]: processfiles(force=True) - -:file:`ni300mesh_300k_nor_1-5.gr` was successfully saved at an -updated configuration for there were no warnings after the last call. - - -Neutron PDF ------------------------------------------------------------------------- - -This example illustrates PDF extraction from -neutron powder data using :ref:`pdfgetn3 `. -Navigate to the :file:`n-Sapphire` directory in the shell. -The :file:`sapphire755.dat` file contains powder diffraction data from -sapphire (α-Al\ :sub:`2`\ O\ :sub:`3`) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The :file:`pdfgetn3.cfg` configuration file specifies -processing parameters such as :confval:`wavelength`, -:confval:`twothetazero`, :confval:`composition`, and :confval:`mode`. - -To extract the sapphire neutron PDF run :: - - $ pdfgetn3 --verbose=info sapphire755.dat - - INFO:applying pdfgetn3 defaults - INFO:set config.mode = neutron - INFO:searching for default config file /home/user/.pdfgetn3.cfg - INFO:searching for default config file .pdfgetn3.cfg - INFO:searching for default config file pdfgetn3.cfg - INFO:loaded default config file pdfgetn3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = - INFO:set config.outputtypes = fq, gr - INFO:set config.mode = neutron - INFO:set config.wavelength = 1.0989 - INFO:set config.twothetazero = -0.38 - INFO:set config.composition = Al2O3 - INFO:set config.qmaxinst = 11.2 - INFO:set config.qmax = 11.2 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 20.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'neutron' - INFO:calling config_neutron - INFO:started PDF processing. - INFO:processing 'sapphire755.dat' - INFO:resolved output file '' as 'sapphire755.fq' - INFO:written outpufile sapphire755.fq - INFO:resolved output file '' as 'sapphire755.gr' - INFO:written outpufile sapphire755.gr - INFO:elapsed time: 0.097 - -This will produce two files :file:`sapphire755.fq`, :file:`sapphire755.gr` -for the |FQ| and |Gr| functions. -To compare them with expected results use :: - - $ plotdata sapphire755-expected.fq sapphire755.fq - $ plotdata sapphire755-expected.gr sapphire755.gr - - -Fit twothetazero ------------------------------------------------------------------------- - -For a good quality PDF it is essential to use powder patterns with -accurate values of *Q*. Some instruments may produce spectra with -a slightly offset scattering angle |twotheta| which -causes inaccurate *Q* and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the :confval:`twothetazero` correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples. - -This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -`diffpy.cmi `__, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use `Anaconda Python`_ and set up a dedicated -Anaconda environment *nbcmi* for this tutorial. -This can be accomplished using the following steps:: - - $ conda create -n nbcmi -c diffpy python=2 diffpy.cmi - $ conda activate nbcmi - $ pip install path/to/diffpy.pdfgetx-VERSION.whl - -When these prerequisites are in place, -change to the :file:`n-twothetazero-fit` directory -and open the self documented Jupyter notebook as follows :: - - $ jupyter notebook fit-twothetazero.ipynb - -.. |tthzero| replace:: :confval:`!twothetazero` - -The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted |tthzero|. -After running all cells the notebook should produce similar graphs -as in the figure below. - -.. figure:: images/twothetazerofit.* - - Refinement of nickel neutron PDF for **(a)** uncorrected data - and **(b)** with a refined zero correction. - The extracted PDFs are plotted as blue circles, - simulated PDFs as red lines and - the difference is plotted offset in green below. - -The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual R\ :sub:`w` which is lowered from (a) 0.18 to (b) 0.05. - - -Small-angle-scattering PDF (sasPDF) ------------------------------------------------------------------------- - -Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using :ref:`pdfgets3 `. -To do this, navigate to the :file:`Au_DNA_NPA` directory in your terminal. -In this folder, you will find :file:`Au_DNA_NPA.chi` and -:file:`Au_DNA_FF.chi` files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in `D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008). -`_. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The :file:`pdfgets3.cfg` -configuration file specifies processing parameters such as :confval:`formfactorfile` (required by ``sas`` mode), :confval:`qmin`, :confval:`qmax`, and :confval:`mode`. - -To extract the PDF of DNA-capped DNA nanoparticle assemblies :: - - $ pdfgets3 --verbose=info Au_DNA_NPA.chi - - INFO:applying pdfgets3 defaults - INFO:set config.mode = sas - INFO:searching for default config file /home/user/.pdfgets3.cfg - INFO:searching for default config file .pdfgets3.cfg - INFO:searching for default config file pdfgets3.cfg - INFO:loaded default config file pdfgets3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = QA - INFO:set config.backgroundfile = - INFO:set config.datapath = [] - INFO:set config.formfactorfile = Au_DNA_FF.chi - INFO:set config.output = - INFO:set config.outputtypes = fq, gr - INFO:set config.force = yes - INFO:set config.mode = sas - INFO:set config.rpoly = 240.605 - INFO:set config.qmaxinst = 0.075 - INFO:set config.qmin = 0.01 - INFO:set config.qmax = 0.072 - INFO:set config.rmin = 100.0 - INFO:set config.rmax = 5000.0 - INFO:set config.rstep = 1.0 - INFO:set config.plot = iq, fq, gr - INFO:set config.verbose = info - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'sas' - INFO:calling config_sas - INFO:started PDF processing. - INFO:processing 'Au_DNA_NPA.chi' - INFO:resolved output file '' as 'Au_DNA_NPA.fq' - INFO:written outpufile Au_DNA_NPA.fq - INFO:resolved output file '' as 'Au_DNA_NPA.gr' - INFO:written outpufile Au_DNA_NPA.gr - INFO:elapsed time: 0.947 - - -This will save two files :file:`Au_DNA_NPA.fq`, :file:`Au_DNA_NPA.gr` in the same directoy for the |FQ| and |Gr| functions. This also plots |FQ| and |Gr| functions in a pop-up window and the processing parameters such as :confval:`rpoly` or so may be tuned interactively by issuing command :py:func:`!tuneconfig` in the `IPython`_ session as discussed above. diff --git a/static_root/doc/pdfgetx/2.1.0/_static/basic.css b/static_root/doc/pdfgetx/2.1.0/_static/basic.css deleted file mode 100644 index 01192852..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_static/basic.css +++ /dev/null @@ -1,768 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- 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: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.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: 450px; - 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.brackets:before, -span.brackets > a:before{ - content: "["; -} - -a.brackets:after, -span.brackets > a:after { - content: "]"; -} - -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, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -img.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 { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 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; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - 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; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -th > p:first-child, -td > p:first-child { - margin-top: 0px; -} - -th > p:last-child, -td > p:last-child { - margin-bottom: 0px; -} - -/* -- figures --------------------------------------------------------------- */ - -div.figure { - margin: 0.5em; - padding: 0.5em; -} - -div.figure p.caption { - padding: 0.3em; -} - -div.figure p.caption span.caption-number { - font-style: italic; -} - -div.figure p.caption 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 td { - vertical-align: top; -} - - -/* -- 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; -} - -li > p:first-child { - margin-top: 0px; -} - -li > p:last-child { - margin-bottom: 0px; -} - -dl.footnote > dt, -dl.citation > dt { - float: left; -} - -dl.footnote > dd, -dl.citation > dd { - margin-bottom: 0em; -} - -dl.footnote > dd:after, -dl.citation > dd: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 > dt:after { - content: ":"; -} - -dl.field-list > dd { - padding-left: 0.5em; - margin-top: 0em; - margin-left: 0em; - margin-bottom: 0em; -} - -dl { - margin-bottom: 15px; -} - -dd > p:first-child { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, span.highlighted { - background-color: #fbe54e; -} - -rect.highlighted { - fill: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.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.5em; - content: ":"; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -span.pre { - -moz-hyphens: none; - -ms-hyphens: none; - -webkit-hyphens: none; - hyphens: none; -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -div.code-block-caption { - padding: 2px 5px; - font-size: small; -} - -div.code-block-caption code { - background-color: transparent; -} - -div.code-block-caption + div > div.highlight > pre { - margin-top: 0; -} - -div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ - user-select: none; -} - -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 { - padding: 1em 1em 0; -} - -div.literal-block-wrapper div.highlight { - margin: 0; -} - -code.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -code.descclassname { - background-color: transparent; -} - -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: relative; - left: 0px; - 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_root/doc/pdfgetx/2.1.0/_static/classic.css b/static_root/doc/pdfgetx/2.1.0/_static/classic.css deleted file mode 100644 index 3496a7bb..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_static/classic.css +++ /dev/null @@ -1,271 +0,0 @@ -/* - * classic.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- classic theme. - * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -html { - /* CSS hack for macOS's scrollbar (see #1125) */ - background-color: #FFFFFF; -} - -body { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; - font-size: 100%; - background-color: white; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: white; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: white; - color: #222222; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #555555; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #555555; - text-decoration: underline; -} - -div.related { - background-color: white; - line-height: 30px; - color: #666666; -} - -div.related a { - color: #444444; -} - -div.sphinxsidebar { -} - -div.sphinxsidebar h3 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #444444; -} - -div.sphinxsidebar h4 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #444444; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #444444; -} - -div.sphinxsidebar a { - color: #444444; -} - -div.sphinxsidebar input { - border: 1px solid #444444; - font-family: sans-serif; - font-size: 1em; -} - - -/* for collapsible sidebar */ -div#sidebarbutton { - background-color: #3c6e83; -} - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #00608f; - text-decoration: none; -} - -a:visited { - color: #30306f; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - background-color: white; - font-weight: normal; - color: #1a1a1a; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #aaaaaa; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #aaaaaa; - color: white; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: #eeffcc; - color: #333333; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -code { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th, dl.field-list > dt { - background-color: #ede; -} - -.warning code { - background: #efc2c2; -} - -.note code { - background: #d6d6d6; -} - -.viewcode-back { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -div.code-block-caption { - color: #efefef; - background-color: #1c4e63; -} \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/_static/copybutton.js b/static_root/doc/pdfgetx/2.1.0/_static/copybutton.js deleted file mode 100644 index ca9f489f..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_static/copybutton.js +++ /dev/null @@ -1,57 +0,0 @@ -$(document).ready(function() { - /* Add a [>>>] button on the top-right corner of code samples to hide - * the >>> and ... prompts and the output and thus make the code - * copyable. */ - var div = $('.highlight-python .highlight,' + - '.highlight-pycon .highlight,' + - '.highlight-python3 .highlight') - var pre = div.find('pre'); - - // get the styles from the current theme - pre.parent().parent().css('position', 'relative'); - var hide_text = 'Hide the prompts and output'; - var show_text = 'Show the prompts and output'; - var border_width = pre.css('border-top-width'); - var border_style = pre.css('border-top-style'); - var border_color = pre.css('border-top-color'); - var button_styles = { - 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', - 'border-color': border_color, 'border-style': border_style, - 'border-width': border_width, 'color': border_color, 'text-size': '75%', - 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', - 'border-radius': '0 3px 0 0' - } - - // create and add the button to all the code blocks that contain >>> - div.each(function(index) { - var jthis = $(this); - if (jthis.find('.gp').length > 0) { - var button = $('>>>'); - button.css(button_styles) - button.attr('title', hide_text); - jthis.prepend(button); - } - // tracebacks (.gt) contain bare text elements that need to be - // wrapped in a span to work with .nextUntil() (see later) - jthis.find('pre:has(.gt)').contents().filter(function() { - return ((this.nodeType == 3) && (this.data.trim().length > 0)); - }).wrap(''); - }); - - // define the behavior of the button when it's clicked - $('.copybutton').toggle( - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').hide(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); - button.css('text-decoration', 'line-through'); - button.attr('title', show_text); - }, - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').show(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); - button.css('text-decoration', 'none'); - button.attr('title', hide_text); - }); -}); diff --git a/static_root/doc/pdfgetx/2.1.0/_static/doctools.js b/static_root/doc/pdfgetx/2.1.0/_static/doctools.js deleted file mode 100644 index daccd209..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_static/doctools.js +++ /dev/null @@ -1,315 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(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; -} - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { - this.initOnKeyListeners(); - } - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return 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 : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keydown(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box or textarea - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - } - } - }); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); diff --git a/static_root/doc/pdfgetx/2.1.0/_static/documentation_options.js b/static_root/doc/pdfgetx/2.1.0/_static/documentation_options.js deleted file mode 100644 index 230e69bc..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_static/documentation_options.js +++ /dev/null @@ -1,11 +0,0 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '2.1.0', - LANGUAGE: 'None', - COLLAPSE_INDEX: false, - BUILDER: 'html', - FILE_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: true -}; \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/_static/favicon.png b/static_root/doc/pdfgetx/2.1.0/_static/favicon.png deleted file mode 100644 index 93e4a02c..00000000 Binary files a/static_root/doc/pdfgetx/2.1.0/_static/favicon.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.0/_static/file.png b/static_root/doc/pdfgetx/2.1.0/_static/file.png deleted file mode 100644 index a858a410..00000000 Binary files a/static_root/doc/pdfgetx/2.1.0/_static/file.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.0/_static/jquery-3.4.1.js b/static_root/doc/pdfgetx/2.1.0/_static/jquery-3.4.1.js deleted file mode 100644 index 773ad95c..00000000 --- a/static_root/doc/pdfgetx/2.1.0/_static/jquery-3.4.1.js +++ /dev/null @@ -1,10598 +0,0 @@ -/*! - * jQuery JavaScript Library v3.4.1 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2019-05-01T21:04Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var document = window.document; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - -var isFunction = function isFunction( obj ) { - - // Support: Chrome <=57, Firefox <=52 - // In some browsers, typeof returns "function" for HTML elements - // (i.e., `typeof document.createElement( "object" ) === "function"`). - // We don't want to classify *any* DOM node as a function. - return typeof obj === "function" && typeof obj.nodeType !== "number"; - }; - - -var isWindow = function isWindow( obj ) { - return obj != null && obj === obj.window; - }; - - - - - var preservedScriptAttributes = { - type: true, - src: true, - nonce: true, - noModule: true - }; - - function DOMEval( code, node, doc ) { - doc = doc || document; - - var i, val, - script = doc.createElement( "script" ); - - script.text = code; - if ( node ) { - for ( i in preservedScriptAttributes ) { - - // Support: Firefox 64+, Edge 18+ - // Some browsers don't support the "nonce" property on scripts. - // On the other hand, just using `getAttribute` is not enough as - // the `nonce` attribute is reset to an empty string whenever it - // becomes browsing-context connected. - // See https://github.com/whatwg/html/issues/2369 - // See https://html.spec.whatwg.org/#nonce-attributes - // The `node.getAttribute` check was added for the sake of - // `jQuery.globalEval` so that it can fake a nonce-containing node - // via an object. - val = node[ i ] || node.getAttribute && node.getAttribute( i ); - if ( val ) { - script.setAttribute( i, val ); - } - } - } - doc.head.appendChild( script ).parentNode.removeChild( script ); - } - - -function toType( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; -} -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.4.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android <=4.0 only - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - copy = options[ name ]; - - // Prevent Object.prototype pollution - // Prevent never-ending loop - if ( name === "__proto__" || target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - src = target[ name ]; - - // Ensure proper type for the source value - if ( copyIsArray && !Array.isArray( src ) ) { - clone = []; - } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { - clone = {}; - } else { - clone = src; - } - copyIsArray = false; - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - // Evaluates a script in a global context - globalEval: function( code, options ) { - DOMEval( code, { nonce: options && options.nonce } ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android <=4.0 only - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = toType( obj ); - - if ( isFunction( obj ) || isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.4 - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://js.foundation/ - * - * Date: 2019-04-08 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - nonnativeSelectorCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - rdescend = new RegExp( whitespace + "|>" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rhtml = /HTML$/i, - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - inDisabledFieldset = addCombinator( - function( elem ) { - return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !nonnativeSelectorCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) && - - // Support: IE 8 only - // Exclude object elements - (nodeType !== 1 || context.nodeName.toLowerCase() !== "object") ) { - - newSelector = selector; - newContext = context; - - // qSA considers elements outside a scoping root when evaluating child or - // descendant combinators, which is not what we want. - // In such cases, we work around the behavior by prefixing every selector in the - // list with an ID selector referencing the scope context. - // Thanks to Andrew Dupont for this technique. - if ( nodeType === 1 && rdescend.test( selector ) ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[i] = "#" + nid + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - nonnativeSelectorCache( selector, true ); - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement("fieldset"); - - try { - return !!fn( el ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || - - // Where there is no isDisabled, check manually - /* jshint -W018 */ - elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; - } - - return elem.disabled === disabled; - - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } - - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - var namespace = elem.namespaceURI, - docElem = (elem.ownerDocument || elem).documentElement; - - // Support: IE <=8 - // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes - // https://bugs.jquery.com/ticket/4833 - return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9-11, Edge - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - if ( preferredDoc !== document && - (subWindow = document.defaultView) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( el ) { - el.className = "i"; - return !el.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( el ) { - el.appendChild( document.createComment("") ); - return !el.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - }); - - // ID filter and find - if ( support.getById ) { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( (elem = elems[i++]) ) { - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( el ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement("input"); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll(":enabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll(":disabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( el ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === document ? -1 : - b === document ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - if ( support.matchesSelector && documentIsHTML && - !nonnativeSelectorCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) { - nonnativeSelectorCache( expr, true ); - } - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return (sel + "").replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - // Use previously-cached element index if available - if ( useCache ) { - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? - argument + length : - argument > length ? - length : - argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( (oldCache = uniqueCache[ key ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context === document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - if ( !context && elem.ownerDocument !== document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context || document, xml) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( el ) { - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( el ) { - return el.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -}; -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Filtered directly for both simple and complex selectors - return jQuery.filter( qualifier, elements, not ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( typeof elem.contentDocument !== "undefined" ) { - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && toType( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && - - // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // rejected_handlers.disable - // fulfilled_handlers.disable - tuples[ 3 - i ][ 3 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock, - - // progress_handlers.lock - tuples[ 0 ][ 3 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the master Deferred - master = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || - isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return master.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); - } - - return master.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( toType( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; - - -// Matches dashed string for camelizing -var rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g; - -// Used by camelCase as callback to replace() -function fcamelCase( all, letter ) { - return letter.toUpperCase(); -} - -// Convert dashed to camelCase; used by the css and data modules -// Support: IE <=9 - 11, Edge 12 - 15 -// Microsoft forgot to hump their vendor prefix (#9572) -function camelCase( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); -} -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( camelCase ); - } else { - key = camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var documentElement = document.documentElement; - - - - var isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ); - }, - composed = { composed: true }; - - // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only - // Check attachment across shadow DOM boundaries when possible (gh-3504) - // Support: iOS 10.0-10.2 only - // Early iOS 10 versions support `attachShadow` but not `getRootNode`, - // leading to errors. We need to check for `getRootNode`. - if ( documentElement.getRootNode ) { - isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ) || - elem.getRootNode( composed ) === elem.ownerDocument; - }; - } -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && - - // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - isAttached( elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - -var swap = function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, scale, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = elem.nodeType && - ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Support: Firefox <=54 - // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) - initial = initial / 2; - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - while ( maxIterations-- ) { - - // Evaluate and update our best guess (doubling guesses that zero out). - // Finish if the scale equals or crosses 1 (making the old*new product non-positive). - jQuery.style( elem, prop, initialInUnit + unit ); - if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { - maxIterations = 0; - } - initialInUnit = initialInUnit / scale; - - } - - initialInUnit = initialInUnit * 2; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); - -var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); - - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // Support: IE <=9 only - option: [ 1, "" ], - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting
", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] -}; - -// Support: IE <=9 only -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, attached, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( toType( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - attached = isAttached( elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( attached ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -} )(); - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 - 11+ -// focus() and blur() are asynchronous, except when they are no-op. -// So expect focus to be synchronous when the element is already active, -// and blur to be synchronous when the element is not already active. -// (focus and blur are always synchronous in other supported browsers, -// this just defines when we can count on it). -function expectSync( elem, type ) { - return ( elem === safeActiveElement() ) === ( type === "focus" ); -} - -// Support: IE <=9 only -// Accessing document.activeElement can throw unexpectedly -// https://bugs.jquery.com/ticket/13393 -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = {}; - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - // Make a writable jQuery.Event from the native event object - var event = jQuery.event.fix( nativeEvent ); - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // If the event is namespaced, then each handler is only invoked if it is - // specially universal or its namespaces are a superset of the event's. - if ( !event.rnamespace || handleObj.namespace === false || - event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && - - // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && - - // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - - // Utilize native event to ensure correct state for checkable inputs - setup: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Claim the first handler - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - // dataPriv.set( el, "click", ... ) - leverageNative( el, "click", returnTrue ); - } - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Force setup before triggering a click - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - leverageNative( el, "click" ); - } - - // Return non-false to allow normal event-path propagation - return true; - }, - - // For cross-browser consistency, suppress native .click() on links - // Also prevent it if we're currently inside a leveraged native-event stack - _default: function( event ) { - var target = event.target; - return rcheckableType.test( target.type ) && - target.click && nodeName( target, "input" ) && - dataPriv.get( target, "click" ) || - nodeName( target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -// Ensure the presence of an event listener that handles manually-triggered -// synthetic events by interrupting progress until reinvoked in response to -// *native* events that it fires directly, ensuring that state changes have -// already occurred before other listeners are invoked. -function leverageNative( el, type, expectSync ) { - - // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add - if ( !expectSync ) { - if ( dataPriv.get( el, type ) === undefined ) { - jQuery.event.add( el, type, returnTrue ); - } - return; - } - - // Register the controller as a special universal handler for all event namespaces - dataPriv.set( el, type, false ); - jQuery.event.add( el, type, { - namespace: false, - handler: function( event ) { - var notAsync, result, - saved = dataPriv.get( this, type ); - - if ( ( event.isTrigger & 1 ) && this[ type ] ) { - - // Interrupt processing of the outer synthetic .trigger()ed event - // Saved data should be false in such cases, but might be a leftover capture object - // from an async native handler (gh-4350) - if ( !saved.length ) { - - // Store arguments for use when handling the inner native event - // There will always be at least one argument (an event object), so this array - // will not be confused with a leftover capture object. - saved = slice.call( arguments ); - dataPriv.set( this, type, saved ); - - // Trigger the native event and capture its result - // Support: IE <=9 - 11+ - // focus() and blur() are asynchronous - notAsync = expectSync( this, type ); - this[ type ](); - result = dataPriv.get( this, type ); - if ( saved !== result || notAsync ) { - dataPriv.set( this, type, false ); - } else { - result = {}; - } - if ( saved !== result ) { - - // Cancel the outer synthetic event - event.stopImmediatePropagation(); - event.preventDefault(); - return result.value; - } - - // If this is an inner synthetic event for an event with a bubbling surrogate - // (focus or blur), assume that the surrogate already propagated from triggering the - // native event and prevent that from happening again here. - // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the - // bubbling surrogate propagates *after* the non-bubbling base), but that seems - // less bad than duplication. - } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { - event.stopPropagation(); - } - - // If this is a native event triggered above, everything is now in order - // Fire an inner synthetic event with the original arguments - } else if ( saved.length ) { - - // ...and capture the result - dataPriv.set( this, type, { - value: jQuery.event.trigger( - - // Support: IE <=9 - 11+ - // Extend with the prototype to reset the above stopImmediatePropagation() - jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), - saved.slice( 1 ), - this - ) - } ); - - // Abort handling of the native event - event.stopImmediatePropagation(); - } - } - } ); -} - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || Date.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - code: true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } -}, jQuery.event.addProp ); - -jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { - jQuery.event.special[ type ] = { - - // Utilize native event if possible so blur/focus sequence is correct - setup: function() { - - // Claim the first handler - // dataPriv.set( this, "focus", ... ) - // dataPriv.set( this, "blur", ... ) - leverageNative( this, type, expectSync ); - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function() { - - // Force setup before trigger - leverageNative( this, type ); - - // Return non-false to allow normal event-path propagation - return true; - }, - - delegateType: delegateType - }; -} ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - /* eslint-disable max-len */ - - // See https://github.com/eslint/eslint/issues/3229 - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, - - /* eslint-enable */ - - // Support: IE <=10 - 11, Edge 12 - 13 only - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( elem ).children( "tbody" )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { - elem.type = elem.type.slice( 5 ); - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.access( src ); - pdataCur = dataPriv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - valueIsFunction = isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( valueIsFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( valueIsFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl && !node.noModule ) { - jQuery._evalUrl( node.src, { - nonce: node.nonce || node.getAttribute( "nonce" ) - } ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && isAttached( node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html.replace( rxhtmlTag, "<$1>" ); - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = isAttached( elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - -var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - container.style.cssText = "position:absolute;left:-11111px;width:60px;" + - "margin-top:1px;padding:0;border:0"; - div.style.cssText = - "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + - "margin:auto;border:1px;padding:1px;" + - "width:60%;top:1%"; - documentElement.appendChild( container ).appendChild( div ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; - - // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 - // Some styles come back with percentage values, even though they shouldn't - div.style.right = "60%"; - pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; - - // Support: IE 9 - 11 only - // Detect misreporting of content dimensions for box-sizing:border-box elements - boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; - - // Support: IE 9 only - // Detect overflow:scroll screwiness (gh-3699) - // Support: Chrome <=64 - // Don't get tricked when zoom affects offsetWidth (gh-4029) - div.style.position = "absolute"; - scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - function roundPixelMeasures( measure ) { - return Math.round( parseFloat( measure ) ); - } - - var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, - reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - jQuery.extend( support, { - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelBoxStyles: function() { - computeStyleTests(); - return pixelBoxStylesVal; - }, - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - }, - scrollboxSize: function() { - computeStyleTests(); - return scrollboxSizeVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !isAttached( elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style, - vendorProps = {}; - -// Return a vendor-prefixed property or undefined -function vendorPropName( name ) { - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a potentially-mapped jQuery.cssProps or vendor prefixed property -function finalPropName( name ) { - var final = jQuery.cssProps[ name ] || vendorProps[ name ]; - - if ( final ) { - return final; - } - if ( name in emptyStyle ) { - return name; - } - return vendorProps[ name ] = vendorPropName( name ) || name; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }; - -function setPositiveNumber( elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { - var i = dimension === "width" ? 1 : 0, - extra = 0, - delta = 0; - - // Adjustment may not be necessary - if ( box === ( isBorderBox ? "border" : "content" ) ) { - return 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin - if ( box === "margin" ) { - delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); - } - - // If we get here with a content-box, we're seeking "padding" or "border" or "margin" - if ( !isBorderBox ) { - - // Add padding - delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // For "border" or "margin", add border - if ( box !== "padding" ) { - delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - - // But still keep track of it otherwise - } else { - extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - - // If we get here with a border-box (content + padding + border), we're seeking "content" or - // "padding" or "margin" - } else { - - // For "content", subtract padding - if ( box === "content" ) { - delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // For "content" or "padding", subtract border - if ( box !== "margin" ) { - delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - // Account for positive content-box scroll gutter when requested by providing computedVal - if ( !isBorderBox && computedVal >= 0 ) { - - // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border - // Assuming integer scroll gutter, subtract the rest and round down - delta += Math.max( 0, Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - computedVal - - delta - - extra - - 0.5 - - // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter - // Use an explicit zero to avoid NaN (gh-3964) - ) ) || 0; - } - - return delta; -} - -function getWidthOrHeight( elem, dimension, extra ) { - - // Start with computed style - var styles = getStyles( elem ), - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). - // Fake content-box until we know it's needed to know the true value. - boxSizingNeeded = !support.boxSizingReliable() || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - valueIsBorderBox = isBorderBox, - - val = curCSS( elem, dimension, styles ), - offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); - - // Support: Firefox <=54 - // Return a confounding non-pixel value or feign ignorance, as appropriate. - if ( rnumnonpx.test( val ) ) { - if ( !extra ) { - return val; - } - val = "auto"; - } - - - // Fall back to offsetWidth/offsetHeight when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - // Support: Android <=4.1 - 4.3 only - // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - // Support: IE 9-11 only - // Also use offsetWidth/offsetHeight for when box sizing is unreliable - // We use getClientRects() to check for hidden/disconnected. - // In those cases, the computed value can be trusted to be border-box - if ( ( !support.boxSizingReliable() && isBorderBox || - val === "auto" || - !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && - elem.getClientRects().length ) { - - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Where available, offsetWidth/offsetHeight approximate border box dimensions. - // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the - // retrieved value as a content box dimension. - valueIsBorderBox = offsetProp in elem; - if ( valueIsBorderBox ) { - val = elem[ offsetProp ]; - } - } - - // Normalize "" and auto - val = parseFloat( val ) || 0; - - // Adjust for the element's box model - return ( val + - boxModelAdjustment( - elem, - dimension, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles, - - // Provide the current computed size to request scroll gutter calculation (gh-3589) - val - ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "gridArea": true, - "gridColumn": true, - "gridColumnEnd": true, - "gridColumnStart": true, - "gridRow": true, - "gridRowEnd": true, - "gridRowStart": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: {}, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append - // "px" to a few hardcoded values. - if ( type === "number" && !isCustomProp ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( i, dimension ) { - jQuery.cssHooks[ dimension ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && - - // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, dimension, extra ); - } ) : - getWidthOrHeight( elem, dimension, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = getStyles( elem ), - - // Only read styles.position if the test has a chance to fail - // to avoid forcing a reflow. - scrollboxSizeBuggy = !support.scrollboxSize() && - styles.position === "absolute", - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) - boxSizingNeeded = scrollboxSizeBuggy || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - subtract = extra ? - boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ) : - 0; - - // Account for unreliable border-box dimensions by comparing offset* to computed and - // faking a content-box to get border and padding (gh-3699) - if ( isBorderBox && scrollboxSizeBuggy ) { - subtract -= Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - parseFloat( styles[ dimension ] ) - - boxModelAdjustment( elem, dimension, "border", false, styles ) - - 0.5 - ); - } - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ dimension ] = value; - value = jQuery.css( elem, dimension ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || - elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( prefix !== "margin" ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || - tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = Date.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 15 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY and Edge just mirrors - // the overflowX value there. - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - result.stop.bind( result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = Date.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && - elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -function classesToArray( value ) { - if ( Array.isArray( value ) ) { - return value; - } - if ( typeof value === "string" ) { - return value.match( rnothtmlwhite ) || []; - } - return []; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isValidValue = type === "string" || Array.isArray( value ); - - if ( typeof stateVal === "boolean" && isValidValue ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( isValidValue ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = classesToArray( value ); - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, valueIsFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - valueIsFunction = isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( valueIsFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - - // Don't return options that are disabled or in a disabled optgroup - !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -support.focusin = "onfocusin" in window; - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - stopPropagationCallback = function( e ) { - e.stopPropagation(); - }; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = lastElement = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - lastElement = cur; - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - - if ( event.isPropagationStopped() ) { - lastElement.addEventListener( type, stopPropagationCallback ); - } - - elem[ type ](); - - if ( event.isPropagationStopped() ) { - lastElement.removeEventListener( type, stopPropagationCallback ); - } - - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = Date.now(); - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } - - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && toType( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - if ( a == null ) { - return ""; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response - * Also sets the responseXXX fields on the jqXHR instance - */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /\bxml\b/, - html: /\bhtml/, - json: /\bjson\b/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": JSON.parse, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() + " " ] = - ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) - .concat( match[ 2 ] ); - } - } - match = responseHeaders[ key.toLowerCase() + " " ]; - } - return match == null ? null : match.join( ", " ); - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 15 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available and should be processed, append data to url - if ( s.data && ( s.processData || typeof s.data === "string" ) ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - - -jQuery._evalUrl = function( url, options ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - - // Only evaluate the response if it is successful (gh-4126) - // dataFilter is not invoked for failure responses, so using it instead - // of the default converter is kludgy but it works. - converters: { - "text script": function() {} - }, - dataFilter: function( response ) { - jQuery.globalEval( response, options ); - } - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var htmlIsFunction = isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.ontimeout = - xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain or forced-by-attrs requests - if ( s.crossDomain || s.scriptAttrs ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( " - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Files used in PDF extraction

-
-

Configuration file

-

Configuration files may define the PDF processing parameters. -By default, the pdfgetx3 program attempts to read -.pdfgetx3.cfg file from the user HOME directory, -then .pdfgetx3.cfg and pdfgetx3.cfg files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the -c, --config option. -The pdfgetn3 program works in the same way, -except it checks for configuration files -~/.pdfgetn3.cfg, .pdfgetn3.cfg and pdfgetn3.cfg.

-

The easiest way of creating a configuration file is to generate -a template content using the --createconfig option as

-
pdfgetx3 --createconfig=test.cfg
-
-
-

and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple “varname=value” syntax, -any lines starting with “#” are ignored as comments.

-

The configuration file has several sections marked as [SECTIONNAME]. -The [DEFAULT] section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the -s, --section option on the -command line. Thus

-
pdfgetx3 --config=test.cfg --section=nacl
-
-
-

would read the parameters from the [nacl] section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section.

-
-
-

Input files

-

PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -2Θ in degrees, momentum transfer Q in inverse nanometers or Q -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the dataformat parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values.

-

The input files are usually passed as command-line arguments to -pdfgetx3 or pdfgetn3 programs and must be paths -accessible from the current working directory.

-

Input files can be also defined by setting the inputfile -value in the configuration file. The -d, --datapath -option can be then used to provide additional data directories to -search for these inputs and for the backgroundfile. -This is to support configuration files located in a different -directory than the data.

-

When the --find option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory.

-
-
-

Output files

-

PDFgetX3 and PDFgetN3 can produce up to four different output data files:

-
    -
  • .iq – I(Q), the background-corrected -intensities sampled on a regular Q-space grid in inverse ångströms,

  • -
  • .sq – S(Q), the total scattering structure function, -with intensities normalized by average scattering factors and -corrected by a polynomial fit,

  • -
  • .fq – F(Q), the reduced structure function equal to Q(S(Q) - 1),

  • -
  • .gr – G(r), the resultant PDF, where the first column is the -separation r in ångströms and the second is the function G in -Å-2.

  • -
-

You can specify what output files should be produced by setting the -outputtypes parameter in the configuration file or by -passing the -t, --outputtypes on the command line.

-

The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the --config option, -the PDFgetX3 will reproduce the previous calculation.

-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/genindex.html b/static_root/doc/pdfgetx/2.1.0/genindex.html deleted file mode 100644 index aab9129a..00000000 --- a/static_root/doc/pdfgetx/2.1.0/genindex.html +++ /dev/null @@ -1,844 +0,0 @@ - - - - - - - Index — diffpy.pdfgetx 2.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - -

Index

- -
- Symbols - | A - | B - | C - | D - | E - | F - | G - | I - | L - | M - | O - | P - | Q - | R - | S - | T - | V - | W - -
-

Symbols

- - - -
- -

A

- - -
- -

B

- - - -
- -

C

- - - -
- -

D

- - - -
- -

E

- - - -
- -

F

- - - -
- -

G

- - -
- -

I

- - - -
- -

L

- - - -
- -

M

- - -
- -

O

- - - -
- -

P

- - - -
- -

Q

- - - -
- -

R

- - - -
- -

S

- - -
- -

T

- - - -
- -

V

- - -
- -

W

- - -
- - - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/index.html b/static_root/doc/pdfgetx/2.1.0/index.html deleted file mode 100644 index 4964daf6..00000000 --- a/static_root/doc/pdfgetx/2.1.0/index.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - diffpy.pdfgetx — diffpy.pdfgetx 2.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/install.html b/static_root/doc/pdfgetx/2.1.0/install.html deleted file mode 100644 index a70f89b0..00000000 --- a/static_root/doc/pdfgetx/2.1.0/install.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - Installation — diffpy.pdfgetx 2.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Installation

-
-

Software requirements

-

This software is written in Python programming language, therefore -you must have Python 3.7, 3.6, 3.5 or 2.7 installed. In addition, -the following third-party Python libraries are also required:

-
    -
  • pip - Python package installer

  • -
  • setuptools - tools for installing Python packages

  • -
  • six - Python 2 and 3 compatibility library

  • -
  • NumPy - library for scientific computing with Python

  • -
  • matplotlib - Python plotting library

  • -
  • IPython - enhanced interactive Python shell

  • -
-

Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -Python Package Index -or using any Internet search engine.

-

Another more convenient option is to obtain one of the science-oriented -Python distributions such as -Anaconda Python, -Enthought Canopy or -PythonXY, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step.

-

On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command

-
sudo apt-get install \
-  python3-pip python3-setuptools python3-six \
-  python3-numpy python3-matplotlib ipython3
-
-
-

This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above.

-

On Windows operating system, it may be necessary to add the -C:\Python37 directory and the scripts directory -C:\Python37\Scripts to the system PATH. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the Command Prompt, type -there python and see if this starts the Python interpreter.

-
-
-

Installation

-

The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -Columbia Technology Ventures. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:

-
pip install ./diffpy.pdfgetx-VERSION.whl
-
-
-

Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending sudo to the command line above. If root access is not available, use the pip install options --user or --prefix to install the software to a user-writable directory.

-

The package provides three programs for PDF conversion, pdfgetx3, pdfgetn3 and pdfgets3. To check if they are correctly installed run

-
pdfgetx3 --version
-pdfgetn3 --version
-pdfgets3 --version
-
-
-

This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a plotdata -command for an easy plotting of text data files. To verify -if plotdata works, run the plotdata --version command. -Finally, a comprehensive test of the installed software can -be executed using

-
python -m diffpy.pdfgetx.tests.run
-
-
-
-

Note

-

Older versions of diffpy.pdfgetx use Python egg format -instead of Python wheel. -To install these use the easy_install command as follows:

-
python -m easy_install ./diffpy.pdfgetx-VERSION.egg
-
-
-
-
-
-

IPython magic command

-

These instructions are intended for IPython users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don’t plan to customize IPython in such way you can safely skip -this paragraph.

-

When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The %pdfgetx3, %pdfgetn3 and %pdfgets3 magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session.

-

The %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up

-
    -
  1. find the profile_default/ipython_config.py file and open it -in a text editor. If that file does not exists, -create it first by executing

    -
    ipython profile create
    -
    -
    -
  2. -
  3. navigate to the paragraph that contains the -c.InteractiveShellApp.extensions and add there -the following line

    -
    c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics']
    -
    -
    -

    There must be no leading indent, i.e., the text must start at the -very first column.

    -
  4. -
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/interact.html b/static_root/doc/pdfgetx/2.1.0/interact.html deleted file mode 100644 index 0b1469a6..00000000 --- a/static_root/doc/pdfgetx/2.1.0/interact.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - Interactive mode — diffpy.pdfgetx 2.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Interactive mode

-

The interactive mode is activated by using either the --i, --interact option or a non-empty ---plot option. In the interactive mode -the program starts an IPython interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands %pdfgetx3 and %pdfgetn3, which can be used with -the same syntax as the pdfgetx3 and pdfgetn3 in -system shell. -The interactive session is also initialized with all functions from the -matplotlib.pyplot module for convenient plotting. -The functions and variables related to PDF processing are:

-
-
-pdfgetter(x=None, y=None, filename='', **kwargs)
-

Instance of the PDFGetter class which serves as a -low-level function that calculates the PDF. This is a callable -object, which takes as an argument a pair of input arrays for -(Q, intensity) or (2Θ, intensity) depending on -dataformat. It can be also called with a keyword -argument filename=FILE, which would read the input arrays -from the specified file. When called with no arguments, -it calculates PDF from the last input data.

-
-
Parameters
-
    -
  • x (numpy.ndarray, optional) – -The Q or 2Θ values in powder diffraction pattern.

  • -
  • y (numpy.ndarray, optional) – -The scattered intensities in powder diffraction pattern

  • -
  • filename (str, optional) – -The text data file for loading the x, y values when -they are not specified.

  • -
  • kwargs (misc, optional) – -Extra keyword arguments that are applied to -the config object, for example qmax=20.

  • -
-
-
Returns
-

A pair of output arrays (r, G).

-
-
-
- -
-
-config
-

Instance of the PDFConfig class that stores the -parameters and input files for the program. -Use print(config) to display the current configuration values. -This is the same object as pdfgetter.config. Configuration -may be changed by setting a respective attribute of the -config object, for example:

-
In [1]: config.qmax = 21
-
-
-

The config values may be also changed by calling the -pdfgetter() or processfiles() function with a -corresponding keyword argument, for example -processfiles(qmax=20, force="once").

-
- -
-
-iraw
-
-iq
-
-sq
-
-fq
-
-gr
-

These variables are assigned the input raw intensities and the -intermediate results, stored as matrix rows. The matrix rows -correspond to twotheta1, intensity1, twotheta2, intensity2, etc. -Because matrices are iterated row first, the raw intensities -from all input files can be plotted with the matplotlib plot -function as plot(*iraw).

-

These variables should be considered read-only and are reset -with subsequent PDF calculations.

-
- -
-
-tuneconfig(plotids=None, pdfgetter=None, axeslist=None)
-

Show a GUI dialog for interactive tuning of configuration variables.

-
-
Parameters
-
    -
  • plotids – The string or iterable that specify what interactive plots should be -tuned. By default the same as config.plot. It can be also an -integer index or name of a transformation in pdfgetter() or -a reference to a Transformation object.

  • -
  • pdfgetter – The optional PDFGetter object to be tuned. -This is by default the interactive pdfgetter() object.

  • -
  • axeslist – An optional list of matplotlib Axes for showing interactive plots. -When None, use subplot(N, 1, i) to create any necessary axes.

  • -
-
-
-
-

Note

-

Changes from tuneconfig() apply only to the configuration -and results in memory. Use the processfiles() function -to save them to disk.

-
-
-

See also

-

Interactive tuning of parameters tutorial

-
-
- -
-
-processfiles(filename=None, **kwargs)
-

Process all input files again with the current configuration values. -This is a higher-level function than pdfgetter(), as -it also saves output files and produces plots as specified by the -config object.

-
-
Parameters
-
    -
  • filename – One or more input files to be converted to PDFs and saved or -plotted according to the config settings. Use the -previous list of input files when not specified.

  • -
  • kwargs – An optional keyword arguments to set for the config -object, for example (force="once", qmax=18).

  • -
-
-
-

This function updates the config.inputfiles -list and the iraw, iq, -sq, fq and gr -interactive variables.

-
- -
-
-clearsession()
-

Clear all elements from the config.inputfiles -and also the -iraw, iq, sq, -fq and gr variables.

-
-
Returns
-

No return value.

-
-
-
- -
-
-loaddata(filename, minrows=10, usecols=None, **kwargs)
-

Find and load data from a text file.

-

The data reading starts at the first matrix block of at least minrows rows -and constant number of columns. This seems to work for most of the -datafiles including those generated by PDFGetX2.

-
-
Parameters
-
    -
  • filename (str) – Name of the file to load the text data from.

  • -
  • minrows (int, optional) – Minimum number of rows in the first data block, by default 10. -All rows must have the same number of floating point values.

  • -
  • usecols (int, str, slice, iterable, optional) – Indices or names of the columns to be loaded from the data block, -the default is all columns. Data blocks that do not contain -sufficient number of columns are skipped. When usecols contain -string items, they are translated to column indices by looking -up a header line preceding the data block. String items formatted -as i:j:k are converted to slice objects. When usecols type -is string it is split to a list of names at comma and whitespace -characters.

  • -
  • unpack (bool, optional) – Return data as a sequence of columns that allows tuple unpacking -such as x, y = loaddata(FILENAME, unpack=True). Note that -transposing the loaded array as loaddata(FILENAME).T has -the same effect. The default is False.

  • -
  • kwargs (misc, optional) – Extra keyword arguments that are passed to numpy.loadtxt.

  • -
-
-
Returns
-

data (numpy.ndarray) – The data block loaded from the text file.

-
-
-
-

See also

-

numpy.loadtxt()

-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
-
-plotdata(filenames, style=None, x=None, y=None, log=None, ax=None, **kwargs)
-

Plot one or more text data files.

-

The files are searched for data blocks which have enough columns -to satisfy both x and y selectors of the plotted data. This -may result in an empty plot when file has none wide-enough data -block (e.g., when y=100).

-
-
Parameters
-
    -
  • filenames (str or an iterable of string file names) – One or more text data files to be plotted.

  • -
  • style (str) – Optional style argument for the matplotlib plot() function.

  • -
  • x (int, str, or iterable, optional) – The column to be used for the x data. This can be a zero-based -index of the desired column or a column name from data header. -A special symbol “.” can be used for a sequential data index. -When not specified, use the first column.

  • -
  • y (int, str, iterable, or slice, optional) – One or more columns to be used for the y data. This can be -a single zero-based index of the desired column or an iterable -of several indices. The y value can be also a string which -is split at commas and converted to integers, column names -or slice objects, e.g. “0,sine,4:7”. The slice instances -are applied to the entire data block from each loaded file. -Use the second column when not specified.

  • -
  • log ({‘x’, ‘y’}, optional) – Set logarithmic scaling for the specified axis and linear scaling -for all others. For example, log="y" applies linear scaling -to the x-axis and logarithmic to the y-axis. Keep the current -axis scaling when not specified.

  • -
  • ax (matplotlib.axes.Axes, optional) – The axes to plot to. The plotting will be performed using the -ax.plot method. The default is pyplot.gca().

  • -
  • kwargs (misc, optional) – Keyword arguments for the matplotlib plot() function.

  • -
-
-
Returns
-

lines (list) – The matplotlib Line2D objects added to the current axis.

-
-
- -

This function can be imported from the -diffpy.pdfgetx.plotdata module.

-
- -
-
-findfiles(patterns=(), path='.', dotfiles=False)
-

Find files that match all specified patterns.

-

Pattern syntax:

-
    -
  • ^start - match “start” only at the beginning of the string.

  • -
  • end$ - match “end” only at the end of string.

  • -
  • <7> - match number 7 preceded by any number of leading zeros.

  • -
  • <1-34> - match an integer range from 1 to 34 inclusive.

  • -
  • <7-> - match an integer greater or equal 7.

  • -
  • <-> - match any integer.

  • -
  • + - start a new group of patterns to match more files.

  • -
  • dir/ - set search path effective from the current pattern group.

  • -
-

All integer ranges <N-M> above allow one or more leading zeros. -The range syntax does not support matching of negative numbers.

-
-
Parameters
-
    -
  • patterns (iterable of strings or str, optional) – String patterns that must all match in returned filenames. -Can be also a single string with patterns separated by -whitespace characters. When empty match all files in the -current directory or in the path. A single + starts -a new pattern group for additional matches. Each pattern -group may have one entry containing /, for example, -dir/ or ./, which sets the search directory for -this and subsequent pattern groups. When pattern group -contains only the path entry it reuses file patterns from -the previous group.

  • -
  • path (str, optional) – Directory to be searched for the files. The default is “.” -to search the current directory.

  • -
  • dotfiles (bool, optional) – When True search also the hidden “.” starting files. These -files are by default ignored, but can be explicitly selected -by adding the ^. pattern.

  • -
-
-
Returns
-

filenames (list) – The list of matching filenames. Return all files when -patterns are not specified.

-
-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/intro.html b/static_root/doc/pdfgetx/2.1.0/intro.html deleted file mode 100644 index 679556f8..00000000 --- a/static_root/doc/pdfgetx/2.1.0/intro.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - Introduction — diffpy.pdfgetx 2.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Introduction

-

diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts.

-
-

License notice

-

Use of this software is subject to and permitted only under a separate, -written Use License granted by Columbia University. If you or your employer -is not a party to such an agreement, then your use of this software is -prohibited. If you don’t know whether or not your anticipated use is under -a license, you must contact Prof. Simon Billinge at sb2896@columbia.edu. -Use of this software without a license is prohibited.

-

Copyright 2009-2020, Trustees of Columbia University in the City of New York.

-

For more information please email Prof. Simon Billinge at sb2896@columbia.edu

-
-
-

Authors

-

This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Hung Vuong, -Songsheng Tao, -Simon Billinge.

-
-
-

References

-

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:

-
-

P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge -PDFgetX3: A rapid and highly automatable program for processing -powder diffraction data into total scattering pair distribution -functions, -J. Appl. Crystallogr. 46, 560-566 (2013)

-
-

For research publications that use this software to process neutron -diffraction data we ask you to also cite:

-
-

P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, -S. J. L. Billinge -PDFgetN3: atomic pair distribution functions from neutron -powder diffraction data using ad hoc corrections, -J. Appl. Crystallogr. 51 (2018)

-
-

For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication:

-
-

CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge -sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data.

-
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/options.html b/static_root/doc/pdfgetx/2.1.0/options.html deleted file mode 100644 index 671e345b..00000000 --- a/static_root/doc/pdfgetx/2.1.0/options.html +++ /dev/null @@ -1,663 +0,0 @@ - - - - - - Options and parameters — diffpy.pdfgetx 2.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Options and parameters

-

PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program.

-
-

Note

-

The command line options start with a leading “-” and can -be only used as command line arguments when starting the -pdfgetx3 program. Within configuration file the parameter -names are plain words without any leading dashes. Finally, -parameters can be also set in the interactive mode as attributes of -the config object, but the assignments must be valid -Python statements. Here are examples of setting composition of -a processed specimen using each of these forms:

-
    -
  1. assigned in configuration file:

    -
    ...
    -composition = CaTiO3
    -...
    -
    -
    -
  2. -
  3. set as a command-line option when starting pdfgetx3 or -pdfgetn3:

    -
    pdfgetx3 --composition=CaTiO3
    -
    -
    -
  4. -
  5. set in the IPython interactive mode:

    -
    pdfgetx3 -i
    -...
    -In [1]: config.composition = "CaTiO3"
    -
    -
    -
  6. -
-
-
-

Program operation

-
-
--h, --help
-

Display a brief usage information with a list of command line options -and exit.

-
- -
-
--V, --version
-

Display the program version and exit.

-
- -
-
---manual
-

Open this manual in a Web browser and exit.

-
- -
-
--f, --find
-
- -
-

Select input files that match all patterns. The command -line arguments are by default taken as input files. However, -with the --find option they are processed as -file patterns and the matching files are then used as inputs. -The input files are by default searched in the current directory -unless there is a path entry (e.g., data/) that -selects a different search path. The search patterns are -interpreted as fixed strings, all of which must be present -in the file name. A single argument + starts -a new group of patterns to match more files that are not -covered by one set of patterns. Additional pattern -groups reuse the current search path unless they provide -their own path value. Pattern groups containing only -a path entry reuse file patterns from the last group. -When pattern groups overlap the repeated matches are ignored -to make the resulting list of files unique. Files starting -with . are ignored unless there is ^. pattern -that explicitly matches them. The search -syntax provides the following special patterns:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

^

match at the beginning of the string, i.e., ^start -matches only filenames that start with “start”.

$

match at the end of string, for example, .chi$ selects -file names ending with “.chi”. A $ on its own -matches every string and can be used to select all files.

<N>

match number N preceded by any number of leading zeros, -e.g., <7> would match in “f7.chi”, “f007.chi”, but not -in “f77.chi”.

<N-M>

match an integer range from N to M inclusive. -The matched number may have one or more leading zeros.

<7->

match number 7 or larger.

<-7>

match number 7 or smaller.

<->

match any integer number.

+

start a new pattern group, for example, .chi$ + .dat$

/

set search path. An argument containing the / symbol -is taken as the search path, for example, data/ or -./. Each pattern group may provide its own search -path effective for that and any subsequent pattern group.

-

The ^$<> characters are often special to Unix or Windows -command shells, therefore they need to be enclosed in double -quotes (") when used on command line.

-
-

See also

-

tutorial on matching input files

-
-
-
-
--l, --list
-

List all input files and exit. This is useful with the ---find option to verify if input files -are matched as intended.

-
- -
-
-

Configuration file options

-
-
--c CONFIG, --config=CONFIG
-

Read custom configuration file after loading the default ones. -Do not load any configuration file when “NONE”.

-
- -
-
--s NAME, --section=NAME
-

Load the custom configuration file section [SectionName] after -loading the [DEFAULT] section. This is useful for creating -several configuration variants in a single configuration file.

-
- -
-
---createconfig=FILE
-

Write template configuration to a new FILE and exit. Write -to the standard output when FILE is “-“.

-
- -

See also the configuration file section -for further details.

-
-
-

Input and output options

-
-
-inputfile
-

This parameter allows to specify one or more input files in the -configuration file, one file per line. The inputfile -is only used if no input files were provided on the -pdfgetx3 or pdfgetn3 command line.

-
- -
-
-dataformat
-
- -
-
---format=FORMAT
-

Format of input files. Available formats are: twotheta, QA, -Qnm corresponding to a two-column text data where the first -column is either the scattering angle 2Θ in degrees, Q in -inverse ångströms or Q in inverse nanometers.

-
- -
-
-backgroundfile
-
- -
-
--b FILE, --background=FILE
-

Optional datafile with background intensities from an empty sample -holder. It must be in the same dataformat as other input files.

-
- -
-

Note

-

The following input is only used in sas mode.

-
-
-
-formfactorfile
-
- -
-
--ff FILE, --formfactorfile=FILE
-

Form factor intensities of the scatterers. This is required for sas mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1.

-
- -
-
-datapath
-
- -
-
--d DATAPATH, --datapath=DATAPATH
-

One or more extra directories to be searched for input or -background data files. The -d option can be specified -several times to add more directories, these are prepended in front -of any default value. Within configuration file the datapath -directories have to be listed each on a separate line.

-

A special value “NONE” (or “none”) clears any previously defined -paths and only the further paths, if any, would be searched for -inputs.

-
- -
-
-output
-
- -
-
--o OUTPUT, --output=OUTPUT
-

Output file name, write to the standard output when “-“. The --t, --outputtypes option controls what results are -being saved. Normally the OUTPUT is used as a custom basename for -the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o -tokens, which are expanded as follows:

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

token

example

definition

@h

dir1/dir2

the input file directory or “.”

@r

dir1/dir2/filename

the input path with extension removed

@e

dat

the input file extension without “.”

@t

filename.dat

the tail component of the input file

@b

filename

the tail component with extension removed

@o

gr

the output extension iq, sq, fq or gr

-

An empty value works the same as “@b.@o” and saves the data -in the current directory with a proper extension for the -saved results. When “@o” is not present in the OUTPUT, it is -appended as a default filename extension.

-
- -
-
-outputtypes
-
- -
-
--t TYPES, --outputtypes=TYPES
-

Result types to be saved, one or more comma separated values. -Supported values are “iq”, “sq”, “fq”, “gr”, corresponding to the -I(Q), S(Q), F(Q) and G(r) curves; these are also used as output -file extensions.

-

Result files are not written when empty, “none” or “NONE”.

-
- -
-
-force
-
- -
-
---force=FORCE
-

Overwrite existing output files. By default the output -files are not written if they already exist. Possible values -in a configuration file are “true”, “yes”, “on”, “1” or -“false”, “no”, “off”, “0” or “once”. The special value “once” -permits one overwrite and then resets config.force to -False. Note that in interactive mode the values assigned -to config.force are converted to Python bool -unless equal to “once”.

-
- -
-
-

PDF parameters

-
-
-mode
-
- -
-
---mode=STRING
-

The PDF conversion mode, i.e., the name of the -pdfgetter() setup. The available modes correspond -to the radiation type used in powder diffraction experiment and can -be “xray” or “neutron”.

-
- -
-
-wavelength
-
- -
-
--w FLOAT, --wavelength=FLOAT
-

X-ray wavelength in ångströms. This value is required -for the “twotheta” dataformat in order to convert the scattering -angles 2Θ to a momentum transfer Q. For other data formats -the wavelength is not necessary and may be left undefined.

-
- -
-
-twothetazero
-
- -
-
---twothetazero=FLOAT
-

Position of the zero scattering angle in diffractometer degrees. -This parameter corrects for a constant offset in the -measured 2Θ values. When loading configuration file -it is assumed 0 unless specified otherwise. This parameter -is only effective for the “twotheta” dataformat.

-
- -
-
-composition
-
- -
-
---composition=STRING
-

Chemical composition of the sample. Supported formats are -“PbTi0.5Zr0.5O3”, “Pb 1 Ti 1/2 Zr 1/2 O 3” or “CH3 (CH2)3 OH”. -Space characters are ignored, unit counts can be omitted, but it is -important to use a proper upper and lower case in atom symbols. -Elements can appear several times in the formula, e.g., “CH3 CH3”, -and the formula may contain parentheses or fractional -stoichiometries.

-
- -
-
-bgscale
-
- -
-
---bgscale=FLOAT
-

Scaling of the background intensities loaded from the -backgroundfile, by default 1.

-
- -
-
-rpoly
-
- -
-
---rpoly=FLOAT
-

r-limit for the maximum frequency in the F(Q) correction polynomial. -The PDF is unreliable at shorter r, however a -very small rpoly would disable polynomial correction and -give noisy PDF. -Larger values produce closer fits with a higher degree polynomial, -but when too large, they might smooth-out a useful signal in the -data. The default is 0.9.

-
- -
-
-qmaxinst
-
- -
-
---qmaxinst
-

The Q cutoff for the meaningful input intensities in inverse -ångströms. Some data files may contain trailing zeros -or unreliable intensities at the upper bound of the detector range. -The qmaxinst defines a threshold for unreliable data. -The parameter is also used as an upper boundary for the polynomial -fit correction of the S(Q) data.

-
- -
-
-qmin
-
- -
-
---qmin
-

The lower Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms.

-
- -
-
-qmax
-
- -
-
---qmax
-

The upper Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms. This is essentially a limit, where sample -signal decays to the level of data noise.

-
- -
-
-rmin
-
- -
-
---rmin=FLOAT
-

Lower bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rmax
-
- -
-
---rmax=FLOAT
-

Upper bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rstep
-
- -
-
---rstep=FLOAT
-

Spacing of the r-grid for the calculated PDF in ångströms.

-
- -
-
-

Other parameters

-
-
-plot
-
- -
-
--p TYPES, --plot=TYPES
-

Plot the specified results. A comma separated list with one or -more items from “iq”, “sq”, “fq”, “gr”. No plot is produced when -empty, “none” or “NONE”. Setting this option turns on the -interactive mode.

-
- -
-
-interact
-
- -
-
--i, --interact
-

Start an IPython interactive session after processing all files. -Useful for tuning the configuration parameters or interactive -plotting. This is always on when plot option has been set. -See also Interactive mode for further details.

-
- -
-
-verbose
-
- -
-
---verbose=VALUE
-

Level of detail for the program to report about its actions. -Possible values are “error”, “warning”, “info”, “debug”, “all” or an -integer number from 0 to 5. Messages are completely suppressed when -0, all messages are printed when verbose is 5 (“all”) or higher. -This option is useful for diagnostics of any unexpected behavior -in the program.

-
- -
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/pdfgetxn3-examples.zip b/static_root/doc/pdfgetx/2.1.0/pdfgetxn3-examples.zip deleted file mode 100644 index 75019fee..00000000 Binary files a/static_root/doc/pdfgetx/2.1.0/pdfgetxn3-examples.zip and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.0/plotdata.html b/static_root/doc/pdfgetx/2.1.0/plotdata.html deleted file mode 100644 index 5f081c28..00000000 --- a/static_root/doc/pdfgetx/2.1.0/plotdata.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - The plotdata program — diffpy.pdfgetx 2.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

The plotdata program

-

The PDFgetX3 software includes a simple stand-alone utility -plotdata for plotting text data files. In most cases -this program can be invoked from a command-shell as

-
plotdata file1.dat file2.dat
-
-
-

which plots the numerical data from the text files file1.dat, -file2.dat together in a single graph. By default the first -column is used as an x variable and the second column is used for the -y values. After displaying the plot the program starts an IPython -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the filenames variable -containing a list of plotted files. It also pre-loads the -plotdata() and findfiles() functions just as in PDFgetX3 -interactive session. The plotdata() -function works in a similar way as the plotdata program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -plotdata() function would be:

-
In [1]: plotdata(['file1.dat', 'file2.dat'])
-
-
-
-

Selecting files

-

The plotdata program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as *.dat. The file search feature is controlled by the -following options:

-
-
--f, --find
-

Use command line arguments as filename patterns and plot all matching -files. This option works in the same way as for -pdfgetx3, for full details see the -pdfgetx3 --find documentation. Note that -within command line the special patterns ^$<> need to be quoted -in double quotes (") so they are not processed by command shell.

-
- -
-
--l, --list
-

List the input files and exit. This is useful in conjunction -with the -f, --find option to check if data files -are selected as intended.

-
- -

Assuming the current directory contains 20 files named -file1.dat, file2.dat, …, file20.dat, -the plotting of files 9 to 13 could be done (with a check listing) -as follows

-
$ plotdata -fl "<9-13>.dat"
-file9.dat
-file10.dat
-file11.dat
-file12.dat
-file13.dat
-$ plotdata -f "<9-13>.dat"
-
-
-

Within an interactive IPython session the equivalent plot could be -produced by combining the plotdata() and findfiles() functions as

-
In [1]: plotdata(findfiles("<9-13>.dat"))
-
-
-
-
-

Selecting x and y data

-

The plotdata program provides several ways of selecting -columns for x or y data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is “0” -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function):

-
-
--x X
-

index or name of the x-column to plot. See the -y option -for the supported syntax, but note that X may select only one -column. When set to “.” use the data-row index for x.

-
- -
-
--y Y
-

index or name of the y-column or columns to plot. The Y column -specification can be a comma separated list of indices, column names -or Python-like ranges, for example “1,2”, “G”, “1:4” (START:STOP, -same as “1,2,3”), “1:4:2” (START:STOP:STEP, same as “1,3”), or -“-2:” (same as “-2,-1”, i.e, the last 2 columns). Because column -indexing starts at “0” the second column must be specified as “1”.

-

The column names work if the data section in the file is preceded by -a headline of unique column names, for example:

-
x     square      cube
-1     1           1
-2     4           8
-3     9           27
-4     16          64
-
-
-

For such data file the plotdata program will recognize column names -“x”, “square” and “cube” and an implicit “.” for row index.

-
- -
-
--s STYLE, --style=STYLE
-

optional plot format specification. See the -matplotlib.pyplot.plot() function -for a list of available formats.

-
- -
-
--L LOG, --log=LOG
-

axes to be plotted with logarithmic scaling, for example, “x”, “y” or -“xy”. Axes not listed in LOG will use linear scaling.

-
- -
-
--h, --help
-

display a brief usage info and exit.

-
- -
-
--V, --version
-

show program version and exit.

-
- -
-
---manual
-

Open this manual page in a Web browser and exit.

-
- -
-
-

Examples

-

The examples directory plotdata contains a sincos.dat -file that has 3-columns of values labeled as “x”, “sin” and “cos”. -Here are several examples of the plotdata capabilities -when used from command line - the user is encouraged to try them out:

-
plotdata sincos.dat
-plotdata -y 1,2 sincos.dat
-plotdata -x . -y 0:3 sincos.dat
-plotdata -y cos sincos.dat
-plotdata -x sin -y cos -sr-- sincos.dat
-
-
-

An equivalent usage from a general IPython session would be:

-
ipython --matplotlib=auto
-In [1]: from diffpy.pdfgetx.plotdata import plotdata
-In [2]: plotdata('sincos.dat')
-In [3]: plotdata('sincos.dat', y=[1,2])
-In [4]: plotdata('sincos.dat', x='.', y=':3')
-In [5]: plotdata('sincos.dat', y='cos')
-In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--')
-
-
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/quick-start.html b/static_root/doc/pdfgetx/2.1.0/quick-start.html deleted file mode 100644 index 1b970560..00000000 --- a/static_root/doc/pdfgetx/2.1.0/quick-start.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - Quick-start guide — diffpy.pdfgetx 2.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Quick-start guide

-

This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing pdfgetx3, pdfgetn3, or -pdfgets3 in a shell window. Please, refer to the installation section if this is not working yet.

-
-

pdfgetx3 command

-

The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as

-
pdfgetx3 [options] input1 input2 ... inputN
-
-
-

The inputN stands for an input powder diffraction data. The -inputN file is a simple two-column text file, where the first -column corresponds to either the 2Θ diffraction angle, or a -momentum transfer, Q, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -FIT2D program using -its “chi” output format, thus we will also refer to them as “chi-files”. -A typical content of a “chi” file looks as folows:

-
Pt_bulk-00055.tif: 2-theta Scan
-2-Theta Angle (Degrees)
-
-       1465
- 2.0003892E-02  0.0000000E+00
- 6.0011677E-02  0.0000000E+00
- 1.0001946E-01  0.0000000E+00
- 1.4002724E-01  0.0000000E+00
- 1.8003502E-01  0.0000000E+00
- ...
-
-
-

The command-line options are arguments that start with a dash “-” and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash --. Options may require values. For short options, -the value may be joined to the option string, for example --w0.142774, while for the long options it has to be separated -with an equal sign, e.g., --wavelength=0.142774. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the Options and parameters section of -this manual. A brief summary of options can be also displayed by -executing

-
pdfgetx3 --help
-
-
-

The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the Tutorial. -In general, the first step is to create a commented configuration file pdfgetx3.cfg using:

-
pdfgetx3 --createconfig=pdfgetx3.cfg
-
-
-

The configuration file can have any name, but it is preferable -to use either pdfgetx3.cfg or .pdfgetx3.cfg, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the -c, --config option.

-

Open the pdfgetx3.cfg file in a text editor. The lines that -start with a hash mark # are comments and are not used. The lines -starting with a right brace [ denote sections in the configuration -file. The active lines are all formatted as -“NAME=VALUE”. Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation:

-
    -
  • dataformat – specifies the input data format

  • -
  • wavelength – radiation wavelength in Å required for the -“twotheta” format.

  • -
  • composition – chemical composition of the sample

  • -
  • qmaxinst – upper Q boundary for a meaningful measurement -intensities.

  • -
  • qmaxQ-cutoff for the Fourier transformation that -yields the PDF.

  • -
-

Save the updated configuration file and run pdfgetx3 on the input data -FILENAME.chi as

-
pdfgetx3 --verbose=info -t gr FILENAME.chi
-
-
-

Here the --verbose=info option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The -t gr option -tells the program to save the final G(r) curve as a -FILENAME.gr file in the working directory.

-

The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation

-
pdfgetx3 -c FILENAME.gr --plot=fq,gr
-
-
-

Note this command does not include any .chi file and this will as -a result process the previously used input FILENAME.chi. -The --plot=fq,gr option tells PDFgetX3 to -display 2 plots for the reduced structure function F(Q) and the -final PDF G(r). The --plot option also implies an -interactive mode -therefore the program does not exit, but starts an -interactive IPython session. To exit the interactive mode, -type exit() and press Enter.

-
-
-

pdfgetn3 command

-

The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the ---mode option. Running pdfgetn3 is nearly identical -to executing pdfgetx3 --mode=neutron. The only difference between -these commands is that pdfgetx3 checks for configuration files -pdfgetx3.cfg and .pdfgetx3.cfg, whereas -pdfgetn3 looks for pdfgetn3.cfg and .pdfgetn3.cfg.

-
-
-

pdfgets3 command

-

The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying mode = sas in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named pdfgets3.cfg and -.pdfgets3.cfg in order, when no configuration file is specified.

-

Please refer to the tutorial section for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3.

-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/release.html b/static_root/doc/pdfgetx/2.1.0/release.html deleted file mode 100644 index b732121e..00000000 --- a/static_root/doc/pdfgetx/2.1.0/release.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - Release notes — diffpy.pdfgetx 2.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Release notes

-
-

Version 2.1.0 – 2020-07-15

-
-

Added

-
    -
  • New mode sas for processing Small Angle Scattering data and -for using custom scattering factors.

  • -
  • qmax-pushes-qmin coupling of sliders in the tuneconfig tool.

  • -
  • New program pdfgets3 and IPython magic %pdfgets3.

  • -
-
-
-

Changed

-
    -
  • Software distribution format to a universal Python wheel.

  • -
  • tuneconfig dialog to access full Q-range with all qmin, qmax, and -qmaxinst sliders. Increased range for the rpoly slider.

  • -
-
-
-

Deprecated

-
    -
  • Software distribution in setuptools egg package.

  • -
-
-
-

Removed

-
    -
  • Support for Python 3.4.

  • -
-
-
-

Fixed

-
    -
  • Support backslash in the --find option path argument on Windows. -Both forward and back slashes are allowed on Windows, but other -platforms must use forward slash.

  • -
  • Recipe for platform-dependent Anaconda package.

  • -
  • Bogus test failure when installed in symlinked directory.

  • -
-
-
-
-

Version 2.0.0 – 2018-11-02

-
-

Added

-
    -
  • New mode neutron for processing constant-wavelength -neutron scattering data.

  • -
  • Correction for an offset of diffractometer zero angle.

  • -
  • Configuration parameter twothetazero and command-line option ---twothetazero for position of the actual zero angle -in diffractometer degrees.

  • -
  • New program pdfgetn3 and IPython magic %pdfgetn3.

  • -
  • Separate configuration file pdfgetn3.cfg for the pdfgetn3 program.

  • -
  • New sub-package diffpy.pdfgetx.apps for entry points to all programs.

  • -
  • Table of electron scattering factors from E. J. Kirkland, -Advanced Computing in Electron Microscopy.

  • -
  • The + operator for additive pattern groups when matching input files -with pdfgetx3 --find.

  • -
  • An optional slash-containing entry, e.g., dir/, to set the search path -for pdfgetx3 --find. Each pattern group may have one path entry which -affects the current and subsequent pattern groups. Pattern groups that -have only the path entry reuse the previous file patterns, for example, -dir1/ .dat$ + dir2/ + dir3/.

  • -
  • The dotfiles flag argument to functs.findfiles to also find -dot-starting files without an explicit pattern.

  • -
  • Support for Python 3.7.

  • -
  • Tutorial examples for constant-wavelength neutron diffraction data.

  • -
-
-
-

Changed

-
    -
  • Initialization arguments of PDFConfig to set initial configuration values.

  • -
  • path argument of functs.findfiles to give one search path instead -of a list of paths.

  • -
  • pdfgetx3 --find to search only the current directory and stop searching -in --datapath.

  • -
  • Improved PDF accuracy by removing repeated Q-grid interpolation.

  • -
  • Handling of dot files by pdfgetx3 --find and the functs.findfiles -function. The dotfiles are by default ignored unless explicitly selected -by a "^." pattern.

  • -
  • Return type of functs.findfiles from IPython SList to a simple list.

  • -
  • Rename camel case interactive functions to lowercase, i.e., to loaddata, -processfiles, clearsession.

  • -
  • Use config.datapath lookup in processfiles(filename).

  • -
-
-
-

Deprecated

-
    -
  • Function cromermann.felectronatq for electron scattering -factors calculation using Mott-Bethe approximate formula.

  • -
  • IPython extension module diffpy.pdfgetx.ipy_pdfgetx3. -Use diffpy.pdfgetx.ipy_magics instead.

  • -
  • Camel case functions loadData, processFiles, clearSession.

  • -
-
-
-

Removed

-
    -
  • Support for Python 2.6.

  • -
  • Processing of environment variable PDFGETX3PATH.

  • -
  • Support for IPython 0.x.

  • -
  • Obsolete variable __gitsha__ from the version module.

  • -
  • Processing of command line options in PDFConfig class.

  • -
  • Implicit loading of configuration files in PDFConfig instantiation.

  • -
-
-
-

Fixed

-
    -
  • Import of all objects from matplotlib.pyplot into -an interactive session started by plotdata.

  • -
  • Inaccurate G interpolation when rstep is comparable to pi / qmax.

  • -
  • Lone anchor patterns ^, $ to match everything.

  • -
-
-
-
-

Version 1.2 – 2018-01-12

-
-

Added

-
    -
  • Support for Python 3.4, 3.5, 3.6 in addition to Python 2.6 and 2.7.

  • -
  • Support for IPython 5.0 with preserved -compatibility with IPython 0.10 and later.

  • -
  • Support for matplotlib 2.0.

  • -
  • New option --log=LOG for the plotdata program to set logarithmic -scale for either of x or y axis. The plotdata() function learnt -a new log argument with the same purpose.

  • -
  • New argument ax for the plotdata() function that select a specific -matplotlib axis for plotting.

  • -
  • Support for Unicode filenames and values in the config -interactive variable.

  • -
  • Processing of parentheses and fractional stoichiometries in chemical -formulas as in Pb (Ti Zr)1/2 O3.

  • -
  • Explanatory error message when PDFgetX3 was installed for -unsupported Python.

  • -
-
-
-

Changed

-
    -
  • The egg package file was enhanced to support all Python -versions. The software is now distributed in a single -egg rather than multiple eggs per each Python version.

  • -
  • PDFgetX3 option --force to take a boolean argument -(yes, no, true, etc.) or once. The configuration -parameter force can be likewise set to a bool or to -a string "once". This enables a safer one-time -overwrite of existing output files.

  • -
  • Plot labels to use a proper Unicode “Å” (Ångström) symbols. -The “Å” symbol is also used within units in output files.

  • -
  • The usecols argument of the loadData() function to also -accept scalars, open-end slice objects and string-denoted -slices such as "1:3" or "1:".

  • -
  • The plotdata program and plotdata() function to accept -open-end slices for the y-columns selection.

  • -
  • The IPython magic function %pdfgetx3 to set the _exit_code -variable as do generic shell commands run from IPython.

  • -
  • Inline documentation to use NumPy-style Napoleon format, -which is human readable and can be included in the manual.

  • -
  • Release scripts to build software package bundles and -documentation in binary-reproducible way.

  • -
-
-
-

Deprecated

-
    -
  • Compatibility with Python 2.6.

  • -
  • Support for IPython 0.x.

  • -
  • Variable __gitsha__ in the version module which was renamed -to __git_commit__.

  • -
-
-
-

Removed

-
    -
  • The hold argument of the plotdata() function, -because it was deprecated in matplotlib.

  • -
  • Support for multiple x-columns in plotdata program and -plotdata() function.

  • -
  • Import of all objects from numpy module into the interactive -session. NumPy is available under the np name instead.

  • -
-
-
-

Fixed

-
    -
  • Avoid duplicate “.gr.gr” extension when pdfgetx3 is run -with option --output=f.gr.

  • -
  • Crash on loading custom configuration section from a local -file, when that section is missing in global configuration.

  • -
  • Missing checkbox in the tuneconfig dialog caused by matplotlib bug.

  • -
-
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/search.html b/static_root/doc/pdfgetx/2.1.0/search.html deleted file mode 100644 index 8b033f6d..00000000 --- a/static_root/doc/pdfgetx/2.1.0/search.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - Search — diffpy.pdfgetx 2.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -

Search

-
- -

- Please activate JavaScript to enable the search - functionality. -

-
-

- From here you can search these documents. Enter your search - words into the box below and click "search". Note that the search - function will automatically search for all of the words. Pages - containing fewer words won't appear in the result list. -

-
- - - -
- -
- -
- -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/searchindex.js b/static_root/doc/pdfgetx/2.1.0/searchindex.js deleted file mode 100644 index 733acb46..00000000 --- a/static_root/doc/pdfgetx/2.1.0/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({docnames:["files","index","install","interact","intro","options","plotdata","quick-start","release","tutorial"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.index":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,sphinx:56},filenames:["files.rst","index.rst","install.rst","interact.rst","intro.rst","options.rst","plotdata.rst","quick-start.rst","release.rst","tutorial.rst"],objects:{"":{backgroundfile:[5,1,1,"-"],bgscale:[5,1,1,"-"],composition:[5,1,1,"-"],config:[3,2,1,"-"],dataformat:[5,1,1,"-"],datapath:[5,1,1,"-"],force:[5,1,1,"-"],formfactorfile:[5,1,1,"-"],fq:[3,2,1,"-"],gr:[3,2,1,"-"],inputfile:[5,1,1,"-"],interact:[5,1,1,"-"],iq:[3,2,1,"-"],iraw:[3,2,1,"-"],mode:[5,1,1,"-"],output:[5,1,1,"-"],outputtypes:[5,1,1,"-"],plot:[5,1,1,"-"],qmax:[5,1,1,"-"],qmaxinst:[5,1,1,"-"],qmin:[5,1,1,"-"],rmax:[5,1,1,"-"],rmin:[5,1,1,"-"],rpoly:[5,1,1,"-"],rstep:[5,1,1,"-"],sq:[3,2,1,"-"],twothetazero:[5,1,1,"-"],verbose:[5,1,1,"-"],wavelength:[5,1,1,"-"]},"diffpy.pdfgetx":{findfiles:[3,0,1,""],loaddata:[3,0,1,""]},"diffpy.pdfgetx.plotdata":{plotdata:[3,0,1,""]},_interactive_:{clearsession:[3,0,1,""],pdfgetter:[3,0,1,""],processfiles:[3,0,1,""],tuneconfig:[3,0,1,""]},pdfgetx3:{"--background":[5,3,1,"cmdoption-pdfgetx3-b"],"--bgscale":[5,3,1,"cmdoption-pdfgetx3-bgscale"],"--composition":[5,3,1,"cmdoption-pdfgetx3-composition"],"--config":[5,3,1,"cmdoption-pdfgetx3-c"],"--createconfig":[5,3,1,"cmdoption-pdfgetx3-createconfig"],"--datapath":[5,3,1,"cmdoption-pdfgetx3-d"],"--find":[5,3,1,"cmdoption-pdfgetx3-f"],"--force":[5,3,1,"cmdoption-pdfgetx3-force"],"--format":[5,3,1,"cmdoption-pdfgetx3-format"],"--formfactorfile":[5,3,1,"cmdoption-pdfgetx3-ff"],"--help":[5,3,1,"cmdoption-pdfgetx3-h"],"--interact":[5,3,1,"cmdoption-pdfgetx3-i"],"--list":[5,3,1,"cmdoption-pdfgetx3-l"],"--manual":[5,3,1,"cmdoption-pdfgetx3-manual"],"--mode":[5,3,1,"cmdoption-pdfgetx3-mode"],"--output":[5,3,1,"cmdoption-pdfgetx3-o"],"--outputtypes":[5,3,1,"cmdoption-pdfgetx3-t"],"--plot":[5,3,1,"cmdoption-pdfgetx3-p"],"--qmax":[5,3,1,"cmdoption-pdfgetx3-qmax"],"--qmaxinst":[5,3,1,"cmdoption-pdfgetx3-qmaxinst"],"--qmin":[5,3,1,"cmdoption-pdfgetx3-qmin"],"--rmax":[5,3,1,"cmdoption-pdfgetx3-rmax"],"--rmin":[5,3,1,"cmdoption-pdfgetx3-rmin"],"--rpoly":[5,3,1,"cmdoption-pdfgetx3-rpoly"],"--rstep":[5,3,1,"cmdoption-pdfgetx3-rstep"],"--section":[5,3,1,"cmdoption-pdfgetx3-s"],"--twothetazero":[5,3,1,"cmdoption-pdfgetx3-twothetazero"],"--verbose":[5,3,1,"cmdoption-pdfgetx3-verbose"],"--version":[5,3,1,"cmdoption-pdfgetx3-v"],"--wavelength":[5,3,1,"cmdoption-pdfgetx3-w"],"-V":[5,3,1,"cmdoption-pdfgetx3-v"],"-b":[5,3,1,"cmdoption-pdfgetx3-b"],"-c":[5,3,1,"cmdoption-pdfgetx3-c"],"-d":[5,3,1,"cmdoption-pdfgetx3-d"],"-f":[5,3,1,"cmdoption-pdfgetx3-f"],"-ff":[5,3,1,"cmdoption-pdfgetx3-ff"],"-h":[5,3,1,"cmdoption-pdfgetx3-h"],"-i":[5,3,1,"cmdoption-pdfgetx3-i"],"-l":[5,3,1,"cmdoption-pdfgetx3-l"],"-o":[5,3,1,"cmdoption-pdfgetx3-o"],"-p":[5,3,1,"cmdoption-pdfgetx3-p"],"-s":[5,3,1,"cmdoption-pdfgetx3-s"],"-t":[5,3,1,"cmdoption-pdfgetx3-t"],"-w":[5,3,1,"cmdoption-pdfgetx3-w"]},plotdata:{"--find":[6,3,1,"cmdoption-plotdata-f"],"--help":[6,3,1,"cmdoption-plotdata-h"],"--list":[6,3,1,"cmdoption-plotdata-l"],"--log":[6,3,1,"cmdoption-plotdata-log"],"--manual":[6,3,1,"cmdoption-plotdata-manual"],"--style":[6,3,1,"cmdoption-plotdata-s"],"--version":[6,3,1,"cmdoption-plotdata-v"],"-L":[6,3,1,"cmdoption-plotdata-log"],"-V":[6,3,1,"cmdoption-plotdata-v"],"-f":[6,3,1,"cmdoption-plotdata-f"],"-h":[6,3,1,"cmdoption-plotdata-h"],"-l":[6,3,1,"cmdoption-plotdata-l"],"-s":[6,3,1,"cmdoption-plotdata-s"],"-x":[6,3,1,"cmdoption-plotdata-x"],"-y":[6,3,1,"cmdoption-plotdata-y"]}},objnames:{"0":["py","function","Python function"],"1":["std","confval","configuration value"],"2":["std","interactvar","interactive variable"],"3":["std","cmdoption","program option"]},objtypes:{"0":"py:function","1":"std:confval","2":"std:interactvar","3":"std:cmdoption"},terms:{"0000000e":7,"0001946e":7,"0003892e":7,"0011677e":7,"00903_qmax18":9,"0x3e20f50":9,"4002724e":7,"5o3":5,"5zr0":5,"6id":9,"8003502e":7,"\u00e5ngstr\u00f6m":[0,5,7,8],"\u03b1":9,"boolean":8,"break":9,"case":[5,6,8,9],"class":[3,8],"default":[0,3,5,6,7,8,9],"final":[2,5,7,9],"float":[3,5],"function":[0,3,4,6,7,8,9],"import":[3,5,6,8,9],"int":3,"juh\u00e1":4,"long":[0,7],"new":[3,4,5,8,9],"public":4,"return":[3,8],"short":7,"true":[3,5,8,9],"try":[6,9],"while":[0,2,7,9],Axes:[3,6],For:[2,3,4,5,6,7,9],One:[3,5,9],SAS:[4,7],Such:9,The:[0,1,2,3,4,5,7,8,9],There:[2,9],These:[2,3],Use:[3,4,6,8,9],Useful:5,With:9,__git_commit__:8,__gitsha__:8,_exit_cod:8,_qmax18:9,abbrevi:9,abil:9,about:[5,7,9],abov:[2,3,9],accept:[0,8,9],access:[0,2,8],accomplish:[2,9],accord:3,accur:9,accuraci:8,acknowledg:4,action:[5,9],activ:[0,3,7,9],actual:[0,2,8],add:[2,5,9],added:3,adding:3,addit:[0,2,3,4,5,8,9],adjust:[4,9],advanc:[8,9],affect:[8,9],after:[0,5,6,9],again:[3,9],agre:2,agreement:4,al2o3:9,all:[0,2,3,5,6,7,8,9],allow:[3,4,5,6,8,9],alon:6,alreadi:[2,5,9],also:[0,2,3,4,5,6,7,8,9],although:7,alwai:5,anaconda:[2,8,9],analysi:4,anchor:8,angl:[0,1,4,5,7,8],angular:9,ani:[0,2,3,4,5,7,9],anoth:[2,9],anticip:4,anywher:9,apart:7,app:8,appear:[5,9],append:5,appl:4,appli:[0,3,9],applic:7,approxim:[8,9],apt:2,arbitrari:9,area:9,argument:[0,2,3,5,6,7,8,9],arrai:3,ask:4,assembl:[4,9],assess:9,assign:[3,5,7],assum:[5,6,7],atom:[4,5],attempt:0,attribut:[3,5,9],au_dna_ff:9,au_dna_npa:9,author:1,auto:6,automat:[4,7,9],avail:[2,5,6,8,9],averag:[0,9],avoid:[8,9],axes:[3,6,9],axeslist:[3,9],axi:[3,8,9],b_qmax18:9,back:8,background:[0,5,9],backgroundfil:[0,5,9],backslash:8,base:[3,9],basenam:5,batch:4,beamlin:9,becaus:[3,6,8,9],been:[5,7,9],begin:[3,5,9],behavior:[5,7],being:[5,7,9],below:9,best:7,beth:8,better:9,between:7,bgscale:[5,9],billing:4,binari:8,block:3,blue:9,bogu:8,bool:[3,5,8],both:[3,7,8,9],bound:[5,9],boundari:[5,7,9],box:9,brace:7,breakpoint:9,brief:[5,6,7],brookhaven:4,browser:[5,6],bug:8,build:8,built:9,bulk:9,bundl:[4,8],button:9,calcul:[0,3,5,7,8,9],calibr:9,call:[3,6,9],callabl:3,camel:8,can:[0,2,3,4,5,6,7,8,9],cannot:[6,9],canopi:2,cap:9,capabl:[6,7],capillari:9,catio3:5,caus:[8,9],cell:9,cfg:[0,7,8,9],ch2:5,ch3:5,chain:9,chang:[0,3,9],charact:[3,5,7,9],check:[0,2,6,7,9],checkbox:8,chemic:[0,5,7,8,9],chi:[5,7,9],chia:4,christoph:4,circl:9,cite:4,citi:4,clear:[3,5,9],clearsess:[3,8,9],clf:9,click:9,close:9,closer:5,cmi:9,code:[2,4,9],colloid:9,columbia:[2,4,9],column:[0,2,3,5,6,7,8,9],combin:6,comma:[3,5,6,9],command:[0,1,3,4,5,6,8,9],comment:[0,7],compar:[8,9],compat:[2,8],complain:9,complet:[5,9],compon:5,composit:[0,5,7,9],comprehens:2,comput:[2,8],conda:9,conduct:9,config:[0,3,5,7,8,9],config_neutron:9,config_sa:9,config_xrai:9,configfil:9,configsect:9,configur:[1,3,7,8],confirm:9,conjunct:6,consid:3,consist:7,constant:[3,4,5,8,9],contact:4,contain:[0,2,3,5,6,7,8,9],content:[0,7,9],continu:9,control:[4,5,6,9],conveni:[2,3,6,7],convent:6,convers:[2,5],convert:[3,4,5,9],copyright:4,correct:[0,4,5,8,9],correctli:[2,7,9],correspond:[0,3,5,7,9],cos:6,could:6,count:5,counterpart:7,coupl:8,cours:2,cover:[5,9],crash:8,creat:[0,2,3,5,7,9],createconfig:[0,5,7],critic:[2,7],cromermann:8,crystallogr:4,cube:6,current:[0,3,5,6,8,9],curv:[5,7,9],custom:[2,4,5,8,9],cutoff:[5,7,9],dash:[5,7],dat:[5,6,8,9],data:[0,1,2,3,4,5,7,8],datafil:[3,5],dataformat:[0,3,5,7,9],datapath:[0,5,8,9],davi:4,debug:5,decai:5,dedic:9,defin:[0,2,3,5,7,9],definit:5,degre:[0,5,7,8,9],delft:9,demonstr:[7,9],denot:[7,8],depend:[2,3,8],der:9,describ:[7,9],descript:[5,7],design:9,desir:[3,9],detail:[5,6,9],detector:[5,9],diagnost:5,dialog:[3,8,9],did:9,differ:[0,2,5,7,9],difficult:9,diffpi:[2,3,4,6,8,9],diffract:[0,3,4,5,7,8,9],diffractomet:[5,8,9],dir1:[5,8],dir2:[5,8],dir3:8,dir:[3,8],directoi:9,directori:[0,2,3,5,6,7,8,9],disabl:5,discuss:9,disk:3,displai:[2,3,5,6,7,9],distribut:[2,4,8,9],dna:9,doc:9,document:[6,7,8,9],doe:[2,3,7,9],don:[2,4],done:[6,9],dot:8,dotfil:[3,8],doubl:[5,6,7],download:2,driven:[2,9],drop:9,duplic:8,dynam:9,each:[0,3,5,8,9],easi:[2,9],easiest:[0,2],easy_instal:2,editor:[0,2,7],edu:4,effect:[3,4,5,9],egg:[2,8],eijck:4,either:[0,3,5,7,8,9],elaps:9,electron:8,element:[3,5,9],email:4,employ:4,empti:[3,5,9],empty_capillari:9,enabl:[7,8],enclos:5,encount:9,encourag:6,end:[3,5,8,9],engin:2,enhanc:[2,8],enough:3,enter:[7,9],enthought:2,entir:3,entri:[3,5,8,9],environ:[2,8,9],equal:[0,3,5,7,9],equival:6,error:[5,8,9],essenti:[5,9],etc:[3,8],even:9,everi:5,everyth:8,exact:9,exampl:[0,1,2,3,5,7,8,9],except:[0,9],execut:[2,7,9],exist:[2,5,8,9],exit:[5,6,7,9],expand:[5,9],expans:6,expect:[5,9],experi:5,experiment:9,explanatori:8,explicit:8,explicitli:[3,5,7,8],extens:[2,5,8,9],extra:[2,3,5,9],extract:[1,4,9],f007:5,f2avg:5,f77:5,faction:9,factor:[0,5,7,8,9],failur:8,fals:[3,5],familiar:7,farrow:4,fashion:[2,7],fast:9,favg2:5,favorit:0,featur:[6,9],felectronatq:8,few:[0,7,9],fft:9,fig:9,figur:9,file10:6,file11:6,file12:6,file13:6,file1:6,file20:6,file2:6,file9:6,file:[1,2,3,4,7,8],filenam:[0,2,3,5,6,7,8,9],find:[0,2,3,5,6,8,9],findfil:[3,6,8,9],finish:9,first:[0,2,3,5,6,7,9],fit2d:7,fit:[0,1,5],fix:5,flag:[8,9],fledg:9,flexibl:5,folder:9,follow:[0,2,4,5,6,9],folow:7,forc:[3,5,8,9],form:[0,5,7,9],format:[2,3,5,6,7,8],formfactorfil:[5,9],formula:[5,8],forward:[8,9],found:[0,2,9],four:0,fourier:[5,7],fraction:[5,8],frequenc:5,fresh:9,from:[0,2,3,4,5,6,7,8],front:5,full:[6,8,9],funct:8,further:5,gang:[4,9],gca:3,gener:[0,3,6,7,8,9],get:[2,7,9],gettransform:9,give:[5,8],given:9,global:[0,8],going:9,good:9,grant:4,graph:[6,9],greater:3,green:9,grid:[0,5,8,9],group:[3,4,5,8,9],gui:[2,3,9],guid:1,handl:[8,9],hao:4,happen:9,has:[0,3,5,6,7,9],hash:7,have:[0,2,3,5,7,8,9],header:[0,3,7,9],headlin:6,help:[5,6,7,9],here:[2,5,6,7,9],hidden:3,higher:[3,5],highli:4,hint:9,hoc:4,hold:8,holder:5,home:[0,9],how:9,howev:[5,9],http:[2,9],human:8,hundr:9,hung:4,ident:7,identifi:[0,9],ignor:[0,3,5,7,8,9],illustr:9,immedi:9,impli:[7,9],implicit:[6,8],improv:8,inaccur:[8,9],includ:[2,3,4,6,7,8,9],inclus:[3,5],increas:8,inde:7,indent:2,index:[1,2,3,6,9],indic:[3,6,9],info:[5,6,7,9],inform:[4,5,7],initi:[3,6,8],inlin:8,input1:7,input2:7,input:[1,3,6,7,8],inputfil:[0,3,5,9],inputn:7,instal:[1,7,8,9],instanc:3,instanti:8,instead:[2,6,7,8],instruct:[2,9],instrument:9,integ:[3,5,6,9],integr:2,intend:[2,5,6,7,9],intens:[0,3,5,7,9],intensity1:3,intensity2:3,interact:[1,2,4,5,6,7,8],interactiveshellapp:2,intermedi:[3,4,9],internet:2,interpol:8,interpret:[2,5],intervent:4,introduct:1,invers:[0,5,7],invok:6,involv:9,ipy_mag:[2,8],ipy_pdfgetx3:8,ipynb:9,ipython3:2,ipython:[1,3,5,6,7,8,9],ipython_config:2,iraw:[3,9],issu:9,item:[3,5],iter:3,its:[5,6,7,9],itself:0,jank:4,join:7,juli:1,jupyt:9,just:[0,6,9],kapton_bgrd_300k_nor_2:9,keep:[3,6],keyword:[3,9],kirkland:8,know:4,known:9,kwarg:3,label:[6,8],laboratori:4,lack:9,languag:2,larg:[5,6,9],larger:5,last:[3,5,6,9],later:8,lead:[2,3,4,5,7],learnt:8,least:3,left:5,legend:9,leli:9,let:9,level:[3,5],librari:[2,4],licens:1,like:[2,6,9],likewis:8,limit:5,line2d:[3,9],line:[0,2,3,4,5,6,7,8,9],linear:[3,6],linux:[2,9],list:[3,5,6,8,9],liu:4,live:9,load:[3,5,6,7,8,9],loaddata:[3,8,9],loadtxt:3,loc:9,local:8,locat:0,log:[3,6,8],logarithm:[3,6,8],lone:8,look:[3,7,9],lookup:8,louwen:4,low:[3,9],lower:[5,9],lowercas:8,mac:[2,9],made:9,magic:[1,8],mai:[0,2,3,5,6,7,8,9],make:[5,7,9],manag:2,mandatori:0,mani:7,manipul:9,manual:[1,5,6,7,8],mark:[0,7],marker:6,match:[2,3,5,6,8],materi:9,matplotlib:[2,3,6,8,9],matric:3,matrix:[3,9],max:9,maximum:[5,9],may:9,mean:9,meaning:[5,7,9],measur:[0,5,7,9],member:4,memori:3,mention:9,messag:[5,8,9],metadata:[0,7],method:[3,9],microscopi:8,might:5,mind:6,minimum:3,minrow:3,misc:3,miss:8,mode:[1,2,4,5,7,8,9],modifi:[6,7],modul:[3,8],momentum:[0,5,7,9],more:[2,3,4,5,7,9],most:[0,3,6,9],mott:8,move:9,multipl:[0,8],must:[0,2,3,4,5,6,7,8],nacl:0,name:[0,2,3,5,6,7,8],nanomet:[0,5,7],nanoparticl:[4,9],napoleon:8,nation:4,natur:9,navig:[2,9],nbcmi:9,ndarrai:3,nearli:7,necessari:[2,3,5,9],need:[0,2,5,6,9],neg:3,neutron:[1,4,5,7,8],next:9,ni300mesh_300k_nor_1:9,nickel:1,nicmd:9,nois:5,noisi:[5,9],non:[3,9],none:[3,5,9],nonzero:9,normal:[0,5,9],notabl:9,note:[1,3,5,6,7,9],notebook:9,noth:9,notic:[1,9],now:[8,9],nsl:9,number:[3,5,9],numer:[0,6,9],numpi:[2,3,8],nykypanchuk:9,object:[3,5,8,9],obsolet:8,obtain:[2,9],off:5,offset:[5,8,9],often:[5,7],older:2,oleg:9,omit:5,onc:[0,2,3,5,8,9],one:[2,3,5,6,8,9],ones:5,onli:[0,3,4,5,6,7,8,9],open:[2,5,6,7,8,9],oper:[1,2,6,7,8],optimum:4,option:[0,1,2,3,6,7,8,9],order:[5,7],org:[2,9],orient:2,origin:9,oscil:9,other:[0,1,2,3,7,8,9],otherwis:[2,5],out:[5,6,9],outpufil:9,output:[1,3,7,8],outputtyp:[0,5,9],outsid:9,overal:9,overlap:[5,9],overrul:9,overwrit:[5,8,9],own:[5,9],packag:[1,2,8],page:[1,6],pair:[3,4],paper:4,paragraph:2,paramet:[0,1,3,4,7,8],parent:9,parenthes:[5,8],pars:9,part:[2,9],parti:[2,4],pass:[0,3,6,7,9],path:[0,2,3,5,8],pattern:[0,3,5,6,8,9],pavol:4,pbti0:5,pdf:[1,2,3,4,7,8],pdfconfig:[3,8],pdfgetn3:[0,1,2,3,4,5,8,9],pdfgets3:[1,2,4,5,8,9],pdfgetter:[3,5,9],pdfgetx2:[3,9],pdfgetx3:[0,1,2,3,4,5,6,8,9],pdfgetx3path:8,pdfgetx:[2,3,4,6,8,9],pdfgetxn3:9,pearl:9,per:[0,5,6,8,9],perform:3,perman:2,permit:[4,5],photon:9,pip:[2,9],place:[2,9],plain:5,plan:2,platform:[8,9],platinum:1,pleas:[4,7],plot:[2,3,4,5,6,7,8,9],plotdata:[1,2,3,8,9],plotid:3,plotpdfcomparison:9,point:[3,8,9],polynomi:[0,5,9],pop:9,posit:[5,8],possibl:5,powder:[0,3,4,5,7,9],power:[4,9],pre:[3,6],preced:[3,5,6,7],prefer:7,prefix:2,preload:9,prepend:[2,5],prerequisit:9,present:[5,7,9],preserv:[2,8],press:7,previou:[0,3,8],previous:[5,7],print:[3,5,7,9],privileg:2,problem:9,procedur:9,process:[0,2,3,4,5,6,7,8],processfil:[3,8,9],produc:[0,3,5,6,9],prof:[4,9],profil:2,profile_default:2,program:[0,1,2,3,4,7,8,9],prohibit:4,prompt:[2,6,9],proper:[5,8],protocol:9,provid:[0,2,5,6,9],pt_bulk:[7,9],pt_bulk_ramp03:9,publish:9,purpos:8,push:8,put:9,pyplot:[3,6,8],python37:2,python3:2,python:[1,2,4,5,6,8,9],pythonxi:2,qmax:[3,5,7,8,9],qmaxinst:[5,7,8,9],qmin:[5,8,9],qnm:5,qualiti:9,quick:1,quot:[5,6,9],radiat:[5,7],rai:[1,4,5,7],rang:[3,5,6,8,9],rapid:4,rather:8,raw:[3,9],read:[0,3,5],readabl:8,reason:9,recalcul:9,recip:8,recogn:[6,9],recommend:9,red:9,redo:[7,9],reduc:[0,7,9],refer:[1,3,7,9],referenc:7,refin:9,regular:[0,9],rel:9,relat:[3,7,9],releas:[1,2],reliabl:9,remark:9,remov:[5,9],renam:8,repeat:[5,8],replac:[2,9],report:5,repositori:2,reproduc:[0,8],requir:[1,5,7,9],resampl:9,rescal:9,research:4,reset:[3,5,9],residu:9,resolv:9,respect:[3,4,7,9],result:[0,3,4,5,7,9],reus:[3,5,8,9],right:7,rmax:[5,9],rmin:[5,9],root:2,round:9,row:[3,6,9],rpoli:[5,8,9],rstep:[5,8,9],run:[2,4,7,8,9],safe:[2,9],safer:8,safeti:9,same:[0,2,3,5,6,7,8,9],sampl:[0,5,7,9],sapphir:9,sapphire755:9,sas:[5,7,8,9],saspdf:[1,4],satisfi:3,save:[3,5,6,7,9],sb2896:4,scalar:8,scale:[3,5,6,8,9],scan:[7,9],scatter:[0,1,3,4,5,7,8],scienc:2,scientif:[2,4],screen:9,script:[2,4,8],search:[0,1,2,3,5,6,7,8],second:[0,3,6,7,9],section:[0,5,6,7,8,9],sectionnam:[0,5],see:[2,5,6,9],seem:3,select:[0,1,3,5,8,9],selector:3,self:9,separ:[0,3,4,5,6,7,8,9],sequenc:3,sequenti:3,seri:[1,4],serv:3,session:[2,3,5,6,7,8,9],set:[0,2,3,5,6,7,8,9],setup:[5,9],setuptool:[2,8],sever:[0,3,5,6,9],shall:9,shape:9,share:[0,9],shell:[2,3,5,6,7,8,9],shortcut:9,shorter:5,should:[0,2,3,9],show:[3,6,9],side:9,sign:7,signal:5,similar:[2,6,7,9],simon:4,simpl:[0,4,6,7,8,9],simul:9,sin:6,sinc:9,sinco:6,sine:3,singl:[2,3,5,6,7,8,9],six:2,skip:[2,3],slash:[8,9],slice:[3,8],slider:[8,9],slightli:9,slist:8,small:[1,4,5,7,8],smaller:5,smooth:5,softwar:[1,4,6,7,8,9],solid:0,solut:9,some:[2,5,9],songsheng:4,sourc:9,space:[0,5],special:[3,5,6,9],specif:[6,8,9],specifi:[0,3,5,6,7,9],specimen:5,spectra:9,split:3,squar:6,stai:9,stand:[6,7],standard:[2,5,9],start:[0,1,2,3,5,6,8,9],state:9,statement:[5,9],step:[2,6,7,9],still:9,stoichiometri:[5,8],stop:[6,8],store:[3,9],str:3,string:[2,3,5,7,8,9],strip:9,structur:[0,7],style:[3,6,8],sub:8,subdirectori:9,subfold:9,subject:4,subplot:[3,9],subsequ:[3,5,8,9],substr:9,subtract:9,successfulli:9,sudden:9,sudo:2,suffici:3,suffix:9,suitabl:9,summari:7,suppli:7,support:[0,2,3,5,6,8],suppress:5,symbol:[3,5,8],symlink:8,synapt:2,syntax:[0,3,5,6,9],system:[2,3,6,9],tabl:8,tail:5,take:[3,7,8],taken:[5,9],talapin:4,tao:4,technolog:[2,9],tell:7,temperatur:9,templat:[0,5],tend:9,termin:[2,9],terribl:9,test:[0,2,8],text:[0,2,3,5,6,7,9],than:[0,3,8],thank:9,thei:[0,2,3,5,6,9],them:[0,3,4,5,6,7,9],thereaft:9,therefor:[2,5,7,9],theta:7,thi:[0,2,3,4,5,6,7,8,9],third:2,those:[2,3,9],three:[2,4,5],threshold:5,through:7,thu:[0,2,6,7,9],tif:7,time:[5,8,9],timothi:4,timur:4,togeth:[6,9],token:[5,9],told:7,too:5,tool:[2,7,8],top:9,total:[0,4,9],trail:5,transfer:[0,5,7,9],transform:[3,5,7,9],transformbackground:9,transformfqgrid:9,transformfqtogr:9,transformqgridregular:9,transformsqnormrpoli:9,transformsqtofq:9,transformtwothetatoqa:9,transformxrayasfnormchri:9,translat:3,transpos:3,truste:4,tunabl:9,tune:[1,3,4,5],tuneconfig:[3,8,9],tupl:3,turn:[5,9],tutori:[1,3,5,7,8],two:[0,5,7,9],twotheta1:3,twotheta2:3,twotheta:[5,7,9],twothetazero:[1,5,8],type:[0,2,3,5,7,8,9],typic:7,ubuntu:2,uncorrect:9,undefin:5,under:[4,8],understood:[0,9],unexpect:5,unicod:8,uniqu:[5,6,9],unit:[0,5,7,8],univers:[4,8,9],unix:[2,5,9],unless:[5,7,8,9],unpack:3,unreli:5,unseemli:9,unsupport:8,updat:[3,7,9],upon:9,upper:[5,7],usag:[5,6],use:[2,3,4,5,6,7,8,9],usecol:[3,8],used:[1,2,3,4,5,6,7,8,9],useful:[0,2,5,6,9],user:[0,1,2,4,5,6,7,9],uses:9,using:[0,2,3,4,5,6,7,8,9],usual:[0,2,9],util:[4,6],utilis:4,valid:[0,2,5,9],valu:[0,3,4,5,6,7,8,9],van:[4,9],variabl:[2,3,6,8,9],variant:5,varnam:0,ventur:2,verbos:[5,7,9],veri:[2,5,7,9],verifi:[2,5,7,9],version:[1,2,5,6,9],virtual:7,visual:[4,9],vogt:4,vuong:4,wai:[0,2,6,7,8,9],warn:[5,9],wavelength:[4,5,7,8,9],web:[5,6],well:[2,7],were:[0,2,5,7,9],what:[0,3,5,9],wheel:[2,8],when:[0,2,3,5,6,7,8,9],where:[0,5,6,7],wherea:7,whether:4,which:[2,3,4,5,6,8,9],whitespac:3,whl:[2,9],who:2,whole:9,wide:3,window:[2,5,6,7,8,9],within:[2,5,6,8],without:[4,5,8,9],word:5,work:[0,2,3,5,6,7,9],wors:9,would:[0,2,3,5,6,9],wright:4,writabl:2,write:[5,7,9],written:[2,4,5,9],www:[2,9],x21:9,xrai:[5,9],yes:[5,8,9],yet:[4,7,9],yield:7,york:4,you:[0,2,4,9],your:[0,4,9],zero:[3,5,8,9],zip:9,zoom:9},titles:["Files used in PDF extraction","diffpy.pdfgetx","Installation","Interactive mode","Introduction","Options and parameters","The plotdata program","Quick-start guide","Release notes","Tutorial"],titleterms:{Added:8,The:6,angl:9,author:4,chang:8,command:[2,7],configur:[0,5,9],content:1,data:[6,9],deprec:8,diffpi:1,exampl:6,extract:0,file:[0,5,6,9],fit:9,fix:8,from:9,guid:7,indic:1,input:[0,5,9],instal:2,interact:[3,9],introduct:4,ipython:2,licens:4,magic:2,match:9,mode:3,name:9,neutron:9,nickel:9,note:8,notic:4,oper:5,option:5,other:5,output:[0,5,9],paramet:[5,9],path:9,pdf:[0,5,9],pdfgetn3:7,pdfgets3:7,pdfgetx3:7,pdfgetx:1,platinum:9,plotdata:6,predefin:9,process:9,program:[5,6],quick:7,rai:9,refer:4,releas:8,remov:8,requir:2,saspdf:9,scatter:9,scratch:9,search:9,select:6,seri:9,small:9,softwar:2,start:7,tabl:1,tune:9,tutori:9,twothetazero:9,used:0,version:8}}) \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.0/tutorial.html b/static_root/doc/pdfgetx/2.1.0/tutorial.html deleted file mode 100644 index 010b4ef1..00000000 --- a/static_root/doc/pdfgetx/2.1.0/tutorial.html +++ /dev/null @@ -1,819 +0,0 @@ - - - - - - Tutorial — diffpy.pdfgetx 2.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Tutorial

-

In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the examples -folder included with the PDFgetX3 distribution. The examples -folder can be found in the parent “doc” directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -https://www.diffpy.org/doc/pdfgetx/2.1.0/pdfgetxn3-examples.zip.

-
-

Nickel X-ray PDF

-
-

predefined configuration file

-

Change to the Ni directory. The file named -ni300mesh_300k_nor_1-5.chi contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the 2Θ scattering -angles and X-ray intensities. The second file -kapton_bgrd_300k_nor_2-3.chi contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the pdfgetx3.cfg contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -pdfgetx3 program -with the powder data file as an argument:

-
$ pdfgetx3 ni300mesh_300k_nor_1-5.chi
-
-
-

For the first run there should be no output on the screen, -however a new file, ni300mesh_300k_nor_1-5.gr should appear -in the work directory. -We can use the plotdata program, -included with this software, to plot the output data:

-
$ plotdata ni300mesh_300k_nor_1-5.gr
-
-
-

This will open a graph window and start an IPython interactive session. -To exit and close the figure, type exit() on the IPython prompt. -Let’s run the program again, but now with a ---verbose=info -option, to show more details about the program actions.

-
$ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi
-
-INFO:applying pdfgetx3 defaults
-INFO:set config.mode = xray
-INFO:searching for default config file /home/user/.pdfgetx3.cfg
-INFO:searching for default config file .pdfgetx3.cfg
-INFO:searching for default config file pdfgetx3.cfg
-INFO:loaded default config file pdfgetx3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi
-INFO:set config.outputtypes = gr
-INFO:set config.wavelength = 0.142774
-INFO:set config.composition = Ni
-INFO:set config.qmaxinst = 26.5
-INFO:set config.qmax = 26.0
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 30.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'xray'
-INFO:calling config_xray
-INFO:started PDF processing.
-INFO:processing 'ni300mesh_300k_nor_1-5.chi'
-INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr'
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-INFO:elapsed time: 0.095
-
-
-

Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the --verbose option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the --force=yes option, upon -which pdfgetx3 would overwrite any existing files.

-

PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the --c option. Another option, --plot=[iq,sq,fq,gr] turns on plotting of the final PDF or of some other result. A -side effect of the --plot option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function F(Q) and the PDF curve G(r). This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:

-
$ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr
-
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-
-Variables related to PDF processing:
-
-pdfgetter    -- PDFGetter used for calculation.
-config       -- configuration data used by PDFGetter.
-                See config.inputfiles for a list of inputs.
-iraw         -- matrix of input raw intensities with 2 rows per file.
-iq sq fq gr  -- intermediate results per each input file stored
-                as matrix rows.
-
-Functions:
-
-tuneconfig   -- dynamically tune configuration variables.
-processfiles -- process specified data files.
-clearsession -- clear all elements from the inputfiles, iraw,
-                iq, sq, fq and gr variables.
-plotdata     -- plot all or selected columns from a text data file.
-loaddata     -- load all or selected columns from a text data file.
-findfiles    -- search for files matching the specified patterns.
-
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-In [1]:
-
-
-

This will open a plot figure similar to

-_images/nickelfqgr.png -

Because of the interactive mode implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -config variable stores all the configuration parameters, -and its content can be displayed with the print() -function as

-
In [1]: print(config)
-
-configfile = ni300mesh_300k_nor_1-5.gr
-configsection = DEFAULT
-dataformat = twotheta
-...
-qmax = 26.0
-...
-
-
-

The processfiles() function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the F(Q) and G(r) -curves calculated at Qmax = 22 Å-1, we can call -processfiles() and pass it a keyword argument for -the new qmax as follows:

-
In [2]: processfiles(qmax=22)
-
-# the qmax parameter was updated to a new value, thus
-In [3]: config.qmax
-Out[3]: 22
-
-
-

There should be now two lines in each plot axis corresponding to -the results at Qmax equal 26 and 22 Å-1. To exit the program, -type exit().

-
-
-

processing from scratch

-

We have already encountered the command-line option -c -for specifying a custom configuration file. A special argument “NONE”, -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-ERROR:Configuration error: wavelength not specified.
-ERROR:See "--help" for more hints.
-
-
-

There is an error, for the wavelength is necessary to convert -the scattering angle 2Θ to momentum transfer Q. The -X-ray wavelength was 0.142774 Å, which can be passed with the --w, --wavelength option:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774
-
-...
-ERROR:Configuration error: Chemical composition not known.
-ERROR:See "--help" for more hints.
-
-
-

There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the --composition option. The example -below uses a “\” character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-...
-
-
-

There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the -t, --outputtypes option. -The outputtypes option recognizes the following result types: -“iq”, “sq”, “fq”, “gr”. One or more of these type strings, -separated by a comma, can be included with the --t option, which will produce the corresponding -output files. An empty string, such as -t "", or -t NONE -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings.

-

At this point, we will not write any output files, but will use the ---plot option to display the calculated curves. The ---plot accepts the same arguments as outputtypes, so to -display the F(Q) and G(r) curves we shall run

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni --plot=fq,gr
-
-WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161
-WARNING:qmax reset to the data boundary qmaxinst=28.0865680161
-
-
-

which should open the following plot window:

-_images/nickelfqgrnoisy.png -

The graphs look terrible. The PDF is very noisy and the F(Q) curve -shows a sudden break at about 27 Å-1. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -iraw, iq, sq, -fq, gr -variables for the original raw data and intermediate results. We -are going to plot the “iq” variable that has the input intensities -resampled on the Q grid. The matplotlib function -clf() clears the figure, -the iq variable is a two-row matrix with Q and I rows, and the -axis() -function lets us zoom to a given range:

-
In [1]: clf()
-In [2]: plot(iq[0], iq[1])
-Out[2]: [<matplotlib.lines.Line2D at 0x3e20f50>]
-In [3]: axis([20, 29, 0, 3000])
-Out[3]: [20, 29, 0, 3000]
-
-
-

The graph shows a sudden drop in the raw intensities at 27 Å-1. -The qmaxinst variable defines a Q cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 Å-1

-
In [4]: processfiles(qmaxinst=26.5)
-WARNING:qmax reset to the data boundary qmaxinst=26.5
-
-
-

The updated curves looks reasonable without any oscillations and -breakpoints. The tuneconfig() function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type tuneconfig() to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the F(Q) and G(r) curves change. -The rpoly parameter controls the degree of data-correction -polynomial and is an approximate low-r bound of reliable G -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the G(r) -curve and save it to an output file nicmd.gr:

-
In [14]: config.qmax = 26
-In [15]: config.outputtypes = 'gr'
-In [16]: config.output = 'nicmd'
-In [17]: processfiles()
-
-
-
-
-
-

Platinum X-ray series

-

PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(z-shell being a notable exception).

-
-

matching input files

-

The pdfgetx3 program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the -f, --find option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option --l, --list makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files.

-

We will try out this file search on platinum example files. Open a -terminal and navigate to the Pt directory. There should be a -series subdirectory with 6 chi files indexed from 903 to 908. -At first, let’s stay in the Pt directory and run the following -command

-
$ pdfgetx3 --list --find
-
-Pt_bulk-00055-pdfgetx2.gr
-Pt_bulk-00055-pdfgetx3.gr
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-pdfgetx3.cfg
-plotpdfcomparison.py
-
-
-

Without any patterns the file search matches all files in the current -directory. Now let’s try to add name patterns. There are few special -patterns, for example ^ matches at the beginning of the filename, $ at the end and <N-M> matches a range of integer values from -N to M. The patterns containing ^$<> need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works.

-

Filenames containing “y”:

-
$ pdfgetx3 --list --find y
-empty_capillary-00032.chi
-plotpdfcomparison.py
-
-
-

Filenames that containing both “y” and “chi”, here we use the -options --list and --find in an abbreviated -form -l and -f:

-
$ pdfgetx3 -lf y chi
-empty_capillary-00032.chi
-
-
-

Filenames that start with “e”:

-
$ pdfgetx3 --list --find "^e"
-empty_capillary-00032.chi
-
-
-

Filenames that contain character “2”:

-
$ pdfgetx3 --list --find 2
-Pt_bulk-00055-pdfgetx2.gr
-empty_capillary-00032.chi
-
-
-

Filenames that contain numeric value “2”:

-
$ pdfgetx3 -lf "<2>"
-Pt_bulk-00055-pdfgetx2.gr
-
-
-

The special argument + starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both “bulk” and “chi” substrings and then -also those that have “empty” and “chi” in their names, use:

-
$ pdfgetx3 -lf bulk chi + empty chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-

When pattern groups overlap the resulting matches are -made unique and each file is listed only once

-
$ pdfgetx3 -lf bulk chi + chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-
-
-

data search path

-

Each group of PDFgetX3 patterns can have one entry containing -forward slash “/” to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered “903” to “905” and “908” from the -series subdirectory can be therefore matched using

-
$ pdfgetx3 -lf series/ "<903-905>" + 908
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-

The current directory can be selected using ./

-
$ pdfgetx3 -lf series/ 903 + ./ bulk chi
-series/Pt_bulk_ramp03-00903.chi
-Pt_bulk-00055.chi
-
-
-

When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -“.chi”-ending files in the current and series -directories can be thus found using

-
$ pdfgetx3 -lf ".chi$" + series/
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00906.chi
-series/Pt_bulk_ramp03-00907.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-
-
-

output file names

-

By default the output files are saved in the current directory. The -output path, can be changed with the -o, --output option. -The -o recognizes several tokens that are replaced with -parts of the input file name, for example, “@b” expands to an -extension-stripped base name. In similar faction, “@o” is replaced -with the output type extension. Thus to generate PDFs for all files -in the series directory and save them in the -series-gr subfolder do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o
-
-
-

The extension “.@o” is automatic when not included anywhere in the -output file name. Thus to process the Pt series at Qmax = 18 Å-1 -while saving the results in the same folder, but with a “_qmax18” suffix -in their filenames do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18
-
-
-

For input file Pt_bulk_ramp03-00903.chi the -o option -above expands to output path series-gr/Pt_bulk_ramp03-00903_qmax18.gr. -The series-gr directory should now contain 12 “gr” files, -6 of them processed at Qmax = 27 Å-1 as given by configuration -file and 6 others processed at Qmax = 18 Å-1.

-
-

See also

-

-o, --output for a list of output tokens

-
-
-
-
-

Interactive tuning of parameters

-

One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the Ni directory in the shell and process -the nickel PDF while plotting the F(Q) and G(r) curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -tuneconfig() -function from the IPython environment

-
$ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi
-...
-In [1]: tuneconfig()
-
-
-

The -tuneconfig() -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot.

-_images/tunenickelfqgr.png -

The constant data scale check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -PDF parameters section. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the bgscale parameter -if PDF has been processed without any background data.

-

By default the -tuneconfig() -function displays the same curves as -specified by the --plot option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the describe() method of the -pdfgetter() object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object t4 that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the tuneconfig() function

-
$ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi
-...
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-
-In [1]: fig, ax = subplots(2)
-In [2]: pdfgetter.describe()
-0   TransformTwoThetaToQA
-    convert x data from twotheta to Q in 1/A
-1   TransformQGridRegular
-    Remove the data outside the (qmin, qmaxinst) range
-2   TransformBackground
-    subtract background intensity
-3   TransformXrayASFnormChris
-    scale and normalize intensities by x-ray scattering factors
-4   TransformSQnormRPoly
-    Normalize S(Q) by fitting a polynomial
-5   TransformSQToFQ
-    Convert S(Q) to F(Q).
-6   TransformFQgrid
-    Resample F(Q) to a regular grid suitable for FFT
-7   TransformFQToGr
-    Convert F(Q) to G(r).
-In [3]: t4 = pdfgetter.getTransformation(4)
-In [4]: tuneconfig([t4, 'gr'], axeslist=ax)
-In [5]: ax[0].legend(loc=2)
-
-
-

The subplots() function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window:

-_images/tunenickelt4gr.png -

The tuning can be finished by clicking the Done button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the config -object, for example:

-
In [5]: config.bgscale = 1.5
-
-
-

Finally, to save the new results, we shall first confirm -outputtypes have been correctly set and then use the -processfiles() function to redo the calculations, plots and -data output for the updated configuration. Note that the -processfiles() function accepts keyword arguments for -configuration parameters. This is used at line In [8] to -turn on the force flag and is in effect a shortcut -for an extra config.force = True statement.

-
In [6]: config.outputtypes
-Out[6]: ['gr']
-In [7]: processfiles()
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-In [8]: processfiles(force=True)
-
-
-

ni300mesh_300k_nor_1-5.gr was successfully saved at an -updated configuration for there were no warnings after the last call.

-
-
-

Neutron PDF

-

This example illustrates PDF extraction from -neutron powder data using pdfgetn3. -Navigate to the n-Sapphire directory in the shell. -The sapphire755.dat file contains powder diffraction data from -sapphire (α-Al2O3) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The pdfgetn3.cfg configuration file specifies -processing parameters such as wavelength, -twothetazero, composition, and mode.

-

To extract the sapphire neutron PDF run

-
$ pdfgetn3 --verbose=info sapphire755.dat
-
-INFO:applying pdfgetn3 defaults
-INFO:set config.mode = neutron
-INFO:searching for default config file /home/user/.pdfgetn3.cfg
-INFO:searching for default config file .pdfgetn3.cfg
-INFO:searching for default config file pdfgetn3.cfg
-INFO:loaded default config file pdfgetn3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.mode = neutron
-INFO:set config.wavelength = 1.0989
-INFO:set config.twothetazero = -0.38
-INFO:set config.composition = Al2O3
-INFO:set config.qmaxinst = 11.2
-INFO:set config.qmax = 11.2
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 20.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'neutron'
-INFO:calling config_neutron
-INFO:started PDF processing.
-INFO:processing 'sapphire755.dat'
-INFO:resolved output file '' as 'sapphire755.fq'
-INFO:written outpufile sapphire755.fq
-INFO:resolved output file '' as 'sapphire755.gr'
-INFO:written outpufile sapphire755.gr
-INFO:elapsed time: 0.097
-
-
-

This will produce two files sapphire755.fq, sapphire755.gr -for the F(Q) and G(r) functions. -To compare them with expected results use

-
$ plotdata sapphire755-expected.fq sapphire755.fq
-$ plotdata sapphire755-expected.gr sapphire755.gr
-
-
-
-
-

Fit twothetazero

-

For a good quality PDF it is essential to use powder patterns with -accurate values of Q. Some instruments may produce spectra with -a slightly offset scattering angle 2Θ which -causes inaccurate Q and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the twothetazero correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples.

-

This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -diffpy.cmi, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use Anaconda Python and set up a dedicated -Anaconda environment nbcmi for this tutorial. -This can be accomplished using the following steps:

-
$ conda create -n nbcmi -c diffpy python=2 diffpy.cmi
-$ conda activate nbcmi
-$ pip install path/to/diffpy.pdfgetx-VERSION.whl
-
-
-

When these prerequisites are in place, -change to the n-twothetazero-fit directory -and open the self documented Jupyter notebook as follows

-
$ jupyter notebook fit-twothetazero.ipynb
-
-
-

The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted twothetazero. -After running all cells the notebook should produce similar graphs -as in the figure below.

-
-_images/twothetazerofit.svgz

Refinement of nickel neutron PDF for (a) uncorrected data -and (b) with a refined zero correction. -The extracted PDFs are plotted as blue circles, -simulated PDFs as red lines and -the difference is plotted offset in green below.

-
-

The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual Rw which is lowered from (a) 0.18 to (b) 0.05.

-
-
-

Small-angle-scattering PDF (sasPDF)

-

Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using pdfgets3. -To do this, navigate to the Au_DNA_NPA directory in your terminal. -In this folder, you will find Au_DNA_NPA.chi and -Au_DNA_FF.chi files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008).. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The pdfgets3.cfg -configuration file specifies processing parameters such as formfactorfile (required by sas mode), qmin, qmax, and mode.

-

To extract the PDF of DNA-capped DNA nanoparticle assemblies

-
$ pdfgets3 --verbose=info Au_DNA_NPA.chi
-
-INFO:applying pdfgets3 defaults
-INFO:set config.mode = sas
-INFO:searching for default config file /home/user/.pdfgets3.cfg
-INFO:searching for default config file .pdfgets3.cfg
-INFO:searching for default config file pdfgets3.cfg
-INFO:loaded default config file pdfgets3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = QA
-INFO:set config.backgroundfile =
-INFO:set config.datapath = []
-INFO:set config.formfactorfile = Au_DNA_FF.chi
-INFO:set config.output =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.force = yes
-INFO:set config.mode = sas
-INFO:set config.rpoly = 240.605
-INFO:set config.qmaxinst = 0.075
-INFO:set config.qmin = 0.01
-INFO:set config.qmax = 0.072
-INFO:set config.rmin = 100.0
-INFO:set config.rmax = 5000.0
-INFO:set config.rstep = 1.0
-INFO:set config.plot = iq, fq, gr
-INFO:set config.verbose = info
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'sas'
-INFO:calling config_sas
-INFO:started PDF processing.
-INFO:processing 'Au_DNA_NPA.chi'
-INFO:resolved output file '' as 'Au_DNA_NPA.fq'
-INFO:written outpufile Au_DNA_NPA.fq
-INFO:resolved output file '' as 'Au_DNA_NPA.gr'
-INFO:written outpufile Au_DNA_NPA.gr
-INFO:elapsed time: 0.947
-
-
-

This will save two files Au_DNA_NPA.fq, Au_DNA_NPA.gr in the same directoy for the F(Q) and G(r) functions. This also plots F(Q) and G(r) functions in a pop-up window and the processing parameters such as rpoly or so may be tuned interactively by issuing command tuneconfig() in the IPython session as discussed above.

-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/PDFgetXNS3_manual.pdf b/static_root/doc/pdfgetx/2.1.1/PDFgetXNS3_manual.pdf deleted file mode 100644 index 0055447b..00000000 Binary files a/static_root/doc/pdfgetx/2.1.1/PDFgetXNS3_manual.pdf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.1/_images/nickelfqgr.png b/static_root/doc/pdfgetx/2.1.1/_images/nickelfqgr.png deleted file mode 100644 index 3fbc12de..00000000 Binary files a/static_root/doc/pdfgetx/2.1.1/_images/nickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.1/_images/nickelfqgrnoisy.png b/static_root/doc/pdfgetx/2.1.1/_images/nickelfqgrnoisy.png deleted file mode 100644 index caab8cf3..00000000 Binary files a/static_root/doc/pdfgetx/2.1.1/_images/nickelfqgrnoisy.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.1/_images/tunenickelfqgr.png b/static_root/doc/pdfgetx/2.1.1/_images/tunenickelfqgr.png deleted file mode 100644 index 14accde4..00000000 Binary files a/static_root/doc/pdfgetx/2.1.1/_images/tunenickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.1/_images/tunenickelt4gr.png b/static_root/doc/pdfgetx/2.1.1/_images/tunenickelt4gr.png deleted file mode 100644 index c95278cd..00000000 Binary files a/static_root/doc/pdfgetx/2.1.1/_images/tunenickelt4gr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.1/_images/twothetazerofit.svgz b/static_root/doc/pdfgetx/2.1.1/_images/twothetazerofit.svgz deleted file mode 100644 index 80e48d71..00000000 Binary files a/static_root/doc/pdfgetx/2.1.1/_images/twothetazerofit.svgz and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.1/_sources/files.rst.txt b/static_root/doc/pdfgetx/2.1.1/_sources/files.rst.txt deleted file mode 100644 index edc63d96..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_sources/files.rst.txt +++ /dev/null @@ -1,102 +0,0 @@ -Files used in PDF extraction -======================================================================== - -.. include:: abbreviations.txt -.. _my-configfile: -.. program:: pdfgetx3 - -Configuration file ------------------------------------------------------------------------- - -Configuration files may define the PDF processing parameters. -By default, the :program:`pdfgetx3` program attempts to read -:file:`.pdfgetx3.cfg` file from the user HOME directory, -then :file:`.pdfgetx3.cfg` and :file:`pdfgetx3.cfg` files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the :option:`-c, --config <-c>` option. -The :program:`pdfgetn3` program works in the same way, -except it checks for configuration files -:file:`~/.pdfgetn3.cfg`, :file:`.pdfgetn3.cfg` and :file:`pdfgetn3.cfg`. - -The easiest way of creating a configuration file is to generate -a template content using the :option:`--createconfig` option as :: - - pdfgetx3 --createconfig=test.cfg - -and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple "varname=value" syntax, -any lines starting with "#" are ignored as comments. - -The configuration file has several sections marked as ``[SECTIONNAME]``. -The ``[DEFAULT]`` section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the :option:`-s, --section <-s>` option on the -command line. Thus :: - - pdfgetx3 --config=test.cfg --section=nacl - -would read the parameters from the ``[nacl]`` section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section. - - -Input files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -|twotheta| in degrees, momentum transfer *Q* in inverse nanometers or *Q* -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the :confval:`dataformat` parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values. - -The input files are usually passed as command-line arguments to -:program:`pdfgetx3` or :program:`pdfgetn3` programs and must be paths -accessible from the current working directory. - -Input files can be also defined by setting the :confval:`inputfile` -value in the configuration file. The :option:`-d, --datapath <-d>` -option can be then used to provide additional data directories to -search for these inputs and for the :confval:`backgroundfile`. -This is to support configuration files located in a different -directory than the data. - -When the :option:`--find <-f>` option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory. - - -Output files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 can produce up to four different output data files: - -* .iq -- |IQ|, the background-corrected - intensities sampled on a regular *Q*-space grid in inverse ångströms, - -* .sq -- |SQ|, the total scattering structure function, - with intensities normalized by average scattering factors and - corrected by a polynomial fit, - -* .fq -- |FQ|, the reduced structure function equal to *Q*\ (|SQ| - 1), - -* .gr -- |Gr|, the resultant PDF, where the first column is the - separation *r* in ångströms and the second is the function *G* in - Å\ :sup:`-2`. - -You can specify what output files should be produced by setting the -:confval:`outputtypes` parameter in the configuration file or by -passing the :option:`-t, --outputtypes <-t>` on the command line. - -The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the :option:`--config <-c>` option, -the PDFgetX3 will reproduce the previous calculation. diff --git a/static_root/doc/pdfgetx/2.1.1/_sources/index.rst.txt b/static_root/doc/pdfgetx/2.1.1/_sources/index.rst.txt deleted file mode 100644 index c7bf373e..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_sources/index.rst.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. PDFgetX3 documentation master file, created by - sphinx-quickstart on Tue Sep 21 18:35:11 2010. - You can adapt this file completely to your liking, - but it should at least contain the root `toctree` directive. - -######################################################################## -diffpy.pdfgetx -######################################################################## - -User manual for PDFgetX3, PDFgetN3, PDFgetS3 and Python package diffpy.pdfgetx. - -| Release |release| -| |today| - -======================================================================== -Table of contents -======================================================================== - - -.. toctree:: - :maxdepth: 2 - - intro - install - quick-start - tutorial - files - interact - options - plotdata - release - -======================================================================== -Indices -======================================================================== - -* :ref:`genindex` -* :ref:`search` diff --git a/static_root/doc/pdfgetx/2.1.1/_sources/install.rst.txt b/static_root/doc/pdfgetx/2.1.1/_sources/install.rst.txt deleted file mode 100644 index df692603..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_sources/install.rst.txt +++ /dev/null @@ -1,146 +0,0 @@ -Installation -======================================================================== - -.. include:: abbreviations.txt - -Software requirements ------------------------------------------------------------------------- - -This software is written in Python programming language, therefore -you must have Python 3.8, 3.7, 3.6, 3.5 or 2.7 installed. In addition, -the following third-party Python libraries are also required: - -* pip - Python package installer -* setuptools - tools for installing Python packages -* six - Python 2 and 3 compatibility library -* NumPy - library for scientific computing with Python -* matplotlib - Python plotting library -* IPython - enhanced interactive Python shell - -Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -`Python Package Index `__ -or using any Internet search engine. - -Another more convenient option is to obtain one of the science-oriented -Python distributions such as -`Anaconda Python`_, -`Enthought Canopy `_ or -`PythonXY `_, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step. - -On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command :: - - sudo apt-get install \ - python3-pip python3-setuptools python3-six \ - python3-numpy python3-matplotlib ipython3 - -This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above. - -On Windows operating system, it may be necessary to add the -``C:\Python37`` directory and the scripts directory -``C:\Python37\Scripts`` to the system :envvar:`!PATH`. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the :program:`Command Prompt`, type -there ``python`` and see if this starts the Python interpreter. - -Alternately, if you want to run the diffpy.pdfgetx software with a specific version of Python, -we recommend using a virtual environment, such as ``conda``. For example, if you have Anaconda Python installed, -you can create a conda virtual environment to install the software as follow :: - - conda create --name pdfgetx_env numpy matplotlib ipython --python=3.8 - -You can choose the name of the environment and python version as you desire. You can choose any of the -supported Python versions. Then, activate this environment and follow the instructions in the -next section to install the software :: - - conda activate pdfgetx_env - -Installation ------------------------------------------------------------------------- - -The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -`Columbia Technology Ventures -`__. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:: - - pip install ./diffpy.pdfgetx-VERSION.whl - -Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending ``sudo`` to the command line above. If root access is not available, use the ``pip install`` options :option:`!--user` or :option:`!--prefix` to install the software to a user-writable directory. - -The package provides three programs for PDF conversion, :program:`pdfgetx3`, :program:`pdfgetn3` and :program:`pdfgets3`. To check if they are correctly installed run :: - - pdfgetx3 --version - pdfgetn3 --version - pdfgets3 --version - -This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a :program:`plotdata` -command for an easy plotting of text data files. To verify -if plotdata works, run the ``plotdata --version`` command. -Finally, a comprehensive test of the installed software can -be executed using :: - - python -m diffpy.pdfgetx.tests.run - -.. note:: - - Older versions of diffpy.pdfgetx use Python egg format - instead of Python wheel. - To install these use the easy_install command as follows:: - - python -m easy_install ./diffpy.pdfgetx-VERSION.egg - -.. index:: %pdfgetx3 IPython magic -.. index:: %pdfgetn3 IPython magic -.. index:: %pdfgets3 IPython magic - -IPython magic command ------------------------------------------------------------------------- - -These instructions are intended for `IPython`_ users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don't plan to customize IPython in such way you can safely skip -this paragraph. - -When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session. - -The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up - -#. find the ``profile_default/ipython_config.py`` file and open it - in a text editor. If that file does not exists, - create it first by executing :: - - ipython profile create - -#. navigate to the paragraph that contains the - :py:data:`!c.InteractiveShellApp.extensions` and add there - the following line :: - - c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics'] - - There must be no leading indent, i.e., the text must start at the - very first column. diff --git a/static_root/doc/pdfgetx/2.1.1/_sources/interact.rst.txt b/static_root/doc/pdfgetx/2.1.1/_sources/interact.rst.txt deleted file mode 100644 index 0d4fb746..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_sources/interact.rst.txt +++ /dev/null @@ -1,154 +0,0 @@ -Interactive mode -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. py:currentmodule:: _interactive_ - -The interactive mode is activated by using either the -:option:`-i, --interact <-i>` option or a non-empty -:option:`--plot <-p>` option. In the interactive mode -the program starts an `IPython`_ interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands ``%pdfgetx3`` and ``%pdfgetn3``, which can be used with -the same syntax as the :program:`pdfgetx3` and :program:`pdfgetn3` in -system shell. -The interactive session is also initialized with all functions from the -:py:mod:`matplotlib.pyplot` module for convenient plotting. -The functions and variables related to PDF processing are: - -.. py:function:: pdfgetter(x=None, y=None, filename='', **kwargs) - - Instance of the :py:class:`!PDFGetter` class which serves as a - low-level function that calculates the PDF. This is a callable - object, which takes as an argument a pair of input arrays for - (*Q*, intensity) or (|twotheta|, intensity) depending on - :confval:`dataformat`. It can be also called with a keyword - argument ``filename=FILE``, which would read the input arrays - from the specified file. When called with no arguments, - it calculates PDF from the last input data. - - :parameters: - * **x** (*numpy.ndarray, optional*) -- - The *Q* or |twotheta| values in powder diffraction pattern. - - * **y** (*numpy.ndarray, optional*) -- - The scattered intensities in powder diffraction pattern - - * **filename** (*str, optional*) -- - The text data file for loading the `x`, `y` values when - they are not specified. - - * **kwargs** (*misc, optional*) -- - Extra keyword arguments that are applied to - the :data:`!config` object, for example ``qmax=20``. - - :return: - A pair of output arrays *(r, G)*. - -.. interactvar:: config - - Instance of the :py:class:`!PDFConfig` class that stores the - :ref:`parameters and input files ` for the program. - Use ``print(config)`` to display the current configuration values. - This is the same object as :data:`!pdfgetter.config`. Configuration - may be changed by setting a respective attribute of the - :interactvar:`!config` object, for example:: - - In [1]: config.qmax = 21 - - The :py:data:`!config` values may be also changed by calling the - :py:func:`pdfgetter` or :py:func:`processfiles` function with a - corresponding keyword argument, for example - ``processfiles(qmax=20, force="once")``. - -.. interactvar:: iraw - iq - sq - fq - gr - - These variables are assigned the input raw intensities and the - intermediate results, stored as matrix rows. The matrix rows - correspond to twotheta1, intensity1, twotheta2, intensity2, etc. - Because matrices are iterated row first, the raw intensities - from all input files can be plotted with the matplotlib plot - function as ``plot(*iraw)``. - - These variables should be considered read-only and are reset - with subsequent PDF calculations. - -.. py:function:: tuneconfig(plotids=None, pdfgetter=None, axeslist=None) - - Show a GUI dialog for interactive tuning of configuration variables. - - :arg plotids: - The string or iterable that specify what interactive plots should be - tuned. By default the same as ``config.plot``. It can be also an - integer index or name of a transformation in :py:func:`pdfgetter` or - a reference to a :py:class:`!Transformation` object. - - :arg pdfgetter: - The optional :py:class:`!PDFGetter` object to be tuned. - This is by default the interactive :py:func:`!pdfgetter` object. - - :arg axeslist: - An optional list of matplotlib Axes for showing interactive plots. - When None, use ``subplot(N, 1, i)`` to create any necessary axes. - - .. note:: - - Changes from :py:func:`!tuneconfig` apply only to the configuration - and results in memory. Use the :py:func:`processfiles` function - to save them to disk. - - .. seealso:: :ref:`my-tuneconfig` tutorial - -.. py:function:: processfiles(filename=None, **kwargs) - - Process all input files again with the current configuration values. - This is a higher-level function than :py:func:`pdfgetter`, as - it also saves output files and produces plots as specified by the - :interactvar:`config` object. - - :arg filename: - One or more input files to be converted to PDFs and saved or - plotted according to the :py:data:`!config` settings. Use the - previous list of input files when not specified. - - :arg kwargs: - An optional keyword arguments to set for the :py:data:`!config` - object, for example ``(force="once", qmax=18)``. - - This function updates the :interactvar:`config.inputfiles ` - list and the :interactvar:`iraw`, :interactvar:`iq`, - :interactvar:`sq`, :interactvar:`fq` and :interactvar:`gr` - interactive variables. - -.. py:function:: clearsession() - - Clear all elements from the :interactvar:`config.inputfiles ` - and also the - :interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, - :interactvar:`fq` and :interactvar:`gr` variables. - - :return: - No return value. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: loaddata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. - -.. py:currentmodule:: diffpy.pdfgetx.plotdata -.. autofunction:: plotdata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx.plotdata` module. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: findfiles - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. diff --git a/static_root/doc/pdfgetx/2.1.1/_sources/intro.rst.txt b/static_root/doc/pdfgetx/2.1.1/_sources/intro.rst.txt deleted file mode 100644 index a112ee9a..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_sources/intro.rst.txt +++ /dev/null @@ -1,70 +0,0 @@ -Introduction -======================================================================== - -diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts. - - -.. index:: license - -License notice ------------------------------------------------------------------------- - -.. include:: ../../LICENSENOTICE.txt - - -.. index:: authors - -Authors ------------------------------------------------------------------------- - -This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Hung Vuong, -Songsheng Tao, -Simon Billinge. - - -.. index:: citations, references - -References ------------------------------------------------------------------------- - -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: - - P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge - `PDFgetX3: A rapid and highly automatable program for processing - powder diffraction data into total scattering pair distribution - functions `__, - *J. Appl. Crystallogr.* **46**, 560-566 (2013) - -For research publications that use this software to process neutron -diffraction data we ask you to also cite: - - P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, - S. J. L. Billinge - `PDFgetN3: atomic pair distribution functions from neutron - powder diffraction data using ad hoc corrections - `__, - *J. Appl. Crystallogr.* **51** (2018) - -For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication: - - CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge - `sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data `__. diff --git a/static_root/doc/pdfgetx/2.1.1/_sources/options.rst.txt b/static_root/doc/pdfgetx/2.1.1/_sources/options.rst.txt deleted file mode 100644 index c02220f2..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_sources/options.rst.txt +++ /dev/null @@ -1,370 +0,0 @@ -Options and parameters -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program. - - -.. Note :: - - The command line options start with a leading "-" and can - be only used as command line arguments when starting the - :program:`pdfgetx3` program. Within configuration file the parameter - names are plain words without any leading dashes. Finally, - parameters can be also set in the interactive mode as attributes of - the :interactvar:`config` object, but the assignments must be valid - Python statements. Here are examples of setting composition of - a processed specimen using each of these forms: - - #. assigned in configuration file:: - - ... - composition = CaTiO3 - ... - - #. set as a command-line option when starting :program:`pdfgetx3` or - :program:`pdfgetn3`:: - - pdfgetx3 --composition=CaTiO3 - - #. set in the IPython interactive mode:: - - pdfgetx3 -i - ... - In [1]: config.composition = "CaTiO3" - - -Program operation ------------------------------------------------------------------------- - -.. option:: -h, --help - - Display a brief usage information with a list of command line options - and exit. - -.. option:: -V, --version - - Display the program version and exit. - -.. option:: --manual - - Open this manual in a Web browser and exit. - -.. option:: -f, --find -.. _my-findpatterns: - - Select input files that match all patterns. The command - line arguments are by default taken as input files. However, - with the :option:`!--find` option they are processed as - file patterns and the matching files are then used as inputs. - The input files are by default searched in the current directory - unless there is a path entry (e.g., :file:`data/`) that - selects a different search path. The search patterns are - interpreted as fixed strings, all of which must be present - in the file name. A single argument ``+`` starts - a new group of patterns to match more files that are not - covered by one set of patterns. Additional pattern - groups reuse the current search path unless they provide - their own path value. Pattern groups containing only - a path entry reuse file patterns from the last group. - When pattern groups overlap the repeated matches are ignored - to make the resulting list of files unique. Files starting - with ``.`` are ignored unless there is ``^.`` pattern - that explicitly matches them. The search - syntax provides the following special patterns: - - .. tabularcolumns:: |l|p{0.75\textwidth}| - - +---------+------------------------------------------------------------+ - | ^ | match at the beginning of the string, i.e., ``^start`` | - | | matches only filenames that start with "start". | - +---------+------------------------------------------------------------+ - | $ | match at the end of string, for example, ``.chi$`` selects | - | | file names ending with ".chi". A ``$`` on its own | - | | matches every string and can be used to select all files. | - +---------+------------------------------------------------------------+ - | | match number *N* preceded by any number of leading zeros, | - | | e.g., ``<7>`` would match in "f7.chi", "f007.chi", but not | - | | in "f77.chi". | - +---------+------------------------------------------------------------+ - | | match an integer range from *N* to *M* inclusive. | - | | The matched number may have one or more leading zeros. | - +---------+------------------------------------------------------------+ - | <7-> | match number 7 or larger. | - +---------+------------------------------------------------------------+ - | <-7> | match number 7 or smaller. | - +---------+------------------------------------------------------------+ - | <-> | match any integer number. | - +---------+------------------------------------------------------------+ - | \+ | start a new pattern group, for example, ``.chi$ + .dat$`` | - +---------+------------------------------------------------------------+ - | / | set search path. An argument containing the ``/`` symbol | - | | is taken as the search path, for example, ``data/`` or | - | | ``./``. Each pattern group may provide its own search | - | | path effective for that and any subsequent pattern group. | - +---------+------------------------------------------------------------+ - - The ``^$<>`` characters are often special to Unix or Windows - command shells, therefore they need to be enclosed in double - quotes (\\") when used on command line. - - .. seealso:: tutorial on :ref:`my-findexamples` - -.. option:: -l, --list - - List all input files and exit. This is useful with the - :option:`!--find` option to verify if input files - are matched as intended. - - -Configuration file options ------------------------------------------------------------------------- - -.. option:: -c CONFIG, --config=CONFIG - - Read custom configuration file after loading the default ones. - Do not load any configuration file when "NONE". - -.. option:: -s NAME, --section=NAME - - Load the custom configuration file section ``[SectionName]`` after - loading the ``[DEFAULT]`` section. This is useful for creating - several configuration variants in a single configuration file. - -.. option:: --createconfig=FILE - - Write template configuration to a new FILE and exit. Write - to the standard output when FILE is "-". - -See also the :ref:`configuration file ` section -for further details. - -.. _my-ioparameters: - -Input and output options ------------------------------------------------------------------------- - -.. confval:: inputfile - - This parameter allows to specify one or more input files in the - configuration file, one file per line. The :confval:`!inputfile` - is only used if no input files were provided on the - :program:`pdfgetx3` or :program:`pdfgetn3` command line. - -.. confval:: dataformat -.. option:: --format=FORMAT - - Format of input files. Available formats are: ``twotheta``, ``QA``, - ``Qnm`` corresponding to a two-column text data where the first - column is either the scattering angle |twotheta| in degrees, *Q* in - inverse ångströms or *Q* in inverse nanometers. - -.. confval:: backgroundfile -.. option:: -b FILE, --background=FILE - - Optional datafile with background intensities from an empty sample - holder. It must be in the same dataformat as other input files. - -.. Note :: - - The following input is only used in ``sas`` mode. - -.. confval:: formfactorfile -.. option:: -ff FILE, --formfactorfile=FILE - - Form factor intensities of the scatterers. This is required for ``sas`` mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1. - -.. _my-datapath: -.. confval:: datapath -.. option:: -d DATAPATH, --datapath=DATAPATH - - One or more extra directories to be searched for input or - background data files. The :option:`!-d` option can be specified - several times to add more directories, these are prepended in front - of any default value. Within configuration file the datapath - directories have to be listed each on a separate line. - - A special value "NONE" (or "none") clears any previously defined - paths and only the further paths, if any, would be searched for - inputs. - -.. confval:: output -.. option:: -o OUTPUT, --output=OUTPUT - - Output file name, write to the standard output when "-". The - :option:`-t, --outputtypes <-t>` option controls what results are - being saved. Normally the OUTPUT is used as a custom basename for - the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o - tokens, which are expanded as follows: - - ===== ================== ======================================= - token example definition - ===== ================== ======================================= - @h dir1/dir2 the input file directory or "." - @r dir1/dir2/filename the input path with extension removed - @e dat the input file extension without "." - @t filename.dat the tail component of the input file - @b filename the tail component with extension removed - @o gr the output extension iq, sq, fq or gr - ===== ================== ======================================= - - An empty value works the same as "@b.@o" and saves the data - in the current directory with a proper extension for the - saved results. When "@o" is not present in the OUTPUT, it is - appended as a default filename extension. - -.. confval:: outputtypes -.. option:: -t TYPES, --outputtypes=TYPES - - Result types to be saved, one or more comma separated values. - Supported values are "iq", "sq", "fq", "gr", corresponding to the - |IQ|, |SQ|, |FQ| and |Gr| curves; these are also used as output - file extensions. - - Result files are not written when empty, "none" or "NONE". - -.. confval:: force -.. option:: --force=FORCE - - Overwrite existing output files. By default the output - files are not written if they already exist. Possible values - in a configuration file are "true", "yes", "on", "1" or - "false", "no", "off", "0" or "once". The special value "once" - permits one overwrite and then resets ``config.force`` to - ``False``. Note that in interactive mode the values assigned - to ``config.force`` are converted to Python :py:class:`bool` - unless equal to "once". - - -.. _my-pdfparameters: - -PDF parameters ------------------------------------------------------------------------- - - -.. confval:: mode -.. option:: --mode=STRING - - The PDF conversion mode, i.e., the name of the - :py:func:`.pdfgetter` setup. The available modes correspond - to the radiation type used in powder diffraction experiment and can - be "xray" or "neutron". - -.. confval:: wavelength -.. option:: -w FLOAT, --wavelength=FLOAT - - X-ray wavelength in ångströms. This value is required - for the "twotheta" dataformat in order to convert the scattering - angles |twotheta| to a momentum transfer *Q*. For other data formats - the wavelength is not necessary and may be left undefined. - -.. confval:: twothetazero -.. option:: --twothetazero=FLOAT - - Position of the zero scattering angle in diffractometer degrees. - This parameter corrects for a constant offset in the - measured |twotheta| values. When loading configuration file - it is assumed 0 unless specified otherwise. This parameter - is only effective for the "twotheta" dataformat. - -.. confval:: composition -.. option:: --composition=STRING - - Chemical composition of the sample. Supported formats are - "PbTi0.5Zr0.5O3", "Pb 1 Ti 1/2 Zr 1/2 O 3" or "CH3 (CH2)3 OH". - Space characters are ignored, unit counts can be omitted, but it is - important to use a proper upper and lower case in atom symbols. - Elements can appear several times in the formula, e.g., "CH3 CH3", - and the formula may contain parentheses or fractional - stoichiometries. - -.. confval:: bgscale -.. option:: --bgscale=FLOAT - - Scaling of the background intensities loaded from the - :confval:`backgroundfile`, by default 1. - -.. confval:: rpoly -.. option:: --rpoly=FLOAT - - *r*-limit for the maximum frequency in the |FQ| correction polynomial. - The PDF is unreliable at shorter *r*, however a - very small :confval:`!rpoly` would disable polynomial correction and - give noisy PDF. - Larger values produce closer fits with a higher degree polynomial, - but when too large, they might smooth-out a useful signal in the - data. The default is 0.9. - -.. confval:: qmaxinst -.. option:: --qmaxinst - - The *Q* cutoff for the meaningful input intensities in inverse - ångströms. Some data files may contain trailing zeros - or unreliable intensities at the upper bound of the detector range. - The :confval:`!qmaxinst` defines a threshold for unreliable data. - The parameter is also used as an upper boundary for the polynomial - fit correction of the |SQ| data. - -.. confval:: qmin -.. option:: --qmin - - The lower *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. - -.. confval:: qmax -.. option:: --qmax - - The upper *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. This is essentially a limit, where sample - signal decays to the level of data noise. - -.. confval:: rmin -.. option:: --rmin=FLOAT - - Lower bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rmax -.. option:: --rmax=FLOAT - - Upper bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rstep -.. option:: --rstep=FLOAT - - Spacing of the *r*-grid for the calculated PDF in ångströms. - - -Other parameters ------------------------------------------------------------------------- - -.. confval:: plot -.. option:: -p TYPES, --plot=TYPES - - Plot the specified results. A comma separated list with one or - more items from "iq", "sq", "fq", "gr". No plot is produced when - empty, "none" or "NONE". Setting this option turns on the - interactive mode. - -.. confval:: interact -.. option:: -i, --interact - - Start an IPython interactive session after processing all files. - Useful for tuning the configuration parameters or interactive - plotting. This is always on when plot option has been set. - See also :doc:`interact` for further details. - -.. confval:: verbose -.. option:: --verbose=VALUE - - Level of detail for the program to report about its actions. - Possible values are "error", "warning", "info", "debug", "all" or an - integer number from 0 to 5. Messages are completely suppressed when - 0, all messages are printed when verbose is 5 ("all") or higher. - This option is useful for diagnostics of any unexpected behavior - in the program. diff --git a/static_root/doc/pdfgetx/2.1.1/_sources/plotdata.rst.txt b/static_root/doc/pdfgetx/2.1.1/_sources/plotdata.rst.txt deleted file mode 100644 index d1c02156..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_sources/plotdata.rst.txt +++ /dev/null @@ -1,161 +0,0 @@ -.. index:: plotdata (program) -.. _cmd-plotdata: - -The plotdata program -======================================================================== - -.. include:: abbreviations.txt -.. program:: plotdata - -The PDFgetX3 software includes a simple stand-alone utility -:program:`plotdata` for plotting text data files. In most cases -this program can be invoked from a command-shell as :: - - plotdata file1.dat file2.dat - -which plots the numerical data from the text files :file:`file1.dat`, -:file:`file2.dat` together in a single graph. By default the first -column is used as an *x* variable and the second column is used for the -*y* values. After displaying the plot the program starts an `IPython`_ -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the :data:`!filenames` variable -containing a list of plotted files. It also pre-loads the -|plotdata| and |findfiles| functions just as in PDFgetX3 -interactive session. The :py:func:`!plotdata` -function works in a similar way as the :program:`plotdata` program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -:py:func:`!plotdata` function would be:: - - In [1]: plotdata(['file1.dat', 'file2.dat']) - - -Selecting files ------------------------------------------------------------------------- - -The :program:`plotdata` program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as ``*.dat``. The file search feature is controlled by the -following options: - -.. option:: -f, --find - - Use command line arguments as filename patterns and plot all matching - files. This option works in the same way as for - :program:`pdfgetx3`, for full details see the - :option:`pdfgetx3 --find ` documentation. Note that - within command line the special patterns ``^$<>`` need to be quoted - in double quotes (\\") so they are not processed by command shell. - -.. option:: -l, --list - - List the input files and exit. This is useful in conjunction - with the :option:`!-f, --find` option to check if data files - are selected as intended. - -Assuming the current directory contains 20 files named -:file:`file1.dat`, :file:`file2.dat`, ..., :file:`file20.dat`, -the plotting of files 9 to 13 could be done (with a check listing) -as follows :: - - $ plotdata -fl "<9-13>.dat" - file9.dat - file10.dat - file11.dat - file12.dat - file13.dat - $ plotdata -f "<9-13>.dat" - -Within an interactive IPython session the equivalent plot could be -produced by combining the |plotdata| and |findfiles| functions as :: - - In [1]: plotdata(findfiles("<9-13>.dat")) - - -Selecting x and y data ------------------------------------------------------------------------- - -The :program:`plotdata` program provides several ways of selecting -columns for *x* or *y* data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is "0" -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function): - - -.. option:: -x X - - index or name of the *x*-column to plot. See the :option:`-y` option - for the supported syntax, but note that ``X`` may select only one - column. When set to "." use the data-row index for *x*. - -.. option:: -y Y - - index or name of the *y*-column or columns to plot. The ``Y`` column - specification can be a comma separated list of indices, column names - or Python-like ranges, for example "1,2", "G", "1:4" (START:STOP, - same as "1,2,3"), "1:4:2" (START:STOP:STEP, same as "1,3"), or - "-2:" (same as "-2,-1", i.e, the last 2 columns). Because column - indexing starts at "0" the second column must be specified as "1". - - The column names work if the data section in the file is preceded by - a headline of unique column names, for example:: - - x square cube - 1 1 1 - 2 4 8 - 3 9 27 - 4 16 64 - - For such data file the plotdata program will recognize column names - "x", "square" and "cube" and an implicit "." for row index. - -.. option:: -s STYLE, --style=STYLE - - optional plot format specification. See the - :func:`matplotlib.pyplot.plot` function - for a list of available formats. - -.. option:: -L LOG, --log=LOG - - axes to be plotted with logarithmic scaling, for example, "x", "y" or - "xy". Axes not listed in ``LOG`` will use linear scaling. - -.. option:: -h, --help - - display a brief usage info and exit. - -.. option:: -V, --version - - show program version and exit. - -.. option:: --manual - - Open this manual page in a Web browser and exit. - - -Examples ------------------------------------------------------------------------- - -The examples directory :file:`plotdata` contains a :file:`sincos.dat` -file that has 3-columns of values labeled as "x", "sin" and "cos". -Here are several examples of the :program:`plotdata` capabilities -when used from command line - the user is encouraged to try them out:: - - plotdata sincos.dat - plotdata -y 1,2 sincos.dat - plotdata -x . -y 0:3 sincos.dat - plotdata -y cos sincos.dat - plotdata -x sin -y cos -sr-- sincos.dat - -An equivalent usage from a general IPython session would be:: - - ipython --matplotlib=auto - In [1]: from diffpy.pdfgetx.plotdata import plotdata - In [2]: plotdata('sincos.dat') - In [3]: plotdata('sincos.dat', y=[1,2]) - In [4]: plotdata('sincos.dat', x='.', y=':3') - In [5]: plotdata('sincos.dat', y='cos') - In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--') diff --git a/static_root/doc/pdfgetx/2.1.1/_sources/quick-start.rst.txt b/static_root/doc/pdfgetx/2.1.1/_sources/quick-start.rst.txt deleted file mode 100644 index 0b2fffd1..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_sources/quick-start.rst.txt +++ /dev/null @@ -1,163 +0,0 @@ -Quick-start guide -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing :program:`pdfgetx3`, :program:`pdfgetn3`, or -:program:`pdfgets3` in a shell window. Please, refer to the :doc:`installation ` section if this is not working yet. - -.. index:: pdfgetx3 (program) -.. _cmd-pdfgetx3: - -pdfgetx3 command ------------------------------------------------------------------------- - -The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as :: - - pdfgetx3 [options] input1 input2 ... inputN - -The :file:`inputN` stands for an input powder diffraction data. The -:file:`inputN` file is a simple two-column text file, where the first -column corresponds to either the |twotheta| diffraction angle, or a -momentum transfer, *Q*, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -`FIT2D program `_ using -its "chi" output format, thus we will also refer to them as "chi-files". -A typical content of a "chi" file looks as folows: - -.. code-block:: none - - Pt_bulk-00055.tif: 2-theta Scan - 2-Theta Angle (Degrees) - - 1465 - 2.0003892E-02 0.0000000E+00 - 6.0011677E-02 0.0000000E+00 - 1.0001946E-01 0.0000000E+00 - 1.4002724E-01 0.0000000E+00 - 1.8003502E-01 0.0000000E+00 - ... - -The command-line options are arguments that start with a dash "-" and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash ``--``. Options may require values. For short options, -the value may be joined to the option string, for example -:option:`!-w0.142774`, while for the long options it has to be separated -with an equal sign, e.g., :option:`!--wavelength=0.142774`. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the :doc:`options` section of -this manual. A brief summary of options can be also displayed by -executing :: - - pdfgetx3 --help - -The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the :doc:`tutorial`. -In general, the first step is to create a commented configuration file ``pdfgetx3.cfg`` using:: - - pdfgetx3 --createconfig=pdfgetx3.cfg - -The configuration file can have any name, but it is preferable -to use either :file:`pdfgetx3.cfg` or :file:`.pdfgetx3.cfg`, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the :option:`-c, --config <-c>` option. - -Open the pdfgetx3.cfg file in a **text** editor. The lines that -start with a hash mark ``#`` are comments and are not used. The lines -starting with a right brace ``[`` denote sections in the configuration -file. The active lines are all formatted as -"NAME=VALUE". Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation: - -* :confval:`dataformat` -- specifies the input data format - -* :confval:`wavelength` -- radiation wavelength in Å required for the - "twotheta" format. - -* :confval:`composition` -- chemical composition of the sample - -* :confval:`qmaxinst` -- upper *Q* boundary for a meaningful measurement - intensities. - -* :confval:`qmax` -- *Q*-cutoff for the Fourier transformation that - yields the PDF. - -Save the updated configuration file and run pdfgetx3 on the input data -:file:`FILENAME.chi` as :: - - pdfgetx3 --verbose=info -t gr FILENAME.chi - -Here the :option:`--verbose=info <--verbose>` option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The :option:`-t gr <-t>` option -tells the program to save the final |Gr| curve as a -:file:`FILENAME.gr` file in the working directory. - -The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation :: - - pdfgetx3 -c FILENAME.gr --plot=fq,gr - -Note this command does not include any .chi file and this will as -a result process the previously used input :file:`FILENAME.chi`. -The :option:`--plot=fq,gr <-p>` option tells PDFgetX3 to -display 2 plots for the reduced structure function |FQ| and the -final PDF |Gr|. The :option:`!--plot` option also implies an -:doc:`interactive mode ` -therefore the program does not exit, but starts an -interactive `IPython`_ session. To exit the interactive mode, -type ``exit()`` and press Enter. - -.. index:: pdfgetn3 (program) -.. _cmd-pdfgetn3: - -pdfgetn3 command ------------------------------------------------------------------------- - -The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the -:option:`--mode` option. Running ``pdfgetn3`` is nearly identical -to executing ``pdfgetx3 --mode=neutron``. The only difference between -these commands is that pdfgetx3 checks for configuration files -:file:`pdfgetx3.cfg` and :file:`.pdfgetx3.cfg`, whereas -pdfgetn3 looks for :file:`pdfgetn3.cfg` and :file:`.pdfgetn3.cfg`. - -.. index:: pdfgets3 (program) -.. _cmd-pdfgets3: - -pdfgets3 command ------------------------------------------------------------------------- - -The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying ``mode = sas`` in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named :file:`pdfgets3.cfg` and -:file:`.pdfgets3.cfg` in order, when no configuration file is specified. - -Please refer to the :doc:`tutorial section ` for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3. diff --git a/static_root/doc/pdfgetx/2.1.1/_sources/release.rst.txt b/static_root/doc/pdfgetx/2.1.1/_sources/release.rst.txt deleted file mode 100644 index 7ede93fa..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_sources/release.rst.txt +++ /dev/null @@ -1,3 +0,0 @@ -.. index:: release notes - -.. mdinclude:: ../../CHANGELOG.md diff --git a/static_root/doc/pdfgetx/2.1.1/_sources/tutorial.rst.txt b/static_root/doc/pdfgetx/2.1.1/_sources/tutorial.rst.txt deleted file mode 100644 index ee02754b..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_sources/tutorial.rst.txt +++ /dev/null @@ -1,744 +0,0 @@ -Tutorial -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. index:: example files -.. py:currentmodule:: diffpy.pdfgetx - -In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the :file:`examples` -folder included with the PDFgetX3 distribution. The :file:`examples` -folder can be found in the parent "doc" directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -|zipped-examples|. - - -.. index:: examples - -Nickel X-ray PDF ------------------------------------------------------------------------- - -predefined configuration file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -Change to the :file:`Ni` directory. The file named -:file:`ni300mesh_300k_nor_1-5.chi` contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the |twotheta| scattering -angles and X-ray intensities. The second file -:file:`kapton_bgrd_300k_nor_2-3.chi` contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the :file:`pdfgetx3.cfg` contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -:ref:`pdfgetx3 ` program -with the powder data file as an argument:: - - $ pdfgetx3 ni300mesh_300k_nor_1-5.chi - -For the first run there should be no output on the screen, -however a new file, :file:`ni300mesh_300k_nor_1-5.gr` should appear -in the work directory. -We can use the :ref:`plotdata ` program, -included with this software, to plot the output data:: - - $ plotdata ni300mesh_300k_nor_1-5.gr - -This will open a graph window and start an `IPython`_ interactive session. -To exit and close the figure, type ``exit()`` on the IPython prompt. -Let's run the program again, but now with a -:option:`--verbose=info <--verbose>` -option, to show more details about the program actions. :: - - $ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi - - INFO:applying pdfgetx3 defaults - INFO:set config.mode = xray - INFO:searching for default config file /home/user/.pdfgetx3.cfg - INFO:searching for default config file .pdfgetx3.cfg - INFO:searching for default config file pdfgetx3.cfg - INFO:loaded default config file pdfgetx3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi - INFO:set config.outputtypes = gr - INFO:set config.wavelength = 0.142774 - INFO:set config.composition = Ni - INFO:set config.qmaxinst = 26.5 - INFO:set config.qmax = 26.0 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 30.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'xray' - INFO:calling config_xray - INFO:started PDF processing. - INFO:processing 'ni300mesh_300k_nor_1-5.chi' - INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr' - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - INFO:elapsed time: 0.095 - -Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the :option:`!--verbose` option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the :option:`--force=yes <--force>` option, upon -which pdfgetx3 would overwrite any existing files. - -PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the -:option:`-c` option. Another option, :option:`--plot=[iq,sq,fq,gr] -<-p>` turns on plotting of the final PDF or of some other result. A -side effect of the :option:`!--plot` option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function |FQ| and the PDF curve |Gr|. This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:: - - $ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr - - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - - Variables related to PDF processing: - - pdfgetter -- PDFGetter used for calculation. - config -- configuration data used by PDFGetter. - See config.inputfiles for a list of inputs. - iraw -- matrix of input raw intensities with 2 rows per file. - iq sq fq gr -- intermediate results per each input file stored - as matrix rows. - - Functions: - - tuneconfig -- dynamically tune configuration variables. - processfiles -- process specified data files. - clearsession -- clear all elements from the inputfiles, iraw, - iq, sq, fq and gr variables. - plotdata -- plot all or selected columns from a text data file. - loaddata -- load all or selected columns from a text data file. - findfiles -- search for files matching the specified patterns. - - Use "%pdfgetx3" for a fresh run without exiting IPython. - In [1]: - -This will open a plot figure similar to - -.. image:: images/nickelfqgr.png - -Because of the :doc:`interactive mode ` implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -:interactvar:`config` variable stores all the configuration parameters, -and its content can be displayed with the :py:func:`print` -function as :: - - In [1]: print(config) - - configfile = ni300mesh_300k_nor_1-5.gr - configsection = DEFAULT - dataformat = twotheta - ... - qmax = 26.0 - ... - -The :py:func:`.processfiles` function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the |FQ| and |Gr| -curves calculated at |Qmax| = 22 |Ainv|, we can call -:py:func:`!processfiles` and pass it a keyword argument for -the new qmax as follows:: - - In [2]: processfiles(qmax=22) - - # the qmax parameter was updated to a new value, thus - In [3]: config.qmax - Out[3]: 22 - -There should be now two lines in each plot axis corresponding to -the results at |Qmax| equal 26 and 22 |Ainv|. To exit the program, -type ``exit()``. - - -processing from scratch -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -We have already encountered the command-line :option:`option -c <-c>` -for specifying a custom configuration file. A special argument "NONE", -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi - - WARNING:Nothing to do, use "-t" or "--plot" options. - ERROR:Configuration error: wavelength not specified. - ERROR:See "--help" for more hints. - -There is an error, for the wavelength is necessary to convert -the scattering angle |twotheta| to momentum transfer *Q*. The -X-ray wavelength was 0.142774 Å, which can be passed with the -:option:`-w, --wavelength <-w>` option:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 - - ... - ERROR:Configuration error: Chemical composition not known. - ERROR:See "--help" for more hints. - -There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the :option:`--composition` option. The example -below uses a "\\\\" character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni - - WARNING:Nothing to do, use "-t" or "--plot" options. - ... - -There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the :option:`-t, --outputtypes <-t>` option. -The outputtypes option recognizes the following result types: -"iq", "sq", "fq", "gr". One or more of these type strings, -separated by a comma, can be included with the -:option:`!-t` option, which will produce the corresponding -output files. An empty string, such as ``-t ""``, or ``-t NONE`` -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings. - -At this point, we will not write any output files, but will use the -:option:`--plot <-p>` option to display the calculated curves. The -:option:`!--plot` accepts the same arguments as outputtypes, so to -display the |FQ| and |Gr| curves we shall run :: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni --plot=fq,gr - - WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161 - WARNING:qmax reset to the data boundary qmaxinst=28.0865680161 - -which should open the following plot window: - -.. image:: images/nickelfqgrnoisy.png - -The graphs look terrible. The PDF is very noisy and the |FQ| curve -shows a sudden break at about 27 |Ainv|. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -:interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, -:interactvar:`fq`, :interactvar:`gr` -variables for the original raw data and intermediate results. We -are going to plot the "iq" variable that has the input intensities -resampled on the *Q* grid. The matplotlib function -:py:func:`~matplotlib.pyplot.clf` clears the figure, -the iq variable is a two-row matrix with *Q* and *I* rows, and the -:py:func:`~matplotlib.pyplot.axis` -function lets us zoom to a given range:: - - In [1]: clf() - In [2]: plot(iq[0], iq[1]) - Out[2]: [] - In [3]: axis([20, 29, 0, 3000]) - Out[3]: [20, 29, 0, 3000] - -The graph shows a sudden drop in the raw intensities at 27 |Ainv|. -The :confval:`qmaxinst` variable defines a *Q* cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 |Ainv| :: - - In [4]: processfiles(qmaxinst=26.5) - WARNING:qmax reset to the data boundary qmaxinst=26.5 - -The updated curves looks reasonable without any oscillations and -breakpoints. The :py:func:`.tuneconfig` function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type ``tuneconfig()`` to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the |FQ| and |Gr| curves change. -The :confval:`rpoly` parameter controls the degree of data-correction -polynomial and is an approximate low-*r* bound of reliable *G* -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the |Gr| -curve and save it to an output file :file:`nicmd.gr`:: - - In [14]: config.qmax = 26 - In [15]: config.outputtypes = 'gr' - In [16]: config.output = 'nicmd' - In [17]: processfiles() - - -Platinum X-ray series ------------------------------------------------------------------------- - -PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(`z-shell `_ being a notable exception). - -.. _my-findexamples: - -matching input files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The :program:`pdfgetx3` program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the :option:`-f, --find <-f>` option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option -:option:`-l, --list <-l>` makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files. - -We will try out this file search on platinum example files. Open a -terminal and navigate to the :file:`Pt` directory. There should be a -:file:`series` subdirectory with 6 chi files indexed from 903 to 908. -At first, let's stay in the :file:`Pt` directory and run the following -command :: - - $ pdfgetx3 --list --find - - Pt_bulk-00055-pdfgetx2.gr - Pt_bulk-00055-pdfgetx3.gr - Pt_bulk-00055.chi - empty_capillary-00032.chi - pdfgetx3.cfg - plotpdfcomparison.py - -Without any patterns the file search matches all files in the current -directory. Now let's try to add name patterns. There are few special -patterns, for example ``^`` matches at the beginning of the filename, ``$`` at the end and ```` matches a range of integer values from -*N* to *M*. The patterns containing ``^$<>`` need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works. - -Filenames containing "y":: - - $ pdfgetx3 --list --find y - empty_capillary-00032.chi - plotpdfcomparison.py - -Filenames that containing both "y" and "chi", here we use the -options :option:`!--list` and :option:`!--find` in an abbreviated -form :option:`!-l` and :option:`!-f`:: - - $ pdfgetx3 -lf y chi - empty_capillary-00032.chi - -Filenames that start with "e":: - - $ pdfgetx3 --list --find "^e" - empty_capillary-00032.chi - -Filenames that contain *character* "2":: - - $ pdfgetx3 --list --find 2 - Pt_bulk-00055-pdfgetx2.gr - empty_capillary-00032.chi - -Filenames that contain *numeric value* "2":: - - $ pdfgetx3 -lf "<2>" - Pt_bulk-00055-pdfgetx2.gr - -The special argument ``+`` starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both "bulk" and "chi" substrings and then -also those that have "empty" and "chi" in their names, use:: - - $ pdfgetx3 -lf bulk chi + empty chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - -When pattern groups overlap the resulting matches are -made unique and each file is listed only once :: - - $ pdfgetx3 -lf bulk chi + chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - - -data search path -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Each group of PDFgetX3 patterns can have one entry containing -forward slash "/" to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered "903" to "905" and "908" from the -:file:`series` subdirectory can be therefore matched using :: - - $ pdfgetx3 -lf series/ "<903-905>" + 908 - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00908.chi - -The current directory can be selected using `./` :: - - $ pdfgetx3 -lf series/ 903 + ./ bulk chi - series/Pt_bulk_ramp03-00903.chi - Pt_bulk-00055.chi - -When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -".chi"-ending files in the current and :file:`series` -directories can be thus found using :: - - $ pdfgetx3 -lf ".chi$" + series/ - Pt_bulk-00055.chi - empty_capillary-00032.chi - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00906.chi - series/Pt_bulk_ramp03-00907.chi - series/Pt_bulk_ramp03-00908.chi - - -output file names -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -By default the output files are saved in the current directory. The -output path, can be changed with the :option:`-o, --output <-o>` option. -The :option:`!-o` recognizes several tokens that are replaced with -parts of the input file name, for example, "@b" expands to an -extension-stripped base name. In similar faction, "@o" is replaced -with the output type extension. Thus to generate PDFs for all files -in the :file:`series` directory and save them in the -:file:`series-gr` subfolder do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o - -The extension ".@o" is automatic when not included anywhere in the -output file name. Thus to process the Pt series at |Qmax| = 18 |Ainv| -while saving the results in the same folder, but with a "_qmax18" suffix -in their filenames do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18 - -For input file :file:`Pt_bulk_ramp03-00903.chi` the :option:`!-o` option -above expands to output path :file:`series-gr/Pt_bulk_ramp03-00903_qmax18.gr`. -The :file:`series-gr` directory should now contain 12 "gr" files, -6 of them processed at |Qmax| = 27 |Ainv| as given by configuration -file and 6 others processed at |Qmax| = 18 |Ainv|. - -.. seealso:: :option:`-o, --output <-o>` for a list of output tokens - -.. index:: tuneconfig (example) -.. _my-tuneconfig: - -Interactive tuning of parameters ------------------------------------------------------------------------- - -One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the :file:`Ni` directory in the shell and process -the nickel PDF while plotting the |FQ| and |Gr| curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -:py:func:`.tuneconfig` -function from the IPython environment :: - - $ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi - ... - In [1]: tuneconfig() - -The -:py:func:`!tuneconfig` -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot. - -.. image:: images/tunenickelfqgr.png - -The *constant data scale* check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -:ref:`PDF parameters section `. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the :confval:`bgscale` parameter -if PDF has been processed without any background data. - -By default the -:py:func:`!tuneconfig` -function displays the same curves as -specified by the :option:`--plot <-p>` option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the :py:meth:`!describe` method of the -:py:func:`.pdfgetter` object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object *t4* that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the :py:func:`!tuneconfig` function :: - - $ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi - ... - Use "%pdfgetx3" for a fresh run without exiting IPython. - - In [1]: fig, ax = subplots(2) - In [2]: pdfgetter.describe() - 0 TransformTwoThetaToQA - convert x data from twotheta to Q in 1/A - 1 TransformQGridRegular - Remove the data outside the (qmin, qmaxinst) range - 2 TransformBackground - subtract background intensity - 3 TransformXrayASFnormChris - scale and normalize intensities by x-ray scattering factors - 4 TransformSQnormRPoly - Normalize S(Q) by fitting a polynomial - 5 TransformSQToFQ - Convert S(Q) to F(Q). - 6 TransformFQgrid - Resample F(Q) to a regular grid suitable for FFT - 7 TransformFQToGr - Convert F(Q) to G(r). - In [3]: t4 = pdfgetter.getTransformation(4) - In [4]: tuneconfig([t4, 'gr'], axeslist=ax) - In [5]: ax[0].legend(loc=2) - -The :py:func:`~matplotlib.pyplot.subplots` function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window: - -.. image:: images/tunenickelt4gr.png - -The tuning can be finished by clicking the ``Done`` button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the :interactvar:`config` -object, for example:: - - In [5]: config.bgscale = 1.5 - -Finally, to save the new results, we shall first confirm -:confval:`outputtypes` have been correctly set and then use the -:py:func:`.processfiles` function to redo the calculations, plots and -data output for the updated configuration. Note that the -:py:func:`!processfiles` function accepts keyword arguments for -configuration parameters. This is used at line ``In [8]`` to -turn on the :confval:`force` flag and is in effect a shortcut -for an extra ``config.force = True`` statement. :: - - In [6]: config.outputtypes - Out[6]: ['gr'] - In [7]: processfiles() - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - In [8]: processfiles(force=True) - -:file:`ni300mesh_300k_nor_1-5.gr` was successfully saved at an -updated configuration for there were no warnings after the last call. - - -Neutron PDF ------------------------------------------------------------------------- - -This example illustrates PDF extraction from -neutron powder data using :ref:`pdfgetn3 `. -Navigate to the :file:`n-Sapphire` directory in the shell. -The :file:`sapphire755.dat` file contains powder diffraction data from -sapphire (α-Al\ :sub:`2`\ O\ :sub:`3`) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The :file:`pdfgetn3.cfg` configuration file specifies -processing parameters such as :confval:`wavelength`, -:confval:`twothetazero`, :confval:`composition`, and :confval:`mode`. - -To extract the sapphire neutron PDF run :: - - $ pdfgetn3 --verbose=info sapphire755.dat - - INFO:applying pdfgetn3 defaults - INFO:set config.mode = neutron - INFO:searching for default config file /home/user/.pdfgetn3.cfg - INFO:searching for default config file .pdfgetn3.cfg - INFO:searching for default config file pdfgetn3.cfg - INFO:loaded default config file pdfgetn3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = - INFO:set config.outputtypes = fq, gr - INFO:set config.mode = neutron - INFO:set config.wavelength = 1.0989 - INFO:set config.twothetazero = -0.38 - INFO:set config.composition = Al2O3 - INFO:set config.qmaxinst = 11.2 - INFO:set config.qmax = 11.2 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 20.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'neutron' - INFO:calling config_neutron - INFO:started PDF processing. - INFO:processing 'sapphire755.dat' - INFO:resolved output file '' as 'sapphire755.fq' - INFO:written outpufile sapphire755.fq - INFO:resolved output file '' as 'sapphire755.gr' - INFO:written outpufile sapphire755.gr - INFO:elapsed time: 0.097 - -This will produce two files :file:`sapphire755.fq`, :file:`sapphire755.gr` -for the |FQ| and |Gr| functions. -To compare them with expected results use :: - - $ plotdata sapphire755-expected.fq sapphire755.fq - $ plotdata sapphire755-expected.gr sapphire755.gr - - -Fit twothetazero ------------------------------------------------------------------------- - -For a good quality PDF it is essential to use powder patterns with -accurate values of *Q*. Some instruments may produce spectra with -a slightly offset scattering angle |twotheta| which -causes inaccurate *Q* and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the :confval:`twothetazero` correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples. - -This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -`diffpy.cmi `__, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use `Anaconda Python`_ and set up a dedicated -Anaconda environment *nbcmi* for this tutorial. -This can be accomplished using the following steps:: - - $ conda create -n nbcmi -c diffpy python=2 diffpy.cmi - $ conda activate nbcmi - $ pip install path/to/diffpy.pdfgetx-VERSION.whl - -When these prerequisites are in place, -change to the :file:`n-twothetazero-fit` directory -and open the self documented Jupyter notebook as follows :: - - $ jupyter notebook fit-twothetazero.ipynb - -.. |tthzero| replace:: :confval:`!twothetazero` - -The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted |tthzero|. -After running all cells the notebook should produce similar graphs -as in the figure below. - -.. figure:: images/twothetazerofit.* - - Refinement of nickel neutron PDF for **(a)** uncorrected data - and **(b)** with a refined zero correction. - The extracted PDFs are plotted as blue circles, - simulated PDFs as red lines and - the difference is plotted offset in green below. - -The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual R\ :sub:`w` which is lowered from (a) 0.18 to (b) 0.05. - - -Small-angle-scattering PDF (sasPDF) ------------------------------------------------------------------------- - -Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using :ref:`pdfgets3 `. -To do this, navigate to the :file:`Au_DNA_NPA` directory in your terminal. -In this folder, you will find :file:`Au_DNA_NPA.chi` and -:file:`Au_DNA_FF.chi` files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in `D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008). -`_. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The :file:`pdfgets3.cfg` -configuration file specifies processing parameters such as :confval:`formfactorfile` (required by ``sas`` mode), :confval:`qmin`, :confval:`qmax`, and :confval:`mode`. - -To extract the PDF of DNA-capped DNA nanoparticle assemblies :: - - $ pdfgets3 --verbose=info Au_DNA_NPA.chi - - INFO:applying pdfgets3 defaults - INFO:set config.mode = sas - INFO:searching for default config file /home/user/.pdfgets3.cfg - INFO:searching for default config file .pdfgets3.cfg - INFO:searching for default config file pdfgets3.cfg - INFO:loaded default config file pdfgets3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = QA - INFO:set config.backgroundfile = - INFO:set config.datapath = [] - INFO:set config.formfactorfile = Au_DNA_FF.chi - INFO:set config.output = - INFO:set config.outputtypes = fq, gr - INFO:set config.force = yes - INFO:set config.mode = sas - INFO:set config.rpoly = 240.605 - INFO:set config.qmaxinst = 0.075 - INFO:set config.qmin = 0.01 - INFO:set config.qmax = 0.072 - INFO:set config.rmin = 100.0 - INFO:set config.rmax = 5000.0 - INFO:set config.rstep = 1.0 - INFO:set config.plot = iq, fq, gr - INFO:set config.verbose = info - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'sas' - INFO:calling config_sas - INFO:started PDF processing. - INFO:processing 'Au_DNA_NPA.chi' - INFO:resolved output file '' as 'Au_DNA_NPA.fq' - INFO:written outpufile Au_DNA_NPA.fq - INFO:resolved output file '' as 'Au_DNA_NPA.gr' - INFO:written outpufile Au_DNA_NPA.gr - INFO:elapsed time: 0.947 - - -This will save two files :file:`Au_DNA_NPA.fq`, :file:`Au_DNA_NPA.gr` in the same directoy for the |FQ| and |Gr| functions. This also plots |FQ| and |Gr| functions in a pop-up window and the processing parameters such as :confval:`rpoly` or so may be tuned interactively by issuing command :py:func:`!tuneconfig` in the `IPython`_ session as discussed above. diff --git a/static_root/doc/pdfgetx/2.1.1/_static/basic.css b/static_root/doc/pdfgetx/2.1.1/_static/basic.css deleted file mode 100644 index 01192852..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_static/basic.css +++ /dev/null @@ -1,768 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- 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: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.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: 450px; - 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.brackets:before, -span.brackets > a:before{ - content: "["; -} - -a.brackets:after, -span.brackets > a:after { - content: "]"; -} - -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, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -img.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 { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 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; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - 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; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -th > p:first-child, -td > p:first-child { - margin-top: 0px; -} - -th > p:last-child, -td > p:last-child { - margin-bottom: 0px; -} - -/* -- figures --------------------------------------------------------------- */ - -div.figure { - margin: 0.5em; - padding: 0.5em; -} - -div.figure p.caption { - padding: 0.3em; -} - -div.figure p.caption span.caption-number { - font-style: italic; -} - -div.figure p.caption 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 td { - vertical-align: top; -} - - -/* -- 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; -} - -li > p:first-child { - margin-top: 0px; -} - -li > p:last-child { - margin-bottom: 0px; -} - -dl.footnote > dt, -dl.citation > dt { - float: left; -} - -dl.footnote > dd, -dl.citation > dd { - margin-bottom: 0em; -} - -dl.footnote > dd:after, -dl.citation > dd: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 > dt:after { - content: ":"; -} - -dl.field-list > dd { - padding-left: 0.5em; - margin-top: 0em; - margin-left: 0em; - margin-bottom: 0em; -} - -dl { - margin-bottom: 15px; -} - -dd > p:first-child { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, span.highlighted { - background-color: #fbe54e; -} - -rect.highlighted { - fill: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.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.5em; - content: ":"; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -span.pre { - -moz-hyphens: none; - -ms-hyphens: none; - -webkit-hyphens: none; - hyphens: none; -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -div.code-block-caption { - padding: 2px 5px; - font-size: small; -} - -div.code-block-caption code { - background-color: transparent; -} - -div.code-block-caption + div > div.highlight > pre { - margin-top: 0; -} - -div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ - user-select: none; -} - -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 { - padding: 1em 1em 0; -} - -div.literal-block-wrapper div.highlight { - margin: 0; -} - -code.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -code.descclassname { - background-color: transparent; -} - -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: relative; - left: 0px; - 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_root/doc/pdfgetx/2.1.1/_static/classic.css b/static_root/doc/pdfgetx/2.1.1/_static/classic.css deleted file mode 100644 index 3496a7bb..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_static/classic.css +++ /dev/null @@ -1,271 +0,0 @@ -/* - * classic.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- classic theme. - * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -html { - /* CSS hack for macOS's scrollbar (see #1125) */ - background-color: #FFFFFF; -} - -body { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; - font-size: 100%; - background-color: white; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: white; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: white; - color: #222222; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #555555; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #555555; - text-decoration: underline; -} - -div.related { - background-color: white; - line-height: 30px; - color: #666666; -} - -div.related a { - color: #444444; -} - -div.sphinxsidebar { -} - -div.sphinxsidebar h3 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #444444; -} - -div.sphinxsidebar h4 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #444444; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #444444; -} - -div.sphinxsidebar a { - color: #444444; -} - -div.sphinxsidebar input { - border: 1px solid #444444; - font-family: sans-serif; - font-size: 1em; -} - - -/* for collapsible sidebar */ -div#sidebarbutton { - background-color: #3c6e83; -} - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #00608f; - text-decoration: none; -} - -a:visited { - color: #30306f; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - background-color: white; - font-weight: normal; - color: #1a1a1a; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #aaaaaa; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #aaaaaa; - color: white; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: #eeffcc; - color: #333333; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -code { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th, dl.field-list > dt { - background-color: #ede; -} - -.warning code { - background: #efc2c2; -} - -.note code { - background: #d6d6d6; -} - -.viewcode-back { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -div.code-block-caption { - color: #efefef; - background-color: #1c4e63; -} \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/_static/copybutton.js b/static_root/doc/pdfgetx/2.1.1/_static/copybutton.js deleted file mode 100644 index ca9f489f..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_static/copybutton.js +++ /dev/null @@ -1,57 +0,0 @@ -$(document).ready(function() { - /* Add a [>>>] button on the top-right corner of code samples to hide - * the >>> and ... prompts and the output and thus make the code - * copyable. */ - var div = $('.highlight-python .highlight,' + - '.highlight-pycon .highlight,' + - '.highlight-python3 .highlight') - var pre = div.find('pre'); - - // get the styles from the current theme - pre.parent().parent().css('position', 'relative'); - var hide_text = 'Hide the prompts and output'; - var show_text = 'Show the prompts and output'; - var border_width = pre.css('border-top-width'); - var border_style = pre.css('border-top-style'); - var border_color = pre.css('border-top-color'); - var button_styles = { - 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', - 'border-color': border_color, 'border-style': border_style, - 'border-width': border_width, 'color': border_color, 'text-size': '75%', - 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', - 'border-radius': '0 3px 0 0' - } - - // create and add the button to all the code blocks that contain >>> - div.each(function(index) { - var jthis = $(this); - if (jthis.find('.gp').length > 0) { - var button = $('>>>'); - button.css(button_styles) - button.attr('title', hide_text); - jthis.prepend(button); - } - // tracebacks (.gt) contain bare text elements that need to be - // wrapped in a span to work with .nextUntil() (see later) - jthis.find('pre:has(.gt)').contents().filter(function() { - return ((this.nodeType == 3) && (this.data.trim().length > 0)); - }).wrap(''); - }); - - // define the behavior of the button when it's clicked - $('.copybutton').toggle( - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').hide(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); - button.css('text-decoration', 'line-through'); - button.attr('title', show_text); - }, - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').show(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); - button.css('text-decoration', 'none'); - button.attr('title', hide_text); - }); -}); diff --git a/static_root/doc/pdfgetx/2.1.1/_static/doctools.js b/static_root/doc/pdfgetx/2.1.1/_static/doctools.js deleted file mode 100644 index daccd209..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_static/doctools.js +++ /dev/null @@ -1,315 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(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; -} - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { - this.initOnKeyListeners(); - } - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return 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 : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keydown(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box or textarea - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - } - } - }); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); diff --git a/static_root/doc/pdfgetx/2.1.1/_static/documentation_options.js b/static_root/doc/pdfgetx/2.1.1/_static/documentation_options.js deleted file mode 100644 index 7c77e4bd..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_static/documentation_options.js +++ /dev/null @@ -1,11 +0,0 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '2.1.1', - LANGUAGE: 'None', - COLLAPSE_INDEX: false, - BUILDER: 'html', - FILE_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: true -}; \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/_static/favicon.png b/static_root/doc/pdfgetx/2.1.1/_static/favicon.png deleted file mode 100644 index 93e4a02c..00000000 Binary files a/static_root/doc/pdfgetx/2.1.1/_static/favicon.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.1/_static/file.png b/static_root/doc/pdfgetx/2.1.1/_static/file.png deleted file mode 100644 index a858a410..00000000 Binary files a/static_root/doc/pdfgetx/2.1.1/_static/file.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.1/_static/jquery-3.4.1.js b/static_root/doc/pdfgetx/2.1.1/_static/jquery-3.4.1.js deleted file mode 100644 index 773ad95c..00000000 --- a/static_root/doc/pdfgetx/2.1.1/_static/jquery-3.4.1.js +++ /dev/null @@ -1,10598 +0,0 @@ -/*! - * jQuery JavaScript Library v3.4.1 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2019-05-01T21:04Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var document = window.document; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - -var isFunction = function isFunction( obj ) { - - // Support: Chrome <=57, Firefox <=52 - // In some browsers, typeof returns "function" for HTML elements - // (i.e., `typeof document.createElement( "object" ) === "function"`). - // We don't want to classify *any* DOM node as a function. - return typeof obj === "function" && typeof obj.nodeType !== "number"; - }; - - -var isWindow = function isWindow( obj ) { - return obj != null && obj === obj.window; - }; - - - - - var preservedScriptAttributes = { - type: true, - src: true, - nonce: true, - noModule: true - }; - - function DOMEval( code, node, doc ) { - doc = doc || document; - - var i, val, - script = doc.createElement( "script" ); - - script.text = code; - if ( node ) { - for ( i in preservedScriptAttributes ) { - - // Support: Firefox 64+, Edge 18+ - // Some browsers don't support the "nonce" property on scripts. - // On the other hand, just using `getAttribute` is not enough as - // the `nonce` attribute is reset to an empty string whenever it - // becomes browsing-context connected. - // See https://github.com/whatwg/html/issues/2369 - // See https://html.spec.whatwg.org/#nonce-attributes - // The `node.getAttribute` check was added for the sake of - // `jQuery.globalEval` so that it can fake a nonce-containing node - // via an object. - val = node[ i ] || node.getAttribute && node.getAttribute( i ); - if ( val ) { - script.setAttribute( i, val ); - } - } - } - doc.head.appendChild( script ).parentNode.removeChild( script ); - } - - -function toType( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; -} -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.4.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android <=4.0 only - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - copy = options[ name ]; - - // Prevent Object.prototype pollution - // Prevent never-ending loop - if ( name === "__proto__" || target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - src = target[ name ]; - - // Ensure proper type for the source value - if ( copyIsArray && !Array.isArray( src ) ) { - clone = []; - } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { - clone = {}; - } else { - clone = src; - } - copyIsArray = false; - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - // Evaluates a script in a global context - globalEval: function( code, options ) { - DOMEval( code, { nonce: options && options.nonce } ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android <=4.0 only - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = toType( obj ); - - if ( isFunction( obj ) || isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.4 - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://js.foundation/ - * - * Date: 2019-04-08 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - nonnativeSelectorCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - rdescend = new RegExp( whitespace + "|>" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rhtml = /HTML$/i, - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - inDisabledFieldset = addCombinator( - function( elem ) { - return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !nonnativeSelectorCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) && - - // Support: IE 8 only - // Exclude object elements - (nodeType !== 1 || context.nodeName.toLowerCase() !== "object") ) { - - newSelector = selector; - newContext = context; - - // qSA considers elements outside a scoping root when evaluating child or - // descendant combinators, which is not what we want. - // In such cases, we work around the behavior by prefixing every selector in the - // list with an ID selector referencing the scope context. - // Thanks to Andrew Dupont for this technique. - if ( nodeType === 1 && rdescend.test( selector ) ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[i] = "#" + nid + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - nonnativeSelectorCache( selector, true ); - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement("fieldset"); - - try { - return !!fn( el ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || - - // Where there is no isDisabled, check manually - /* jshint -W018 */ - elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; - } - - return elem.disabled === disabled; - - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } - - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - var namespace = elem.namespaceURI, - docElem = (elem.ownerDocument || elem).documentElement; - - // Support: IE <=8 - // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes - // https://bugs.jquery.com/ticket/4833 - return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9-11, Edge - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - if ( preferredDoc !== document && - (subWindow = document.defaultView) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( el ) { - el.className = "i"; - return !el.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( el ) { - el.appendChild( document.createComment("") ); - return !el.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - }); - - // ID filter and find - if ( support.getById ) { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( (elem = elems[i++]) ) { - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( el ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement("input"); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll(":enabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll(":disabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( el ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === document ? -1 : - b === document ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - if ( support.matchesSelector && documentIsHTML && - !nonnativeSelectorCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) { - nonnativeSelectorCache( expr, true ); - } - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return (sel + "").replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - // Use previously-cached element index if available - if ( useCache ) { - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? - argument + length : - argument > length ? - length : - argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( (oldCache = uniqueCache[ key ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context === document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - if ( !context && elem.ownerDocument !== document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context || document, xml) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( el ) { - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( el ) { - return el.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -}; -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Filtered directly for both simple and complex selectors - return jQuery.filter( qualifier, elements, not ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( typeof elem.contentDocument !== "undefined" ) { - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && toType( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && - - // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // rejected_handlers.disable - // fulfilled_handlers.disable - tuples[ 3 - i ][ 3 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock, - - // progress_handlers.lock - tuples[ 0 ][ 3 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the master Deferred - master = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || - isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return master.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); - } - - return master.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( toType( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; - - -// Matches dashed string for camelizing -var rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g; - -// Used by camelCase as callback to replace() -function fcamelCase( all, letter ) { - return letter.toUpperCase(); -} - -// Convert dashed to camelCase; used by the css and data modules -// Support: IE <=9 - 11, Edge 12 - 15 -// Microsoft forgot to hump their vendor prefix (#9572) -function camelCase( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); -} -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( camelCase ); - } else { - key = camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var documentElement = document.documentElement; - - - - var isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ); - }, - composed = { composed: true }; - - // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only - // Check attachment across shadow DOM boundaries when possible (gh-3504) - // Support: iOS 10.0-10.2 only - // Early iOS 10 versions support `attachShadow` but not `getRootNode`, - // leading to errors. We need to check for `getRootNode`. - if ( documentElement.getRootNode ) { - isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ) || - elem.getRootNode( composed ) === elem.ownerDocument; - }; - } -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && - - // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - isAttached( elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - -var swap = function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, scale, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = elem.nodeType && - ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Support: Firefox <=54 - // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) - initial = initial / 2; - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - while ( maxIterations-- ) { - - // Evaluate and update our best guess (doubling guesses that zero out). - // Finish if the scale equals or crosses 1 (making the old*new product non-positive). - jQuery.style( elem, prop, initialInUnit + unit ); - if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { - maxIterations = 0; - } - initialInUnit = initialInUnit / scale; - - } - - initialInUnit = initialInUnit * 2; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); - -var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); - - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // Support: IE <=9 only - option: [ 1, "" ], - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] -}; - -// Support: IE <=9 only -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, attached, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( toType( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - attached = isAttached( elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( attached ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -} )(); - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 - 11+ -// focus() and blur() are asynchronous, except when they are no-op. -// So expect focus to be synchronous when the element is already active, -// and blur to be synchronous when the element is not already active. -// (focus and blur are always synchronous in other supported browsers, -// this just defines when we can count on it). -function expectSync( elem, type ) { - return ( elem === safeActiveElement() ) === ( type === "focus" ); -} - -// Support: IE <=9 only -// Accessing document.activeElement can throw unexpectedly -// https://bugs.jquery.com/ticket/13393 -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = {}; - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - // Make a writable jQuery.Event from the native event object - var event = jQuery.event.fix( nativeEvent ); - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // If the event is namespaced, then each handler is only invoked if it is - // specially universal or its namespaces are a superset of the event's. - if ( !event.rnamespace || handleObj.namespace === false || - event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && - - // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && - - // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - - // Utilize native event to ensure correct state for checkable inputs - setup: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Claim the first handler - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - // dataPriv.set( el, "click", ... ) - leverageNative( el, "click", returnTrue ); - } - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Force setup before triggering a click - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - leverageNative( el, "click" ); - } - - // Return non-false to allow normal event-path propagation - return true; - }, - - // For cross-browser consistency, suppress native .click() on links - // Also prevent it if we're currently inside a leveraged native-event stack - _default: function( event ) { - var target = event.target; - return rcheckableType.test( target.type ) && - target.click && nodeName( target, "input" ) && - dataPriv.get( target, "click" ) || - nodeName( target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -// Ensure the presence of an event listener that handles manually-triggered -// synthetic events by interrupting progress until reinvoked in response to -// *native* events that it fires directly, ensuring that state changes have -// already occurred before other listeners are invoked. -function leverageNative( el, type, expectSync ) { - - // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add - if ( !expectSync ) { - if ( dataPriv.get( el, type ) === undefined ) { - jQuery.event.add( el, type, returnTrue ); - } - return; - } - - // Register the controller as a special universal handler for all event namespaces - dataPriv.set( el, type, false ); - jQuery.event.add( el, type, { - namespace: false, - handler: function( event ) { - var notAsync, result, - saved = dataPriv.get( this, type ); - - if ( ( event.isTrigger & 1 ) && this[ type ] ) { - - // Interrupt processing of the outer synthetic .trigger()ed event - // Saved data should be false in such cases, but might be a leftover capture object - // from an async native handler (gh-4350) - if ( !saved.length ) { - - // Store arguments for use when handling the inner native event - // There will always be at least one argument (an event object), so this array - // will not be confused with a leftover capture object. - saved = slice.call( arguments ); - dataPriv.set( this, type, saved ); - - // Trigger the native event and capture its result - // Support: IE <=9 - 11+ - // focus() and blur() are asynchronous - notAsync = expectSync( this, type ); - this[ type ](); - result = dataPriv.get( this, type ); - if ( saved !== result || notAsync ) { - dataPriv.set( this, type, false ); - } else { - result = {}; - } - if ( saved !== result ) { - - // Cancel the outer synthetic event - event.stopImmediatePropagation(); - event.preventDefault(); - return result.value; - } - - // If this is an inner synthetic event for an event with a bubbling surrogate - // (focus or blur), assume that the surrogate already propagated from triggering the - // native event and prevent that from happening again here. - // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the - // bubbling surrogate propagates *after* the non-bubbling base), but that seems - // less bad than duplication. - } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { - event.stopPropagation(); - } - - // If this is a native event triggered above, everything is now in order - // Fire an inner synthetic event with the original arguments - } else if ( saved.length ) { - - // ...and capture the result - dataPriv.set( this, type, { - value: jQuery.event.trigger( - - // Support: IE <=9 - 11+ - // Extend with the prototype to reset the above stopImmediatePropagation() - jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), - saved.slice( 1 ), - this - ) - } ); - - // Abort handling of the native event - event.stopImmediatePropagation(); - } - } - } ); -} - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || Date.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - code: true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } -}, jQuery.event.addProp ); - -jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { - jQuery.event.special[ type ] = { - - // Utilize native event if possible so blur/focus sequence is correct - setup: function() { - - // Claim the first handler - // dataPriv.set( this, "focus", ... ) - // dataPriv.set( this, "blur", ... ) - leverageNative( this, type, expectSync ); - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function() { - - // Force setup before trigger - leverageNative( this, type ); - - // Return non-false to allow normal event-path propagation - return true; - }, - - delegateType: delegateType - }; -} ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - /* eslint-disable max-len */ - - // See https://github.com/eslint/eslint/issues/3229 - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, - - /* eslint-enable */ - - // Support: IE <=10 - 11, Edge 12 - 13 only - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( elem ).children( "tbody" )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { - elem.type = elem.type.slice( 5 ); - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.access( src ); - pdataCur = dataPriv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - valueIsFunction = isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( valueIsFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( valueIsFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl && !node.noModule ) { - jQuery._evalUrl( node.src, { - nonce: node.nonce || node.getAttribute( "nonce" ) - } ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && isAttached( node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html.replace( rxhtmlTag, "<$1>" ); - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = isAttached( elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - -var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - container.style.cssText = "position:absolute;left:-11111px;width:60px;" + - "margin-top:1px;padding:0;border:0"; - div.style.cssText = - "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + - "margin:auto;border:1px;padding:1px;" + - "width:60%;top:1%"; - documentElement.appendChild( container ).appendChild( div ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; - - // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 - // Some styles come back with percentage values, even though they shouldn't - div.style.right = "60%"; - pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; - - // Support: IE 9 - 11 only - // Detect misreporting of content dimensions for box-sizing:border-box elements - boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; - - // Support: IE 9 only - // Detect overflow:scroll screwiness (gh-3699) - // Support: Chrome <=64 - // Don't get tricked when zoom affects offsetWidth (gh-4029) - div.style.position = "absolute"; - scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - function roundPixelMeasures( measure ) { - return Math.round( parseFloat( measure ) ); - } - - var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, - reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - jQuery.extend( support, { - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelBoxStyles: function() { - computeStyleTests(); - return pixelBoxStylesVal; - }, - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - }, - scrollboxSize: function() { - computeStyleTests(); - return scrollboxSizeVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !isAttached( elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style, - vendorProps = {}; - -// Return a vendor-prefixed property or undefined -function vendorPropName( name ) { - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a potentially-mapped jQuery.cssProps or vendor prefixed property -function finalPropName( name ) { - var final = jQuery.cssProps[ name ] || vendorProps[ name ]; - - if ( final ) { - return final; - } - if ( name in emptyStyle ) { - return name; - } - return vendorProps[ name ] = vendorPropName( name ) || name; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }; - -function setPositiveNumber( elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { - var i = dimension === "width" ? 1 : 0, - extra = 0, - delta = 0; - - // Adjustment may not be necessary - if ( box === ( isBorderBox ? "border" : "content" ) ) { - return 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin - if ( box === "margin" ) { - delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); - } - - // If we get here with a content-box, we're seeking "padding" or "border" or "margin" - if ( !isBorderBox ) { - - // Add padding - delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // For "border" or "margin", add border - if ( box !== "padding" ) { - delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - - // But still keep track of it otherwise - } else { - extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - - // If we get here with a border-box (content + padding + border), we're seeking "content" or - // "padding" or "margin" - } else { - - // For "content", subtract padding - if ( box === "content" ) { - delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // For "content" or "padding", subtract border - if ( box !== "margin" ) { - delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - // Account for positive content-box scroll gutter when requested by providing computedVal - if ( !isBorderBox && computedVal >= 0 ) { - - // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border - // Assuming integer scroll gutter, subtract the rest and round down - delta += Math.max( 0, Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - computedVal - - delta - - extra - - 0.5 - - // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter - // Use an explicit zero to avoid NaN (gh-3964) - ) ) || 0; - } - - return delta; -} - -function getWidthOrHeight( elem, dimension, extra ) { - - // Start with computed style - var styles = getStyles( elem ), - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). - // Fake content-box until we know it's needed to know the true value. - boxSizingNeeded = !support.boxSizingReliable() || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - valueIsBorderBox = isBorderBox, - - val = curCSS( elem, dimension, styles ), - offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); - - // Support: Firefox <=54 - // Return a confounding non-pixel value or feign ignorance, as appropriate. - if ( rnumnonpx.test( val ) ) { - if ( !extra ) { - return val; - } - val = "auto"; - } - - - // Fall back to offsetWidth/offsetHeight when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - // Support: Android <=4.1 - 4.3 only - // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - // Support: IE 9-11 only - // Also use offsetWidth/offsetHeight for when box sizing is unreliable - // We use getClientRects() to check for hidden/disconnected. - // In those cases, the computed value can be trusted to be border-box - if ( ( !support.boxSizingReliable() && isBorderBox || - val === "auto" || - !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && - elem.getClientRects().length ) { - - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Where available, offsetWidth/offsetHeight approximate border box dimensions. - // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the - // retrieved value as a content box dimension. - valueIsBorderBox = offsetProp in elem; - if ( valueIsBorderBox ) { - val = elem[ offsetProp ]; - } - } - - // Normalize "" and auto - val = parseFloat( val ) || 0; - - // Adjust for the element's box model - return ( val + - boxModelAdjustment( - elem, - dimension, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles, - - // Provide the current computed size to request scroll gutter calculation (gh-3589) - val - ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "gridArea": true, - "gridColumn": true, - "gridColumnEnd": true, - "gridColumnStart": true, - "gridRow": true, - "gridRowEnd": true, - "gridRowStart": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: {}, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append - // "px" to a few hardcoded values. - if ( type === "number" && !isCustomProp ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( i, dimension ) { - jQuery.cssHooks[ dimension ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && - - // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, dimension, extra ); - } ) : - getWidthOrHeight( elem, dimension, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = getStyles( elem ), - - // Only read styles.position if the test has a chance to fail - // to avoid forcing a reflow. - scrollboxSizeBuggy = !support.scrollboxSize() && - styles.position === "absolute", - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) - boxSizingNeeded = scrollboxSizeBuggy || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - subtract = extra ? - boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ) : - 0; - - // Account for unreliable border-box dimensions by comparing offset* to computed and - // faking a content-box to get border and padding (gh-3699) - if ( isBorderBox && scrollboxSizeBuggy ) { - subtract -= Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - parseFloat( styles[ dimension ] ) - - boxModelAdjustment( elem, dimension, "border", false, styles ) - - 0.5 - ); - } - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ dimension ] = value; - value = jQuery.css( elem, dimension ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || - elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( prefix !== "margin" ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || - tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = Date.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 15 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY and Edge just mirrors - // the overflowX value there. - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - result.stop.bind( result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = Date.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && - elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -function classesToArray( value ) { - if ( Array.isArray( value ) ) { - return value; - } - if ( typeof value === "string" ) { - return value.match( rnothtmlwhite ) || []; - } - return []; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isValidValue = type === "string" || Array.isArray( value ); - - if ( typeof stateVal === "boolean" && isValidValue ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( isValidValue ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = classesToArray( value ); - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, valueIsFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - valueIsFunction = isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( valueIsFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - - // Don't return options that are disabled or in a disabled optgroup - !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -support.focusin = "onfocusin" in window; - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - stopPropagationCallback = function( e ) { - e.stopPropagation(); - }; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = lastElement = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - lastElement = cur; - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - - if ( event.isPropagationStopped() ) { - lastElement.addEventListener( type, stopPropagationCallback ); - } - - elem[ type ](); - - if ( event.isPropagationStopped() ) { - lastElement.removeEventListener( type, stopPropagationCallback ); - } - - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = Date.now(); - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } - - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && toType( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - if ( a == null ) { - return ""; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response - * Also sets the responseXXX fields on the jqXHR instance - */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /\bxml\b/, - html: /\bhtml/, - json: /\bjson\b/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": JSON.parse, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() + " " ] = - ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) - .concat( match[ 2 ] ); - } - } - match = responseHeaders[ key.toLowerCase() + " " ]; - } - return match == null ? null : match.join( ", " ); - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 15 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available and should be processed, append data to url - if ( s.data && ( s.processData || typeof s.data === "string" ) ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - - -jQuery._evalUrl = function( url, options ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - - // Only evaluate the response if it is successful (gh-4126) - // dataFilter is not invoked for failure responses, so using it instead - // of the default converter is kludgy but it works. - converters: { - "text script": function() {} - }, - dataFilter: function( response ) { - jQuery.globalEval( response, options ); - } - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var htmlIsFunction = isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.ontimeout = - xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain or forced-by-attrs requests - if ( s.crossDomain || s.scriptAttrs ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( " - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Files used in PDF extraction

-
-

Configuration file

-

Configuration files may define the PDF processing parameters. -By default, the pdfgetx3 program attempts to read -.pdfgetx3.cfg file from the user HOME directory, -then .pdfgetx3.cfg and pdfgetx3.cfg files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the -c, --config option. -The pdfgetn3 program works in the same way, -except it checks for configuration files -~/.pdfgetn3.cfg, .pdfgetn3.cfg and pdfgetn3.cfg.

-

The easiest way of creating a configuration file is to generate -a template content using the --createconfig option as

-
pdfgetx3 --createconfig=test.cfg
-
-
-

and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple “varname=value” syntax, -any lines starting with “#” are ignored as comments.

-

The configuration file has several sections marked as [SECTIONNAME]. -The [DEFAULT] section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the -s, --section option on the -command line. Thus

-
pdfgetx3 --config=test.cfg --section=nacl
-
-
-

would read the parameters from the [nacl] section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section.

-
-
-

Input files

-

PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -2Θ in degrees, momentum transfer Q in inverse nanometers or Q -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the dataformat parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values.

-

The input files are usually passed as command-line arguments to -pdfgetx3 or pdfgetn3 programs and must be paths -accessible from the current working directory.

-

Input files can be also defined by setting the inputfile -value in the configuration file. The -d, --datapath -option can be then used to provide additional data directories to -search for these inputs and for the backgroundfile. -This is to support configuration files located in a different -directory than the data.

-

When the --find option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory.

-
-
-

Output files

-

PDFgetX3 and PDFgetN3 can produce up to four different output data files:

-
    -
  • .iq – I(Q), the background-corrected -intensities sampled on a regular Q-space grid in inverse ångströms,

  • -
  • .sq – S(Q), the total scattering structure function, -with intensities normalized by average scattering factors and -corrected by a polynomial fit,

  • -
  • .fq – F(Q), the reduced structure function equal to Q(S(Q) - 1),

  • -
  • .gr – G(r), the resultant PDF, where the first column is the -separation r in ångströms and the second is the function G in -Å-2.

  • -
-

You can specify what output files should be produced by setting the -outputtypes parameter in the configuration file or by -passing the -t, --outputtypes on the command line.

-

The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the --config option, -the PDFgetX3 will reproduce the previous calculation.

-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/genindex.html b/static_root/doc/pdfgetx/2.1.1/genindex.html deleted file mode 100644 index 2be1a0aa..00000000 --- a/static_root/doc/pdfgetx/2.1.1/genindex.html +++ /dev/null @@ -1,844 +0,0 @@ - - - - - - - Index — diffpy.pdfgetx 2.1.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - -

Index

- -
- Symbols - | A - | B - | C - | D - | E - | F - | G - | I - | L - | M - | O - | P - | Q - | R - | S - | T - | V - | W - -
-

Symbols

- - - -
- -

A

- - -
- -

B

- - - -
- -

C

- - - -
- -

D

- - - -
- -

E

- - - -
- -

F

- - - -
- -

G

- - -
- -

I

- - - -
- -

L

- - - -
- -

M

- - -
- -

O

- - - -
- -

P

- - - -
- -

Q

- - - -
- -

R

- - - -
- -

S

- - -
- -

T

- - - -
- -

V

- - -
- -

W

- - -
- - - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/index.html b/static_root/doc/pdfgetx/2.1.1/index.html deleted file mode 100644 index 15dfafb8..00000000 --- a/static_root/doc/pdfgetx/2.1.1/index.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - diffpy.pdfgetx — diffpy.pdfgetx 2.1.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/install.html b/static_root/doc/pdfgetx/2.1.1/install.html deleted file mode 100644 index ed74c44a..00000000 --- a/static_root/doc/pdfgetx/2.1.1/install.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - Installation — diffpy.pdfgetx 2.1.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Installation

-
-

Software requirements

-

This software is written in Python programming language, therefore -you must have Python 3.8, 3.7, 3.6, 3.5 or 2.7 installed. In addition, -the following third-party Python libraries are also required:

-
    -
  • pip - Python package installer

  • -
  • setuptools - tools for installing Python packages

  • -
  • six - Python 2 and 3 compatibility library

  • -
  • NumPy - library for scientific computing with Python

  • -
  • matplotlib - Python plotting library

  • -
  • IPython - enhanced interactive Python shell

  • -
-

Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -Python Package Index -or using any Internet search engine.

-

Another more convenient option is to obtain one of the science-oriented -Python distributions such as -Anaconda Python, -Enthought Canopy or -PythonXY, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step.

-

On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command

-
sudo apt-get install \
-  python3-pip python3-setuptools python3-six \
-  python3-numpy python3-matplotlib ipython3
-
-
-

This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above.

-

On Windows operating system, it may be necessary to add the -C:\Python37 directory and the scripts directory -C:\Python37\Scripts to the system PATH. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the Command Prompt, type -there python and see if this starts the Python interpreter.

-

Alternately, if you want to run the diffpy.pdfgetx software with a specific version of Python, -we recommend using a virtual environment, such as conda. For example, if you have Anaconda Python installed, -you can create a conda virtual environment to install the software as follow

-
conda create --name pdfgetx_env numpy matplotlib ipython --python=3.8
-
-
-

You can choose the name of the environment and python version as you desire. You can choose any of the -supported Python versions. Then, activate this environment and follow the instructions in the -next section to install the software

-
conda activate pdfgetx_env
-
-
-
-
-

Installation

-

The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -Columbia Technology Ventures. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:

-
pip install ./diffpy.pdfgetx-VERSION.whl
-
-
-

Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending sudo to the command line above. If root access is not available, use the pip install options --user or --prefix to install the software to a user-writable directory.

-

The package provides three programs for PDF conversion, pdfgetx3, pdfgetn3 and pdfgets3. To check if they are correctly installed run

-
pdfgetx3 --version
-pdfgetn3 --version
-pdfgets3 --version
-
-
-

This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a plotdata -command for an easy plotting of text data files. To verify -if plotdata works, run the plotdata --version command. -Finally, a comprehensive test of the installed software can -be executed using

-
python -m diffpy.pdfgetx.tests.run
-
-
-
-

Note

-

Older versions of diffpy.pdfgetx use Python egg format -instead of Python wheel. -To install these use the easy_install command as follows:

-
python -m easy_install ./diffpy.pdfgetx-VERSION.egg
-
-
-
-
-
-

IPython magic command

-

These instructions are intended for IPython users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don’t plan to customize IPython in such way you can safely skip -this paragraph.

-

When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The %pdfgetx3, %pdfgetn3 and %pdfgets3 magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session.

-

The %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up

-
    -
  1. find the profile_default/ipython_config.py file and open it -in a text editor. If that file does not exists, -create it first by executing

    -
    ipython profile create
    -
    -
    -
  2. -
  3. navigate to the paragraph that contains the -c.InteractiveShellApp.extensions and add there -the following line

    -
    c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics']
    -
    -
    -

    There must be no leading indent, i.e., the text must start at the -very first column.

    -
  4. -
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/interact.html b/static_root/doc/pdfgetx/2.1.1/interact.html deleted file mode 100644 index 9211aef7..00000000 --- a/static_root/doc/pdfgetx/2.1.1/interact.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - Interactive mode — diffpy.pdfgetx 2.1.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Interactive mode

-

The interactive mode is activated by using either the --i, --interact option or a non-empty ---plot option. In the interactive mode -the program starts an IPython interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands %pdfgetx3 and %pdfgetn3, which can be used with -the same syntax as the pdfgetx3 and pdfgetn3 in -system shell. -The interactive session is also initialized with all functions from the -matplotlib.pyplot module for convenient plotting. -The functions and variables related to PDF processing are:

-
-
-pdfgetter(x=None, y=None, filename='', **kwargs)
-

Instance of the PDFGetter class which serves as a -low-level function that calculates the PDF. This is a callable -object, which takes as an argument a pair of input arrays for -(Q, intensity) or (2Θ, intensity) depending on -dataformat. It can be also called with a keyword -argument filename=FILE, which would read the input arrays -from the specified file. When called with no arguments, -it calculates PDF from the last input data.

-
-
Parameters
-
    -
  • x (numpy.ndarray, optional) – -The Q or 2Θ values in powder diffraction pattern.

  • -
  • y (numpy.ndarray, optional) – -The scattered intensities in powder diffraction pattern

  • -
  • filename (str, optional) – -The text data file for loading the x, y values when -they are not specified.

  • -
  • kwargs (misc, optional) – -Extra keyword arguments that are applied to -the config object, for example qmax=20.

  • -
-
-
Returns
-

A pair of output arrays (r, G).

-
-
-
- -
-
-config
-

Instance of the PDFConfig class that stores the -parameters and input files for the program. -Use print(config) to display the current configuration values. -This is the same object as pdfgetter.config. Configuration -may be changed by setting a respective attribute of the -config object, for example:

-
In [1]: config.qmax = 21
-
-
-

The config values may be also changed by calling the -pdfgetter() or processfiles() function with a -corresponding keyword argument, for example -processfiles(qmax=20, force="once").

-
- -
-
-iraw
-
-iq
-
-sq
-
-fq
-
-gr
-

These variables are assigned the input raw intensities and the -intermediate results, stored as matrix rows. The matrix rows -correspond to twotheta1, intensity1, twotheta2, intensity2, etc. -Because matrices are iterated row first, the raw intensities -from all input files can be plotted with the matplotlib plot -function as plot(*iraw).

-

These variables should be considered read-only and are reset -with subsequent PDF calculations.

-
- -
-
-tuneconfig(plotids=None, pdfgetter=None, axeslist=None)
-

Show a GUI dialog for interactive tuning of configuration variables.

-
-
Parameters
-
    -
  • plotids – The string or iterable that specify what interactive plots should be -tuned. By default the same as config.plot. It can be also an -integer index or name of a transformation in pdfgetter() or -a reference to a Transformation object.

  • -
  • pdfgetter – The optional PDFGetter object to be tuned. -This is by default the interactive pdfgetter() object.

  • -
  • axeslist – An optional list of matplotlib Axes for showing interactive plots. -When None, use subplot(N, 1, i) to create any necessary axes.

  • -
-
-
-
-

Note

-

Changes from tuneconfig() apply only to the configuration -and results in memory. Use the processfiles() function -to save them to disk.

-
-
-

See also

-

Interactive tuning of parameters tutorial

-
-
- -
-
-processfiles(filename=None, **kwargs)
-

Process all input files again with the current configuration values. -This is a higher-level function than pdfgetter(), as -it also saves output files and produces plots as specified by the -config object.

-
-
Parameters
-
    -
  • filename – One or more input files to be converted to PDFs and saved or -plotted according to the config settings. Use the -previous list of input files when not specified.

  • -
  • kwargs – An optional keyword arguments to set for the config -object, for example (force="once", qmax=18).

  • -
-
-
-

This function updates the config.inputfiles -list and the iraw, iq, -sq, fq and gr -interactive variables.

-
- -
-
-clearsession()
-

Clear all elements from the config.inputfiles -and also the -iraw, iq, sq, -fq and gr variables.

-
-
Returns
-

No return value.

-
-
-
- -
-
-loaddata(filename, minrows=10, usecols=None, **kwargs)
-

Find and load data from a text file.

-

The data reading starts at the first matrix block of at least minrows rows -and constant number of columns. This seems to work for most of the -datafiles including those generated by PDFGetX2.

-
-
Parameters
-
    -
  • filename (str) – Name of the file to load the text data from.

  • -
  • minrows (int, optional) – Minimum number of rows in the first data block, by default 10. -All rows must have the same number of floating point values.

  • -
  • usecols (int, str, slice, iterable, optional) – Indices or names of the columns to be loaded from the data block, -the default is all columns. Data blocks that do not contain -sufficient number of columns are skipped. When usecols contain -string items, they are translated to column indices by looking -up a header line preceding the data block. String items formatted -as i:j:k are converted to slice objects. When usecols type -is string it is split to a list of names at comma and whitespace -characters.

  • -
  • unpack (bool, optional) – Return data as a sequence of columns that allows tuple unpacking -such as x, y = loaddata(FILENAME, unpack=True). Note that -transposing the loaded array as loaddata(FILENAME).T has -the same effect. The default is False.

  • -
  • kwargs (misc, optional) – Extra keyword arguments that are passed to numpy.loadtxt.

  • -
-
-
Returns
-

data (numpy.ndarray) – The data block loaded from the text file.

-
-
-
-

See also

-

numpy.loadtxt()

-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
-
-plotdata(filenames, style=None, x=None, y=None, log=None, ax=None, **kwargs)
-

Plot one or more text data files.

-

The files are searched for data blocks which have enough columns -to satisfy both x and y selectors of the plotted data. This -may result in an empty plot when file has none wide-enough data -block (e.g., when y=100).

-
-
Parameters
-
    -
  • filenames (str or an iterable of string file names) – One or more text data files to be plotted.

  • -
  • style (str) – Optional style argument for the matplotlib plot() function.

  • -
  • x (int, str, or iterable, optional) – The column to be used for the x data. This can be a zero-based -index of the desired column or a column name from data header. -A special symbol “.” can be used for a sequential data index. -When not specified, use the first column.

  • -
  • y (int, str, iterable, or slice, optional) – One or more columns to be used for the y data. This can be -a single zero-based index of the desired column or an iterable -of several indices. The y value can be also a string which -is split at commas and converted to integers, column names -or slice objects, e.g. “0,sine,4:7”. The slice instances -are applied to the entire data block from each loaded file. -Use the second column when not specified.

  • -
  • log ({‘x’, ‘y’}, optional) – Set logarithmic scaling for the specified axis and linear scaling -for all others. For example, log="y" applies linear scaling -to the x-axis and logarithmic to the y-axis. Keep the current -axis scaling when not specified.

  • -
  • ax (matplotlib.axes.Axes, optional) – The axes to plot to. The plotting will be performed using the -ax.plot method. The default is pyplot.gca().

  • -
  • kwargs (misc, optional) – Keyword arguments for the matplotlib plot() function.

  • -
-
-
Returns
-

lines (list) – The matplotlib Line2D objects added to the current axis.

-
-
- -

This function can be imported from the -diffpy.pdfgetx.plotdata module.

-
- -
-
-findfiles(patterns=(), path='.', dotfiles=False)
-

Find files that match all specified patterns.

-

Pattern syntax:

-
    -
  • ^start - match “start” only at the beginning of the string.

  • -
  • end$ - match “end” only at the end of string.

  • -
  • <7> - match number 7 preceded by any number of leading zeros.

  • -
  • <1-34> - match an integer range from 1 to 34 inclusive.

  • -
  • <7-> - match an integer greater or equal 7.

  • -
  • <-> - match any integer.

  • -
  • + - start a new group of patterns to match more files.

  • -
  • dir/ - set search path effective from the current pattern group.

  • -
-

All integer ranges <N-M> above allow one or more leading zeros. -The range syntax does not support matching of negative numbers.

-
-
Parameters
-
    -
  • patterns (iterable of strings or str, optional) – String patterns that must all match in returned filenames. -Can be also a single string with patterns separated by -whitespace characters. When empty match all files in the -current directory or in the path. A single + starts -a new pattern group for additional matches. Each pattern -group may have one entry containing /, for example, -dir/ or ./, which sets the search directory for -this and subsequent pattern groups. When pattern group -contains only the path entry it reuses file patterns from -the previous group.

  • -
  • path (str, optional) – Directory to be searched for the files. The default is “.” -to search the current directory.

  • -
  • dotfiles (bool, optional) – When True search also the hidden “.” starting files. These -files are by default ignored, but can be explicitly selected -by adding the ^. pattern.

  • -
-
-
Returns
-

filenames (list) – The list of matching filenames. Return all files when -patterns are not specified.

-
-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/intro.html b/static_root/doc/pdfgetx/2.1.1/intro.html deleted file mode 100644 index 151c31c6..00000000 --- a/static_root/doc/pdfgetx/2.1.1/intro.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - Introduction — diffpy.pdfgetx 2.1.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Introduction

-

diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts.

-
-

License notice

-

Use of this software is subject to and permitted only under a separate, -written Use License granted by Columbia University. If you or your employer -is not a party to such an agreement, then your use of this software is -prohibited. If you don’t know whether or not your anticipated use is under -a license, you must contact Prof. Simon Billinge at sb2896@columbia.edu. -Use of this software without a license is prohibited.

-

Copyright 2009-2020, Trustees of Columbia University in the City of New York.

-

For more information please email Prof. Simon Billinge at sb2896@columbia.edu

-
-
-

Authors

-

This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Hung Vuong, -Songsheng Tao, -Simon Billinge.

-
-
-

References

-

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:

-
-

P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge -PDFgetX3: A rapid and highly automatable program for processing -powder diffraction data into total scattering pair distribution -functions, -J. Appl. Crystallogr. 46, 560-566 (2013)

-
-

For research publications that use this software to process neutron -diffraction data we ask you to also cite:

-
-

P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, -S. J. L. Billinge -PDFgetN3: atomic pair distribution functions from neutron -powder diffraction data using ad hoc corrections, -J. Appl. Crystallogr. 51 (2018)

-
-

For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication:

-
-

CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge -sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data.

-
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/options.html b/static_root/doc/pdfgetx/2.1.1/options.html deleted file mode 100644 index 3c4c76a5..00000000 --- a/static_root/doc/pdfgetx/2.1.1/options.html +++ /dev/null @@ -1,663 +0,0 @@ - - - - - - Options and parameters — diffpy.pdfgetx 2.1.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Options and parameters

-

PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program.

-
-

Note

-

The command line options start with a leading “-” and can -be only used as command line arguments when starting the -pdfgetx3 program. Within configuration file the parameter -names are plain words without any leading dashes. Finally, -parameters can be also set in the interactive mode as attributes of -the config object, but the assignments must be valid -Python statements. Here are examples of setting composition of -a processed specimen using each of these forms:

-
    -
  1. assigned in configuration file:

    -
    ...
    -composition = CaTiO3
    -...
    -
    -
    -
  2. -
  3. set as a command-line option when starting pdfgetx3 or -pdfgetn3:

    -
    pdfgetx3 --composition=CaTiO3
    -
    -
    -
  4. -
  5. set in the IPython interactive mode:

    -
    pdfgetx3 -i
    -...
    -In [1]: config.composition = "CaTiO3"
    -
    -
    -
  6. -
-
-
-

Program operation

-
-
--h, --help
-

Display a brief usage information with a list of command line options -and exit.

-
- -
-
--V, --version
-

Display the program version and exit.

-
- -
-
---manual
-

Open this manual in a Web browser and exit.

-
- -
-
--f, --find
-
- -
-

Select input files that match all patterns. The command -line arguments are by default taken as input files. However, -with the --find option they are processed as -file patterns and the matching files are then used as inputs. -The input files are by default searched in the current directory -unless there is a path entry (e.g., data/) that -selects a different search path. The search patterns are -interpreted as fixed strings, all of which must be present -in the file name. A single argument + starts -a new group of patterns to match more files that are not -covered by one set of patterns. Additional pattern -groups reuse the current search path unless they provide -their own path value. Pattern groups containing only -a path entry reuse file patterns from the last group. -When pattern groups overlap the repeated matches are ignored -to make the resulting list of files unique. Files starting -with . are ignored unless there is ^. pattern -that explicitly matches them. The search -syntax provides the following special patterns:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

^

match at the beginning of the string, i.e., ^start -matches only filenames that start with “start”.

$

match at the end of string, for example, .chi$ selects -file names ending with “.chi”. A $ on its own -matches every string and can be used to select all files.

<N>

match number N preceded by any number of leading zeros, -e.g., <7> would match in “f7.chi”, “f007.chi”, but not -in “f77.chi”.

<N-M>

match an integer range from N to M inclusive. -The matched number may have one or more leading zeros.

<7->

match number 7 or larger.

<-7>

match number 7 or smaller.

<->

match any integer number.

+

start a new pattern group, for example, .chi$ + .dat$

/

set search path. An argument containing the / symbol -is taken as the search path, for example, data/ or -./. Each pattern group may provide its own search -path effective for that and any subsequent pattern group.

-

The ^$<> characters are often special to Unix or Windows -command shells, therefore they need to be enclosed in double -quotes (") when used on command line.

-
-

See also

-

tutorial on matching input files

-
-
-
-
--l, --list
-

List all input files and exit. This is useful with the ---find option to verify if input files -are matched as intended.

-
- -
-
-

Configuration file options

-
-
--c CONFIG, --config=CONFIG
-

Read custom configuration file after loading the default ones. -Do not load any configuration file when “NONE”.

-
- -
-
--s NAME, --section=NAME
-

Load the custom configuration file section [SectionName] after -loading the [DEFAULT] section. This is useful for creating -several configuration variants in a single configuration file.

-
- -
-
---createconfig=FILE
-

Write template configuration to a new FILE and exit. Write -to the standard output when FILE is “-“.

-
- -

See also the configuration file section -for further details.

-
-
-

Input and output options

-
-
-inputfile
-

This parameter allows to specify one or more input files in the -configuration file, one file per line. The inputfile -is only used if no input files were provided on the -pdfgetx3 or pdfgetn3 command line.

-
- -
-
-dataformat
-
- -
-
---format=FORMAT
-

Format of input files. Available formats are: twotheta, QA, -Qnm corresponding to a two-column text data where the first -column is either the scattering angle 2Θ in degrees, Q in -inverse ångströms or Q in inverse nanometers.

-
- -
-
-backgroundfile
-
- -
-
--b FILE, --background=FILE
-

Optional datafile with background intensities from an empty sample -holder. It must be in the same dataformat as other input files.

-
- -
-

Note

-

The following input is only used in sas mode.

-
-
-
-formfactorfile
-
- -
-
--ff FILE, --formfactorfile=FILE
-

Form factor intensities of the scatterers. This is required for sas mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1.

-
- -
-
-datapath
-
- -
-
--d DATAPATH, --datapath=DATAPATH
-

One or more extra directories to be searched for input or -background data files. The -d option can be specified -several times to add more directories, these are prepended in front -of any default value. Within configuration file the datapath -directories have to be listed each on a separate line.

-

A special value “NONE” (or “none”) clears any previously defined -paths and only the further paths, if any, would be searched for -inputs.

-
- -
-
-output
-
- -
-
--o OUTPUT, --output=OUTPUT
-

Output file name, write to the standard output when “-“. The --t, --outputtypes option controls what results are -being saved. Normally the OUTPUT is used as a custom basename for -the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o -tokens, which are expanded as follows:

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

token

example

definition

@h

dir1/dir2

the input file directory or “.”

@r

dir1/dir2/filename

the input path with extension removed

@e

dat

the input file extension without “.”

@t

filename.dat

the tail component of the input file

@b

filename

the tail component with extension removed

@o

gr

the output extension iq, sq, fq or gr

-

An empty value works the same as “@b.@o” and saves the data -in the current directory with a proper extension for the -saved results. When “@o” is not present in the OUTPUT, it is -appended as a default filename extension.

-
- -
-
-outputtypes
-
- -
-
--t TYPES, --outputtypes=TYPES
-

Result types to be saved, one or more comma separated values. -Supported values are “iq”, “sq”, “fq”, “gr”, corresponding to the -I(Q), S(Q), F(Q) and G(r) curves; these are also used as output -file extensions.

-

Result files are not written when empty, “none” or “NONE”.

-
- -
-
-force
-
- -
-
---force=FORCE
-

Overwrite existing output files. By default the output -files are not written if they already exist. Possible values -in a configuration file are “true”, “yes”, “on”, “1” or -“false”, “no”, “off”, “0” or “once”. The special value “once” -permits one overwrite and then resets config.force to -False. Note that in interactive mode the values assigned -to config.force are converted to Python bool -unless equal to “once”.

-
- -
-
-

PDF parameters

-
-
-mode
-
- -
-
---mode=STRING
-

The PDF conversion mode, i.e., the name of the -pdfgetter() setup. The available modes correspond -to the radiation type used in powder diffraction experiment and can -be “xray” or “neutron”.

-
- -
-
-wavelength
-
- -
-
--w FLOAT, --wavelength=FLOAT
-

X-ray wavelength in ångströms. This value is required -for the “twotheta” dataformat in order to convert the scattering -angles 2Θ to a momentum transfer Q. For other data formats -the wavelength is not necessary and may be left undefined.

-
- -
-
-twothetazero
-
- -
-
---twothetazero=FLOAT
-

Position of the zero scattering angle in diffractometer degrees. -This parameter corrects for a constant offset in the -measured 2Θ values. When loading configuration file -it is assumed 0 unless specified otherwise. This parameter -is only effective for the “twotheta” dataformat.

-
- -
-
-composition
-
- -
-
---composition=STRING
-

Chemical composition of the sample. Supported formats are -“PbTi0.5Zr0.5O3”, “Pb 1 Ti 1/2 Zr 1/2 O 3” or “CH3 (CH2)3 OH”. -Space characters are ignored, unit counts can be omitted, but it is -important to use a proper upper and lower case in atom symbols. -Elements can appear several times in the formula, e.g., “CH3 CH3”, -and the formula may contain parentheses or fractional -stoichiometries.

-
- -
-
-bgscale
-
- -
-
---bgscale=FLOAT
-

Scaling of the background intensities loaded from the -backgroundfile, by default 1.

-
- -
-
-rpoly
-
- -
-
---rpoly=FLOAT
-

r-limit for the maximum frequency in the F(Q) correction polynomial. -The PDF is unreliable at shorter r, however a -very small rpoly would disable polynomial correction and -give noisy PDF. -Larger values produce closer fits with a higher degree polynomial, -but when too large, they might smooth-out a useful signal in the -data. The default is 0.9.

-
- -
-
-qmaxinst
-
- -
-
---qmaxinst
-

The Q cutoff for the meaningful input intensities in inverse -ångströms. Some data files may contain trailing zeros -or unreliable intensities at the upper bound of the detector range. -The qmaxinst defines a threshold for unreliable data. -The parameter is also used as an upper boundary for the polynomial -fit correction of the S(Q) data.

-
- -
-
-qmin
-
- -
-
---qmin
-

The lower Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms.

-
- -
-
-qmax
-
- -
-
---qmax
-

The upper Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms. This is essentially a limit, where sample -signal decays to the level of data noise.

-
- -
-
-rmin
-
- -
-
---rmin=FLOAT
-

Lower bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rmax
-
- -
-
---rmax=FLOAT
-

Upper bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rstep
-
- -
-
---rstep=FLOAT
-

Spacing of the r-grid for the calculated PDF in ångströms.

-
- -
-
-

Other parameters

-
-
-plot
-
- -
-
--p TYPES, --plot=TYPES
-

Plot the specified results. A comma separated list with one or -more items from “iq”, “sq”, “fq”, “gr”. No plot is produced when -empty, “none” or “NONE”. Setting this option turns on the -interactive mode.

-
- -
-
-interact
-
- -
-
--i, --interact
-

Start an IPython interactive session after processing all files. -Useful for tuning the configuration parameters or interactive -plotting. This is always on when plot option has been set. -See also Interactive mode for further details.

-
- -
-
-verbose
-
- -
-
---verbose=VALUE
-

Level of detail for the program to report about its actions. -Possible values are “error”, “warning”, “info”, “debug”, “all” or an -integer number from 0 to 5. Messages are completely suppressed when -0, all messages are printed when verbose is 5 (“all”) or higher. -This option is useful for diagnostics of any unexpected behavior -in the program.

-
- -
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/pdfgetxn3-examples.zip b/static_root/doc/pdfgetx/2.1.1/pdfgetxn3-examples.zip deleted file mode 100755 index fbac94df..00000000 Binary files a/static_root/doc/pdfgetx/2.1.1/pdfgetxn3-examples.zip and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.1/plotdata.html b/static_root/doc/pdfgetx/2.1.1/plotdata.html deleted file mode 100644 index 18cdf0b2..00000000 --- a/static_root/doc/pdfgetx/2.1.1/plotdata.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - The plotdata program — diffpy.pdfgetx 2.1.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

The plotdata program

-

The PDFgetX3 software includes a simple stand-alone utility -plotdata for plotting text data files. In most cases -this program can be invoked from a command-shell as

-
plotdata file1.dat file2.dat
-
-
-

which plots the numerical data from the text files file1.dat, -file2.dat together in a single graph. By default the first -column is used as an x variable and the second column is used for the -y values. After displaying the plot the program starts an IPython -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the filenames variable -containing a list of plotted files. It also pre-loads the -plotdata() and findfiles() functions just as in PDFgetX3 -interactive session. The plotdata() -function works in a similar way as the plotdata program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -plotdata() function would be:

-
In [1]: plotdata(['file1.dat', 'file2.dat'])
-
-
-
-

Selecting files

-

The plotdata program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as *.dat. The file search feature is controlled by the -following options:

-
-
--f, --find
-

Use command line arguments as filename patterns and plot all matching -files. This option works in the same way as for -pdfgetx3, for full details see the -pdfgetx3 --find documentation. Note that -within command line the special patterns ^$<> need to be quoted -in double quotes (") so they are not processed by command shell.

-
- -
-
--l, --list
-

List the input files and exit. This is useful in conjunction -with the -f, --find option to check if data files -are selected as intended.

-
- -

Assuming the current directory contains 20 files named -file1.dat, file2.dat, …, file20.dat, -the plotting of files 9 to 13 could be done (with a check listing) -as follows

-
$ plotdata -fl "<9-13>.dat"
-file9.dat
-file10.dat
-file11.dat
-file12.dat
-file13.dat
-$ plotdata -f "<9-13>.dat"
-
-
-

Within an interactive IPython session the equivalent plot could be -produced by combining the plotdata() and findfiles() functions as

-
In [1]: plotdata(findfiles("<9-13>.dat"))
-
-
-
-
-

Selecting x and y data

-

The plotdata program provides several ways of selecting -columns for x or y data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is “0” -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function):

-
-
--x X
-

index or name of the x-column to plot. See the -y option -for the supported syntax, but note that X may select only one -column. When set to “.” use the data-row index for x.

-
- -
-
--y Y
-

index or name of the y-column or columns to plot. The Y column -specification can be a comma separated list of indices, column names -or Python-like ranges, for example “1,2”, “G”, “1:4” (START:STOP, -same as “1,2,3”), “1:4:2” (START:STOP:STEP, same as “1,3”), or -“-2:” (same as “-2,-1”, i.e, the last 2 columns). Because column -indexing starts at “0” the second column must be specified as “1”.

-

The column names work if the data section in the file is preceded by -a headline of unique column names, for example:

-
x     square      cube
-1     1           1
-2     4           8
-3     9           27
-4     16          64
-
-
-

For such data file the plotdata program will recognize column names -“x”, “square” and “cube” and an implicit “.” for row index.

-
- -
-
--s STYLE, --style=STYLE
-

optional plot format specification. See the -matplotlib.pyplot.plot() function -for a list of available formats.

-
- -
-
--L LOG, --log=LOG
-

axes to be plotted with logarithmic scaling, for example, “x”, “y” or -“xy”. Axes not listed in LOG will use linear scaling.

-
- -
-
--h, --help
-

display a brief usage info and exit.

-
- -
-
--V, --version
-

show program version and exit.

-
- -
-
---manual
-

Open this manual page in a Web browser and exit.

-
- -
-
-

Examples

-

The examples directory plotdata contains a sincos.dat -file that has 3-columns of values labeled as “x”, “sin” and “cos”. -Here are several examples of the plotdata capabilities -when used from command line - the user is encouraged to try them out:

-
plotdata sincos.dat
-plotdata -y 1,2 sincos.dat
-plotdata -x . -y 0:3 sincos.dat
-plotdata -y cos sincos.dat
-plotdata -x sin -y cos -sr-- sincos.dat
-
-
-

An equivalent usage from a general IPython session would be:

-
ipython --matplotlib=auto
-In [1]: from diffpy.pdfgetx.plotdata import plotdata
-In [2]: plotdata('sincos.dat')
-In [3]: plotdata('sincos.dat', y=[1,2])
-In [4]: plotdata('sincos.dat', x='.', y=':3')
-In [5]: plotdata('sincos.dat', y='cos')
-In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--')
-
-
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/quick-start.html b/static_root/doc/pdfgetx/2.1.1/quick-start.html deleted file mode 100644 index 123d446b..00000000 --- a/static_root/doc/pdfgetx/2.1.1/quick-start.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - Quick-start guide — diffpy.pdfgetx 2.1.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Quick-start guide

-

This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing pdfgetx3, pdfgetn3, or -pdfgets3 in a shell window. Please, refer to the installation section if this is not working yet.

-
-

pdfgetx3 command

-

The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as

-
pdfgetx3 [options] input1 input2 ... inputN
-
-
-

The inputN stands for an input powder diffraction data. The -inputN file is a simple two-column text file, where the first -column corresponds to either the 2Θ diffraction angle, or a -momentum transfer, Q, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -FIT2D program using -its “chi” output format, thus we will also refer to them as “chi-files”. -A typical content of a “chi” file looks as folows:

-
Pt_bulk-00055.tif: 2-theta Scan
-2-Theta Angle (Degrees)
-
-       1465
- 2.0003892E-02  0.0000000E+00
- 6.0011677E-02  0.0000000E+00
- 1.0001946E-01  0.0000000E+00
- 1.4002724E-01  0.0000000E+00
- 1.8003502E-01  0.0000000E+00
- ...
-
-
-

The command-line options are arguments that start with a dash “-” and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash --. Options may require values. For short options, -the value may be joined to the option string, for example --w0.142774, while for the long options it has to be separated -with an equal sign, e.g., --wavelength=0.142774. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the Options and parameters section of -this manual. A brief summary of options can be also displayed by -executing

-
pdfgetx3 --help
-
-
-

The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the Tutorial. -In general, the first step is to create a commented configuration file pdfgetx3.cfg using:

-
pdfgetx3 --createconfig=pdfgetx3.cfg
-
-
-

The configuration file can have any name, but it is preferable -to use either pdfgetx3.cfg or .pdfgetx3.cfg, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the -c, --config option.

-

Open the pdfgetx3.cfg file in a text editor. The lines that -start with a hash mark # are comments and are not used. The lines -starting with a right brace [ denote sections in the configuration -file. The active lines are all formatted as -“NAME=VALUE”. Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation:

-
    -
  • dataformat – specifies the input data format

  • -
  • wavelength – radiation wavelength in Å required for the -“twotheta” format.

  • -
  • composition – chemical composition of the sample

  • -
  • qmaxinst – upper Q boundary for a meaningful measurement -intensities.

  • -
  • qmaxQ-cutoff for the Fourier transformation that -yields the PDF.

  • -
-

Save the updated configuration file and run pdfgetx3 on the input data -FILENAME.chi as

-
pdfgetx3 --verbose=info -t gr FILENAME.chi
-
-
-

Here the --verbose=info option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The -t gr option -tells the program to save the final G(r) curve as a -FILENAME.gr file in the working directory.

-

The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation

-
pdfgetx3 -c FILENAME.gr --plot=fq,gr
-
-
-

Note this command does not include any .chi file and this will as -a result process the previously used input FILENAME.chi. -The --plot=fq,gr option tells PDFgetX3 to -display 2 plots for the reduced structure function F(Q) and the -final PDF G(r). The --plot option also implies an -interactive mode -therefore the program does not exit, but starts an -interactive IPython session. To exit the interactive mode, -type exit() and press Enter.

-
-
-

pdfgetn3 command

-

The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the ---mode option. Running pdfgetn3 is nearly identical -to executing pdfgetx3 --mode=neutron. The only difference between -these commands is that pdfgetx3 checks for configuration files -pdfgetx3.cfg and .pdfgetx3.cfg, whereas -pdfgetn3 looks for pdfgetn3.cfg and .pdfgetn3.cfg.

-
-
-

pdfgets3 command

-

The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying mode = sas in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named pdfgets3.cfg and -.pdfgets3.cfg in order, when no configuration file is specified.

-

Please refer to the tutorial section for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3.

-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/release.html b/static_root/doc/pdfgetx/2.1.1/release.html deleted file mode 100644 index 4ad9f190..00000000 --- a/static_root/doc/pdfgetx/2.1.1/release.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - Release notes — diffpy.pdfgetx 2.1.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Release notes

-
-

Version 2.1.1 - 2020-09-01

-
-

Added

-
    -
  • Support for Python 3.8

  • -
-
-
-
-

Version 2.1.0 – 2020-07-15

-
-

Added

-
    -
  • New mode sas for processing Small Angle Scattering data and -for using custom scattering factors.

  • -
  • qmax-pushes-qmin coupling of sliders in the tuneconfig tool.

  • -
  • New program pdfgets3 and IPython magic %pdfgets3.

  • -
-
-
-

Changed

-
    -
  • Software distribution format to a universal Python wheel.

  • -
  • tuneconfig dialog to access full Q-range with all qmin, qmax, and -qmaxinst sliders. Increased range for the rpoly slider.

  • -
-
-
-

Deprecated

-
    -
  • Software distribution in setuptools egg package.

  • -
-
-
-

Removed

-
    -
  • Support for Python 3.4.

  • -
-
-
-

Fixed

-
    -
  • Support backslash in the --find option path argument on Windows. -Both forward and back slashes are allowed on Windows, but other -platforms must use forward slash.

  • -
  • Recipe for platform-dependent Anaconda package.

  • -
  • Bogus test failure when installed in symlinked directory.

  • -
-
-
-
-

Version 2.0.0 – 2018-11-02

-
-

Added

-
    -
  • New mode neutron for processing constant-wavelength -neutron scattering data.

  • -
  • Correction for an offset of diffractometer zero angle.

  • -
  • Configuration parameter twothetazero and command-line option ---twothetazero for position of the actual zero angle -in diffractometer degrees.

  • -
  • New program pdfgetn3 and IPython magic %pdfgetn3.

  • -
  • Separate configuration file pdfgetn3.cfg for the pdfgetn3 program.

  • -
  • New sub-package diffpy.pdfgetx.apps for entry points to all programs.

  • -
  • Table of electron scattering factors from E. J. Kirkland, -Advanced Computing in Electron Microscopy.

  • -
  • The + operator for additive pattern groups when matching input files -with pdfgetx3 --find.

  • -
  • An optional slash-containing entry, e.g., dir/, to set the search path -for pdfgetx3 --find. Each pattern group may have one path entry which -affects the current and subsequent pattern groups. Pattern groups that -have only the path entry reuse the previous file patterns, for example, -dir1/ .dat$ + dir2/ + dir3/.

  • -
  • The dotfiles flag argument to functs.findfiles to also find -dot-starting files without an explicit pattern.

  • -
  • Support for Python 3.7.

  • -
  • Tutorial examples for constant-wavelength neutron diffraction data.

  • -
-
-
-

Changed

-
    -
  • Initialization arguments of PDFConfig to set initial configuration values.

  • -
  • path argument of functs.findfiles to give one search path instead -of a list of paths.

  • -
  • pdfgetx3 --find to search only the current directory and stop searching -in --datapath.

  • -
  • Improved PDF accuracy by removing repeated Q-grid interpolation.

  • -
  • Handling of dot files by pdfgetx3 --find and the functs.findfiles -function. The dotfiles are by default ignored unless explicitly selected -by a "^." pattern.

  • -
  • Return type of functs.findfiles from IPython SList to a simple list.

  • -
  • Rename camel case interactive functions to lowercase, i.e., to loaddata, -processfiles, clearsession.

  • -
  • Use config.datapath lookup in processfiles(filename).

  • -
-
-
-

Deprecated

-
    -
  • Function cromermann.felectronatq for electron scattering -factors calculation using Mott-Bethe approximate formula.

  • -
  • IPython extension module diffpy.pdfgetx.ipy_pdfgetx3. -Use diffpy.pdfgetx.ipy_magics instead.

  • -
  • Camel case functions loadData, processFiles, clearSession.

  • -
-
-
-

Removed

-
    -
  • Support for Python 2.6.

  • -
  • Processing of environment variable PDFGETX3PATH.

  • -
  • Support for IPython 0.x.

  • -
  • Obsolete variable __gitsha__ from the version module.

  • -
  • Processing of command line options in PDFConfig class.

  • -
  • Implicit loading of configuration files in PDFConfig instantiation.

  • -
-
-
-

Fixed

-
    -
  • Import of all objects from matplotlib.pyplot into -an interactive session started by plotdata.

  • -
  • Inaccurate G interpolation when rstep is comparable to pi / qmax.

  • -
  • Lone anchor patterns ^, $ to match everything.

  • -
-
-
-
-

Version 1.2 – 2018-01-12

-
-

Added

-
    -
  • Support for Python 3.4, 3.5, 3.6 in addition to Python 2.6 and 2.7.

  • -
  • Support for IPython 5.0 with preserved -compatibility with IPython 0.10 and later.

  • -
  • Support for matplotlib 2.0.

  • -
  • New option --log=LOG for the plotdata program to set logarithmic -scale for either of x or y axis. The plotdata() function learnt -a new log argument with the same purpose.

  • -
  • New argument ax for the plotdata() function that select a specific -matplotlib axis for plotting.

  • -
  • Support for Unicode filenames and values in the config -interactive variable.

  • -
  • Processing of parentheses and fractional stoichiometries in chemical -formulas as in Pb (Ti Zr)1/2 O3.

  • -
  • Explanatory error message when PDFgetX3 was installed for -unsupported Python.

  • -
-
-
-

Changed

-
    -
  • The egg package file was enhanced to support all Python -versions. The software is now distributed in a single -egg rather than multiple eggs per each Python version.

  • -
  • PDFgetX3 option --force to take a boolean argument -(yes, no, true, etc.) or once. The configuration -parameter force can be likewise set to a bool or to -a string "once". This enables a safer one-time -overwrite of existing output files.

  • -
  • Plot labels to use a proper Unicode “Å” (Ångström) symbols. -The “Å” symbol is also used within units in output files.

  • -
  • The usecols argument of the loadData() function to also -accept scalars, open-end slice objects and string-denoted -slices such as "1:3" or "1:".

  • -
  • The plotdata program and plotdata() function to accept -open-end slices for the y-columns selection.

  • -
  • The IPython magic function %pdfgetx3 to set the _exit_code -variable as do generic shell commands run from IPython.

  • -
  • Inline documentation to use NumPy-style Napoleon format, -which is human readable and can be included in the manual.

  • -
  • Release scripts to build software package bundles and -documentation in binary-reproducible way.

  • -
-
-
-

Deprecated

-
    -
  • Compatibility with Python 2.6.

  • -
  • Support for IPython 0.x.

  • -
  • Variable __gitsha__ in the version module which was renamed -to __git_commit__.

  • -
-
-
-

Removed

-
    -
  • The hold argument of the plotdata() function, -because it was deprecated in matplotlib.

  • -
  • Support for multiple x-columns in plotdata program and -plotdata() function.

  • -
  • Import of all objects from numpy module into the interactive -session. NumPy is available under the np name instead.

  • -
-
-
-

Fixed

-
    -
  • Avoid duplicate “.gr.gr” extension when pdfgetx3 is run -with option --output=f.gr.

  • -
  • Crash on loading custom configuration section from a local -file, when that section is missing in global configuration.

  • -
  • Missing checkbox in the tuneconfig dialog caused by matplotlib bug.

  • -
-
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/search.html b/static_root/doc/pdfgetx/2.1.1/search.html deleted file mode 100644 index 3539d9cc..00000000 --- a/static_root/doc/pdfgetx/2.1.1/search.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - Search — diffpy.pdfgetx 2.1.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -

Search

-
- -

- Please activate JavaScript to enable the search - functionality. -

-
-

- From here you can search these documents. Enter your search - words into the box below and click "search". Note that the search - function will automatically search for all of the words. Pages - containing fewer words won't appear in the result list. -

-
- - - -
- -
- -
- -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/searchindex.js b/static_root/doc/pdfgetx/2.1.1/searchindex.js deleted file mode 100644 index 2b69cc89..00000000 --- a/static_root/doc/pdfgetx/2.1.1/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({docnames:["files","index","install","interact","intro","options","plotdata","quick-start","release","tutorial"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.index":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,sphinx:56},filenames:["files.rst","index.rst","install.rst","interact.rst","intro.rst","options.rst","plotdata.rst","quick-start.rst","release.rst","tutorial.rst"],objects:{"":{backgroundfile:[5,1,1,"-"],bgscale:[5,1,1,"-"],composition:[5,1,1,"-"],config:[3,2,1,"-"],dataformat:[5,1,1,"-"],datapath:[5,1,1,"-"],force:[5,1,1,"-"],formfactorfile:[5,1,1,"-"],fq:[3,2,1,"-"],gr:[3,2,1,"-"],inputfile:[5,1,1,"-"],interact:[5,1,1,"-"],iq:[3,2,1,"-"],iraw:[3,2,1,"-"],mode:[5,1,1,"-"],output:[5,1,1,"-"],outputtypes:[5,1,1,"-"],plot:[5,1,1,"-"],qmax:[5,1,1,"-"],qmaxinst:[5,1,1,"-"],qmin:[5,1,1,"-"],rmax:[5,1,1,"-"],rmin:[5,1,1,"-"],rpoly:[5,1,1,"-"],rstep:[5,1,1,"-"],sq:[3,2,1,"-"],twothetazero:[5,1,1,"-"],verbose:[5,1,1,"-"],wavelength:[5,1,1,"-"]},"diffpy.pdfgetx":{findfiles:[3,0,1,""],loaddata:[3,0,1,""]},"diffpy.pdfgetx.plotdata":{plotdata:[3,0,1,""]},_interactive_:{clearsession:[3,0,1,""],pdfgetter:[3,0,1,""],processfiles:[3,0,1,""],tuneconfig:[3,0,1,""]},pdfgetx3:{"--background":[5,3,1,"cmdoption-pdfgetx3-b"],"--bgscale":[5,3,1,"cmdoption-pdfgetx3-bgscale"],"--composition":[5,3,1,"cmdoption-pdfgetx3-composition"],"--config":[5,3,1,"cmdoption-pdfgetx3-c"],"--createconfig":[5,3,1,"cmdoption-pdfgetx3-createconfig"],"--datapath":[5,3,1,"cmdoption-pdfgetx3-d"],"--find":[5,3,1,"cmdoption-pdfgetx3-f"],"--force":[5,3,1,"cmdoption-pdfgetx3-force"],"--format":[5,3,1,"cmdoption-pdfgetx3-format"],"--formfactorfile":[5,3,1,"cmdoption-pdfgetx3-ff"],"--help":[5,3,1,"cmdoption-pdfgetx3-h"],"--interact":[5,3,1,"cmdoption-pdfgetx3-i"],"--list":[5,3,1,"cmdoption-pdfgetx3-l"],"--manual":[5,3,1,"cmdoption-pdfgetx3-manual"],"--mode":[5,3,1,"cmdoption-pdfgetx3-mode"],"--output":[5,3,1,"cmdoption-pdfgetx3-o"],"--outputtypes":[5,3,1,"cmdoption-pdfgetx3-t"],"--plot":[5,3,1,"cmdoption-pdfgetx3-p"],"--qmax":[5,3,1,"cmdoption-pdfgetx3-qmax"],"--qmaxinst":[5,3,1,"cmdoption-pdfgetx3-qmaxinst"],"--qmin":[5,3,1,"cmdoption-pdfgetx3-qmin"],"--rmax":[5,3,1,"cmdoption-pdfgetx3-rmax"],"--rmin":[5,3,1,"cmdoption-pdfgetx3-rmin"],"--rpoly":[5,3,1,"cmdoption-pdfgetx3-rpoly"],"--rstep":[5,3,1,"cmdoption-pdfgetx3-rstep"],"--section":[5,3,1,"cmdoption-pdfgetx3-s"],"--twothetazero":[5,3,1,"cmdoption-pdfgetx3-twothetazero"],"--verbose":[5,3,1,"cmdoption-pdfgetx3-verbose"],"--version":[5,3,1,"cmdoption-pdfgetx3-v"],"--wavelength":[5,3,1,"cmdoption-pdfgetx3-w"],"-V":[5,3,1,"cmdoption-pdfgetx3-v"],"-b":[5,3,1,"cmdoption-pdfgetx3-b"],"-c":[5,3,1,"cmdoption-pdfgetx3-c"],"-d":[5,3,1,"cmdoption-pdfgetx3-d"],"-f":[5,3,1,"cmdoption-pdfgetx3-f"],"-ff":[5,3,1,"cmdoption-pdfgetx3-ff"],"-h":[5,3,1,"cmdoption-pdfgetx3-h"],"-i":[5,3,1,"cmdoption-pdfgetx3-i"],"-l":[5,3,1,"cmdoption-pdfgetx3-l"],"-o":[5,3,1,"cmdoption-pdfgetx3-o"],"-p":[5,3,1,"cmdoption-pdfgetx3-p"],"-s":[5,3,1,"cmdoption-pdfgetx3-s"],"-t":[5,3,1,"cmdoption-pdfgetx3-t"],"-w":[5,3,1,"cmdoption-pdfgetx3-w"]},plotdata:{"--find":[6,3,1,"cmdoption-plotdata-f"],"--help":[6,3,1,"cmdoption-plotdata-h"],"--list":[6,3,1,"cmdoption-plotdata-l"],"--log":[6,3,1,"cmdoption-plotdata-log"],"--manual":[6,3,1,"cmdoption-plotdata-manual"],"--style":[6,3,1,"cmdoption-plotdata-s"],"--version":[6,3,1,"cmdoption-plotdata-v"],"-L":[6,3,1,"cmdoption-plotdata-log"],"-V":[6,3,1,"cmdoption-plotdata-v"],"-f":[6,3,1,"cmdoption-plotdata-f"],"-h":[6,3,1,"cmdoption-plotdata-h"],"-l":[6,3,1,"cmdoption-plotdata-l"],"-s":[6,3,1,"cmdoption-plotdata-s"],"-x":[6,3,1,"cmdoption-plotdata-x"],"-y":[6,3,1,"cmdoption-plotdata-y"]}},objnames:{"0":["py","function","Python function"],"1":["std","confval","configuration value"],"2":["std","interactvar","interactive variable"],"3":["std","cmdoption","program option"]},objtypes:{"0":"py:function","1":"std:confval","2":"std:interactvar","3":"std:cmdoption"},terms:{"0000000e":7,"0001946e":7,"0003892e":7,"0011677e":7,"00903_qmax18":9,"0x3e20f50":9,"4002724e":7,"5o3":5,"5zr0":5,"6id":9,"8003502e":7,"\u00e5ngstr\u00f6m":[0,5,7,8],"\u03b1":9,"boolean":8,"break":9,"case":[5,6,8,9],"class":[3,8],"default":[0,3,5,6,7,8,9],"final":[2,5,7,9],"float":[3,5],"function":[0,3,4,6,7,8,9],"import":[3,5,6,8,9],"int":3,"juh\u00e1":4,"long":[0,7],"new":[3,4,5,8,9],"public":4,"return":[3,8],"short":7,"true":[3,5,8,9],"try":[6,9],"while":[0,2,7,9],Axes:[3,6],For:[2,3,4,5,6,7,9],One:[3,5,9],SAS:[4,7],Such:9,The:[0,1,2,3,4,5,7,8,9],Then:2,There:[2,9],These:[2,3],Use:[3,4,6,8,9],Useful:5,With:9,__git_commit__:8,__gitsha__:8,_exit_cod:8,_qmax18:9,abbrevi:9,abil:9,about:[5,7,9],abov:[2,3,9],accept:[0,8,9],access:[0,2,8],accomplish:[2,9],accord:3,accur:9,accuraci:8,acknowledg:4,action:[5,9],activ:[0,2,3,7,9],actual:[0,2,8],add:[2,5,9],added:3,adding:3,addit:[0,2,3,4,5,8,9],adjust:[4,9],advanc:[8,9],affect:[8,9],after:[0,5,6,9],again:[3,9],agre:2,agreement:4,al2o3:9,all:[0,2,3,5,6,7,8,9],allow:[3,4,5,6,8,9],alon:6,alreadi:[2,5,9],also:[0,2,3,4,5,6,7,8,9],altern:2,although:7,alwai:5,anaconda:[2,8,9],analysi:4,anchor:8,angl:[0,1,4,5,7,8],angular:9,ani:[0,2,3,4,5,7,9],anoth:[2,9],anticip:4,anywher:9,apart:7,app:8,appear:[5,9],append:5,appl:4,appli:[0,3,9],applic:7,approxim:[8,9],apt:2,arbitrari:9,area:9,argument:[0,2,3,5,6,7,8,9],arrai:3,ask:4,assembl:[4,9],assess:9,assign:[3,5,7],assum:[5,6,7],atom:[4,5],attempt:0,attribut:[3,5,9],au_dna_ff:9,au_dna_npa:9,author:1,auto:6,automat:[4,7,9],avail:[2,5,6,8,9],averag:[0,9],avoid:[8,9],axes:[3,6,9],axeslist:[3,9],axi:[3,8,9],b_qmax18:9,back:8,background:[0,5,9],backgroundfil:[0,5,9],backslash:8,base:[3,9],basenam:5,batch:4,beamlin:9,becaus:[3,6,8,9],been:[5,7,9],begin:[3,5,9],behavior:[5,7],being:[5,7,9],below:9,best:7,beth:8,better:9,between:7,bgscale:[5,9],billing:4,binari:8,block:3,blue:9,bogu:8,bool:[3,5,8],both:[3,7,8,9],bound:[5,9],boundari:[5,7,9],box:9,brace:7,breakpoint:9,brief:[5,6,7],brookhaven:4,browser:[5,6],bug:8,build:8,built:9,bulk:9,bundl:[4,8],button:9,calcul:[0,3,5,7,8,9],calibr:9,call:[3,6,9],callabl:3,camel:8,can:[0,2,3,4,5,6,7,8,9],cannot:[6,9],canopi:2,cap:9,capabl:[6,7],capillari:9,catio3:5,caus:[8,9],cell:9,cfg:[0,7,8,9],ch2:5,ch3:5,chain:9,chang:[0,3,9],charact:[3,5,7,9],check:[0,2,6,7,9],checkbox:8,chemic:[0,5,7,8,9],chi:[5,7,9],chia:4,choos:2,christoph:4,circl:9,cite:4,citi:4,clear:[3,5,9],clearsess:[3,8,9],clf:9,click:9,close:9,closer:5,cmi:9,code:[2,4,9],colloid:9,columbia:[2,4,9],column:[0,2,3,5,6,7,8,9],combin:6,comma:[3,5,6,9],command:[0,1,3,4,5,6,8,9],comment:[0,7],compar:[8,9],compat:[2,8],complain:9,complet:[5,9],compon:5,composit:[0,5,7,9],comprehens:2,comput:[2,8],conda:[2,9],conduct:9,config:[0,3,5,7,8,9],config_neutron:9,config_sa:9,config_xrai:9,configfil:9,configsect:9,configur:[1,3,7,8],confirm:9,conjunct:6,consid:3,consist:7,constant:[3,4,5,8,9],contact:4,contain:[0,2,3,5,6,7,8,9],content:[0,7,9],continu:9,control:[4,5,6,9],conveni:[2,3,6,7],convent:6,convers:[2,5],convert:[3,4,5,9],copyright:4,correct:[0,4,5,8,9],correctli:[2,7,9],correspond:[0,3,5,7,9],cos:6,could:6,count:5,counterpart:7,coupl:8,cours:2,cover:[5,9],crash:8,creat:[0,2,3,5,7,9],createconfig:[0,5,7],critic:[2,7],cromermann:8,crystallogr:4,cube:6,current:[0,3,5,6,8,9],curv:[5,7,9],custom:[2,4,5,8,9],cutoff:[5,7,9],dash:[5,7],dat:[5,6,8,9],data:[0,1,2,3,4,5,7,8],datafil:[3,5],dataformat:[0,3,5,7,9],datapath:[0,5,8,9],davi:4,debug:5,decai:5,dedic:9,defin:[0,2,3,5,7,9],definit:5,degre:[0,5,7,8,9],delft:9,demonstr:[7,9],denot:[7,8],depend:[2,3,8],der:9,describ:[7,9],descript:[5,7],design:9,desir:[2,3,9],detail:[5,6,9],detector:[5,9],diagnost:5,dialog:[3,8,9],did:9,differ:[0,2,5,7,9],difficult:9,diffpi:[2,3,4,6,8,9],diffract:[0,3,4,5,7,8,9],diffractomet:[5,8,9],dir1:[5,8],dir2:[5,8],dir3:8,dir:[3,8],directoi:9,directori:[0,2,3,5,6,7,8,9],disabl:5,discuss:9,disk:3,displai:[2,3,5,6,7,9],distribut:[2,4,8,9],dna:9,doc:9,document:[6,7,8,9],doe:[2,3,7,9],don:[2,4],done:[6,9],dot:8,dotfil:[3,8],doubl:[5,6,7],download:2,driven:[2,9],drop:9,duplic:8,dynam:9,each:[0,3,5,8,9],easi:[2,9],easiest:[0,2],easy_instal:2,editor:[0,2,7],edu:4,effect:[3,4,5,9],egg:[2,8],eijck:4,either:[0,3,5,7,8,9],elaps:9,electron:8,element:[3,5,9],email:4,employ:4,empti:[3,5,9],empty_capillari:9,enabl:[7,8],enclos:5,encount:9,encourag:6,end:[3,5,8,9],engin:2,enhanc:[2,8],enough:3,enter:[7,9],enthought:2,entir:3,entri:[3,5,8,9],environ:[2,8,9],equal:[0,3,5,7,9],equival:6,error:[5,8,9],essenti:[5,9],etc:[3,8],even:9,everi:5,everyth:8,exact:9,exampl:[0,1,2,3,5,7,8,9],except:[0,9],execut:[2,7,9],exist:[2,5,8,9],exit:[5,6,7,9],expand:[5,9],expans:6,expect:[5,9],experi:5,experiment:9,explanatori:8,explicit:8,explicitli:[3,5,7,8],extens:[2,5,8,9],extra:[2,3,5,9],extract:[1,4,9],f007:5,f2avg:5,f77:5,faction:9,factor:[0,5,7,8,9],failur:8,fals:[3,5],familiar:7,farrow:4,fashion:[2,7],fast:9,favg2:5,favorit:0,featur:[6,9],felectronatq:8,few:[0,7,9],fft:9,fig:9,figur:9,file10:6,file11:6,file12:6,file13:6,file1:6,file20:6,file2:6,file9:6,file:[1,2,3,4,7,8],filenam:[0,2,3,5,6,7,8,9],find:[0,2,3,5,6,8,9],findfil:[3,6,8,9],finish:9,first:[0,2,3,5,6,7,9],fit2d:7,fit:[0,1,5],fix:5,flag:[8,9],fledg:9,flexibl:5,folder:9,follow:[0,2,4,5,6,9],folow:7,forc:[3,5,8,9],form:[0,5,7,9],format:[2,3,5,6,7,8],formfactorfil:[5,9],formula:[5,8],forward:[8,9],found:[0,2,9],four:0,fourier:[5,7],fraction:[5,8],frequenc:5,fresh:9,from:[0,2,3,4,5,6,7,8],front:5,full:[6,8,9],funct:8,further:5,gang:[4,9],gca:3,gener:[0,3,6,7,8,9],get:[2,7,9],gettransform:9,give:[5,8],given:9,global:[0,8],going:9,good:9,grant:4,graph:[6,9],greater:3,green:9,grid:[0,5,8,9],group:[3,4,5,8,9],gui:[2,3,9],guid:1,handl:[8,9],hao:4,happen:9,has:[0,3,5,6,7,9],hash:7,have:[0,2,3,5,7,8,9],header:[0,3,7,9],headlin:6,help:[5,6,7,9],here:[2,5,6,7,9],hidden:3,higher:[3,5],highli:4,hint:9,hoc:4,hold:8,holder:5,home:[0,9],how:9,howev:[5,9],http:[2,9],human:8,hundr:9,hung:4,ident:7,identifi:[0,9],ignor:[0,3,5,7,8,9],illustr:9,immedi:9,impli:[7,9],implicit:[6,8],improv:8,inaccur:[8,9],includ:[2,3,4,6,7,8,9],inclus:[3,5],increas:8,inde:7,indent:2,index:[1,2,3,6,9],indic:[3,6,9],info:[5,6,7,9],inform:[4,5,7],initi:[3,6,8],inlin:8,input1:7,input2:7,input:[1,3,6,7,8],inputfil:[0,3,5,9],inputn:7,instal:[1,7,8,9],instanc:3,instanti:8,instead:[2,6,7,8],instruct:[2,9],instrument:9,integ:[3,5,6,9],integr:2,intend:[2,5,6,7,9],intens:[0,3,5,7,9],intensity1:3,intensity2:3,interact:[1,2,4,5,6,7,8],interactiveshellapp:2,intermedi:[3,4,9],internet:2,interpol:8,interpret:[2,5],intervent:4,introduct:1,invers:[0,5,7],invok:6,involv:9,ipy_mag:[2,8],ipy_pdfgetx3:8,ipynb:9,ipython3:2,ipython:[1,3,5,6,7,8,9],ipython_config:2,iraw:[3,9],issu:9,item:[3,5],iter:3,its:[5,6,7,9],itself:0,jank:4,join:7,jupyt:9,just:[0,6,9],kapton_bgrd_300k_nor_2:9,keep:[3,6],keyword:[3,9],kirkland:8,know:4,known:9,kwarg:3,label:[6,8],laboratori:4,lack:9,languag:2,larg:[5,6,9],larger:5,last:[3,5,6,9],later:8,lead:[2,3,4,5,7],learnt:8,least:3,left:5,legend:9,leli:9,let:9,level:[3,5],librari:[2,4],licens:1,like:[2,6,9],likewis:8,limit:5,line2d:[3,9],line:[0,2,3,4,5,6,7,8,9],linear:[3,6],linux:[2,9],list:[3,5,6,8,9],liu:4,live:9,load:[3,5,6,7,8,9],loaddata:[3,8,9],loadtxt:3,loc:9,local:8,locat:0,log:[3,6,8],logarithm:[3,6,8],lone:8,look:[3,7,9],lookup:8,louwen:4,low:[3,9],lower:[5,9],lowercas:8,mac:[2,9],made:9,magic:[1,8],mai:[0,2,3,5,6,7,8,9],make:[5,7,9],manag:2,mandatori:0,mani:7,manipul:9,manual:[1,5,6,7,8],mark:[0,7],marker:6,match:[2,3,5,6,8],materi:9,matplotlib:[2,3,6,8,9],matric:3,matrix:[3,9],max:9,maximum:[5,9],may:9,mean:9,meaning:[5,7,9],measur:[0,5,7,9],member:4,memori:3,mention:9,messag:[5,8,9],metadata:[0,7],method:[3,9],microscopi:8,might:5,mind:6,minimum:3,minrow:3,misc:3,miss:8,mode:[1,2,4,5,7,8,9],modifi:[6,7],modul:[3,8],momentum:[0,5,7,9],more:[2,3,4,5,7,9],most:[0,3,6,9],mott:8,move:9,multipl:[0,8],must:[0,2,3,4,5,6,7,8],nacl:0,name:[0,2,3,5,6,7,8],nanomet:[0,5,7],nanoparticl:[4,9],napoleon:8,nation:4,natur:9,navig:[2,9],nbcmi:9,ndarrai:3,nearli:7,necessari:[2,3,5,9],need:[0,2,5,6,9],neg:3,neutron:[1,4,5,7,8],next:[2,9],ni300mesh_300k_nor_1:9,nickel:1,nicmd:9,nois:5,noisi:[5,9],non:[3,9],none:[3,5,9],nonzero:9,normal:[0,5,9],notabl:9,note:[1,3,5,6,7,9],notebook:9,noth:9,notic:[1,9],now:[8,9],nsl:9,number:[3,5,9],numer:[0,6,9],numpi:[2,3,8],nykypanchuk:9,object:[3,5,8,9],obsolet:8,obtain:[2,9],off:5,offset:[5,8,9],often:[5,7],older:2,oleg:9,omit:5,onc:[0,2,3,5,8,9],one:[2,3,5,6,8,9],ones:5,onli:[0,3,4,5,6,7,8,9],open:[2,5,6,7,8,9],oper:[1,2,6,7,8],optimum:4,option:[0,1,2,3,6,7,8,9],order:[5,7],org:[2,9],orient:2,origin:9,oscil:9,other:[0,1,2,3,7,8,9],otherwis:[2,5],out:[5,6,9],outpufil:9,output:[1,3,7,8],outputtyp:[0,5,9],outsid:9,overal:9,overlap:[5,9],overrul:9,overwrit:[5,8,9],own:[5,9],packag:[1,2,8],page:[1,6],pair:[3,4],paper:4,paragraph:2,paramet:[0,1,3,4,7,8],parent:9,parenthes:[5,8],pars:9,part:[2,9],parti:[2,4],pass:[0,3,6,7,9],path:[0,2,3,5,8],pattern:[0,3,5,6,8,9],pavol:4,pbti0:5,pdf:[1,2,3,4,7,8],pdfconfig:[3,8],pdfgetn3:[0,1,2,3,4,5,8,9],pdfgets3:[1,2,4,5,8,9],pdfgetter:[3,5,9],pdfgetx2:[3,9],pdfgetx3:[0,1,2,3,4,5,6,8,9],pdfgetx3path:8,pdfgetx:[2,3,4,6,8,9],pdfgetx_env:2,pdfgetxn3:9,pearl:9,per:[0,5,6,8,9],perform:3,perman:2,permit:[4,5],photon:9,pip:[2,9],place:[2,9],plain:5,plan:2,platform:[8,9],platinum:1,pleas:[4,7],plot:[2,3,4,5,6,7,8,9],plotdata:[1,2,3,8,9],plotid:3,plotpdfcomparison:9,point:[3,8,9],polynomi:[0,5,9],pop:9,posit:[5,8],possibl:5,powder:[0,3,4,5,7,9],power:[4,9],pre:[3,6],preced:[3,5,6,7],prefer:7,prefix:2,preload:9,prepend:[2,5],prerequisit:9,present:[5,7,9],preserv:[2,8],press:7,previou:[0,3,8],previous:[5,7],print:[3,5,7,9],privileg:2,problem:9,procedur:9,process:[0,2,3,4,5,6,7,8],processfil:[3,8,9],produc:[0,3,5,6,9],prof:[4,9],profil:2,profile_default:2,program:[0,1,2,3,4,7,8,9],prohibit:4,prompt:[2,6,9],proper:[5,8],protocol:9,provid:[0,2,5,6,9],pt_bulk:[7,9],pt_bulk_ramp03:9,publish:9,purpos:8,push:8,put:9,pyplot:[3,6,8],python37:2,python3:2,python:[1,2,4,5,6,8,9],pythonxi:2,qmax:[3,5,7,8,9],qmaxinst:[5,7,8,9],qmin:[5,8,9],qnm:5,qualiti:9,quick:1,quot:[5,6,9],radiat:[5,7],rai:[1,4,5,7],rang:[3,5,6,8,9],rapid:4,rather:8,raw:[3,9],read:[0,3,5],readabl:8,reason:9,recalcul:9,recip:8,recogn:[6,9],recommend:[2,9],red:9,redo:[7,9],reduc:[0,7,9],refer:[1,3,7,9],referenc:7,refin:9,regular:[0,9],rel:9,relat:[3,7,9],releas:[1,2],reliabl:9,remark:9,remov:[5,9],renam:8,repeat:[5,8],replac:[2,9],report:5,repositori:2,reproduc:[0,8],requir:[1,5,7,9],resampl:9,rescal:9,research:4,reset:[3,5,9],residu:9,resolv:9,respect:[3,4,7,9],result:[0,3,4,5,7,9],reus:[3,5,8,9],right:7,rmax:[5,9],rmin:[5,9],root:2,round:9,row:[3,6,9],rpoli:[5,8,9],rstep:[5,8,9],run:[2,4,7,8,9],safe:[2,9],safer:8,safeti:9,same:[0,2,3,5,6,7,8,9],sampl:[0,5,7,9],sapphir:9,sapphire755:9,sas:[5,7,8,9],saspdf:[1,4],satisfi:3,save:[3,5,6,7,9],sb2896:4,scalar:8,scale:[3,5,6,8,9],scan:[7,9],scatter:[0,1,3,4,5,7,8],scienc:2,scientif:[2,4],screen:9,script:[2,4,8],search:[0,1,2,3,5,6,7,8],second:[0,3,6,7,9],section:[0,2,5,6,7,8,9],sectionnam:[0,5],see:[2,5,6,9],seem:3,select:[0,1,3,5,8,9],selector:3,self:9,separ:[0,3,4,5,6,7,8,9],septemb:1,sequenc:3,sequenti:3,seri:[1,4],serv:3,session:[2,3,5,6,7,8,9],set:[0,2,3,5,6,7,8,9],setup:[5,9],setuptool:[2,8],sever:[0,3,5,6,9],shall:9,shape:9,share:[0,9],shell:[2,3,5,6,7,8,9],shortcut:9,shorter:5,should:[0,2,3,9],show:[3,6,9],side:9,sign:7,signal:5,similar:[2,6,7,9],simon:4,simpl:[0,4,6,7,8,9],simul:9,sin:6,sinc:9,sinco:6,sine:3,singl:[2,3,5,6,7,8,9],six:2,skip:[2,3],slash:[8,9],slice:[3,8],slider:[8,9],slightli:9,slist:8,small:[1,4,5,7,8],smaller:5,smooth:5,softwar:[1,4,6,7,8,9],solid:0,solut:9,some:[2,5,9],songsheng:4,sourc:9,space:[0,5],special:[3,5,6,9],specif:[2,6,8,9],specifi:[0,3,5,6,7,9],specimen:5,spectra:9,split:3,squar:6,stai:9,stand:[6,7],standard:[2,5,9],start:[0,1,2,3,5,6,8,9],state:9,statement:[5,9],step:[2,6,7,9],still:9,stoichiometri:[5,8],stop:[6,8],store:[3,9],str:3,string:[2,3,5,7,8,9],strip:9,structur:[0,7],style:[3,6,8],sub:8,subdirectori:9,subfold:9,subject:4,subplot:[3,9],subsequ:[3,5,8,9],substr:9,subtract:9,successfulli:9,sudden:9,sudo:2,suffici:3,suffix:9,suitabl:9,summari:7,suppli:7,support:[0,2,3,5,6,8],suppress:5,symbol:[3,5,8],symlink:8,synapt:2,syntax:[0,3,5,6,9],system:[2,3,6,9],tabl:8,tail:5,take:[3,7,8],taken:[5,9],talapin:4,tao:4,technolog:[2,9],tell:7,temperatur:9,templat:[0,5],tend:9,termin:[2,9],terribl:9,test:[0,2,8],text:[0,2,3,5,6,7,9],than:[0,3,8],thank:9,thei:[0,2,3,5,6,9],them:[0,3,4,5,6,7,9],thereaft:9,therefor:[2,5,7,9],theta:7,thi:[0,2,3,4,5,6,7,8,9],third:2,those:[2,3,9],three:[2,4,5],threshold:5,through:7,thu:[0,2,6,7,9],tif:7,time:[5,8,9],timothi:4,timur:4,togeth:[6,9],token:[5,9],told:7,too:5,tool:[2,7,8],top:9,total:[0,4,9],trail:5,transfer:[0,5,7,9],transform:[3,5,7,9],transformbackground:9,transformfqgrid:9,transformfqtogr:9,transformqgridregular:9,transformsqnormrpoli:9,transformsqtofq:9,transformtwothetatoqa:9,transformxrayasfnormchri:9,translat:3,transpos:3,truste:4,tunabl:9,tune:[1,3,4,5],tuneconfig:[3,8,9],tupl:3,turn:[5,9],tutori:[1,3,5,7,8],two:[0,5,7,9],twotheta1:3,twotheta2:3,twotheta:[5,7,9],twothetazero:[1,5,8],type:[0,2,3,5,7,8,9],typic:7,ubuntu:2,uncorrect:9,undefin:5,under:[4,8],understood:[0,9],unexpect:5,unicod:8,uniqu:[5,6,9],unit:[0,5,7,8],univers:[4,8,9],unix:[2,5,9],unless:[5,7,8,9],unpack:3,unreli:5,unseemli:9,unsupport:8,updat:[3,7,9],upon:9,upper:[5,7],usag:[5,6],use:[2,3,4,5,6,7,8,9],usecol:[3,8],used:[1,2,3,4,5,6,7,8,9],useful:[0,2,5,6,9],user:[0,1,2,4,5,6,7,9],uses:9,using:[0,2,3,4,5,6,7,8,9],usual:[0,2,9],util:[4,6],utilis:4,valid:[0,2,5,9],valu:[0,3,4,5,6,7,8,9],van:[4,9],variabl:[2,3,6,8,9],variant:5,varnam:0,ventur:2,verbos:[5,7,9],veri:[2,5,7,9],verifi:[2,5,7,9],version:[1,2,5,6,9],virtual:[2,7],visual:[4,9],vogt:4,vuong:4,wai:[0,2,6,7,8,9],want:2,warn:[5,9],wavelength:[4,5,7,8,9],web:[5,6],well:[2,7],were:[0,2,5,7,9],what:[0,3,5,9],wheel:[2,8],when:[0,2,3,5,6,7,8,9],where:[0,5,6,7],wherea:7,whether:4,which:[2,3,4,5,6,8,9],whitespac:3,whl:[2,9],who:2,whole:9,wide:3,window:[2,5,6,7,8,9],within:[2,5,6,8],without:[4,5,8,9],word:5,work:[0,2,3,5,6,7,9],wors:9,would:[0,2,3,5,6,9],wright:4,writabl:2,write:[5,7,9],written:[2,4,5,9],www:[2,9],x21:9,xrai:[5,9],yes:[5,8,9],yet:[4,7,9],yield:7,york:4,you:[0,2,4,9],your:[0,4,9],zero:[3,5,8,9],zip:9,zoom:9},titles:["Files used in PDF extraction","diffpy.pdfgetx","Installation","Interactive mode","Introduction","Options and parameters","The plotdata program","Quick-start guide","Release notes","Tutorial"],titleterms:{Added:8,The:6,angl:9,author:4,chang:8,command:[2,7],configur:[0,5,9],content:1,data:[6,9],deprec:8,diffpi:1,exampl:6,extract:0,file:[0,5,6,9],fit:9,fix:8,from:9,guid:7,indic:1,input:[0,5,9],instal:2,interact:[3,9],introduct:4,ipython:2,licens:4,magic:2,match:9,mode:3,name:9,neutron:9,nickel:9,note:8,notic:4,oper:5,option:5,other:5,output:[0,5,9],paramet:[5,9],path:9,pdf:[0,5,9],pdfgetn3:7,pdfgets3:7,pdfgetx3:7,pdfgetx:1,platinum:9,plotdata:6,predefin:9,process:9,program:[5,6],quick:7,rai:9,refer:4,releas:8,remov:8,requir:2,saspdf:9,scatter:9,scratch:9,search:9,select:6,seri:9,small:9,softwar:2,start:7,tabl:1,tune:9,tutori:9,twothetazero:9,used:0,version:8}}) \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.1/tutorial.html b/static_root/doc/pdfgetx/2.1.1/tutorial.html deleted file mode 100644 index d20b361a..00000000 --- a/static_root/doc/pdfgetx/2.1.1/tutorial.html +++ /dev/null @@ -1,819 +0,0 @@ - - - - - - Tutorial — diffpy.pdfgetx 2.1.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Tutorial

-

In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the examples -folder included with the PDFgetX3 distribution. The examples -folder can be found in the parent “doc” directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -https://www.diffpy.org/doc/pdfgetx/2.1.1/pdfgetxn3-examples.zip.

-
-

Nickel X-ray PDF

-
-

predefined configuration file

-

Change to the Ni directory. The file named -ni300mesh_300k_nor_1-5.chi contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the 2Θ scattering -angles and X-ray intensities. The second file -kapton_bgrd_300k_nor_2-3.chi contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the pdfgetx3.cfg contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -pdfgetx3 program -with the powder data file as an argument:

-
$ pdfgetx3 ni300mesh_300k_nor_1-5.chi
-
-
-

For the first run there should be no output on the screen, -however a new file, ni300mesh_300k_nor_1-5.gr should appear -in the work directory. -We can use the plotdata program, -included with this software, to plot the output data:

-
$ plotdata ni300mesh_300k_nor_1-5.gr
-
-
-

This will open a graph window and start an IPython interactive session. -To exit and close the figure, type exit() on the IPython prompt. -Let’s run the program again, but now with a ---verbose=info -option, to show more details about the program actions.

-
$ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi
-
-INFO:applying pdfgetx3 defaults
-INFO:set config.mode = xray
-INFO:searching for default config file /home/user/.pdfgetx3.cfg
-INFO:searching for default config file .pdfgetx3.cfg
-INFO:searching for default config file pdfgetx3.cfg
-INFO:loaded default config file pdfgetx3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi
-INFO:set config.outputtypes = gr
-INFO:set config.wavelength = 0.142774
-INFO:set config.composition = Ni
-INFO:set config.qmaxinst = 26.5
-INFO:set config.qmax = 26.0
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 30.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'xray'
-INFO:calling config_xray
-INFO:started PDF processing.
-INFO:processing 'ni300mesh_300k_nor_1-5.chi'
-INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr'
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-INFO:elapsed time: 0.095
-
-
-

Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the --verbose option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the --force=yes option, upon -which pdfgetx3 would overwrite any existing files.

-

PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the --c option. Another option, --plot=[iq,sq,fq,gr] turns on plotting of the final PDF or of some other result. A -side effect of the --plot option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function F(Q) and the PDF curve G(r). This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:

-
$ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr
-
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-
-Variables related to PDF processing:
-
-pdfgetter    -- PDFGetter used for calculation.
-config       -- configuration data used by PDFGetter.
-                See config.inputfiles for a list of inputs.
-iraw         -- matrix of input raw intensities with 2 rows per file.
-iq sq fq gr  -- intermediate results per each input file stored
-                as matrix rows.
-
-Functions:
-
-tuneconfig   -- dynamically tune configuration variables.
-processfiles -- process specified data files.
-clearsession -- clear all elements from the inputfiles, iraw,
-                iq, sq, fq and gr variables.
-plotdata     -- plot all or selected columns from a text data file.
-loaddata     -- load all or selected columns from a text data file.
-findfiles    -- search for files matching the specified patterns.
-
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-In [1]:
-
-
-

This will open a plot figure similar to

-_images/nickelfqgr.png -

Because of the interactive mode implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -config variable stores all the configuration parameters, -and its content can be displayed with the print() -function as

-
In [1]: print(config)
-
-configfile = ni300mesh_300k_nor_1-5.gr
-configsection = DEFAULT
-dataformat = twotheta
-...
-qmax = 26.0
-...
-
-
-

The processfiles() function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the F(Q) and G(r) -curves calculated at Qmax = 22 Å-1, we can call -processfiles() and pass it a keyword argument for -the new qmax as follows:

-
In [2]: processfiles(qmax=22)
-
-# the qmax parameter was updated to a new value, thus
-In [3]: config.qmax
-Out[3]: 22
-
-
-

There should be now two lines in each plot axis corresponding to -the results at Qmax equal 26 and 22 Å-1. To exit the program, -type exit().

-
-
-

processing from scratch

-

We have already encountered the command-line option -c -for specifying a custom configuration file. A special argument “NONE”, -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-ERROR:Configuration error: wavelength not specified.
-ERROR:See "--help" for more hints.
-
-
-

There is an error, for the wavelength is necessary to convert -the scattering angle 2Θ to momentum transfer Q. The -X-ray wavelength was 0.142774 Å, which can be passed with the --w, --wavelength option:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774
-
-...
-ERROR:Configuration error: Chemical composition not known.
-ERROR:See "--help" for more hints.
-
-
-

There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the --composition option. The example -below uses a “\” character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-...
-
-
-

There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the -t, --outputtypes option. -The outputtypes option recognizes the following result types: -“iq”, “sq”, “fq”, “gr”. One or more of these type strings, -separated by a comma, can be included with the --t option, which will produce the corresponding -output files. An empty string, such as -t "", or -t NONE -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings.

-

At this point, we will not write any output files, but will use the ---plot option to display the calculated curves. The ---plot accepts the same arguments as outputtypes, so to -display the F(Q) and G(r) curves we shall run

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni --plot=fq,gr
-
-WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161
-WARNING:qmax reset to the data boundary qmaxinst=28.0865680161
-
-
-

which should open the following plot window:

-_images/nickelfqgrnoisy.png -

The graphs look terrible. The PDF is very noisy and the F(Q) curve -shows a sudden break at about 27 Å-1. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -iraw, iq, sq, -fq, gr -variables for the original raw data and intermediate results. We -are going to plot the “iq” variable that has the input intensities -resampled on the Q grid. The matplotlib function -clf() clears the figure, -the iq variable is a two-row matrix with Q and I rows, and the -axis() -function lets us zoom to a given range:

-
In [1]: clf()
-In [2]: plot(iq[0], iq[1])
-Out[2]: [<matplotlib.lines.Line2D at 0x3e20f50>]
-In [3]: axis([20, 29, 0, 3000])
-Out[3]: [20, 29, 0, 3000]
-
-
-

The graph shows a sudden drop in the raw intensities at 27 Å-1. -The qmaxinst variable defines a Q cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 Å-1

-
In [4]: processfiles(qmaxinst=26.5)
-WARNING:qmax reset to the data boundary qmaxinst=26.5
-
-
-

The updated curves looks reasonable without any oscillations and -breakpoints. The tuneconfig() function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type tuneconfig() to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the F(Q) and G(r) curves change. -The rpoly parameter controls the degree of data-correction -polynomial and is an approximate low-r bound of reliable G -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the G(r) -curve and save it to an output file nicmd.gr:

-
In [14]: config.qmax = 26
-In [15]: config.outputtypes = 'gr'
-In [16]: config.output = 'nicmd'
-In [17]: processfiles()
-
-
-
-
-
-

Platinum X-ray series

-

PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(z-shell being a notable exception).

-
-

matching input files

-

The pdfgetx3 program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the -f, --find option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option --l, --list makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files.

-

We will try out this file search on platinum example files. Open a -terminal and navigate to the Pt directory. There should be a -series subdirectory with 6 chi files indexed from 903 to 908. -At first, let’s stay in the Pt directory and run the following -command

-
$ pdfgetx3 --list --find
-
-Pt_bulk-00055-pdfgetx2.gr
-Pt_bulk-00055-pdfgetx3.gr
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-pdfgetx3.cfg
-plotpdfcomparison.py
-
-
-

Without any patterns the file search matches all files in the current -directory. Now let’s try to add name patterns. There are few special -patterns, for example ^ matches at the beginning of the filename, $ at the end and <N-M> matches a range of integer values from -N to M. The patterns containing ^$<> need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works.

-

Filenames containing “y”:

-
$ pdfgetx3 --list --find y
-empty_capillary-00032.chi
-plotpdfcomparison.py
-
-
-

Filenames that containing both “y” and “chi”, here we use the -options --list and --find in an abbreviated -form -l and -f:

-
$ pdfgetx3 -lf y chi
-empty_capillary-00032.chi
-
-
-

Filenames that start with “e”:

-
$ pdfgetx3 --list --find "^e"
-empty_capillary-00032.chi
-
-
-

Filenames that contain character “2”:

-
$ pdfgetx3 --list --find 2
-Pt_bulk-00055-pdfgetx2.gr
-empty_capillary-00032.chi
-
-
-

Filenames that contain numeric value “2”:

-
$ pdfgetx3 -lf "<2>"
-Pt_bulk-00055-pdfgetx2.gr
-
-
-

The special argument + starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both “bulk” and “chi” substrings and then -also those that have “empty” and “chi” in their names, use:

-
$ pdfgetx3 -lf bulk chi + empty chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-

When pattern groups overlap the resulting matches are -made unique and each file is listed only once

-
$ pdfgetx3 -lf bulk chi + chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-
-
-

data search path

-

Each group of PDFgetX3 patterns can have one entry containing -forward slash “/” to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered “903” to “905” and “908” from the -series subdirectory can be therefore matched using

-
$ pdfgetx3 -lf series/ "<903-905>" + 908
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-

The current directory can be selected using ./

-
$ pdfgetx3 -lf series/ 903 + ./ bulk chi
-series/Pt_bulk_ramp03-00903.chi
-Pt_bulk-00055.chi
-
-
-

When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -“.chi”-ending files in the current and series -directories can be thus found using

-
$ pdfgetx3 -lf ".chi$" + series/
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00906.chi
-series/Pt_bulk_ramp03-00907.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-
-
-

output file names

-

By default the output files are saved in the current directory. The -output path, can be changed with the -o, --output option. -The -o recognizes several tokens that are replaced with -parts of the input file name, for example, “@b” expands to an -extension-stripped base name. In similar faction, “@o” is replaced -with the output type extension. Thus to generate PDFs for all files -in the series directory and save them in the -series-gr subfolder do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o
-
-
-

The extension “.@o” is automatic when not included anywhere in the -output file name. Thus to process the Pt series at Qmax = 18 Å-1 -while saving the results in the same folder, but with a “_qmax18” suffix -in their filenames do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18
-
-
-

For input file Pt_bulk_ramp03-00903.chi the -o option -above expands to output path series-gr/Pt_bulk_ramp03-00903_qmax18.gr. -The series-gr directory should now contain 12 “gr” files, -6 of them processed at Qmax = 27 Å-1 as given by configuration -file and 6 others processed at Qmax = 18 Å-1.

-
-

See also

-

-o, --output for a list of output tokens

-
-
-
-
-

Interactive tuning of parameters

-

One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the Ni directory in the shell and process -the nickel PDF while plotting the F(Q) and G(r) curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -tuneconfig() -function from the IPython environment

-
$ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi
-...
-In [1]: tuneconfig()
-
-
-

The -tuneconfig() -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot.

-_images/tunenickelfqgr.png -

The constant data scale check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -PDF parameters section. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the bgscale parameter -if PDF has been processed without any background data.

-

By default the -tuneconfig() -function displays the same curves as -specified by the --plot option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the describe() method of the -pdfgetter() object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object t4 that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the tuneconfig() function

-
$ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi
-...
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-
-In [1]: fig, ax = subplots(2)
-In [2]: pdfgetter.describe()
-0   TransformTwoThetaToQA
-    convert x data from twotheta to Q in 1/A
-1   TransformQGridRegular
-    Remove the data outside the (qmin, qmaxinst) range
-2   TransformBackground
-    subtract background intensity
-3   TransformXrayASFnormChris
-    scale and normalize intensities by x-ray scattering factors
-4   TransformSQnormRPoly
-    Normalize S(Q) by fitting a polynomial
-5   TransformSQToFQ
-    Convert S(Q) to F(Q).
-6   TransformFQgrid
-    Resample F(Q) to a regular grid suitable for FFT
-7   TransformFQToGr
-    Convert F(Q) to G(r).
-In [3]: t4 = pdfgetter.getTransformation(4)
-In [4]: tuneconfig([t4, 'gr'], axeslist=ax)
-In [5]: ax[0].legend(loc=2)
-
-
-

The subplots() function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window:

-_images/tunenickelt4gr.png -

The tuning can be finished by clicking the Done button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the config -object, for example:

-
In [5]: config.bgscale = 1.5
-
-
-

Finally, to save the new results, we shall first confirm -outputtypes have been correctly set and then use the -processfiles() function to redo the calculations, plots and -data output for the updated configuration. Note that the -processfiles() function accepts keyword arguments for -configuration parameters. This is used at line In [8] to -turn on the force flag and is in effect a shortcut -for an extra config.force = True statement.

-
In [6]: config.outputtypes
-Out[6]: ['gr']
-In [7]: processfiles()
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-In [8]: processfiles(force=True)
-
-
-

ni300mesh_300k_nor_1-5.gr was successfully saved at an -updated configuration for there were no warnings after the last call.

-
-
-

Neutron PDF

-

This example illustrates PDF extraction from -neutron powder data using pdfgetn3. -Navigate to the n-Sapphire directory in the shell. -The sapphire755.dat file contains powder diffraction data from -sapphire (α-Al2O3) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The pdfgetn3.cfg configuration file specifies -processing parameters such as wavelength, -twothetazero, composition, and mode.

-

To extract the sapphire neutron PDF run

-
$ pdfgetn3 --verbose=info sapphire755.dat
-
-INFO:applying pdfgetn3 defaults
-INFO:set config.mode = neutron
-INFO:searching for default config file /home/user/.pdfgetn3.cfg
-INFO:searching for default config file .pdfgetn3.cfg
-INFO:searching for default config file pdfgetn3.cfg
-INFO:loaded default config file pdfgetn3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.mode = neutron
-INFO:set config.wavelength = 1.0989
-INFO:set config.twothetazero = -0.38
-INFO:set config.composition = Al2O3
-INFO:set config.qmaxinst = 11.2
-INFO:set config.qmax = 11.2
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 20.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'neutron'
-INFO:calling config_neutron
-INFO:started PDF processing.
-INFO:processing 'sapphire755.dat'
-INFO:resolved output file '' as 'sapphire755.fq'
-INFO:written outpufile sapphire755.fq
-INFO:resolved output file '' as 'sapphire755.gr'
-INFO:written outpufile sapphire755.gr
-INFO:elapsed time: 0.097
-
-
-

This will produce two files sapphire755.fq, sapphire755.gr -for the F(Q) and G(r) functions. -To compare them with expected results use

-
$ plotdata sapphire755-expected.fq sapphire755.fq
-$ plotdata sapphire755-expected.gr sapphire755.gr
-
-
-
-
-

Fit twothetazero

-

For a good quality PDF it is essential to use powder patterns with -accurate values of Q. Some instruments may produce spectra with -a slightly offset scattering angle 2Θ which -causes inaccurate Q and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the twothetazero correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples.

-

This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -diffpy.cmi, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use Anaconda Python and set up a dedicated -Anaconda environment nbcmi for this tutorial. -This can be accomplished using the following steps:

-
$ conda create -n nbcmi -c diffpy python=2 diffpy.cmi
-$ conda activate nbcmi
-$ pip install path/to/diffpy.pdfgetx-VERSION.whl
-
-
-

When these prerequisites are in place, -change to the n-twothetazero-fit directory -and open the self documented Jupyter notebook as follows

-
$ jupyter notebook fit-twothetazero.ipynb
-
-
-

The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted twothetazero. -After running all cells the notebook should produce similar graphs -as in the figure below.

-
-_images/twothetazerofit.svgz

Refinement of nickel neutron PDF for (a) uncorrected data -and (b) with a refined zero correction. -The extracted PDFs are plotted as blue circles, -simulated PDFs as red lines and -the difference is plotted offset in green below.

-
-

The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual Rw which is lowered from (a) 0.18 to (b) 0.05.

-
-
-

Small-angle-scattering PDF (sasPDF)

-

Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using pdfgets3. -To do this, navigate to the Au_DNA_NPA directory in your terminal. -In this folder, you will find Au_DNA_NPA.chi and -Au_DNA_FF.chi files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008).. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The pdfgets3.cfg -configuration file specifies processing parameters such as formfactorfile (required by sas mode), qmin, qmax, and mode.

-

To extract the PDF of DNA-capped DNA nanoparticle assemblies

-
$ pdfgets3 --verbose=info Au_DNA_NPA.chi
-
-INFO:applying pdfgets3 defaults
-INFO:set config.mode = sas
-INFO:searching for default config file /home/user/.pdfgets3.cfg
-INFO:searching for default config file .pdfgets3.cfg
-INFO:searching for default config file pdfgets3.cfg
-INFO:loaded default config file pdfgets3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = QA
-INFO:set config.backgroundfile =
-INFO:set config.datapath = []
-INFO:set config.formfactorfile = Au_DNA_FF.chi
-INFO:set config.output =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.force = yes
-INFO:set config.mode = sas
-INFO:set config.rpoly = 240.605
-INFO:set config.qmaxinst = 0.075
-INFO:set config.qmin = 0.01
-INFO:set config.qmax = 0.072
-INFO:set config.rmin = 100.0
-INFO:set config.rmax = 5000.0
-INFO:set config.rstep = 1.0
-INFO:set config.plot = iq, fq, gr
-INFO:set config.verbose = info
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'sas'
-INFO:calling config_sas
-INFO:started PDF processing.
-INFO:processing 'Au_DNA_NPA.chi'
-INFO:resolved output file '' as 'Au_DNA_NPA.fq'
-INFO:written outpufile Au_DNA_NPA.fq
-INFO:resolved output file '' as 'Au_DNA_NPA.gr'
-INFO:written outpufile Au_DNA_NPA.gr
-INFO:elapsed time: 0.947
-
-
-

This will save two files Au_DNA_NPA.fq, Au_DNA_NPA.gr in the same directoy for the F(Q) and G(r) functions. This also plots F(Q) and G(r) functions in a pop-up window and the processing parameters such as rpoly or so may be tuned interactively by issuing command tuneconfig() in the IPython session as discussed above.

-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/PDFgetXNS3_manual.pdf b/static_root/doc/pdfgetx/2.1.2/PDFgetXNS3_manual.pdf deleted file mode 100644 index 7b46570f..00000000 Binary files a/static_root/doc/pdfgetx/2.1.2/PDFgetXNS3_manual.pdf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.2/_images/nickelfqgr.png b/static_root/doc/pdfgetx/2.1.2/_images/nickelfqgr.png deleted file mode 100644 index 3fbc12de..00000000 Binary files a/static_root/doc/pdfgetx/2.1.2/_images/nickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.2/_images/nickelfqgrnoisy.png b/static_root/doc/pdfgetx/2.1.2/_images/nickelfqgrnoisy.png deleted file mode 100644 index caab8cf3..00000000 Binary files a/static_root/doc/pdfgetx/2.1.2/_images/nickelfqgrnoisy.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.2/_images/tunenickelfqgr.png b/static_root/doc/pdfgetx/2.1.2/_images/tunenickelfqgr.png deleted file mode 100644 index 14accde4..00000000 Binary files a/static_root/doc/pdfgetx/2.1.2/_images/tunenickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.2/_images/tunenickelt4gr.png b/static_root/doc/pdfgetx/2.1.2/_images/tunenickelt4gr.png deleted file mode 100644 index c95278cd..00000000 Binary files a/static_root/doc/pdfgetx/2.1.2/_images/tunenickelt4gr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.2/_images/twothetazerofit.svgz b/static_root/doc/pdfgetx/2.1.2/_images/twothetazerofit.svgz deleted file mode 100644 index 80e48d71..00000000 Binary files a/static_root/doc/pdfgetx/2.1.2/_images/twothetazerofit.svgz and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.2/_sources/files.rst.txt b/static_root/doc/pdfgetx/2.1.2/_sources/files.rst.txt deleted file mode 100644 index edc63d96..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_sources/files.rst.txt +++ /dev/null @@ -1,102 +0,0 @@ -Files used in PDF extraction -======================================================================== - -.. include:: abbreviations.txt -.. _my-configfile: -.. program:: pdfgetx3 - -Configuration file ------------------------------------------------------------------------- - -Configuration files may define the PDF processing parameters. -By default, the :program:`pdfgetx3` program attempts to read -:file:`.pdfgetx3.cfg` file from the user HOME directory, -then :file:`.pdfgetx3.cfg` and :file:`pdfgetx3.cfg` files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the :option:`-c, --config <-c>` option. -The :program:`pdfgetn3` program works in the same way, -except it checks for configuration files -:file:`~/.pdfgetn3.cfg`, :file:`.pdfgetn3.cfg` and :file:`pdfgetn3.cfg`. - -The easiest way of creating a configuration file is to generate -a template content using the :option:`--createconfig` option as :: - - pdfgetx3 --createconfig=test.cfg - -and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple "varname=value" syntax, -any lines starting with "#" are ignored as comments. - -The configuration file has several sections marked as ``[SECTIONNAME]``. -The ``[DEFAULT]`` section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the :option:`-s, --section <-s>` option on the -command line. Thus :: - - pdfgetx3 --config=test.cfg --section=nacl - -would read the parameters from the ``[nacl]`` section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section. - - -Input files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -|twotheta| in degrees, momentum transfer *Q* in inverse nanometers or *Q* -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the :confval:`dataformat` parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values. - -The input files are usually passed as command-line arguments to -:program:`pdfgetx3` or :program:`pdfgetn3` programs and must be paths -accessible from the current working directory. - -Input files can be also defined by setting the :confval:`inputfile` -value in the configuration file. The :option:`-d, --datapath <-d>` -option can be then used to provide additional data directories to -search for these inputs and for the :confval:`backgroundfile`. -This is to support configuration files located in a different -directory than the data. - -When the :option:`--find <-f>` option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory. - - -Output files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 can produce up to four different output data files: - -* .iq -- |IQ|, the background-corrected - intensities sampled on a regular *Q*-space grid in inverse ångströms, - -* .sq -- |SQ|, the total scattering structure function, - with intensities normalized by average scattering factors and - corrected by a polynomial fit, - -* .fq -- |FQ|, the reduced structure function equal to *Q*\ (|SQ| - 1), - -* .gr -- |Gr|, the resultant PDF, where the first column is the - separation *r* in ångströms and the second is the function *G* in - Å\ :sup:`-2`. - -You can specify what output files should be produced by setting the -:confval:`outputtypes` parameter in the configuration file or by -passing the :option:`-t, --outputtypes <-t>` on the command line. - -The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the :option:`--config <-c>` option, -the PDFgetX3 will reproduce the previous calculation. diff --git a/static_root/doc/pdfgetx/2.1.2/_sources/index.rst.txt b/static_root/doc/pdfgetx/2.1.2/_sources/index.rst.txt deleted file mode 100644 index c7bf373e..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_sources/index.rst.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. PDFgetX3 documentation master file, created by - sphinx-quickstart on Tue Sep 21 18:35:11 2010. - You can adapt this file completely to your liking, - but it should at least contain the root `toctree` directive. - -######################################################################## -diffpy.pdfgetx -######################################################################## - -User manual for PDFgetX3, PDFgetN3, PDFgetS3 and Python package diffpy.pdfgetx. - -| Release |release| -| |today| - -======================================================================== -Table of contents -======================================================================== - - -.. toctree:: - :maxdepth: 2 - - intro - install - quick-start - tutorial - files - interact - options - plotdata - release - -======================================================================== -Indices -======================================================================== - -* :ref:`genindex` -* :ref:`search` diff --git a/static_root/doc/pdfgetx/2.1.2/_sources/install.rst.txt b/static_root/doc/pdfgetx/2.1.2/_sources/install.rst.txt deleted file mode 100644 index 483f1fa6..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_sources/install.rst.txt +++ /dev/null @@ -1,146 +0,0 @@ -Installation -======================================================================== - -.. include:: abbreviations.txt - -Software requirements ------------------------------------------------------------------------- - -This software is written in Python programming language, therefore -you must have Python 3.8, 3.7, 3.6, 3.5 or 2.7 installed. In addition, -the following third-party Python libraries are also required: - -* pip - Python package installer -* setuptools - tools for installing Python packages -* six - Python 2 and 3 compatibility library -* NumPy - library for scientific computing with Python -* matplotlib - Python plotting library -* IPython - enhanced interactive Python shell - -Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -`Python Package Index `__ -or using any Internet search engine. - -Another more convenient option is to obtain one of the science-oriented -Python distributions such as -`Anaconda Python`_, -`Enthought Canopy `_ or -`PythonXY `_, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step. - -On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command :: - - sudo apt-get install \ - python3-pip python3-setuptools python3-six \ - python3-numpy python3-matplotlib ipython3 - -This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above. - -On Windows operating system, it may be necessary to add the -``C:\Python37`` directory and the scripts directory -``C:\Python37\Scripts`` to the system :envvar:`!PATH`. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the :program:`Command Prompt`, type -there ``python`` and see if this starts the Python interpreter. - -Alternately, if you want to run the diffpy.pdfgetx software with a specific version of Python, -we recommend using a virtual environment, such as ``conda``. For example, if you have Anaconda Python installed, -you can create a conda virtual environment to install the software as follow :: - - conda create --name pdfgetx_env python=3.8 numpy matplotlib ipython - -You can choose the name of the environment and python version as you desire. You can choose any of the -supported Python versions. Then, activate this environment and follow the instructions in the -next section to install the software :: - - conda activate pdfgetx_env - -Installation ------------------------------------------------------------------------- - -The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -`Columbia Technology Ventures -`__. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:: - - pip install ./diffpy.pdfgetx-VERSION.whl - -Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending ``sudo`` to the command line above. If root access is not available, use the ``pip install`` options :option:`!--user` or :option:`!--prefix` to install the software to a user-writable directory. - -The package provides three programs for PDF conversion, :program:`pdfgetx3`, :program:`pdfgetn3` and :program:`pdfgets3`. To check if they are correctly installed run :: - - pdfgetx3 --version - pdfgetn3 --version - pdfgets3 --version - -This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a :program:`plotdata` -command for an easy plotting of text data files. To verify -if plotdata works, run the ``plotdata --version`` command. -Finally, a comprehensive test of the installed software can -be executed using :: - - python -m diffpy.pdfgetx.tests.run - -.. note:: - - Older versions of diffpy.pdfgetx use Python egg format - instead of Python wheel. - To install these use the easy_install command as follows:: - - python -m easy_install ./diffpy.pdfgetx-VERSION.egg - -.. index:: %pdfgetx3 IPython magic -.. index:: %pdfgetn3 IPython magic -.. index:: %pdfgets3 IPython magic - -IPython magic command ------------------------------------------------------------------------- - -These instructions are intended for `IPython`_ users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don't plan to customize IPython in such way you can safely skip -this paragraph. - -When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session. - -The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up - -#. find the ``profile_default/ipython_config.py`` file and open it - in a text editor. If that file does not exists, - create it first by executing :: - - ipython profile create - -#. navigate to the paragraph that contains the - :py:data:`!c.InteractiveShellApp.extensions` and add there - the following line :: - - c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics'] - - There must be no leading indent, i.e., the text must start at the - very first column. diff --git a/static_root/doc/pdfgetx/2.1.2/_sources/interact.rst.txt b/static_root/doc/pdfgetx/2.1.2/_sources/interact.rst.txt deleted file mode 100644 index 0d4fb746..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_sources/interact.rst.txt +++ /dev/null @@ -1,154 +0,0 @@ -Interactive mode -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. py:currentmodule:: _interactive_ - -The interactive mode is activated by using either the -:option:`-i, --interact <-i>` option or a non-empty -:option:`--plot <-p>` option. In the interactive mode -the program starts an `IPython`_ interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands ``%pdfgetx3`` and ``%pdfgetn3``, which can be used with -the same syntax as the :program:`pdfgetx3` and :program:`pdfgetn3` in -system shell. -The interactive session is also initialized with all functions from the -:py:mod:`matplotlib.pyplot` module for convenient plotting. -The functions and variables related to PDF processing are: - -.. py:function:: pdfgetter(x=None, y=None, filename='', **kwargs) - - Instance of the :py:class:`!PDFGetter` class which serves as a - low-level function that calculates the PDF. This is a callable - object, which takes as an argument a pair of input arrays for - (*Q*, intensity) or (|twotheta|, intensity) depending on - :confval:`dataformat`. It can be also called with a keyword - argument ``filename=FILE``, which would read the input arrays - from the specified file. When called with no arguments, - it calculates PDF from the last input data. - - :parameters: - * **x** (*numpy.ndarray, optional*) -- - The *Q* or |twotheta| values in powder diffraction pattern. - - * **y** (*numpy.ndarray, optional*) -- - The scattered intensities in powder diffraction pattern - - * **filename** (*str, optional*) -- - The text data file for loading the `x`, `y` values when - they are not specified. - - * **kwargs** (*misc, optional*) -- - Extra keyword arguments that are applied to - the :data:`!config` object, for example ``qmax=20``. - - :return: - A pair of output arrays *(r, G)*. - -.. interactvar:: config - - Instance of the :py:class:`!PDFConfig` class that stores the - :ref:`parameters and input files ` for the program. - Use ``print(config)`` to display the current configuration values. - This is the same object as :data:`!pdfgetter.config`. Configuration - may be changed by setting a respective attribute of the - :interactvar:`!config` object, for example:: - - In [1]: config.qmax = 21 - - The :py:data:`!config` values may be also changed by calling the - :py:func:`pdfgetter` or :py:func:`processfiles` function with a - corresponding keyword argument, for example - ``processfiles(qmax=20, force="once")``. - -.. interactvar:: iraw - iq - sq - fq - gr - - These variables are assigned the input raw intensities and the - intermediate results, stored as matrix rows. The matrix rows - correspond to twotheta1, intensity1, twotheta2, intensity2, etc. - Because matrices are iterated row first, the raw intensities - from all input files can be plotted with the matplotlib plot - function as ``plot(*iraw)``. - - These variables should be considered read-only and are reset - with subsequent PDF calculations. - -.. py:function:: tuneconfig(plotids=None, pdfgetter=None, axeslist=None) - - Show a GUI dialog for interactive tuning of configuration variables. - - :arg plotids: - The string or iterable that specify what interactive plots should be - tuned. By default the same as ``config.plot``. It can be also an - integer index or name of a transformation in :py:func:`pdfgetter` or - a reference to a :py:class:`!Transformation` object. - - :arg pdfgetter: - The optional :py:class:`!PDFGetter` object to be tuned. - This is by default the interactive :py:func:`!pdfgetter` object. - - :arg axeslist: - An optional list of matplotlib Axes for showing interactive plots. - When None, use ``subplot(N, 1, i)`` to create any necessary axes. - - .. note:: - - Changes from :py:func:`!tuneconfig` apply only to the configuration - and results in memory. Use the :py:func:`processfiles` function - to save them to disk. - - .. seealso:: :ref:`my-tuneconfig` tutorial - -.. py:function:: processfiles(filename=None, **kwargs) - - Process all input files again with the current configuration values. - This is a higher-level function than :py:func:`pdfgetter`, as - it also saves output files and produces plots as specified by the - :interactvar:`config` object. - - :arg filename: - One or more input files to be converted to PDFs and saved or - plotted according to the :py:data:`!config` settings. Use the - previous list of input files when not specified. - - :arg kwargs: - An optional keyword arguments to set for the :py:data:`!config` - object, for example ``(force="once", qmax=18)``. - - This function updates the :interactvar:`config.inputfiles ` - list and the :interactvar:`iraw`, :interactvar:`iq`, - :interactvar:`sq`, :interactvar:`fq` and :interactvar:`gr` - interactive variables. - -.. py:function:: clearsession() - - Clear all elements from the :interactvar:`config.inputfiles ` - and also the - :interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, - :interactvar:`fq` and :interactvar:`gr` variables. - - :return: - No return value. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: loaddata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. - -.. py:currentmodule:: diffpy.pdfgetx.plotdata -.. autofunction:: plotdata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx.plotdata` module. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: findfiles - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. diff --git a/static_root/doc/pdfgetx/2.1.2/_sources/intro.rst.txt b/static_root/doc/pdfgetx/2.1.2/_sources/intro.rst.txt deleted file mode 100644 index a112ee9a..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_sources/intro.rst.txt +++ /dev/null @@ -1,70 +0,0 @@ -Introduction -======================================================================== - -diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts. - - -.. index:: license - -License notice ------------------------------------------------------------------------- - -.. include:: ../../LICENSENOTICE.txt - - -.. index:: authors - -Authors ------------------------------------------------------------------------- - -This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Hung Vuong, -Songsheng Tao, -Simon Billinge. - - -.. index:: citations, references - -References ------------------------------------------------------------------------- - -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: - - P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge - `PDFgetX3: A rapid and highly automatable program for processing - powder diffraction data into total scattering pair distribution - functions `__, - *J. Appl. Crystallogr.* **46**, 560-566 (2013) - -For research publications that use this software to process neutron -diffraction data we ask you to also cite: - - P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, - S. J. L. Billinge - `PDFgetN3: atomic pair distribution functions from neutron - powder diffraction data using ad hoc corrections - `__, - *J. Appl. Crystallogr.* **51** (2018) - -For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication: - - CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge - `sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data `__. diff --git a/static_root/doc/pdfgetx/2.1.2/_sources/options.rst.txt b/static_root/doc/pdfgetx/2.1.2/_sources/options.rst.txt deleted file mode 100644 index c02220f2..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_sources/options.rst.txt +++ /dev/null @@ -1,370 +0,0 @@ -Options and parameters -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program. - - -.. Note :: - - The command line options start with a leading "-" and can - be only used as command line arguments when starting the - :program:`pdfgetx3` program. Within configuration file the parameter - names are plain words without any leading dashes. Finally, - parameters can be also set in the interactive mode as attributes of - the :interactvar:`config` object, but the assignments must be valid - Python statements. Here are examples of setting composition of - a processed specimen using each of these forms: - - #. assigned in configuration file:: - - ... - composition = CaTiO3 - ... - - #. set as a command-line option when starting :program:`pdfgetx3` or - :program:`pdfgetn3`:: - - pdfgetx3 --composition=CaTiO3 - - #. set in the IPython interactive mode:: - - pdfgetx3 -i - ... - In [1]: config.composition = "CaTiO3" - - -Program operation ------------------------------------------------------------------------- - -.. option:: -h, --help - - Display a brief usage information with a list of command line options - and exit. - -.. option:: -V, --version - - Display the program version and exit. - -.. option:: --manual - - Open this manual in a Web browser and exit. - -.. option:: -f, --find -.. _my-findpatterns: - - Select input files that match all patterns. The command - line arguments are by default taken as input files. However, - with the :option:`!--find` option they are processed as - file patterns and the matching files are then used as inputs. - The input files are by default searched in the current directory - unless there is a path entry (e.g., :file:`data/`) that - selects a different search path. The search patterns are - interpreted as fixed strings, all of which must be present - in the file name. A single argument ``+`` starts - a new group of patterns to match more files that are not - covered by one set of patterns. Additional pattern - groups reuse the current search path unless they provide - their own path value. Pattern groups containing only - a path entry reuse file patterns from the last group. - When pattern groups overlap the repeated matches are ignored - to make the resulting list of files unique. Files starting - with ``.`` are ignored unless there is ``^.`` pattern - that explicitly matches them. The search - syntax provides the following special patterns: - - .. tabularcolumns:: |l|p{0.75\textwidth}| - - +---------+------------------------------------------------------------+ - | ^ | match at the beginning of the string, i.e., ``^start`` | - | | matches only filenames that start with "start". | - +---------+------------------------------------------------------------+ - | $ | match at the end of string, for example, ``.chi$`` selects | - | | file names ending with ".chi". A ``$`` on its own | - | | matches every string and can be used to select all files. | - +---------+------------------------------------------------------------+ - | | match number *N* preceded by any number of leading zeros, | - | | e.g., ``<7>`` would match in "f7.chi", "f007.chi", but not | - | | in "f77.chi". | - +---------+------------------------------------------------------------+ - | | match an integer range from *N* to *M* inclusive. | - | | The matched number may have one or more leading zeros. | - +---------+------------------------------------------------------------+ - | <7-> | match number 7 or larger. | - +---------+------------------------------------------------------------+ - | <-7> | match number 7 or smaller. | - +---------+------------------------------------------------------------+ - | <-> | match any integer number. | - +---------+------------------------------------------------------------+ - | \+ | start a new pattern group, for example, ``.chi$ + .dat$`` | - +---------+------------------------------------------------------------+ - | / | set search path. An argument containing the ``/`` symbol | - | | is taken as the search path, for example, ``data/`` or | - | | ``./``. Each pattern group may provide its own search | - | | path effective for that and any subsequent pattern group. | - +---------+------------------------------------------------------------+ - - The ``^$<>`` characters are often special to Unix or Windows - command shells, therefore they need to be enclosed in double - quotes (\\") when used on command line. - - .. seealso:: tutorial on :ref:`my-findexamples` - -.. option:: -l, --list - - List all input files and exit. This is useful with the - :option:`!--find` option to verify if input files - are matched as intended. - - -Configuration file options ------------------------------------------------------------------------- - -.. option:: -c CONFIG, --config=CONFIG - - Read custom configuration file after loading the default ones. - Do not load any configuration file when "NONE". - -.. option:: -s NAME, --section=NAME - - Load the custom configuration file section ``[SectionName]`` after - loading the ``[DEFAULT]`` section. This is useful for creating - several configuration variants in a single configuration file. - -.. option:: --createconfig=FILE - - Write template configuration to a new FILE and exit. Write - to the standard output when FILE is "-". - -See also the :ref:`configuration file ` section -for further details. - -.. _my-ioparameters: - -Input and output options ------------------------------------------------------------------------- - -.. confval:: inputfile - - This parameter allows to specify one or more input files in the - configuration file, one file per line. The :confval:`!inputfile` - is only used if no input files were provided on the - :program:`pdfgetx3` or :program:`pdfgetn3` command line. - -.. confval:: dataformat -.. option:: --format=FORMAT - - Format of input files. Available formats are: ``twotheta``, ``QA``, - ``Qnm`` corresponding to a two-column text data where the first - column is either the scattering angle |twotheta| in degrees, *Q* in - inverse ångströms or *Q* in inverse nanometers. - -.. confval:: backgroundfile -.. option:: -b FILE, --background=FILE - - Optional datafile with background intensities from an empty sample - holder. It must be in the same dataformat as other input files. - -.. Note :: - - The following input is only used in ``sas`` mode. - -.. confval:: formfactorfile -.. option:: -ff FILE, --formfactorfile=FILE - - Form factor intensities of the scatterers. This is required for ``sas`` mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1. - -.. _my-datapath: -.. confval:: datapath -.. option:: -d DATAPATH, --datapath=DATAPATH - - One or more extra directories to be searched for input or - background data files. The :option:`!-d` option can be specified - several times to add more directories, these are prepended in front - of any default value. Within configuration file the datapath - directories have to be listed each on a separate line. - - A special value "NONE" (or "none") clears any previously defined - paths and only the further paths, if any, would be searched for - inputs. - -.. confval:: output -.. option:: -o OUTPUT, --output=OUTPUT - - Output file name, write to the standard output when "-". The - :option:`-t, --outputtypes <-t>` option controls what results are - being saved. Normally the OUTPUT is used as a custom basename for - the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o - tokens, which are expanded as follows: - - ===== ================== ======================================= - token example definition - ===== ================== ======================================= - @h dir1/dir2 the input file directory or "." - @r dir1/dir2/filename the input path with extension removed - @e dat the input file extension without "." - @t filename.dat the tail component of the input file - @b filename the tail component with extension removed - @o gr the output extension iq, sq, fq or gr - ===== ================== ======================================= - - An empty value works the same as "@b.@o" and saves the data - in the current directory with a proper extension for the - saved results. When "@o" is not present in the OUTPUT, it is - appended as a default filename extension. - -.. confval:: outputtypes -.. option:: -t TYPES, --outputtypes=TYPES - - Result types to be saved, one or more comma separated values. - Supported values are "iq", "sq", "fq", "gr", corresponding to the - |IQ|, |SQ|, |FQ| and |Gr| curves; these are also used as output - file extensions. - - Result files are not written when empty, "none" or "NONE". - -.. confval:: force -.. option:: --force=FORCE - - Overwrite existing output files. By default the output - files are not written if they already exist. Possible values - in a configuration file are "true", "yes", "on", "1" or - "false", "no", "off", "0" or "once". The special value "once" - permits one overwrite and then resets ``config.force`` to - ``False``. Note that in interactive mode the values assigned - to ``config.force`` are converted to Python :py:class:`bool` - unless equal to "once". - - -.. _my-pdfparameters: - -PDF parameters ------------------------------------------------------------------------- - - -.. confval:: mode -.. option:: --mode=STRING - - The PDF conversion mode, i.e., the name of the - :py:func:`.pdfgetter` setup. The available modes correspond - to the radiation type used in powder diffraction experiment and can - be "xray" or "neutron". - -.. confval:: wavelength -.. option:: -w FLOAT, --wavelength=FLOAT - - X-ray wavelength in ångströms. This value is required - for the "twotheta" dataformat in order to convert the scattering - angles |twotheta| to a momentum transfer *Q*. For other data formats - the wavelength is not necessary and may be left undefined. - -.. confval:: twothetazero -.. option:: --twothetazero=FLOAT - - Position of the zero scattering angle in diffractometer degrees. - This parameter corrects for a constant offset in the - measured |twotheta| values. When loading configuration file - it is assumed 0 unless specified otherwise. This parameter - is only effective for the "twotheta" dataformat. - -.. confval:: composition -.. option:: --composition=STRING - - Chemical composition of the sample. Supported formats are - "PbTi0.5Zr0.5O3", "Pb 1 Ti 1/2 Zr 1/2 O 3" or "CH3 (CH2)3 OH". - Space characters are ignored, unit counts can be omitted, but it is - important to use a proper upper and lower case in atom symbols. - Elements can appear several times in the formula, e.g., "CH3 CH3", - and the formula may contain parentheses or fractional - stoichiometries. - -.. confval:: bgscale -.. option:: --bgscale=FLOAT - - Scaling of the background intensities loaded from the - :confval:`backgroundfile`, by default 1. - -.. confval:: rpoly -.. option:: --rpoly=FLOAT - - *r*-limit for the maximum frequency in the |FQ| correction polynomial. - The PDF is unreliable at shorter *r*, however a - very small :confval:`!rpoly` would disable polynomial correction and - give noisy PDF. - Larger values produce closer fits with a higher degree polynomial, - but when too large, they might smooth-out a useful signal in the - data. The default is 0.9. - -.. confval:: qmaxinst -.. option:: --qmaxinst - - The *Q* cutoff for the meaningful input intensities in inverse - ångströms. Some data files may contain trailing zeros - or unreliable intensities at the upper bound of the detector range. - The :confval:`!qmaxinst` defines a threshold for unreliable data. - The parameter is also used as an upper boundary for the polynomial - fit correction of the |SQ| data. - -.. confval:: qmin -.. option:: --qmin - - The lower *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. - -.. confval:: qmax -.. option:: --qmax - - The upper *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. This is essentially a limit, where sample - signal decays to the level of data noise. - -.. confval:: rmin -.. option:: --rmin=FLOAT - - Lower bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rmax -.. option:: --rmax=FLOAT - - Upper bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rstep -.. option:: --rstep=FLOAT - - Spacing of the *r*-grid for the calculated PDF in ångströms. - - -Other parameters ------------------------------------------------------------------------- - -.. confval:: plot -.. option:: -p TYPES, --plot=TYPES - - Plot the specified results. A comma separated list with one or - more items from "iq", "sq", "fq", "gr". No plot is produced when - empty, "none" or "NONE". Setting this option turns on the - interactive mode. - -.. confval:: interact -.. option:: -i, --interact - - Start an IPython interactive session after processing all files. - Useful for tuning the configuration parameters or interactive - plotting. This is always on when plot option has been set. - See also :doc:`interact` for further details. - -.. confval:: verbose -.. option:: --verbose=VALUE - - Level of detail for the program to report about its actions. - Possible values are "error", "warning", "info", "debug", "all" or an - integer number from 0 to 5. Messages are completely suppressed when - 0, all messages are printed when verbose is 5 ("all") or higher. - This option is useful for diagnostics of any unexpected behavior - in the program. diff --git a/static_root/doc/pdfgetx/2.1.2/_sources/plotdata.rst.txt b/static_root/doc/pdfgetx/2.1.2/_sources/plotdata.rst.txt deleted file mode 100644 index d1c02156..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_sources/plotdata.rst.txt +++ /dev/null @@ -1,161 +0,0 @@ -.. index:: plotdata (program) -.. _cmd-plotdata: - -The plotdata program -======================================================================== - -.. include:: abbreviations.txt -.. program:: plotdata - -The PDFgetX3 software includes a simple stand-alone utility -:program:`plotdata` for plotting text data files. In most cases -this program can be invoked from a command-shell as :: - - plotdata file1.dat file2.dat - -which plots the numerical data from the text files :file:`file1.dat`, -:file:`file2.dat` together in a single graph. By default the first -column is used as an *x* variable and the second column is used for the -*y* values. After displaying the plot the program starts an `IPython`_ -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the :data:`!filenames` variable -containing a list of plotted files. It also pre-loads the -|plotdata| and |findfiles| functions just as in PDFgetX3 -interactive session. The :py:func:`!plotdata` -function works in a similar way as the :program:`plotdata` program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -:py:func:`!plotdata` function would be:: - - In [1]: plotdata(['file1.dat', 'file2.dat']) - - -Selecting files ------------------------------------------------------------------------- - -The :program:`plotdata` program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as ``*.dat``. The file search feature is controlled by the -following options: - -.. option:: -f, --find - - Use command line arguments as filename patterns and plot all matching - files. This option works in the same way as for - :program:`pdfgetx3`, for full details see the - :option:`pdfgetx3 --find ` documentation. Note that - within command line the special patterns ``^$<>`` need to be quoted - in double quotes (\\") so they are not processed by command shell. - -.. option:: -l, --list - - List the input files and exit. This is useful in conjunction - with the :option:`!-f, --find` option to check if data files - are selected as intended. - -Assuming the current directory contains 20 files named -:file:`file1.dat`, :file:`file2.dat`, ..., :file:`file20.dat`, -the plotting of files 9 to 13 could be done (with a check listing) -as follows :: - - $ plotdata -fl "<9-13>.dat" - file9.dat - file10.dat - file11.dat - file12.dat - file13.dat - $ plotdata -f "<9-13>.dat" - -Within an interactive IPython session the equivalent plot could be -produced by combining the |plotdata| and |findfiles| functions as :: - - In [1]: plotdata(findfiles("<9-13>.dat")) - - -Selecting x and y data ------------------------------------------------------------------------- - -The :program:`plotdata` program provides several ways of selecting -columns for *x* or *y* data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is "0" -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function): - - -.. option:: -x X - - index or name of the *x*-column to plot. See the :option:`-y` option - for the supported syntax, but note that ``X`` may select only one - column. When set to "." use the data-row index for *x*. - -.. option:: -y Y - - index or name of the *y*-column or columns to plot. The ``Y`` column - specification can be a comma separated list of indices, column names - or Python-like ranges, for example "1,2", "G", "1:4" (START:STOP, - same as "1,2,3"), "1:4:2" (START:STOP:STEP, same as "1,3"), or - "-2:" (same as "-2,-1", i.e, the last 2 columns). Because column - indexing starts at "0" the second column must be specified as "1". - - The column names work if the data section in the file is preceded by - a headline of unique column names, for example:: - - x square cube - 1 1 1 - 2 4 8 - 3 9 27 - 4 16 64 - - For such data file the plotdata program will recognize column names - "x", "square" and "cube" and an implicit "." for row index. - -.. option:: -s STYLE, --style=STYLE - - optional plot format specification. See the - :func:`matplotlib.pyplot.plot` function - for a list of available formats. - -.. option:: -L LOG, --log=LOG - - axes to be plotted with logarithmic scaling, for example, "x", "y" or - "xy". Axes not listed in ``LOG`` will use linear scaling. - -.. option:: -h, --help - - display a brief usage info and exit. - -.. option:: -V, --version - - show program version and exit. - -.. option:: --manual - - Open this manual page in a Web browser and exit. - - -Examples ------------------------------------------------------------------------- - -The examples directory :file:`plotdata` contains a :file:`sincos.dat` -file that has 3-columns of values labeled as "x", "sin" and "cos". -Here are several examples of the :program:`plotdata` capabilities -when used from command line - the user is encouraged to try them out:: - - plotdata sincos.dat - plotdata -y 1,2 sincos.dat - plotdata -x . -y 0:3 sincos.dat - plotdata -y cos sincos.dat - plotdata -x sin -y cos -sr-- sincos.dat - -An equivalent usage from a general IPython session would be:: - - ipython --matplotlib=auto - In [1]: from diffpy.pdfgetx.plotdata import plotdata - In [2]: plotdata('sincos.dat') - In [3]: plotdata('sincos.dat', y=[1,2]) - In [4]: plotdata('sincos.dat', x='.', y=':3') - In [5]: plotdata('sincos.dat', y='cos') - In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--') diff --git a/static_root/doc/pdfgetx/2.1.2/_sources/quick-start.rst.txt b/static_root/doc/pdfgetx/2.1.2/_sources/quick-start.rst.txt deleted file mode 100644 index 0b2fffd1..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_sources/quick-start.rst.txt +++ /dev/null @@ -1,163 +0,0 @@ -Quick-start guide -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing :program:`pdfgetx3`, :program:`pdfgetn3`, or -:program:`pdfgets3` in a shell window. Please, refer to the :doc:`installation ` section if this is not working yet. - -.. index:: pdfgetx3 (program) -.. _cmd-pdfgetx3: - -pdfgetx3 command ------------------------------------------------------------------------- - -The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as :: - - pdfgetx3 [options] input1 input2 ... inputN - -The :file:`inputN` stands for an input powder diffraction data. The -:file:`inputN` file is a simple two-column text file, where the first -column corresponds to either the |twotheta| diffraction angle, or a -momentum transfer, *Q*, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -`FIT2D program `_ using -its "chi" output format, thus we will also refer to them as "chi-files". -A typical content of a "chi" file looks as folows: - -.. code-block:: none - - Pt_bulk-00055.tif: 2-theta Scan - 2-Theta Angle (Degrees) - - 1465 - 2.0003892E-02 0.0000000E+00 - 6.0011677E-02 0.0000000E+00 - 1.0001946E-01 0.0000000E+00 - 1.4002724E-01 0.0000000E+00 - 1.8003502E-01 0.0000000E+00 - ... - -The command-line options are arguments that start with a dash "-" and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash ``--``. Options may require values. For short options, -the value may be joined to the option string, for example -:option:`!-w0.142774`, while for the long options it has to be separated -with an equal sign, e.g., :option:`!--wavelength=0.142774`. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the :doc:`options` section of -this manual. A brief summary of options can be also displayed by -executing :: - - pdfgetx3 --help - -The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the :doc:`tutorial`. -In general, the first step is to create a commented configuration file ``pdfgetx3.cfg`` using:: - - pdfgetx3 --createconfig=pdfgetx3.cfg - -The configuration file can have any name, but it is preferable -to use either :file:`pdfgetx3.cfg` or :file:`.pdfgetx3.cfg`, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the :option:`-c, --config <-c>` option. - -Open the pdfgetx3.cfg file in a **text** editor. The lines that -start with a hash mark ``#`` are comments and are not used. The lines -starting with a right brace ``[`` denote sections in the configuration -file. The active lines are all formatted as -"NAME=VALUE". Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation: - -* :confval:`dataformat` -- specifies the input data format - -* :confval:`wavelength` -- radiation wavelength in Å required for the - "twotheta" format. - -* :confval:`composition` -- chemical composition of the sample - -* :confval:`qmaxinst` -- upper *Q* boundary for a meaningful measurement - intensities. - -* :confval:`qmax` -- *Q*-cutoff for the Fourier transformation that - yields the PDF. - -Save the updated configuration file and run pdfgetx3 on the input data -:file:`FILENAME.chi` as :: - - pdfgetx3 --verbose=info -t gr FILENAME.chi - -Here the :option:`--verbose=info <--verbose>` option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The :option:`-t gr <-t>` option -tells the program to save the final |Gr| curve as a -:file:`FILENAME.gr` file in the working directory. - -The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation :: - - pdfgetx3 -c FILENAME.gr --plot=fq,gr - -Note this command does not include any .chi file and this will as -a result process the previously used input :file:`FILENAME.chi`. -The :option:`--plot=fq,gr <-p>` option tells PDFgetX3 to -display 2 plots for the reduced structure function |FQ| and the -final PDF |Gr|. The :option:`!--plot` option also implies an -:doc:`interactive mode ` -therefore the program does not exit, but starts an -interactive `IPython`_ session. To exit the interactive mode, -type ``exit()`` and press Enter. - -.. index:: pdfgetn3 (program) -.. _cmd-pdfgetn3: - -pdfgetn3 command ------------------------------------------------------------------------- - -The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the -:option:`--mode` option. Running ``pdfgetn3`` is nearly identical -to executing ``pdfgetx3 --mode=neutron``. The only difference between -these commands is that pdfgetx3 checks for configuration files -:file:`pdfgetx3.cfg` and :file:`.pdfgetx3.cfg`, whereas -pdfgetn3 looks for :file:`pdfgetn3.cfg` and :file:`.pdfgetn3.cfg`. - -.. index:: pdfgets3 (program) -.. _cmd-pdfgets3: - -pdfgets3 command ------------------------------------------------------------------------- - -The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying ``mode = sas`` in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named :file:`pdfgets3.cfg` and -:file:`.pdfgets3.cfg` in order, when no configuration file is specified. - -Please refer to the :doc:`tutorial section ` for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3. diff --git a/static_root/doc/pdfgetx/2.1.2/_sources/release.rst.txt b/static_root/doc/pdfgetx/2.1.2/_sources/release.rst.txt deleted file mode 100644 index 7ede93fa..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_sources/release.rst.txt +++ /dev/null @@ -1,3 +0,0 @@ -.. index:: release notes - -.. mdinclude:: ../../CHANGELOG.md diff --git a/static_root/doc/pdfgetx/2.1.2/_sources/tutorial.rst.txt b/static_root/doc/pdfgetx/2.1.2/_sources/tutorial.rst.txt deleted file mode 100644 index ee02754b..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_sources/tutorial.rst.txt +++ /dev/null @@ -1,744 +0,0 @@ -Tutorial -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. index:: example files -.. py:currentmodule:: diffpy.pdfgetx - -In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the :file:`examples` -folder included with the PDFgetX3 distribution. The :file:`examples` -folder can be found in the parent "doc" directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -|zipped-examples|. - - -.. index:: examples - -Nickel X-ray PDF ------------------------------------------------------------------------- - -predefined configuration file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -Change to the :file:`Ni` directory. The file named -:file:`ni300mesh_300k_nor_1-5.chi` contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the |twotheta| scattering -angles and X-ray intensities. The second file -:file:`kapton_bgrd_300k_nor_2-3.chi` contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the :file:`pdfgetx3.cfg` contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -:ref:`pdfgetx3 ` program -with the powder data file as an argument:: - - $ pdfgetx3 ni300mesh_300k_nor_1-5.chi - -For the first run there should be no output on the screen, -however a new file, :file:`ni300mesh_300k_nor_1-5.gr` should appear -in the work directory. -We can use the :ref:`plotdata ` program, -included with this software, to plot the output data:: - - $ plotdata ni300mesh_300k_nor_1-5.gr - -This will open a graph window and start an `IPython`_ interactive session. -To exit and close the figure, type ``exit()`` on the IPython prompt. -Let's run the program again, but now with a -:option:`--verbose=info <--verbose>` -option, to show more details about the program actions. :: - - $ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi - - INFO:applying pdfgetx3 defaults - INFO:set config.mode = xray - INFO:searching for default config file /home/user/.pdfgetx3.cfg - INFO:searching for default config file .pdfgetx3.cfg - INFO:searching for default config file pdfgetx3.cfg - INFO:loaded default config file pdfgetx3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi - INFO:set config.outputtypes = gr - INFO:set config.wavelength = 0.142774 - INFO:set config.composition = Ni - INFO:set config.qmaxinst = 26.5 - INFO:set config.qmax = 26.0 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 30.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'xray' - INFO:calling config_xray - INFO:started PDF processing. - INFO:processing 'ni300mesh_300k_nor_1-5.chi' - INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr' - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - INFO:elapsed time: 0.095 - -Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the :option:`!--verbose` option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the :option:`--force=yes <--force>` option, upon -which pdfgetx3 would overwrite any existing files. - -PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the -:option:`-c` option. Another option, :option:`--plot=[iq,sq,fq,gr] -<-p>` turns on plotting of the final PDF or of some other result. A -side effect of the :option:`!--plot` option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function |FQ| and the PDF curve |Gr|. This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:: - - $ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr - - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - - Variables related to PDF processing: - - pdfgetter -- PDFGetter used for calculation. - config -- configuration data used by PDFGetter. - See config.inputfiles for a list of inputs. - iraw -- matrix of input raw intensities with 2 rows per file. - iq sq fq gr -- intermediate results per each input file stored - as matrix rows. - - Functions: - - tuneconfig -- dynamically tune configuration variables. - processfiles -- process specified data files. - clearsession -- clear all elements from the inputfiles, iraw, - iq, sq, fq and gr variables. - plotdata -- plot all or selected columns from a text data file. - loaddata -- load all or selected columns from a text data file. - findfiles -- search for files matching the specified patterns. - - Use "%pdfgetx3" for a fresh run without exiting IPython. - In [1]: - -This will open a plot figure similar to - -.. image:: images/nickelfqgr.png - -Because of the :doc:`interactive mode ` implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -:interactvar:`config` variable stores all the configuration parameters, -and its content can be displayed with the :py:func:`print` -function as :: - - In [1]: print(config) - - configfile = ni300mesh_300k_nor_1-5.gr - configsection = DEFAULT - dataformat = twotheta - ... - qmax = 26.0 - ... - -The :py:func:`.processfiles` function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the |FQ| and |Gr| -curves calculated at |Qmax| = 22 |Ainv|, we can call -:py:func:`!processfiles` and pass it a keyword argument for -the new qmax as follows:: - - In [2]: processfiles(qmax=22) - - # the qmax parameter was updated to a new value, thus - In [3]: config.qmax - Out[3]: 22 - -There should be now two lines in each plot axis corresponding to -the results at |Qmax| equal 26 and 22 |Ainv|. To exit the program, -type ``exit()``. - - -processing from scratch -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -We have already encountered the command-line :option:`option -c <-c>` -for specifying a custom configuration file. A special argument "NONE", -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi - - WARNING:Nothing to do, use "-t" or "--plot" options. - ERROR:Configuration error: wavelength not specified. - ERROR:See "--help" for more hints. - -There is an error, for the wavelength is necessary to convert -the scattering angle |twotheta| to momentum transfer *Q*. The -X-ray wavelength was 0.142774 Å, which can be passed with the -:option:`-w, --wavelength <-w>` option:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 - - ... - ERROR:Configuration error: Chemical composition not known. - ERROR:See "--help" for more hints. - -There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the :option:`--composition` option. The example -below uses a "\\\\" character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni - - WARNING:Nothing to do, use "-t" or "--plot" options. - ... - -There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the :option:`-t, --outputtypes <-t>` option. -The outputtypes option recognizes the following result types: -"iq", "sq", "fq", "gr". One or more of these type strings, -separated by a comma, can be included with the -:option:`!-t` option, which will produce the corresponding -output files. An empty string, such as ``-t ""``, or ``-t NONE`` -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings. - -At this point, we will not write any output files, but will use the -:option:`--plot <-p>` option to display the calculated curves. The -:option:`!--plot` accepts the same arguments as outputtypes, so to -display the |FQ| and |Gr| curves we shall run :: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni --plot=fq,gr - - WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161 - WARNING:qmax reset to the data boundary qmaxinst=28.0865680161 - -which should open the following plot window: - -.. image:: images/nickelfqgrnoisy.png - -The graphs look terrible. The PDF is very noisy and the |FQ| curve -shows a sudden break at about 27 |Ainv|. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -:interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, -:interactvar:`fq`, :interactvar:`gr` -variables for the original raw data and intermediate results. We -are going to plot the "iq" variable that has the input intensities -resampled on the *Q* grid. The matplotlib function -:py:func:`~matplotlib.pyplot.clf` clears the figure, -the iq variable is a two-row matrix with *Q* and *I* rows, and the -:py:func:`~matplotlib.pyplot.axis` -function lets us zoom to a given range:: - - In [1]: clf() - In [2]: plot(iq[0], iq[1]) - Out[2]: [] - In [3]: axis([20, 29, 0, 3000]) - Out[3]: [20, 29, 0, 3000] - -The graph shows a sudden drop in the raw intensities at 27 |Ainv|. -The :confval:`qmaxinst` variable defines a *Q* cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 |Ainv| :: - - In [4]: processfiles(qmaxinst=26.5) - WARNING:qmax reset to the data boundary qmaxinst=26.5 - -The updated curves looks reasonable without any oscillations and -breakpoints. The :py:func:`.tuneconfig` function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type ``tuneconfig()`` to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the |FQ| and |Gr| curves change. -The :confval:`rpoly` parameter controls the degree of data-correction -polynomial and is an approximate low-*r* bound of reliable *G* -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the |Gr| -curve and save it to an output file :file:`nicmd.gr`:: - - In [14]: config.qmax = 26 - In [15]: config.outputtypes = 'gr' - In [16]: config.output = 'nicmd' - In [17]: processfiles() - - -Platinum X-ray series ------------------------------------------------------------------------- - -PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(`z-shell `_ being a notable exception). - -.. _my-findexamples: - -matching input files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The :program:`pdfgetx3` program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the :option:`-f, --find <-f>` option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option -:option:`-l, --list <-l>` makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files. - -We will try out this file search on platinum example files. Open a -terminal and navigate to the :file:`Pt` directory. There should be a -:file:`series` subdirectory with 6 chi files indexed from 903 to 908. -At first, let's stay in the :file:`Pt` directory and run the following -command :: - - $ pdfgetx3 --list --find - - Pt_bulk-00055-pdfgetx2.gr - Pt_bulk-00055-pdfgetx3.gr - Pt_bulk-00055.chi - empty_capillary-00032.chi - pdfgetx3.cfg - plotpdfcomparison.py - -Without any patterns the file search matches all files in the current -directory. Now let's try to add name patterns. There are few special -patterns, for example ``^`` matches at the beginning of the filename, ``$`` at the end and ```` matches a range of integer values from -*N* to *M*. The patterns containing ``^$<>`` need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works. - -Filenames containing "y":: - - $ pdfgetx3 --list --find y - empty_capillary-00032.chi - plotpdfcomparison.py - -Filenames that containing both "y" and "chi", here we use the -options :option:`!--list` and :option:`!--find` in an abbreviated -form :option:`!-l` and :option:`!-f`:: - - $ pdfgetx3 -lf y chi - empty_capillary-00032.chi - -Filenames that start with "e":: - - $ pdfgetx3 --list --find "^e" - empty_capillary-00032.chi - -Filenames that contain *character* "2":: - - $ pdfgetx3 --list --find 2 - Pt_bulk-00055-pdfgetx2.gr - empty_capillary-00032.chi - -Filenames that contain *numeric value* "2":: - - $ pdfgetx3 -lf "<2>" - Pt_bulk-00055-pdfgetx2.gr - -The special argument ``+`` starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both "bulk" and "chi" substrings and then -also those that have "empty" and "chi" in their names, use:: - - $ pdfgetx3 -lf bulk chi + empty chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - -When pattern groups overlap the resulting matches are -made unique and each file is listed only once :: - - $ pdfgetx3 -lf bulk chi + chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - - -data search path -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Each group of PDFgetX3 patterns can have one entry containing -forward slash "/" to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered "903" to "905" and "908" from the -:file:`series` subdirectory can be therefore matched using :: - - $ pdfgetx3 -lf series/ "<903-905>" + 908 - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00908.chi - -The current directory can be selected using `./` :: - - $ pdfgetx3 -lf series/ 903 + ./ bulk chi - series/Pt_bulk_ramp03-00903.chi - Pt_bulk-00055.chi - -When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -".chi"-ending files in the current and :file:`series` -directories can be thus found using :: - - $ pdfgetx3 -lf ".chi$" + series/ - Pt_bulk-00055.chi - empty_capillary-00032.chi - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00906.chi - series/Pt_bulk_ramp03-00907.chi - series/Pt_bulk_ramp03-00908.chi - - -output file names -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -By default the output files are saved in the current directory. The -output path, can be changed with the :option:`-o, --output <-o>` option. -The :option:`!-o` recognizes several tokens that are replaced with -parts of the input file name, for example, "@b" expands to an -extension-stripped base name. In similar faction, "@o" is replaced -with the output type extension. Thus to generate PDFs for all files -in the :file:`series` directory and save them in the -:file:`series-gr` subfolder do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o - -The extension ".@o" is automatic when not included anywhere in the -output file name. Thus to process the Pt series at |Qmax| = 18 |Ainv| -while saving the results in the same folder, but with a "_qmax18" suffix -in their filenames do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18 - -For input file :file:`Pt_bulk_ramp03-00903.chi` the :option:`!-o` option -above expands to output path :file:`series-gr/Pt_bulk_ramp03-00903_qmax18.gr`. -The :file:`series-gr` directory should now contain 12 "gr" files, -6 of them processed at |Qmax| = 27 |Ainv| as given by configuration -file and 6 others processed at |Qmax| = 18 |Ainv|. - -.. seealso:: :option:`-o, --output <-o>` for a list of output tokens - -.. index:: tuneconfig (example) -.. _my-tuneconfig: - -Interactive tuning of parameters ------------------------------------------------------------------------- - -One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the :file:`Ni` directory in the shell and process -the nickel PDF while plotting the |FQ| and |Gr| curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -:py:func:`.tuneconfig` -function from the IPython environment :: - - $ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi - ... - In [1]: tuneconfig() - -The -:py:func:`!tuneconfig` -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot. - -.. image:: images/tunenickelfqgr.png - -The *constant data scale* check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -:ref:`PDF parameters section `. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the :confval:`bgscale` parameter -if PDF has been processed without any background data. - -By default the -:py:func:`!tuneconfig` -function displays the same curves as -specified by the :option:`--plot <-p>` option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the :py:meth:`!describe` method of the -:py:func:`.pdfgetter` object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object *t4* that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the :py:func:`!tuneconfig` function :: - - $ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi - ... - Use "%pdfgetx3" for a fresh run without exiting IPython. - - In [1]: fig, ax = subplots(2) - In [2]: pdfgetter.describe() - 0 TransformTwoThetaToQA - convert x data from twotheta to Q in 1/A - 1 TransformQGridRegular - Remove the data outside the (qmin, qmaxinst) range - 2 TransformBackground - subtract background intensity - 3 TransformXrayASFnormChris - scale and normalize intensities by x-ray scattering factors - 4 TransformSQnormRPoly - Normalize S(Q) by fitting a polynomial - 5 TransformSQToFQ - Convert S(Q) to F(Q). - 6 TransformFQgrid - Resample F(Q) to a regular grid suitable for FFT - 7 TransformFQToGr - Convert F(Q) to G(r). - In [3]: t4 = pdfgetter.getTransformation(4) - In [4]: tuneconfig([t4, 'gr'], axeslist=ax) - In [5]: ax[0].legend(loc=2) - -The :py:func:`~matplotlib.pyplot.subplots` function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window: - -.. image:: images/tunenickelt4gr.png - -The tuning can be finished by clicking the ``Done`` button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the :interactvar:`config` -object, for example:: - - In [5]: config.bgscale = 1.5 - -Finally, to save the new results, we shall first confirm -:confval:`outputtypes` have been correctly set and then use the -:py:func:`.processfiles` function to redo the calculations, plots and -data output for the updated configuration. Note that the -:py:func:`!processfiles` function accepts keyword arguments for -configuration parameters. This is used at line ``In [8]`` to -turn on the :confval:`force` flag and is in effect a shortcut -for an extra ``config.force = True`` statement. :: - - In [6]: config.outputtypes - Out[6]: ['gr'] - In [7]: processfiles() - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - In [8]: processfiles(force=True) - -:file:`ni300mesh_300k_nor_1-5.gr` was successfully saved at an -updated configuration for there were no warnings after the last call. - - -Neutron PDF ------------------------------------------------------------------------- - -This example illustrates PDF extraction from -neutron powder data using :ref:`pdfgetn3 `. -Navigate to the :file:`n-Sapphire` directory in the shell. -The :file:`sapphire755.dat` file contains powder diffraction data from -sapphire (α-Al\ :sub:`2`\ O\ :sub:`3`) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The :file:`pdfgetn3.cfg` configuration file specifies -processing parameters such as :confval:`wavelength`, -:confval:`twothetazero`, :confval:`composition`, and :confval:`mode`. - -To extract the sapphire neutron PDF run :: - - $ pdfgetn3 --verbose=info sapphire755.dat - - INFO:applying pdfgetn3 defaults - INFO:set config.mode = neutron - INFO:searching for default config file /home/user/.pdfgetn3.cfg - INFO:searching for default config file .pdfgetn3.cfg - INFO:searching for default config file pdfgetn3.cfg - INFO:loaded default config file pdfgetn3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = - INFO:set config.outputtypes = fq, gr - INFO:set config.mode = neutron - INFO:set config.wavelength = 1.0989 - INFO:set config.twothetazero = -0.38 - INFO:set config.composition = Al2O3 - INFO:set config.qmaxinst = 11.2 - INFO:set config.qmax = 11.2 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 20.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'neutron' - INFO:calling config_neutron - INFO:started PDF processing. - INFO:processing 'sapphire755.dat' - INFO:resolved output file '' as 'sapphire755.fq' - INFO:written outpufile sapphire755.fq - INFO:resolved output file '' as 'sapphire755.gr' - INFO:written outpufile sapphire755.gr - INFO:elapsed time: 0.097 - -This will produce two files :file:`sapphire755.fq`, :file:`sapphire755.gr` -for the |FQ| and |Gr| functions. -To compare them with expected results use :: - - $ plotdata sapphire755-expected.fq sapphire755.fq - $ plotdata sapphire755-expected.gr sapphire755.gr - - -Fit twothetazero ------------------------------------------------------------------------- - -For a good quality PDF it is essential to use powder patterns with -accurate values of *Q*. Some instruments may produce spectra with -a slightly offset scattering angle |twotheta| which -causes inaccurate *Q* and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the :confval:`twothetazero` correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples. - -This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -`diffpy.cmi `__, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use `Anaconda Python`_ and set up a dedicated -Anaconda environment *nbcmi* for this tutorial. -This can be accomplished using the following steps:: - - $ conda create -n nbcmi -c diffpy python=2 diffpy.cmi - $ conda activate nbcmi - $ pip install path/to/diffpy.pdfgetx-VERSION.whl - -When these prerequisites are in place, -change to the :file:`n-twothetazero-fit` directory -and open the self documented Jupyter notebook as follows :: - - $ jupyter notebook fit-twothetazero.ipynb - -.. |tthzero| replace:: :confval:`!twothetazero` - -The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted |tthzero|. -After running all cells the notebook should produce similar graphs -as in the figure below. - -.. figure:: images/twothetazerofit.* - - Refinement of nickel neutron PDF for **(a)** uncorrected data - and **(b)** with a refined zero correction. - The extracted PDFs are plotted as blue circles, - simulated PDFs as red lines and - the difference is plotted offset in green below. - -The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual R\ :sub:`w` which is lowered from (a) 0.18 to (b) 0.05. - - -Small-angle-scattering PDF (sasPDF) ------------------------------------------------------------------------- - -Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using :ref:`pdfgets3 `. -To do this, navigate to the :file:`Au_DNA_NPA` directory in your terminal. -In this folder, you will find :file:`Au_DNA_NPA.chi` and -:file:`Au_DNA_FF.chi` files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in `D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008). -`_. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The :file:`pdfgets3.cfg` -configuration file specifies processing parameters such as :confval:`formfactorfile` (required by ``sas`` mode), :confval:`qmin`, :confval:`qmax`, and :confval:`mode`. - -To extract the PDF of DNA-capped DNA nanoparticle assemblies :: - - $ pdfgets3 --verbose=info Au_DNA_NPA.chi - - INFO:applying pdfgets3 defaults - INFO:set config.mode = sas - INFO:searching for default config file /home/user/.pdfgets3.cfg - INFO:searching for default config file .pdfgets3.cfg - INFO:searching for default config file pdfgets3.cfg - INFO:loaded default config file pdfgets3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = QA - INFO:set config.backgroundfile = - INFO:set config.datapath = [] - INFO:set config.formfactorfile = Au_DNA_FF.chi - INFO:set config.output = - INFO:set config.outputtypes = fq, gr - INFO:set config.force = yes - INFO:set config.mode = sas - INFO:set config.rpoly = 240.605 - INFO:set config.qmaxinst = 0.075 - INFO:set config.qmin = 0.01 - INFO:set config.qmax = 0.072 - INFO:set config.rmin = 100.0 - INFO:set config.rmax = 5000.0 - INFO:set config.rstep = 1.0 - INFO:set config.plot = iq, fq, gr - INFO:set config.verbose = info - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'sas' - INFO:calling config_sas - INFO:started PDF processing. - INFO:processing 'Au_DNA_NPA.chi' - INFO:resolved output file '' as 'Au_DNA_NPA.fq' - INFO:written outpufile Au_DNA_NPA.fq - INFO:resolved output file '' as 'Au_DNA_NPA.gr' - INFO:written outpufile Au_DNA_NPA.gr - INFO:elapsed time: 0.947 - - -This will save two files :file:`Au_DNA_NPA.fq`, :file:`Au_DNA_NPA.gr` in the same directoy for the |FQ| and |Gr| functions. This also plots |FQ| and |Gr| functions in a pop-up window and the processing parameters such as :confval:`rpoly` or so may be tuned interactively by issuing command :py:func:`!tuneconfig` in the `IPython`_ session as discussed above. diff --git a/static_root/doc/pdfgetx/2.1.2/_static/basic.css b/static_root/doc/pdfgetx/2.1.2/_static/basic.css deleted file mode 100644 index 01192852..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_static/basic.css +++ /dev/null @@ -1,768 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- 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: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.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: 450px; - 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.brackets:before, -span.brackets > a:before{ - content: "["; -} - -a.brackets:after, -span.brackets > a:after { - content: "]"; -} - -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, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -img.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 { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 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; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - 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; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -th > p:first-child, -td > p:first-child { - margin-top: 0px; -} - -th > p:last-child, -td > p:last-child { - margin-bottom: 0px; -} - -/* -- figures --------------------------------------------------------------- */ - -div.figure { - margin: 0.5em; - padding: 0.5em; -} - -div.figure p.caption { - padding: 0.3em; -} - -div.figure p.caption span.caption-number { - font-style: italic; -} - -div.figure p.caption 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 td { - vertical-align: top; -} - - -/* -- 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; -} - -li > p:first-child { - margin-top: 0px; -} - -li > p:last-child { - margin-bottom: 0px; -} - -dl.footnote > dt, -dl.citation > dt { - float: left; -} - -dl.footnote > dd, -dl.citation > dd { - margin-bottom: 0em; -} - -dl.footnote > dd:after, -dl.citation > dd: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 > dt:after { - content: ":"; -} - -dl.field-list > dd { - padding-left: 0.5em; - margin-top: 0em; - margin-left: 0em; - margin-bottom: 0em; -} - -dl { - margin-bottom: 15px; -} - -dd > p:first-child { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, span.highlighted { - background-color: #fbe54e; -} - -rect.highlighted { - fill: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.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.5em; - content: ":"; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -span.pre { - -moz-hyphens: none; - -ms-hyphens: none; - -webkit-hyphens: none; - hyphens: none; -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -div.code-block-caption { - padding: 2px 5px; - font-size: small; -} - -div.code-block-caption code { - background-color: transparent; -} - -div.code-block-caption + div > div.highlight > pre { - margin-top: 0; -} - -div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ - user-select: none; -} - -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 { - padding: 1em 1em 0; -} - -div.literal-block-wrapper div.highlight { - margin: 0; -} - -code.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -code.descclassname { - background-color: transparent; -} - -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: relative; - left: 0px; - 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_root/doc/pdfgetx/2.1.2/_static/classic.css b/static_root/doc/pdfgetx/2.1.2/_static/classic.css deleted file mode 100644 index 3496a7bb..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_static/classic.css +++ /dev/null @@ -1,271 +0,0 @@ -/* - * classic.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- classic theme. - * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -html { - /* CSS hack for macOS's scrollbar (see #1125) */ - background-color: #FFFFFF; -} - -body { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; - font-size: 100%; - background-color: white; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: white; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: white; - color: #222222; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #555555; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #555555; - text-decoration: underline; -} - -div.related { - background-color: white; - line-height: 30px; - color: #666666; -} - -div.related a { - color: #444444; -} - -div.sphinxsidebar { -} - -div.sphinxsidebar h3 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #444444; -} - -div.sphinxsidebar h4 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #444444; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #444444; -} - -div.sphinxsidebar a { - color: #444444; -} - -div.sphinxsidebar input { - border: 1px solid #444444; - font-family: sans-serif; - font-size: 1em; -} - - -/* for collapsible sidebar */ -div#sidebarbutton { - background-color: #3c6e83; -} - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #00608f; - text-decoration: none; -} - -a:visited { - color: #30306f; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - background-color: white; - font-weight: normal; - color: #1a1a1a; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #aaaaaa; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #aaaaaa; - color: white; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: #eeffcc; - color: #333333; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -code { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th, dl.field-list > dt { - background-color: #ede; -} - -.warning code { - background: #efc2c2; -} - -.note code { - background: #d6d6d6; -} - -.viewcode-back { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -div.code-block-caption { - color: #efefef; - background-color: #1c4e63; -} \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/_static/copybutton.js b/static_root/doc/pdfgetx/2.1.2/_static/copybutton.js deleted file mode 100644 index ca9f489f..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_static/copybutton.js +++ /dev/null @@ -1,57 +0,0 @@ -$(document).ready(function() { - /* Add a [>>>] button on the top-right corner of code samples to hide - * the >>> and ... prompts and the output and thus make the code - * copyable. */ - var div = $('.highlight-python .highlight,' + - '.highlight-pycon .highlight,' + - '.highlight-python3 .highlight') - var pre = div.find('pre'); - - // get the styles from the current theme - pre.parent().parent().css('position', 'relative'); - var hide_text = 'Hide the prompts and output'; - var show_text = 'Show the prompts and output'; - var border_width = pre.css('border-top-width'); - var border_style = pre.css('border-top-style'); - var border_color = pre.css('border-top-color'); - var button_styles = { - 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', - 'border-color': border_color, 'border-style': border_style, - 'border-width': border_width, 'color': border_color, 'text-size': '75%', - 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', - 'border-radius': '0 3px 0 0' - } - - // create and add the button to all the code blocks that contain >>> - div.each(function(index) { - var jthis = $(this); - if (jthis.find('.gp').length > 0) { - var button = $('>>>'); - button.css(button_styles) - button.attr('title', hide_text); - jthis.prepend(button); - } - // tracebacks (.gt) contain bare text elements that need to be - // wrapped in a span to work with .nextUntil() (see later) - jthis.find('pre:has(.gt)').contents().filter(function() { - return ((this.nodeType == 3) && (this.data.trim().length > 0)); - }).wrap(''); - }); - - // define the behavior of the button when it's clicked - $('.copybutton').toggle( - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').hide(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); - button.css('text-decoration', 'line-through'); - button.attr('title', show_text); - }, - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').show(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); - button.css('text-decoration', 'none'); - button.attr('title', hide_text); - }); -}); diff --git a/static_root/doc/pdfgetx/2.1.2/_static/doctools.js b/static_root/doc/pdfgetx/2.1.2/_static/doctools.js deleted file mode 100644 index daccd209..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_static/doctools.js +++ /dev/null @@ -1,315 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(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; -} - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { - this.initOnKeyListeners(); - } - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return 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 : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keydown(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box or textarea - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - } - } - }); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); diff --git a/static_root/doc/pdfgetx/2.1.2/_static/documentation_options.js b/static_root/doc/pdfgetx/2.1.2/_static/documentation_options.js deleted file mode 100644 index ec3d5cf2..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_static/documentation_options.js +++ /dev/null @@ -1,11 +0,0 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '2.1.2', - LANGUAGE: 'None', - COLLAPSE_INDEX: false, - BUILDER: 'html', - FILE_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: true -}; \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/_static/favicon.png b/static_root/doc/pdfgetx/2.1.2/_static/favicon.png deleted file mode 100644 index 93e4a02c..00000000 Binary files a/static_root/doc/pdfgetx/2.1.2/_static/favicon.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.2/_static/file.png b/static_root/doc/pdfgetx/2.1.2/_static/file.png deleted file mode 100644 index a858a410..00000000 Binary files a/static_root/doc/pdfgetx/2.1.2/_static/file.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.2/_static/jquery-3.4.1.js b/static_root/doc/pdfgetx/2.1.2/_static/jquery-3.4.1.js deleted file mode 100644 index 773ad95c..00000000 --- a/static_root/doc/pdfgetx/2.1.2/_static/jquery-3.4.1.js +++ /dev/null @@ -1,10598 +0,0 @@ -/*! - * jQuery JavaScript Library v3.4.1 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2019-05-01T21:04Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var document = window.document; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - -var isFunction = function isFunction( obj ) { - - // Support: Chrome <=57, Firefox <=52 - // In some browsers, typeof returns "function" for HTML elements - // (i.e., `typeof document.createElement( "object" ) === "function"`). - // We don't want to classify *any* DOM node as a function. - return typeof obj === "function" && typeof obj.nodeType !== "number"; - }; - - -var isWindow = function isWindow( obj ) { - return obj != null && obj === obj.window; - }; - - - - - var preservedScriptAttributes = { - type: true, - src: true, - nonce: true, - noModule: true - }; - - function DOMEval( code, node, doc ) { - doc = doc || document; - - var i, val, - script = doc.createElement( "script" ); - - script.text = code; - if ( node ) { - for ( i in preservedScriptAttributes ) { - - // Support: Firefox 64+, Edge 18+ - // Some browsers don't support the "nonce" property on scripts. - // On the other hand, just using `getAttribute` is not enough as - // the `nonce` attribute is reset to an empty string whenever it - // becomes browsing-context connected. - // See https://github.com/whatwg/html/issues/2369 - // See https://html.spec.whatwg.org/#nonce-attributes - // The `node.getAttribute` check was added for the sake of - // `jQuery.globalEval` so that it can fake a nonce-containing node - // via an object. - val = node[ i ] || node.getAttribute && node.getAttribute( i ); - if ( val ) { - script.setAttribute( i, val ); - } - } - } - doc.head.appendChild( script ).parentNode.removeChild( script ); - } - - -function toType( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; -} -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.4.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android <=4.0 only - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - copy = options[ name ]; - - // Prevent Object.prototype pollution - // Prevent never-ending loop - if ( name === "__proto__" || target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - src = target[ name ]; - - // Ensure proper type for the source value - if ( copyIsArray && !Array.isArray( src ) ) { - clone = []; - } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { - clone = {}; - } else { - clone = src; - } - copyIsArray = false; - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - // Evaluates a script in a global context - globalEval: function( code, options ) { - DOMEval( code, { nonce: options && options.nonce } ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android <=4.0 only - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = toType( obj ); - - if ( isFunction( obj ) || isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.4 - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://js.foundation/ - * - * Date: 2019-04-08 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - nonnativeSelectorCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - rdescend = new RegExp( whitespace + "|>" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rhtml = /HTML$/i, - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - inDisabledFieldset = addCombinator( - function( elem ) { - return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !nonnativeSelectorCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) && - - // Support: IE 8 only - // Exclude object elements - (nodeType !== 1 || context.nodeName.toLowerCase() !== "object") ) { - - newSelector = selector; - newContext = context; - - // qSA considers elements outside a scoping root when evaluating child or - // descendant combinators, which is not what we want. - // In such cases, we work around the behavior by prefixing every selector in the - // list with an ID selector referencing the scope context. - // Thanks to Andrew Dupont for this technique. - if ( nodeType === 1 && rdescend.test( selector ) ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[i] = "#" + nid + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - nonnativeSelectorCache( selector, true ); - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement("fieldset"); - - try { - return !!fn( el ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || - - // Where there is no isDisabled, check manually - /* jshint -W018 */ - elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; - } - - return elem.disabled === disabled; - - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } - - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - var namespace = elem.namespaceURI, - docElem = (elem.ownerDocument || elem).documentElement; - - // Support: IE <=8 - // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes - // https://bugs.jquery.com/ticket/4833 - return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9-11, Edge - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - if ( preferredDoc !== document && - (subWindow = document.defaultView) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( el ) { - el.className = "i"; - return !el.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( el ) { - el.appendChild( document.createComment("") ); - return !el.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - }); - - // ID filter and find - if ( support.getById ) { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( (elem = elems[i++]) ) { - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( el ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement("input"); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll(":enabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll(":disabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( el ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === document ? -1 : - b === document ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - if ( support.matchesSelector && documentIsHTML && - !nonnativeSelectorCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) { - nonnativeSelectorCache( expr, true ); - } - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return (sel + "").replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - // Use previously-cached element index if available - if ( useCache ) { - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? - argument + length : - argument > length ? - length : - argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( (oldCache = uniqueCache[ key ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context === document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - if ( !context && elem.ownerDocument !== document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context || document, xml) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( el ) { - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( el ) { - return el.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -}; -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Filtered directly for both simple and complex selectors - return jQuery.filter( qualifier, elements, not ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( typeof elem.contentDocument !== "undefined" ) { - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && toType( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && - - // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // rejected_handlers.disable - // fulfilled_handlers.disable - tuples[ 3 - i ][ 3 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock, - - // progress_handlers.lock - tuples[ 0 ][ 3 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the master Deferred - master = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || - isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return master.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); - } - - return master.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( toType( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; - - -// Matches dashed string for camelizing -var rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g; - -// Used by camelCase as callback to replace() -function fcamelCase( all, letter ) { - return letter.toUpperCase(); -} - -// Convert dashed to camelCase; used by the css and data modules -// Support: IE <=9 - 11, Edge 12 - 15 -// Microsoft forgot to hump their vendor prefix (#9572) -function camelCase( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); -} -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( camelCase ); - } else { - key = camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var documentElement = document.documentElement; - - - - var isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ); - }, - composed = { composed: true }; - - // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only - // Check attachment across shadow DOM boundaries when possible (gh-3504) - // Support: iOS 10.0-10.2 only - // Early iOS 10 versions support `attachShadow` but not `getRootNode`, - // leading to errors. We need to check for `getRootNode`. - if ( documentElement.getRootNode ) { - isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ) || - elem.getRootNode( composed ) === elem.ownerDocument; - }; - } -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && - - // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - isAttached( elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - -var swap = function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, scale, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = elem.nodeType && - ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Support: Firefox <=54 - // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) - initial = initial / 2; - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - while ( maxIterations-- ) { - - // Evaluate and update our best guess (doubling guesses that zero out). - // Finish if the scale equals or crosses 1 (making the old*new product non-positive). - jQuery.style( elem, prop, initialInUnit + unit ); - if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { - maxIterations = 0; - } - initialInUnit = initialInUnit / scale; - - } - - initialInUnit = initialInUnit * 2; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); - -var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); - - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // Support: IE <=9 only - option: [ 1, "" ], - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] -}; - -// Support: IE <=9 only -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, attached, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( toType( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - attached = isAttached( elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( attached ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -} )(); - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 - 11+ -// focus() and blur() are asynchronous, except when they are no-op. -// So expect focus to be synchronous when the element is already active, -// and blur to be synchronous when the element is not already active. -// (focus and blur are always synchronous in other supported browsers, -// this just defines when we can count on it). -function expectSync( elem, type ) { - return ( elem === safeActiveElement() ) === ( type === "focus" ); -} - -// Support: IE <=9 only -// Accessing document.activeElement can throw unexpectedly -// https://bugs.jquery.com/ticket/13393 -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = {}; - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - // Make a writable jQuery.Event from the native event object - var event = jQuery.event.fix( nativeEvent ); - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // If the event is namespaced, then each handler is only invoked if it is - // specially universal or its namespaces are a superset of the event's. - if ( !event.rnamespace || handleObj.namespace === false || - event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && - - // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && - - // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - - // Utilize native event to ensure correct state for checkable inputs - setup: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Claim the first handler - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - // dataPriv.set( el, "click", ... ) - leverageNative( el, "click", returnTrue ); - } - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Force setup before triggering a click - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - leverageNative( el, "click" ); - } - - // Return non-false to allow normal event-path propagation - return true; - }, - - // For cross-browser consistency, suppress native .click() on links - // Also prevent it if we're currently inside a leveraged native-event stack - _default: function( event ) { - var target = event.target; - return rcheckableType.test( target.type ) && - target.click && nodeName( target, "input" ) && - dataPriv.get( target, "click" ) || - nodeName( target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -// Ensure the presence of an event listener that handles manually-triggered -// synthetic events by interrupting progress until reinvoked in response to -// *native* events that it fires directly, ensuring that state changes have -// already occurred before other listeners are invoked. -function leverageNative( el, type, expectSync ) { - - // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add - if ( !expectSync ) { - if ( dataPriv.get( el, type ) === undefined ) { - jQuery.event.add( el, type, returnTrue ); - } - return; - } - - // Register the controller as a special universal handler for all event namespaces - dataPriv.set( el, type, false ); - jQuery.event.add( el, type, { - namespace: false, - handler: function( event ) { - var notAsync, result, - saved = dataPriv.get( this, type ); - - if ( ( event.isTrigger & 1 ) && this[ type ] ) { - - // Interrupt processing of the outer synthetic .trigger()ed event - // Saved data should be false in such cases, but might be a leftover capture object - // from an async native handler (gh-4350) - if ( !saved.length ) { - - // Store arguments for use when handling the inner native event - // There will always be at least one argument (an event object), so this array - // will not be confused with a leftover capture object. - saved = slice.call( arguments ); - dataPriv.set( this, type, saved ); - - // Trigger the native event and capture its result - // Support: IE <=9 - 11+ - // focus() and blur() are asynchronous - notAsync = expectSync( this, type ); - this[ type ](); - result = dataPriv.get( this, type ); - if ( saved !== result || notAsync ) { - dataPriv.set( this, type, false ); - } else { - result = {}; - } - if ( saved !== result ) { - - // Cancel the outer synthetic event - event.stopImmediatePropagation(); - event.preventDefault(); - return result.value; - } - - // If this is an inner synthetic event for an event with a bubbling surrogate - // (focus or blur), assume that the surrogate already propagated from triggering the - // native event and prevent that from happening again here. - // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the - // bubbling surrogate propagates *after* the non-bubbling base), but that seems - // less bad than duplication. - } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { - event.stopPropagation(); - } - - // If this is a native event triggered above, everything is now in order - // Fire an inner synthetic event with the original arguments - } else if ( saved.length ) { - - // ...and capture the result - dataPriv.set( this, type, { - value: jQuery.event.trigger( - - // Support: IE <=9 - 11+ - // Extend with the prototype to reset the above stopImmediatePropagation() - jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), - saved.slice( 1 ), - this - ) - } ); - - // Abort handling of the native event - event.stopImmediatePropagation(); - } - } - } ); -} - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || Date.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - code: true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } -}, jQuery.event.addProp ); - -jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { - jQuery.event.special[ type ] = { - - // Utilize native event if possible so blur/focus sequence is correct - setup: function() { - - // Claim the first handler - // dataPriv.set( this, "focus", ... ) - // dataPriv.set( this, "blur", ... ) - leverageNative( this, type, expectSync ); - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function() { - - // Force setup before trigger - leverageNative( this, type ); - - // Return non-false to allow normal event-path propagation - return true; - }, - - delegateType: delegateType - }; -} ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - /* eslint-disable max-len */ - - // See https://github.com/eslint/eslint/issues/3229 - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, - - /* eslint-enable */ - - // Support: IE <=10 - 11, Edge 12 - 13 only - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( elem ).children( "tbody" )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { - elem.type = elem.type.slice( 5 ); - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.access( src ); - pdataCur = dataPriv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - valueIsFunction = isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( valueIsFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( valueIsFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl && !node.noModule ) { - jQuery._evalUrl( node.src, { - nonce: node.nonce || node.getAttribute( "nonce" ) - } ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && isAttached( node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html.replace( rxhtmlTag, "<$1>" ); - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = isAttached( elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - -var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - container.style.cssText = "position:absolute;left:-11111px;width:60px;" + - "margin-top:1px;padding:0;border:0"; - div.style.cssText = - "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + - "margin:auto;border:1px;padding:1px;" + - "width:60%;top:1%"; - documentElement.appendChild( container ).appendChild( div ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; - - // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 - // Some styles come back with percentage values, even though they shouldn't - div.style.right = "60%"; - pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; - - // Support: IE 9 - 11 only - // Detect misreporting of content dimensions for box-sizing:border-box elements - boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; - - // Support: IE 9 only - // Detect overflow:scroll screwiness (gh-3699) - // Support: Chrome <=64 - // Don't get tricked when zoom affects offsetWidth (gh-4029) - div.style.position = "absolute"; - scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - function roundPixelMeasures( measure ) { - return Math.round( parseFloat( measure ) ); - } - - var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, - reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - jQuery.extend( support, { - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelBoxStyles: function() { - computeStyleTests(); - return pixelBoxStylesVal; - }, - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - }, - scrollboxSize: function() { - computeStyleTests(); - return scrollboxSizeVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !isAttached( elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style, - vendorProps = {}; - -// Return a vendor-prefixed property or undefined -function vendorPropName( name ) { - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a potentially-mapped jQuery.cssProps or vendor prefixed property -function finalPropName( name ) { - var final = jQuery.cssProps[ name ] || vendorProps[ name ]; - - if ( final ) { - return final; - } - if ( name in emptyStyle ) { - return name; - } - return vendorProps[ name ] = vendorPropName( name ) || name; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }; - -function setPositiveNumber( elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { - var i = dimension === "width" ? 1 : 0, - extra = 0, - delta = 0; - - // Adjustment may not be necessary - if ( box === ( isBorderBox ? "border" : "content" ) ) { - return 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin - if ( box === "margin" ) { - delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); - } - - // If we get here with a content-box, we're seeking "padding" or "border" or "margin" - if ( !isBorderBox ) { - - // Add padding - delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // For "border" or "margin", add border - if ( box !== "padding" ) { - delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - - // But still keep track of it otherwise - } else { - extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - - // If we get here with a border-box (content + padding + border), we're seeking "content" or - // "padding" or "margin" - } else { - - // For "content", subtract padding - if ( box === "content" ) { - delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // For "content" or "padding", subtract border - if ( box !== "margin" ) { - delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - // Account for positive content-box scroll gutter when requested by providing computedVal - if ( !isBorderBox && computedVal >= 0 ) { - - // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border - // Assuming integer scroll gutter, subtract the rest and round down - delta += Math.max( 0, Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - computedVal - - delta - - extra - - 0.5 - - // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter - // Use an explicit zero to avoid NaN (gh-3964) - ) ) || 0; - } - - return delta; -} - -function getWidthOrHeight( elem, dimension, extra ) { - - // Start with computed style - var styles = getStyles( elem ), - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). - // Fake content-box until we know it's needed to know the true value. - boxSizingNeeded = !support.boxSizingReliable() || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - valueIsBorderBox = isBorderBox, - - val = curCSS( elem, dimension, styles ), - offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); - - // Support: Firefox <=54 - // Return a confounding non-pixel value or feign ignorance, as appropriate. - if ( rnumnonpx.test( val ) ) { - if ( !extra ) { - return val; - } - val = "auto"; - } - - - // Fall back to offsetWidth/offsetHeight when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - // Support: Android <=4.1 - 4.3 only - // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - // Support: IE 9-11 only - // Also use offsetWidth/offsetHeight for when box sizing is unreliable - // We use getClientRects() to check for hidden/disconnected. - // In those cases, the computed value can be trusted to be border-box - if ( ( !support.boxSizingReliable() && isBorderBox || - val === "auto" || - !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && - elem.getClientRects().length ) { - - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Where available, offsetWidth/offsetHeight approximate border box dimensions. - // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the - // retrieved value as a content box dimension. - valueIsBorderBox = offsetProp in elem; - if ( valueIsBorderBox ) { - val = elem[ offsetProp ]; - } - } - - // Normalize "" and auto - val = parseFloat( val ) || 0; - - // Adjust for the element's box model - return ( val + - boxModelAdjustment( - elem, - dimension, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles, - - // Provide the current computed size to request scroll gutter calculation (gh-3589) - val - ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "gridArea": true, - "gridColumn": true, - "gridColumnEnd": true, - "gridColumnStart": true, - "gridRow": true, - "gridRowEnd": true, - "gridRowStart": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: {}, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append - // "px" to a few hardcoded values. - if ( type === "number" && !isCustomProp ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( i, dimension ) { - jQuery.cssHooks[ dimension ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && - - // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, dimension, extra ); - } ) : - getWidthOrHeight( elem, dimension, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = getStyles( elem ), - - // Only read styles.position if the test has a chance to fail - // to avoid forcing a reflow. - scrollboxSizeBuggy = !support.scrollboxSize() && - styles.position === "absolute", - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) - boxSizingNeeded = scrollboxSizeBuggy || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - subtract = extra ? - boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ) : - 0; - - // Account for unreliable border-box dimensions by comparing offset* to computed and - // faking a content-box to get border and padding (gh-3699) - if ( isBorderBox && scrollboxSizeBuggy ) { - subtract -= Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - parseFloat( styles[ dimension ] ) - - boxModelAdjustment( elem, dimension, "border", false, styles ) - - 0.5 - ); - } - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ dimension ] = value; - value = jQuery.css( elem, dimension ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || - elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( prefix !== "margin" ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || - tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = Date.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 15 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY and Edge just mirrors - // the overflowX value there. - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - result.stop.bind( result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = Date.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && - elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -function classesToArray( value ) { - if ( Array.isArray( value ) ) { - return value; - } - if ( typeof value === "string" ) { - return value.match( rnothtmlwhite ) || []; - } - return []; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isValidValue = type === "string" || Array.isArray( value ); - - if ( typeof stateVal === "boolean" && isValidValue ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( isValidValue ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = classesToArray( value ); - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, valueIsFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - valueIsFunction = isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( valueIsFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - - // Don't return options that are disabled or in a disabled optgroup - !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -support.focusin = "onfocusin" in window; - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - stopPropagationCallback = function( e ) { - e.stopPropagation(); - }; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = lastElement = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - lastElement = cur; - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - - if ( event.isPropagationStopped() ) { - lastElement.addEventListener( type, stopPropagationCallback ); - } - - elem[ type ](); - - if ( event.isPropagationStopped() ) { - lastElement.removeEventListener( type, stopPropagationCallback ); - } - - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = Date.now(); - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } - - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && toType( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - if ( a == null ) { - return ""; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response - * Also sets the responseXXX fields on the jqXHR instance - */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /\bxml\b/, - html: /\bhtml/, - json: /\bjson\b/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": JSON.parse, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() + " " ] = - ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) - .concat( match[ 2 ] ); - } - } - match = responseHeaders[ key.toLowerCase() + " " ]; - } - return match == null ? null : match.join( ", " ); - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 15 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available and should be processed, append data to url - if ( s.data && ( s.processData || typeof s.data === "string" ) ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - - -jQuery._evalUrl = function( url, options ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - - // Only evaluate the response if it is successful (gh-4126) - // dataFilter is not invoked for failure responses, so using it instead - // of the default converter is kludgy but it works. - converters: { - "text script": function() {} - }, - dataFilter: function( response ) { - jQuery.globalEval( response, options ); - } - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var htmlIsFunction = isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.ontimeout = - xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain or forced-by-attrs requests - if ( s.crossDomain || s.scriptAttrs ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( " - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Files used in PDF extraction

-
-

Configuration file

-

Configuration files may define the PDF processing parameters. -By default, the pdfgetx3 program attempts to read -.pdfgetx3.cfg file from the user HOME directory, -then .pdfgetx3.cfg and pdfgetx3.cfg files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the -c, --config option. -The pdfgetn3 program works in the same way, -except it checks for configuration files -~/.pdfgetn3.cfg, .pdfgetn3.cfg and pdfgetn3.cfg.

-

The easiest way of creating a configuration file is to generate -a template content using the --createconfig option as

-
pdfgetx3 --createconfig=test.cfg
-
-
-

and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple “varname=value” syntax, -any lines starting with “#” are ignored as comments.

-

The configuration file has several sections marked as [SECTIONNAME]. -The [DEFAULT] section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the -s, --section option on the -command line. Thus

-
pdfgetx3 --config=test.cfg --section=nacl
-
-
-

would read the parameters from the [nacl] section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section.

-
-
-

Input files

-

PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -2Θ in degrees, momentum transfer Q in inverse nanometers or Q -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the dataformat parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values.

-

The input files are usually passed as command-line arguments to -pdfgetx3 or pdfgetn3 programs and must be paths -accessible from the current working directory.

-

Input files can be also defined by setting the inputfile -value in the configuration file. The -d, --datapath -option can be then used to provide additional data directories to -search for these inputs and for the backgroundfile. -This is to support configuration files located in a different -directory than the data.

-

When the --find option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory.

-
-
-

Output files

-

PDFgetX3 and PDFgetN3 can produce up to four different output data files:

-
    -
  • .iq – I(Q), the background-corrected -intensities sampled on a regular Q-space grid in inverse ångströms,

  • -
  • .sq – S(Q), the total scattering structure function, -with intensities normalized by average scattering factors and -corrected by a polynomial fit,

  • -
  • .fq – F(Q), the reduced structure function equal to Q(S(Q) - 1),

  • -
  • .gr – G(r), the resultant PDF, where the first column is the -separation r in ångströms and the second is the function G in -Å-2.

  • -
-

You can specify what output files should be produced by setting the -outputtypes parameter in the configuration file or by -passing the -t, --outputtypes on the command line.

-

The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the --config option, -the PDFgetX3 will reproduce the previous calculation.

-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/genindex.html b/static_root/doc/pdfgetx/2.1.2/genindex.html deleted file mode 100644 index 42762ade..00000000 --- a/static_root/doc/pdfgetx/2.1.2/genindex.html +++ /dev/null @@ -1,844 +0,0 @@ - - - - - - - Index — diffpy.pdfgetx 2.1.2 documentation - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - -

Index

- -
- Symbols - | A - | B - | C - | D - | E - | F - | G - | I - | L - | M - | O - | P - | Q - | R - | S - | T - | V - | W - -
-

Symbols

- - - -
- -

A

- - -
- -

B

- - - -
- -

C

- - - -
- -

D

- - - -
- -

E

- - - -
- -

F

- - - -
- -

G

- - -
- -

I

- - - -
- -

L

- - - -
- -

M

- - -
- -

O

- - - -
- -

P

- - - -
- -

Q

- - - -
- -

R

- - - -
- -

S

- - -
- -

T

- - - -
- -

V

- - -
- -

W

- - -
- - - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/index.html b/static_root/doc/pdfgetx/2.1.2/index.html deleted file mode 100644 index 0bb9c48e..00000000 --- a/static_root/doc/pdfgetx/2.1.2/index.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - diffpy.pdfgetx — diffpy.pdfgetx 2.1.2 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/install.html b/static_root/doc/pdfgetx/2.1.2/install.html deleted file mode 100644 index 852707f7..00000000 --- a/static_root/doc/pdfgetx/2.1.2/install.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - Installation — diffpy.pdfgetx 2.1.2 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Installation

-
-

Software requirements

-

This software is written in Python programming language, therefore -you must have Python 3.8, 3.7, 3.6, 3.5 or 2.7 installed. In addition, -the following third-party Python libraries are also required:

-
    -
  • pip - Python package installer

  • -
  • setuptools - tools for installing Python packages

  • -
  • six - Python 2 and 3 compatibility library

  • -
  • NumPy - library for scientific computing with Python

  • -
  • matplotlib - Python plotting library

  • -
  • IPython - enhanced interactive Python shell

  • -
-

Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -Python Package Index -or using any Internet search engine.

-

Another more convenient option is to obtain one of the science-oriented -Python distributions such as -Anaconda Python, -Enthought Canopy or -PythonXY, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step.

-

On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command

-
sudo apt-get install \
-  python3-pip python3-setuptools python3-six \
-  python3-numpy python3-matplotlib ipython3
-
-
-

This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above.

-

On Windows operating system, it may be necessary to add the -C:\Python37 directory and the scripts directory -C:\Python37\Scripts to the system PATH. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the Command Prompt, type -there python and see if this starts the Python interpreter.

-

Alternately, if you want to run the diffpy.pdfgetx software with a specific version of Python, -we recommend using a virtual environment, such as conda. For example, if you have Anaconda Python installed, -you can create a conda virtual environment to install the software as follow

-
conda create --name pdfgetx_env python=3.8 numpy matplotlib ipython
-
-
-

You can choose the name of the environment and python version as you desire. You can choose any of the -supported Python versions. Then, activate this environment and follow the instructions in the -next section to install the software

-
conda activate pdfgetx_env
-
-
-
-
-

Installation

-

The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -Columbia Technology Ventures. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:

-
pip install ./diffpy.pdfgetx-VERSION.whl
-
-
-

Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending sudo to the command line above. If root access is not available, use the pip install options --user or --prefix to install the software to a user-writable directory.

-

The package provides three programs for PDF conversion, pdfgetx3, pdfgetn3 and pdfgets3. To check if they are correctly installed run

-
pdfgetx3 --version
-pdfgetn3 --version
-pdfgets3 --version
-
-
-

This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a plotdata -command for an easy plotting of text data files. To verify -if plotdata works, run the plotdata --version command. -Finally, a comprehensive test of the installed software can -be executed using

-
python -m diffpy.pdfgetx.tests.run
-
-
-
-

Note

-

Older versions of diffpy.pdfgetx use Python egg format -instead of Python wheel. -To install these use the easy_install command as follows:

-
python -m easy_install ./diffpy.pdfgetx-VERSION.egg
-
-
-
-
-
-

IPython magic command

-

These instructions are intended for IPython users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don’t plan to customize IPython in such way you can safely skip -this paragraph.

-

When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The %pdfgetx3, %pdfgetn3 and %pdfgets3 magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session.

-

The %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up

-
    -
  1. find the profile_default/ipython_config.py file and open it -in a text editor. If that file does not exists, -create it first by executing

    -
    ipython profile create
    -
    -
    -
  2. -
  3. navigate to the paragraph that contains the -c.InteractiveShellApp.extensions and add there -the following line

    -
    c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics']
    -
    -
    -

    There must be no leading indent, i.e., the text must start at the -very first column.

    -
  4. -
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/interact.html b/static_root/doc/pdfgetx/2.1.2/interact.html deleted file mode 100644 index 13c1c910..00000000 --- a/static_root/doc/pdfgetx/2.1.2/interact.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - Interactive mode — diffpy.pdfgetx 2.1.2 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Interactive mode

-

The interactive mode is activated by using either the --i, --interact option or a non-empty ---plot option. In the interactive mode -the program starts an IPython interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands %pdfgetx3 and %pdfgetn3, which can be used with -the same syntax as the pdfgetx3 and pdfgetn3 in -system shell. -The interactive session is also initialized with all functions from the -matplotlib.pyplot module for convenient plotting. -The functions and variables related to PDF processing are:

-
-
-pdfgetter(x=None, y=None, filename='', **kwargs)
-

Instance of the PDFGetter class which serves as a -low-level function that calculates the PDF. This is a callable -object, which takes as an argument a pair of input arrays for -(Q, intensity) or (2Θ, intensity) depending on -dataformat. It can be also called with a keyword -argument filename=FILE, which would read the input arrays -from the specified file. When called with no arguments, -it calculates PDF from the last input data.

-
-
Parameters
-
    -
  • x (numpy.ndarray, optional) – -The Q or 2Θ values in powder diffraction pattern.

  • -
  • y (numpy.ndarray, optional) – -The scattered intensities in powder diffraction pattern

  • -
  • filename (str, optional) – -The text data file for loading the x, y values when -they are not specified.

  • -
  • kwargs (misc, optional) – -Extra keyword arguments that are applied to -the config object, for example qmax=20.

  • -
-
-
Returns
-

A pair of output arrays (r, G).

-
-
-
- -
-
-config
-

Instance of the PDFConfig class that stores the -parameters and input files for the program. -Use print(config) to display the current configuration values. -This is the same object as pdfgetter.config. Configuration -may be changed by setting a respective attribute of the -config object, for example:

-
In [1]: config.qmax = 21
-
-
-

The config values may be also changed by calling the -pdfgetter() or processfiles() function with a -corresponding keyword argument, for example -processfiles(qmax=20, force="once").

-
- -
-
-iraw
-
-iq
-
-sq
-
-fq
-
-gr
-

These variables are assigned the input raw intensities and the -intermediate results, stored as matrix rows. The matrix rows -correspond to twotheta1, intensity1, twotheta2, intensity2, etc. -Because matrices are iterated row first, the raw intensities -from all input files can be plotted with the matplotlib plot -function as plot(*iraw).

-

These variables should be considered read-only and are reset -with subsequent PDF calculations.

-
- -
-
-tuneconfig(plotids=None, pdfgetter=None, axeslist=None)
-

Show a GUI dialog for interactive tuning of configuration variables.

-
-
Parameters
-
    -
  • plotids – The string or iterable that specify what interactive plots should be -tuned. By default the same as config.plot. It can be also an -integer index or name of a transformation in pdfgetter() or -a reference to a Transformation object.

  • -
  • pdfgetter – The optional PDFGetter object to be tuned. -This is by default the interactive pdfgetter() object.

  • -
  • axeslist – An optional list of matplotlib Axes for showing interactive plots. -When None, use subplot(N, 1, i) to create any necessary axes.

  • -
-
-
-
-

Note

-

Changes from tuneconfig() apply only to the configuration -and results in memory. Use the processfiles() function -to save them to disk.

-
-
-

See also

-

Interactive tuning of parameters tutorial

-
-
- -
-
-processfiles(filename=None, **kwargs)
-

Process all input files again with the current configuration values. -This is a higher-level function than pdfgetter(), as -it also saves output files and produces plots as specified by the -config object.

-
-
Parameters
-
    -
  • filename – One or more input files to be converted to PDFs and saved or -plotted according to the config settings. Use the -previous list of input files when not specified.

  • -
  • kwargs – An optional keyword arguments to set for the config -object, for example (force="once", qmax=18).

  • -
-
-
-

This function updates the config.inputfiles -list and the iraw, iq, -sq, fq and gr -interactive variables.

-
- -
-
-clearsession()
-

Clear all elements from the config.inputfiles -and also the -iraw, iq, sq, -fq and gr variables.

-
-
Returns
-

No return value.

-
-
-
- -
-
-loaddata(filename, minrows=10, usecols=None, **kwargs)
-

Find and load data from a text file.

-

The data reading starts at the first matrix block of at least minrows rows -and constant number of columns. This seems to work for most of the -datafiles including those generated by PDFGetX2.

-
-
Parameters
-
    -
  • filename (str) – Name of the file to load the text data from.

  • -
  • minrows (int, optional) – Minimum number of rows in the first data block, by default 10. -All rows must have the same number of floating point values.

  • -
  • usecols (int, str, slice, iterable, optional) – Indices or names of the columns to be loaded from the data block, -the default is all columns. Data blocks that do not contain -sufficient number of columns are skipped. When usecols contain -string items, they are translated to column indices by looking -up a header line preceding the data block. String items formatted -as i:j:k are converted to slice objects. When usecols type -is string it is split to a list of names at comma and whitespace -characters.

  • -
  • unpack (bool, optional) – Return data as a sequence of columns that allows tuple unpacking -such as x, y = loaddata(FILENAME, unpack=True). Note that -transposing the loaded array as loaddata(FILENAME).T has -the same effect. The default is False.

  • -
  • kwargs (misc, optional) – Extra keyword arguments that are passed to numpy.loadtxt.

  • -
-
-
Returns
-

data (numpy.ndarray) – The data block loaded from the text file.

-
-
-
-

See also

-

numpy.loadtxt()

-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
-
-plotdata(filenames, style=None, x=None, y=None, log=None, ax=None, **kwargs)
-

Plot one or more text data files.

-

The files are searched for data blocks which have enough columns -to satisfy both x and y selectors of the plotted data. This -may result in an empty plot when file has none wide-enough data -block (e.g., when y=100).

-
-
Parameters
-
    -
  • filenames (str or an iterable of string file names) – One or more text data files to be plotted.

  • -
  • style (str) – Optional style argument for the matplotlib plot() function.

  • -
  • x (int, str, or iterable, optional) – The column to be used for the x data. This can be a zero-based -index of the desired column or a column name from data header. -A special symbol “.” can be used for a sequential data index. -When not specified, use the first column.

  • -
  • y (int, str, iterable, or slice, optional) – One or more columns to be used for the y data. This can be -a single zero-based index of the desired column or an iterable -of several indices. The y value can be also a string which -is split at commas and converted to integers, column names -or slice objects, e.g. “0,sine,4:7”. The slice instances -are applied to the entire data block from each loaded file. -Use the second column when not specified.

  • -
  • log ({‘x’, ‘y’}, optional) – Set logarithmic scaling for the specified axis and linear scaling -for all others. For example, log="y" applies linear scaling -to the x-axis and logarithmic to the y-axis. Keep the current -axis scaling when not specified.

  • -
  • ax (matplotlib.axes.Axes, optional) – The axes to plot to. The plotting will be performed using the -ax.plot method. The default is pyplot.gca().

  • -
  • kwargs (misc, optional) – Keyword arguments for the matplotlib plot() function.

  • -
-
-
Returns
-

lines (list) – The matplotlib Line2D objects added to the current axis.

-
-
- -

This function can be imported from the -diffpy.pdfgetx.plotdata module.

-
- -
-
-findfiles(patterns=(), path='.', dotfiles=False)
-

Find files that match all specified patterns.

-

Pattern syntax:

-
    -
  • ^start - match “start” only at the beginning of the string.

  • -
  • end$ - match “end” only at the end of string.

  • -
  • <7> - match number 7 preceded by any number of leading zeros.

  • -
  • <1-34> - match an integer range from 1 to 34 inclusive.

  • -
  • <7-> - match an integer greater or equal 7.

  • -
  • <-> - match any integer.

  • -
  • + - start a new group of patterns to match more files.

  • -
  • dir/ - set search path effective from the current pattern group.

  • -
-

All integer ranges <N-M> above allow one or more leading zeros. -The range syntax does not support matching of negative numbers.

-
-
Parameters
-
    -
  • patterns (iterable of strings or str, optional) – String patterns that must all match in returned filenames. -Can be also a single string with patterns separated by -whitespace characters. When empty match all files in the -current directory or in the path. A single + starts -a new pattern group for additional matches. Each pattern -group may have one entry containing /, for example, -dir/ or ./, which sets the search directory for -this and subsequent pattern groups. When pattern group -contains only the path entry it reuses file patterns from -the previous group.

  • -
  • path (str, optional) – Directory to be searched for the files. The default is “.” -to search the current directory.

  • -
  • dotfiles (bool, optional) – When True search also the hidden “.” starting files. These -files are by default ignored, but can be explicitly selected -by adding the ^. pattern.

  • -
-
-
Returns
-

filenames (list) – The list of matching filenames. Return all files when -patterns are not specified.

-
-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/intro.html b/static_root/doc/pdfgetx/2.1.2/intro.html deleted file mode 100644 index ed8ce2bc..00000000 --- a/static_root/doc/pdfgetx/2.1.2/intro.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - Introduction — diffpy.pdfgetx 2.1.2 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Introduction

-

diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts.

-
-

License notice

-

Use of this software is subject to and permitted only under a separate, -written Use License granted by Columbia University. If you or your employer -is not a party to such an agreement, then your use of this software is -prohibited. If you don’t know whether or not your anticipated use is under -a license, you must contact Prof. Simon Billinge at sb2896@columbia.edu. -Use of this software without a license is prohibited.

-

Copyright 2009-2020, Trustees of Columbia University in the City of New York.

-

For more information please email Prof. Simon Billinge at sb2896@columbia.edu

-
-
-

Authors

-

This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Hung Vuong, -Songsheng Tao, -Simon Billinge.

-
-
-

References

-

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:

-
-

P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge -PDFgetX3: A rapid and highly automatable program for processing -powder diffraction data into total scattering pair distribution -functions, -J. Appl. Crystallogr. 46, 560-566 (2013)

-
-

For research publications that use this software to process neutron -diffraction data we ask you to also cite:

-
-

P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, -S. J. L. Billinge -PDFgetN3: atomic pair distribution functions from neutron -powder diffraction data using ad hoc corrections, -J. Appl. Crystallogr. 51 (2018)

-
-

For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication:

-
-

CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge -sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data.

-
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/options.html b/static_root/doc/pdfgetx/2.1.2/options.html deleted file mode 100644 index 1e47bfa9..00000000 --- a/static_root/doc/pdfgetx/2.1.2/options.html +++ /dev/null @@ -1,663 +0,0 @@ - - - - - - Options and parameters — diffpy.pdfgetx 2.1.2 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Options and parameters

-

PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program.

-
-

Note

-

The command line options start with a leading “-” and can -be only used as command line arguments when starting the -pdfgetx3 program. Within configuration file the parameter -names are plain words without any leading dashes. Finally, -parameters can be also set in the interactive mode as attributes of -the config object, but the assignments must be valid -Python statements. Here are examples of setting composition of -a processed specimen using each of these forms:

-
    -
  1. assigned in configuration file:

    -
    ...
    -composition = CaTiO3
    -...
    -
    -
    -
  2. -
  3. set as a command-line option when starting pdfgetx3 or -pdfgetn3:

    -
    pdfgetx3 --composition=CaTiO3
    -
    -
    -
  4. -
  5. set in the IPython interactive mode:

    -
    pdfgetx3 -i
    -...
    -In [1]: config.composition = "CaTiO3"
    -
    -
    -
  6. -
-
-
-

Program operation

-
-
--h, --help
-

Display a brief usage information with a list of command line options -and exit.

-
- -
-
--V, --version
-

Display the program version and exit.

-
- -
-
---manual
-

Open this manual in a Web browser and exit.

-
- -
-
--f, --find
-
- -
-

Select input files that match all patterns. The command -line arguments are by default taken as input files. However, -with the --find option they are processed as -file patterns and the matching files are then used as inputs. -The input files are by default searched in the current directory -unless there is a path entry (e.g., data/) that -selects a different search path. The search patterns are -interpreted as fixed strings, all of which must be present -in the file name. A single argument + starts -a new group of patterns to match more files that are not -covered by one set of patterns. Additional pattern -groups reuse the current search path unless they provide -their own path value. Pattern groups containing only -a path entry reuse file patterns from the last group. -When pattern groups overlap the repeated matches are ignored -to make the resulting list of files unique. Files starting -with . are ignored unless there is ^. pattern -that explicitly matches them. The search -syntax provides the following special patterns:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

^

match at the beginning of the string, i.e., ^start -matches only filenames that start with “start”.

$

match at the end of string, for example, .chi$ selects -file names ending with “.chi”. A $ on its own -matches every string and can be used to select all files.

<N>

match number N preceded by any number of leading zeros, -e.g., <7> would match in “f7.chi”, “f007.chi”, but not -in “f77.chi”.

<N-M>

match an integer range from N to M inclusive. -The matched number may have one or more leading zeros.

<7->

match number 7 or larger.

<-7>

match number 7 or smaller.

<->

match any integer number.

+

start a new pattern group, for example, .chi$ + .dat$

/

set search path. An argument containing the / symbol -is taken as the search path, for example, data/ or -./. Each pattern group may provide its own search -path effective for that and any subsequent pattern group.

-

The ^$<> characters are often special to Unix or Windows -command shells, therefore they need to be enclosed in double -quotes (") when used on command line.

-
-

See also

-

tutorial on matching input files

-
-
-
-
--l, --list
-

List all input files and exit. This is useful with the ---find option to verify if input files -are matched as intended.

-
- -
-
-

Configuration file options

-
-
--c CONFIG, --config=CONFIG
-

Read custom configuration file after loading the default ones. -Do not load any configuration file when “NONE”.

-
- -
-
--s NAME, --section=NAME
-

Load the custom configuration file section [SectionName] after -loading the [DEFAULT] section. This is useful for creating -several configuration variants in a single configuration file.

-
- -
-
---createconfig=FILE
-

Write template configuration to a new FILE and exit. Write -to the standard output when FILE is “-“.

-
- -

See also the configuration file section -for further details.

-
-
-

Input and output options

-
-
-inputfile
-

This parameter allows to specify one or more input files in the -configuration file, one file per line. The inputfile -is only used if no input files were provided on the -pdfgetx3 or pdfgetn3 command line.

-
- -
-
-dataformat
-
- -
-
---format=FORMAT
-

Format of input files. Available formats are: twotheta, QA, -Qnm corresponding to a two-column text data where the first -column is either the scattering angle 2Θ in degrees, Q in -inverse ångströms or Q in inverse nanometers.

-
- -
-
-backgroundfile
-
- -
-
--b FILE, --background=FILE
-

Optional datafile with background intensities from an empty sample -holder. It must be in the same dataformat as other input files.

-
- -
-

Note

-

The following input is only used in sas mode.

-
-
-
-formfactorfile
-
- -
-
--ff FILE, --formfactorfile=FILE
-

Form factor intensities of the scatterers. This is required for sas mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1.

-
- -
-
-datapath
-
- -
-
--d DATAPATH, --datapath=DATAPATH
-

One or more extra directories to be searched for input or -background data files. The -d option can be specified -several times to add more directories, these are prepended in front -of any default value. Within configuration file the datapath -directories have to be listed each on a separate line.

-

A special value “NONE” (or “none”) clears any previously defined -paths and only the further paths, if any, would be searched for -inputs.

-
- -
-
-output
-
- -
-
--o OUTPUT, --output=OUTPUT
-

Output file name, write to the standard output when “-“. The --t, --outputtypes option controls what results are -being saved. Normally the OUTPUT is used as a custom basename for -the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o -tokens, which are expanded as follows:

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

token

example

definition

@h

dir1/dir2

the input file directory or “.”

@r

dir1/dir2/filename

the input path with extension removed

@e

dat

the input file extension without “.”

@t

filename.dat

the tail component of the input file

@b

filename

the tail component with extension removed

@o

gr

the output extension iq, sq, fq or gr

-

An empty value works the same as “@b.@o” and saves the data -in the current directory with a proper extension for the -saved results. When “@o” is not present in the OUTPUT, it is -appended as a default filename extension.

-
- -
-
-outputtypes
-
- -
-
--t TYPES, --outputtypes=TYPES
-

Result types to be saved, one or more comma separated values. -Supported values are “iq”, “sq”, “fq”, “gr”, corresponding to the -I(Q), S(Q), F(Q) and G(r) curves; these are also used as output -file extensions.

-

Result files are not written when empty, “none” or “NONE”.

-
- -
-
-force
-
- -
-
---force=FORCE
-

Overwrite existing output files. By default the output -files are not written if they already exist. Possible values -in a configuration file are “true”, “yes”, “on”, “1” or -“false”, “no”, “off”, “0” or “once”. The special value “once” -permits one overwrite and then resets config.force to -False. Note that in interactive mode the values assigned -to config.force are converted to Python bool -unless equal to “once”.

-
- -
-
-

PDF parameters

-
-
-mode
-
- -
-
---mode=STRING
-

The PDF conversion mode, i.e., the name of the -pdfgetter() setup. The available modes correspond -to the radiation type used in powder diffraction experiment and can -be “xray” or “neutron”.

-
- -
-
-wavelength
-
- -
-
--w FLOAT, --wavelength=FLOAT
-

X-ray wavelength in ångströms. This value is required -for the “twotheta” dataformat in order to convert the scattering -angles 2Θ to a momentum transfer Q. For other data formats -the wavelength is not necessary and may be left undefined.

-
- -
-
-twothetazero
-
- -
-
---twothetazero=FLOAT
-

Position of the zero scattering angle in diffractometer degrees. -This parameter corrects for a constant offset in the -measured 2Θ values. When loading configuration file -it is assumed 0 unless specified otherwise. This parameter -is only effective for the “twotheta” dataformat.

-
- -
-
-composition
-
- -
-
---composition=STRING
-

Chemical composition of the sample. Supported formats are -“PbTi0.5Zr0.5O3”, “Pb 1 Ti 1/2 Zr 1/2 O 3” or “CH3 (CH2)3 OH”. -Space characters are ignored, unit counts can be omitted, but it is -important to use a proper upper and lower case in atom symbols. -Elements can appear several times in the formula, e.g., “CH3 CH3”, -and the formula may contain parentheses or fractional -stoichiometries.

-
- -
-
-bgscale
-
- -
-
---bgscale=FLOAT
-

Scaling of the background intensities loaded from the -backgroundfile, by default 1.

-
- -
-
-rpoly
-
- -
-
---rpoly=FLOAT
-

r-limit for the maximum frequency in the F(Q) correction polynomial. -The PDF is unreliable at shorter r, however a -very small rpoly would disable polynomial correction and -give noisy PDF. -Larger values produce closer fits with a higher degree polynomial, -but when too large, they might smooth-out a useful signal in the -data. The default is 0.9.

-
- -
-
-qmaxinst
-
- -
-
---qmaxinst
-

The Q cutoff for the meaningful input intensities in inverse -ångströms. Some data files may contain trailing zeros -or unreliable intensities at the upper bound of the detector range. -The qmaxinst defines a threshold for unreliable data. -The parameter is also used as an upper boundary for the polynomial -fit correction of the S(Q) data.

-
- -
-
-qmin
-
- -
-
---qmin
-

The lower Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms.

-
- -
-
-qmax
-
- -
-
---qmax
-

The upper Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms. This is essentially a limit, where sample -signal decays to the level of data noise.

-
- -
-
-rmin
-
- -
-
---rmin=FLOAT
-

Lower bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rmax
-
- -
-
---rmax=FLOAT
-

Upper bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rstep
-
- -
-
---rstep=FLOAT
-

Spacing of the r-grid for the calculated PDF in ångströms.

-
- -
-
-

Other parameters

-
-
-plot
-
- -
-
--p TYPES, --plot=TYPES
-

Plot the specified results. A comma separated list with one or -more items from “iq”, “sq”, “fq”, “gr”. No plot is produced when -empty, “none” or “NONE”. Setting this option turns on the -interactive mode.

-
- -
-
-interact
-
- -
-
--i, --interact
-

Start an IPython interactive session after processing all files. -Useful for tuning the configuration parameters or interactive -plotting. This is always on when plot option has been set. -See also Interactive mode for further details.

-
- -
-
-verbose
-
- -
-
---verbose=VALUE
-

Level of detail for the program to report about its actions. -Possible values are “error”, “warning”, “info”, “debug”, “all” or an -integer number from 0 to 5. Messages are completely suppressed when -0, all messages are printed when verbose is 5 (“all”) or higher. -This option is useful for diagnostics of any unexpected behavior -in the program.

-
- -
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/pdfgetxn3-examples.zip b/static_root/doc/pdfgetx/2.1.2/pdfgetxn3-examples.zip deleted file mode 100755 index ce2b55c4..00000000 Binary files a/static_root/doc/pdfgetx/2.1.2/pdfgetxn3-examples.zip and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.1.2/plotdata.html b/static_root/doc/pdfgetx/2.1.2/plotdata.html deleted file mode 100644 index 7c3d4827..00000000 --- a/static_root/doc/pdfgetx/2.1.2/plotdata.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - The plotdata program — diffpy.pdfgetx 2.1.2 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

The plotdata program

-

The PDFgetX3 software includes a simple stand-alone utility -plotdata for plotting text data files. In most cases -this program can be invoked from a command-shell as

-
plotdata file1.dat file2.dat
-
-
-

which plots the numerical data from the text files file1.dat, -file2.dat together in a single graph. By default the first -column is used as an x variable and the second column is used for the -y values. After displaying the plot the program starts an IPython -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the filenames variable -containing a list of plotted files. It also pre-loads the -plotdata() and findfiles() functions just as in PDFgetX3 -interactive session. The plotdata() -function works in a similar way as the plotdata program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -plotdata() function would be:

-
In [1]: plotdata(['file1.dat', 'file2.dat'])
-
-
-
-

Selecting files

-

The plotdata program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as *.dat. The file search feature is controlled by the -following options:

-
-
--f, --find
-

Use command line arguments as filename patterns and plot all matching -files. This option works in the same way as for -pdfgetx3, for full details see the -pdfgetx3 --find documentation. Note that -within command line the special patterns ^$<> need to be quoted -in double quotes (") so they are not processed by command shell.

-
- -
-
--l, --list
-

List the input files and exit. This is useful in conjunction -with the -f, --find option to check if data files -are selected as intended.

-
- -

Assuming the current directory contains 20 files named -file1.dat, file2.dat, …, file20.dat, -the plotting of files 9 to 13 could be done (with a check listing) -as follows

-
$ plotdata -fl "<9-13>.dat"
-file9.dat
-file10.dat
-file11.dat
-file12.dat
-file13.dat
-$ plotdata -f "<9-13>.dat"
-
-
-

Within an interactive IPython session the equivalent plot could be -produced by combining the plotdata() and findfiles() functions as

-
In [1]: plotdata(findfiles("<9-13>.dat"))
-
-
-
-
-

Selecting x and y data

-

The plotdata program provides several ways of selecting -columns for x or y data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is “0” -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function):

-
-
--x X
-

index or name of the x-column to plot. See the -y option -for the supported syntax, but note that X may select only one -column. When set to “.” use the data-row index for x.

-
- -
-
--y Y
-

index or name of the y-column or columns to plot. The Y column -specification can be a comma separated list of indices, column names -or Python-like ranges, for example “1,2”, “G”, “1:4” (START:STOP, -same as “1,2,3”), “1:4:2” (START:STOP:STEP, same as “1,3”), or -“-2:” (same as “-2,-1”, i.e, the last 2 columns). Because column -indexing starts at “0” the second column must be specified as “1”.

-

The column names work if the data section in the file is preceded by -a headline of unique column names, for example:

-
x     square      cube
-1     1           1
-2     4           8
-3     9           27
-4     16          64
-
-
-

For such data file the plotdata program will recognize column names -“x”, “square” and “cube” and an implicit “.” for row index.

-
- -
-
--s STYLE, --style=STYLE
-

optional plot format specification. See the -matplotlib.pyplot.plot() function -for a list of available formats.

-
- -
-
--L LOG, --log=LOG
-

axes to be plotted with logarithmic scaling, for example, “x”, “y” or -“xy”. Axes not listed in LOG will use linear scaling.

-
- -
-
--h, --help
-

display a brief usage info and exit.

-
- -
-
--V, --version
-

show program version and exit.

-
- -
-
---manual
-

Open this manual page in a Web browser and exit.

-
- -
-
-

Examples

-

The examples directory plotdata contains a sincos.dat -file that has 3-columns of values labeled as “x”, “sin” and “cos”. -Here are several examples of the plotdata capabilities -when used from command line - the user is encouraged to try them out:

-
plotdata sincos.dat
-plotdata -y 1,2 sincos.dat
-plotdata -x . -y 0:3 sincos.dat
-plotdata -y cos sincos.dat
-plotdata -x sin -y cos -sr-- sincos.dat
-
-
-

An equivalent usage from a general IPython session would be:

-
ipython --matplotlib=auto
-In [1]: from diffpy.pdfgetx.plotdata import plotdata
-In [2]: plotdata('sincos.dat')
-In [3]: plotdata('sincos.dat', y=[1,2])
-In [4]: plotdata('sincos.dat', x='.', y=':3')
-In [5]: plotdata('sincos.dat', y='cos')
-In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--')
-
-
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/quick-start.html b/static_root/doc/pdfgetx/2.1.2/quick-start.html deleted file mode 100644 index 725f6ad8..00000000 --- a/static_root/doc/pdfgetx/2.1.2/quick-start.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - Quick-start guide — diffpy.pdfgetx 2.1.2 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Quick-start guide

-

This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing pdfgetx3, pdfgetn3, or -pdfgets3 in a shell window. Please, refer to the installation section if this is not working yet.

-
-

pdfgetx3 command

-

The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as

-
pdfgetx3 [options] input1 input2 ... inputN
-
-
-

The inputN stands for an input powder diffraction data. The -inputN file is a simple two-column text file, where the first -column corresponds to either the 2Θ diffraction angle, or a -momentum transfer, Q, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -FIT2D program using -its “chi” output format, thus we will also refer to them as “chi-files”. -A typical content of a “chi” file looks as folows:

-
Pt_bulk-00055.tif: 2-theta Scan
-2-Theta Angle (Degrees)
-
-       1465
- 2.0003892E-02  0.0000000E+00
- 6.0011677E-02  0.0000000E+00
- 1.0001946E-01  0.0000000E+00
- 1.4002724E-01  0.0000000E+00
- 1.8003502E-01  0.0000000E+00
- ...
-
-
-

The command-line options are arguments that start with a dash “-” and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash --. Options may require values. For short options, -the value may be joined to the option string, for example --w0.142774, while for the long options it has to be separated -with an equal sign, e.g., --wavelength=0.142774. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the Options and parameters section of -this manual. A brief summary of options can be also displayed by -executing

-
pdfgetx3 --help
-
-
-

The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the Tutorial. -In general, the first step is to create a commented configuration file pdfgetx3.cfg using:

-
pdfgetx3 --createconfig=pdfgetx3.cfg
-
-
-

The configuration file can have any name, but it is preferable -to use either pdfgetx3.cfg or .pdfgetx3.cfg, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the -c, --config option.

-

Open the pdfgetx3.cfg file in a text editor. The lines that -start with a hash mark # are comments and are not used. The lines -starting with a right brace [ denote sections in the configuration -file. The active lines are all formatted as -“NAME=VALUE”. Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation:

-
    -
  • dataformat – specifies the input data format

  • -
  • wavelength – radiation wavelength in Å required for the -“twotheta” format.

  • -
  • composition – chemical composition of the sample

  • -
  • qmaxinst – upper Q boundary for a meaningful measurement -intensities.

  • -
  • qmaxQ-cutoff for the Fourier transformation that -yields the PDF.

  • -
-

Save the updated configuration file and run pdfgetx3 on the input data -FILENAME.chi as

-
pdfgetx3 --verbose=info -t gr FILENAME.chi
-
-
-

Here the --verbose=info option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The -t gr option -tells the program to save the final G(r) curve as a -FILENAME.gr file in the working directory.

-

The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation

-
pdfgetx3 -c FILENAME.gr --plot=fq,gr
-
-
-

Note this command does not include any .chi file and this will as -a result process the previously used input FILENAME.chi. -The --plot=fq,gr option tells PDFgetX3 to -display 2 plots for the reduced structure function F(Q) and the -final PDF G(r). The --plot option also implies an -interactive mode -therefore the program does not exit, but starts an -interactive IPython session. To exit the interactive mode, -type exit() and press Enter.

-
-
-

pdfgetn3 command

-

The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the ---mode option. Running pdfgetn3 is nearly identical -to executing pdfgetx3 --mode=neutron. The only difference between -these commands is that pdfgetx3 checks for configuration files -pdfgetx3.cfg and .pdfgetx3.cfg, whereas -pdfgetn3 looks for pdfgetn3.cfg and .pdfgetn3.cfg.

-
-
-

pdfgets3 command

-

The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying mode = sas in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named pdfgets3.cfg and -.pdfgets3.cfg in order, when no configuration file is specified.

-

Please refer to the tutorial section for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3.

-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/release.html b/static_root/doc/pdfgetx/2.1.2/release.html deleted file mode 100644 index 5a592e87..00000000 --- a/static_root/doc/pdfgetx/2.1.2/release.html +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - Release notes — diffpy.pdfgetx 2.1.2 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Release notes

-
-

Version 2.1.2 - 2021-12-24

-
-

Fixed

-
    -
  • Fixed the command provided to the users in the installation instructions which -incorrectly instructed them to setup a Python environment in which pdfgetx -could be installed by using the flag --python=3.8 to the correct usage of -this flag as python=3.8.

  • -
-
-
-
-

Version 2.1.1 - 2020-09-01

-
-

Added

-
    -
  • Support for Python 3.8

  • -
-
-
-
-

Version 2.1.0 – 2020-07-15

-
-

Added

-
    -
  • New mode sas for processing Small Angle Scattering data and -for using custom scattering factors.

  • -
  • qmax-pushes-qmin coupling of sliders in the tuneconfig tool.

  • -
  • New program pdfgets3 and IPython magic %pdfgets3.

  • -
-
-
-

Changed

-
    -
  • Software distribution format to a universal Python wheel.

  • -
  • tuneconfig dialog to access full Q-range with all qmin, qmax, and -qmaxinst sliders. Increased range for the rpoly slider.

  • -
-
-
-

Deprecated

-
    -
  • Software distribution in setuptools egg package.

  • -
-
-
-

Removed

-
    -
  • Support for Python 3.4.

  • -
-
-
-

Fixed

-
    -
  • Support backslash in the --find option path argument on Windows. -Both forward and back slashes are allowed on Windows, but other -platforms must use forward slash.

  • -
  • Recipe for platform-dependent Anaconda package.

  • -
  • Bogus test failure when installed in symlinked directory.

  • -
-
-
-
-

Version 2.0.0 – 2018-11-02

-
-

Added

-
    -
  • New mode neutron for processing constant-wavelength -neutron scattering data.

  • -
  • Correction for an offset of diffractometer zero angle.

  • -
  • Configuration parameter twothetazero and command-line option ---twothetazero for position of the actual zero angle -in diffractometer degrees.

  • -
  • New program pdfgetn3 and IPython magic %pdfgetn3.

  • -
  • Separate configuration file pdfgetn3.cfg for the pdfgetn3 program.

  • -
  • New sub-package diffpy.pdfgetx.apps for entry points to all programs.

  • -
  • Table of electron scattering factors from E. J. Kirkland, -Advanced Computing in Electron Microscopy.

  • -
  • The + operator for additive pattern groups when matching input files -with pdfgetx3 --find.

  • -
  • An optional slash-containing entry, e.g., dir/, to set the search path -for pdfgetx3 --find. Each pattern group may have one path entry which -affects the current and subsequent pattern groups. Pattern groups that -have only the path entry reuse the previous file patterns, for example, -dir1/ .dat$ + dir2/ + dir3/.

  • -
  • The dotfiles flag argument to functs.findfiles to also find -dot-starting files without an explicit pattern.

  • -
  • Support for Python 3.7.

  • -
  • Tutorial examples for constant-wavelength neutron diffraction data.

  • -
-
-
-

Changed

-
    -
  • Initialization arguments of PDFConfig to set initial configuration values.

  • -
  • path argument of functs.findfiles to give one search path instead -of a list of paths.

  • -
  • pdfgetx3 --find to search only the current directory and stop searching -in --datapath.

  • -
  • Improved PDF accuracy by removing repeated Q-grid interpolation.

  • -
  • Handling of dot files by pdfgetx3 --find and the functs.findfiles -function. The dotfiles are by default ignored unless explicitly selected -by a "^." pattern.

  • -
  • Return type of functs.findfiles from IPython SList to a simple list.

  • -
  • Rename camel case interactive functions to lowercase, i.e., to loaddata, -processfiles, clearsession.

  • -
  • Use config.datapath lookup in processfiles(filename).

  • -
-
-
-

Deprecated

-
    -
  • Function cromermann.felectronatq for electron scattering -factors calculation using Mott-Bethe approximate formula.

  • -
  • IPython extension module diffpy.pdfgetx.ipy_pdfgetx3. -Use diffpy.pdfgetx.ipy_magics instead.

  • -
  • Camel case functions loadData, processFiles, clearSession.

  • -
-
-
-

Removed

-
    -
  • Support for Python 2.6.

  • -
  • Processing of environment variable PDFGETX3PATH.

  • -
  • Support for IPython 0.x.

  • -
  • Obsolete variable __gitsha__ from the version module.

  • -
  • Processing of command line options in PDFConfig class.

  • -
  • Implicit loading of configuration files in PDFConfig instantiation.

  • -
-
-
-

Fixed

-
    -
  • Import of all objects from matplotlib.pyplot into -an interactive session started by plotdata.

  • -
  • Inaccurate G interpolation when rstep is comparable to pi / qmax.

  • -
  • Lone anchor patterns ^, $ to match everything.

  • -
-
-
-
-

Version 1.2 – 2018-01-12

-
-

Added

-
    -
  • Support for Python 3.4, 3.5, 3.6 in addition to Python 2.6 and 2.7.

  • -
  • Support for IPython 5.0 with preserved -compatibility with IPython 0.10 and later.

  • -
  • Support for matplotlib 2.0.

  • -
  • New option --log=LOG for the plotdata program to set logarithmic -scale for either of x or y axis. The plotdata() function learnt -a new log argument with the same purpose.

  • -
  • New argument ax for the plotdata() function that select a specific -matplotlib axis for plotting.

  • -
  • Support for Unicode filenames and values in the config -interactive variable.

  • -
  • Processing of parentheses and fractional stoichiometries in chemical -formulas as in Pb (Ti Zr)1/2 O3.

  • -
  • Explanatory error message when PDFgetX3 was installed for -unsupported Python.

  • -
-
-
-

Changed

-
    -
  • The egg package file was enhanced to support all Python -versions. The software is now distributed in a single -egg rather than multiple eggs per each Python version.

  • -
  • PDFgetX3 option --force to take a boolean argument -(yes, no, true, etc.) or once. The configuration -parameter force can be likewise set to a bool or to -a string "once". This enables a safer one-time -overwrite of existing output files.

  • -
  • Plot labels to use a proper Unicode “Å” (Ångström) symbols. -The “Å” symbol is also used within units in output files.

  • -
  • The usecols argument of the loadData() function to also -accept scalars, open-end slice objects and string-denoted -slices such as "1:3" or "1:".

  • -
  • The plotdata program and plotdata() function to accept -open-end slices for the y-columns selection.

  • -
  • The IPython magic function %pdfgetx3 to set the _exit_code -variable as do generic shell commands run from IPython.

  • -
  • Inline documentation to use NumPy-style Napoleon format, -which is human readable and can be included in the manual.

  • -
  • Release scripts to build software package bundles and -documentation in binary-reproducible way.

  • -
-
-
-

Deprecated

-
    -
  • Compatibility with Python 2.6.

  • -
  • Support for IPython 0.x.

  • -
  • Variable __gitsha__ in the version module which was renamed -to __git_commit__.

  • -
-
-
-

Removed

-
    -
  • The hold argument of the plotdata() function, -because it was deprecated in matplotlib.

  • -
  • Support for multiple x-columns in plotdata program and -plotdata() function.

  • -
  • Import of all objects from numpy module into the interactive -session. NumPy is available under the np name instead.

  • -
-
-
-

Fixed

-
    -
  • Avoid duplicate “.gr.gr” extension when pdfgetx3 is run -with option --output=f.gr.

  • -
  • Crash on loading custom configuration section from a local -file, when that section is missing in global configuration.

  • -
  • Missing checkbox in the tuneconfig dialog caused by matplotlib bug.

  • -
-
-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/search.html b/static_root/doc/pdfgetx/2.1.2/search.html deleted file mode 100644 index e57f69a7..00000000 --- a/static_root/doc/pdfgetx/2.1.2/search.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - Search — diffpy.pdfgetx 2.1.2 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -

Search

-
- -

- Please activate JavaScript to enable the search - functionality. -

-
-

- From here you can search these documents. Enter your search - words into the box below and click "search". Note that the search - function will automatically search for all of the words. Pages - containing fewer words won't appear in the result list. -

-
- - - -
- -
- -
- -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/searchindex.js b/static_root/doc/pdfgetx/2.1.2/searchindex.js deleted file mode 100644 index a3d1e4b6..00000000 --- a/static_root/doc/pdfgetx/2.1.2/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({docnames:["files","index","install","interact","intro","options","plotdata","quick-start","release","tutorial"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.index":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,sphinx:56},filenames:["files.rst","index.rst","install.rst","interact.rst","intro.rst","options.rst","plotdata.rst","quick-start.rst","release.rst","tutorial.rst"],objects:{"":{backgroundfile:[5,1,1,"-"],bgscale:[5,1,1,"-"],composition:[5,1,1,"-"],config:[3,2,1,"-"],dataformat:[5,1,1,"-"],datapath:[5,1,1,"-"],force:[5,1,1,"-"],formfactorfile:[5,1,1,"-"],fq:[3,2,1,"-"],gr:[3,2,1,"-"],inputfile:[5,1,1,"-"],interact:[5,1,1,"-"],iq:[3,2,1,"-"],iraw:[3,2,1,"-"],mode:[5,1,1,"-"],output:[5,1,1,"-"],outputtypes:[5,1,1,"-"],plot:[5,1,1,"-"],qmax:[5,1,1,"-"],qmaxinst:[5,1,1,"-"],qmin:[5,1,1,"-"],rmax:[5,1,1,"-"],rmin:[5,1,1,"-"],rpoly:[5,1,1,"-"],rstep:[5,1,1,"-"],sq:[3,2,1,"-"],twothetazero:[5,1,1,"-"],verbose:[5,1,1,"-"],wavelength:[5,1,1,"-"]},"diffpy.pdfgetx":{findfiles:[3,0,1,""],loaddata:[3,0,1,""]},"diffpy.pdfgetx.plotdata":{plotdata:[3,0,1,""]},_interactive_:{clearsession:[3,0,1,""],pdfgetter:[3,0,1,""],processfiles:[3,0,1,""],tuneconfig:[3,0,1,""]},pdfgetx3:{"--background":[5,3,1,"cmdoption-pdfgetx3-b"],"--bgscale":[5,3,1,"cmdoption-pdfgetx3-bgscale"],"--composition":[5,3,1,"cmdoption-pdfgetx3-composition"],"--config":[5,3,1,"cmdoption-pdfgetx3-c"],"--createconfig":[5,3,1,"cmdoption-pdfgetx3-createconfig"],"--datapath":[5,3,1,"cmdoption-pdfgetx3-d"],"--find":[5,3,1,"cmdoption-pdfgetx3-f"],"--force":[5,3,1,"cmdoption-pdfgetx3-force"],"--format":[5,3,1,"cmdoption-pdfgetx3-format"],"--formfactorfile":[5,3,1,"cmdoption-pdfgetx3-ff"],"--help":[5,3,1,"cmdoption-pdfgetx3-h"],"--interact":[5,3,1,"cmdoption-pdfgetx3-i"],"--list":[5,3,1,"cmdoption-pdfgetx3-l"],"--manual":[5,3,1,"cmdoption-pdfgetx3-manual"],"--mode":[5,3,1,"cmdoption-pdfgetx3-mode"],"--output":[5,3,1,"cmdoption-pdfgetx3-o"],"--outputtypes":[5,3,1,"cmdoption-pdfgetx3-t"],"--plot":[5,3,1,"cmdoption-pdfgetx3-p"],"--qmax":[5,3,1,"cmdoption-pdfgetx3-qmax"],"--qmaxinst":[5,3,1,"cmdoption-pdfgetx3-qmaxinst"],"--qmin":[5,3,1,"cmdoption-pdfgetx3-qmin"],"--rmax":[5,3,1,"cmdoption-pdfgetx3-rmax"],"--rmin":[5,3,1,"cmdoption-pdfgetx3-rmin"],"--rpoly":[5,3,1,"cmdoption-pdfgetx3-rpoly"],"--rstep":[5,3,1,"cmdoption-pdfgetx3-rstep"],"--section":[5,3,1,"cmdoption-pdfgetx3-s"],"--twothetazero":[5,3,1,"cmdoption-pdfgetx3-twothetazero"],"--verbose":[5,3,1,"cmdoption-pdfgetx3-verbose"],"--version":[5,3,1,"cmdoption-pdfgetx3-v"],"--wavelength":[5,3,1,"cmdoption-pdfgetx3-w"],"-V":[5,3,1,"cmdoption-pdfgetx3-v"],"-b":[5,3,1,"cmdoption-pdfgetx3-b"],"-c":[5,3,1,"cmdoption-pdfgetx3-c"],"-d":[5,3,1,"cmdoption-pdfgetx3-d"],"-f":[5,3,1,"cmdoption-pdfgetx3-f"],"-ff":[5,3,1,"cmdoption-pdfgetx3-ff"],"-h":[5,3,1,"cmdoption-pdfgetx3-h"],"-i":[5,3,1,"cmdoption-pdfgetx3-i"],"-l":[5,3,1,"cmdoption-pdfgetx3-l"],"-o":[5,3,1,"cmdoption-pdfgetx3-o"],"-p":[5,3,1,"cmdoption-pdfgetx3-p"],"-s":[5,3,1,"cmdoption-pdfgetx3-s"],"-t":[5,3,1,"cmdoption-pdfgetx3-t"],"-w":[5,3,1,"cmdoption-pdfgetx3-w"]},plotdata:{"--find":[6,3,1,"cmdoption-plotdata-f"],"--help":[6,3,1,"cmdoption-plotdata-h"],"--list":[6,3,1,"cmdoption-plotdata-l"],"--log":[6,3,1,"cmdoption-plotdata-log"],"--manual":[6,3,1,"cmdoption-plotdata-manual"],"--style":[6,3,1,"cmdoption-plotdata-s"],"--version":[6,3,1,"cmdoption-plotdata-v"],"-L":[6,3,1,"cmdoption-plotdata-log"],"-V":[6,3,1,"cmdoption-plotdata-v"],"-f":[6,3,1,"cmdoption-plotdata-f"],"-h":[6,3,1,"cmdoption-plotdata-h"],"-l":[6,3,1,"cmdoption-plotdata-l"],"-s":[6,3,1,"cmdoption-plotdata-s"],"-x":[6,3,1,"cmdoption-plotdata-x"],"-y":[6,3,1,"cmdoption-plotdata-y"]}},objnames:{"0":["py","function","Python function"],"1":["std","confval","configuration value"],"2":["std","interactvar","interactive variable"],"3":["std","cmdoption","program option"]},objtypes:{"0":"py:function","1":"std:confval","2":"std:interactvar","3":"std:cmdoption"},terms:{"0000000e":7,"0001946e":7,"0003892e":7,"0011677e":7,"00903_qmax18":9,"0x3e20f50":9,"4002724e":7,"5o3":5,"5zr0":5,"6id":9,"8003502e":7,"\u00e5ngstr\u00f6m":[0,5,7,8],"\u03b1":9,"boolean":8,"break":9,"case":[5,6,8,9],"class":[3,8],"default":[0,3,5,6,7,8,9],"final":[2,5,7,9],"float":[3,5],"function":[0,3,4,6,7,8,9],"import":[3,5,6,8,9],"int":3,"juh\u00e1":4,"long":[0,7],"new":[3,4,5,8,9],"public":4,"return":[3,8],"short":7,"true":[3,5,8,9],"try":[6,9],"while":[0,2,7,9],Axes:[3,6],For:[2,3,4,5,6,7,9],One:[3,5,9],SAS:[4,7],Such:9,The:[0,1,2,3,4,5,7,8,9],Then:2,There:[2,9],These:[2,3],Use:[3,4,6,8,9],Useful:5,With:9,__git_commit__:8,__gitsha__:8,_exit_cod:8,_qmax18:9,abbrevi:9,abil:9,about:[5,7,9],abov:[2,3,9],accept:[0,8,9],access:[0,2,8],accomplish:[2,9],accord:3,accur:9,accuraci:8,acknowledg:4,action:[5,9],activ:[0,2,3,7,9],actual:[0,2,8],add:[2,5,9],added:3,adding:3,addit:[0,2,3,4,5,8,9],adjust:[4,9],advanc:[8,9],affect:[8,9],after:[0,5,6,9],again:[3,9],agre:2,agreement:4,al2o3:9,all:[0,2,3,5,6,7,8,9],allow:[3,4,5,6,8,9],alon:6,alreadi:[2,5,9],also:[0,2,3,4,5,6,7,8,9],altern:2,although:7,alwai:5,anaconda:[2,8,9],analysi:4,anchor:8,angl:[0,1,4,5,7,8],angular:9,ani:[0,2,3,4,5,7,9],anoth:[2,9],anticip:4,anywher:9,apart:7,app:8,appear:[5,9],append:5,appl:4,appli:[0,3,9],applic:7,approxim:[8,9],apt:2,arbitrari:9,area:9,argument:[0,2,3,5,6,7,8,9],arrai:3,ask:4,assembl:[4,9],assess:9,assign:[3,5,7],assum:[5,6,7],atom:[4,5],attempt:0,attribut:[3,5,9],au_dna_ff:9,au_dna_npa:9,author:1,auto:6,automat:[4,7,9],avail:[2,5,6,8,9],averag:[0,9],avoid:[8,9],axes:[3,6,9],axeslist:[3,9],axi:[3,8,9],b_qmax18:9,back:8,background:[0,5,9],backgroundfil:[0,5,9],backslash:8,base:[3,9],basenam:5,batch:4,beamlin:9,becaus:[3,6,8,9],been:[5,7,9],begin:[3,5,9],behavior:[5,7],being:[5,7,9],below:9,best:7,beth:8,better:9,between:7,bgscale:[5,9],billing:4,binari:8,block:3,blue:9,bogu:8,bool:[3,5,8],both:[3,7,8,9],bound:[5,9],boundari:[5,7,9],box:9,brace:7,breakpoint:9,brief:[5,6,7],brookhaven:4,browser:[5,6],bug:8,build:8,built:9,bulk:9,bundl:[4,8],button:9,calcul:[0,3,5,7,8,9],calibr:9,call:[3,6,9],callabl:3,camel:8,can:[0,2,3,4,5,6,7,8,9],cannot:[6,9],canopi:2,cap:9,capabl:[6,7],capillari:9,catio3:5,caus:[8,9],cell:9,cfg:[0,7,8,9],ch2:5,ch3:5,chain:9,chang:[0,3,9],charact:[3,5,7,9],check:[0,2,6,7,9],checkbox:8,chemic:[0,5,7,8,9],chi:[5,7,9],chia:4,choos:2,christoph:4,circl:9,cite:4,citi:4,clear:[3,5,9],clearsess:[3,8,9],clf:9,click:9,close:9,closer:5,cmi:9,code:[2,4,9],colloid:9,columbia:[2,4,9],column:[0,2,3,5,6,7,8,9],combin:6,comma:[3,5,6,9],command:[0,1,3,4,5,6,8,9],comment:[0,7],compar:[8,9],compat:[2,8],complain:9,complet:[5,9],compon:5,composit:[0,5,7,9],comprehens:2,comput:[2,8],conda:[2,9],conduct:9,config:[0,3,5,7,8,9],config_neutron:9,config_sa:9,config_xrai:9,configfil:9,configsect:9,configur:[1,3,7,8],confirm:9,conjunct:6,consid:3,consist:7,constant:[3,4,5,8,9],contact:4,contain:[0,2,3,5,6,7,8,9],content:[0,7,9],continu:9,control:[4,5,6,9],conveni:[2,3,6,7],convent:6,convers:[2,5],convert:[3,4,5,9],copyright:4,correct:[0,4,5,8,9],correctli:[2,7,9],correspond:[0,3,5,7,9],cos:6,could:[6,8],count:5,counterpart:7,coupl:8,cours:2,cover:[5,9],crash:8,creat:[0,2,3,5,7,9],createconfig:[0,5,7],critic:[2,7],cromermann:8,crystallogr:4,cube:6,current:[0,3,5,6,8,9],curv:[5,7,9],custom:[2,4,5,8,9],cutoff:[5,7,9],dash:[5,7],dat:[5,6,8,9],data:[0,1,2,3,4,5,7,8],datafil:[3,5],dataformat:[0,3,5,7,9],datapath:[0,5,8,9],davi:4,debug:5,decai:5,decemb:1,dedic:9,defin:[0,2,3,5,7,9],definit:5,degre:[0,5,7,8,9],delft:9,demonstr:[7,9],denot:[7,8],depend:[2,3,8],der:9,describ:[7,9],descript:[5,7],design:9,desir:[2,3,9],detail:[5,6,9],detector:[5,9],diagnost:5,dialog:[3,8,9],did:9,differ:[0,2,5,7,9],difficult:9,diffpi:[2,3,4,6,8,9],diffract:[0,3,4,5,7,8,9],diffractomet:[5,8,9],dir1:[5,8],dir2:[5,8],dir3:8,dir:[3,8],directoi:9,directori:[0,2,3,5,6,7,8,9],disabl:5,discuss:9,disk:3,displai:[2,3,5,6,7,9],distribut:[2,4,8,9],dna:9,doc:9,document:[6,7,8,9],doe:[2,3,7,9],don:[2,4],done:[6,9],dot:8,dotfil:[3,8],doubl:[5,6,7],download:2,driven:[2,9],drop:9,duplic:8,dynam:9,each:[0,3,5,8,9],easi:[2,9],easiest:[0,2],easy_instal:2,editor:[0,2,7],edu:4,effect:[3,4,5,9],egg:[2,8],eijck:4,either:[0,3,5,7,8,9],elaps:9,electron:8,element:[3,5,9],email:4,employ:4,empti:[3,5,9],empty_capillari:9,enabl:[7,8],enclos:5,encount:9,encourag:6,end:[3,5,8,9],engin:2,enhanc:[2,8],enough:3,enter:[7,9],enthought:2,entir:3,entri:[3,5,8,9],environ:[2,8,9],equal:[0,3,5,7,9],equival:6,error:[5,8,9],essenti:[5,9],etc:[3,8],even:9,everi:5,everyth:8,exact:9,exampl:[0,1,2,3,5,7,8,9],except:[0,9],execut:[2,7,9],exist:[2,5,8,9],exit:[5,6,7,9],expand:[5,9],expans:6,expect:[5,9],experi:5,experiment:9,explanatori:8,explicit:8,explicitli:[3,5,7,8],extens:[2,5,8,9],extra:[2,3,5,9],extract:[1,4,9],f007:5,f2avg:5,f77:5,faction:9,factor:[0,5,7,8,9],failur:8,fals:[3,5],familiar:7,farrow:4,fashion:[2,7],fast:9,favg2:5,favorit:0,featur:[6,9],felectronatq:8,few:[0,7,9],fft:9,fig:9,figur:9,file10:6,file11:6,file12:6,file13:6,file1:6,file20:6,file2:6,file9:6,file:[1,2,3,4,7,8],filenam:[0,2,3,5,6,7,8,9],find:[0,2,3,5,6,8,9],findfil:[3,6,8,9],finish:9,first:[0,2,3,5,6,7,9],fit2d:7,fit:[0,1,5],fix:5,flag:[8,9],fledg:9,flexibl:5,folder:9,follow:[0,2,4,5,6,9],folow:7,forc:[3,5,8,9],form:[0,5,7,9],format:[2,3,5,6,7,8],formfactorfil:[5,9],formula:[5,8],forward:[8,9],found:[0,2,9],four:0,fourier:[5,7],fraction:[5,8],frequenc:5,fresh:9,from:[0,2,3,4,5,6,7,8],front:5,full:[6,8,9],funct:8,further:5,gang:[4,9],gca:3,gener:[0,3,6,7,8,9],get:[2,7,9],gettransform:9,give:[5,8],given:9,global:[0,8],going:9,good:9,grant:4,graph:[6,9],greater:3,green:9,grid:[0,5,8,9],group:[3,4,5,8,9],gui:[2,3,9],guid:1,handl:[8,9],hao:4,happen:9,has:[0,3,5,6,7,9],hash:7,have:[0,2,3,5,7,8,9],header:[0,3,7,9],headlin:6,help:[5,6,7,9],here:[2,5,6,7,9],hidden:3,higher:[3,5],highli:4,hint:9,hoc:4,hold:8,holder:5,home:[0,9],how:9,howev:[5,9],http:[2,9],human:8,hundr:9,hung:4,ident:7,identifi:[0,9],ignor:[0,3,5,7,8,9],illustr:9,immedi:9,impli:[7,9],implicit:[6,8],improv:8,inaccur:[8,9],includ:[2,3,4,6,7,8,9],inclus:[3,5],incorrectli:8,increas:8,inde:7,indent:2,index:[1,2,3,6,9],indic:[3,6,9],info:[5,6,7,9],inform:[4,5,7],initi:[3,6,8],inlin:8,input1:7,input2:7,input:[1,3,6,7,8],inputfil:[0,3,5,9],inputn:7,instal:[1,7,8,9],instanc:3,instanti:8,instead:[2,6,7,8],instruct:[2,8,9],instrument:9,integ:[3,5,6,9],integr:2,intend:[2,5,6,7,9],intens:[0,3,5,7,9],intensity1:3,intensity2:3,interact:[1,2,4,5,6,7,8],interactiveshellapp:2,intermedi:[3,4,9],internet:2,interpol:8,interpret:[2,5],intervent:4,introduct:1,invers:[0,5,7],invok:6,involv:9,ipy_mag:[2,8],ipy_pdfgetx3:8,ipynb:9,ipython3:2,ipython:[1,3,5,6,7,8,9],ipython_config:2,iraw:[3,9],issu:9,item:[3,5],iter:3,its:[5,6,7,9],itself:0,jank:4,join:7,jupyt:9,just:[0,6,9],kapton_bgrd_300k_nor_2:9,keep:[3,6],keyword:[3,9],kirkland:8,know:4,known:9,kwarg:3,label:[6,8],laboratori:4,lack:9,languag:2,larg:[5,6,9],larger:5,last:[3,5,6,9],later:8,lead:[2,3,4,5,7],learnt:8,least:3,left:5,legend:9,leli:9,let:9,level:[3,5],librari:[2,4],licens:1,like:[2,6,9],likewis:8,limit:5,line2d:[3,9],line:[0,2,3,4,5,6,7,8,9],linear:[3,6],linux:[2,9],list:[3,5,6,8,9],liu:4,live:9,load:[3,5,6,7,8,9],loaddata:[3,8,9],loadtxt:3,loc:9,local:8,locat:0,log:[3,6,8],logarithm:[3,6,8],lone:8,look:[3,7,9],lookup:8,louwen:4,low:[3,9],lower:[5,9],lowercas:8,mac:[2,9],made:9,magic:[1,8],mai:[0,2,3,5,6,7,8,9],make:[5,7,9],manag:2,mandatori:0,mani:7,manipul:9,manual:[1,5,6,7,8],mark:[0,7],marker:6,match:[2,3,5,6,8],materi:9,matplotlib:[2,3,6,8,9],matric:3,matrix:[3,9],max:9,maximum:[5,9],may:9,mean:9,meaning:[5,7,9],measur:[0,5,7,9],member:4,memori:3,mention:9,messag:[5,8,9],metadata:[0,7],method:[3,9],microscopi:8,might:5,mind:6,minimum:3,minrow:3,misc:3,miss:8,mode:[1,2,4,5,7,8,9],modifi:[6,7],modul:[3,8],momentum:[0,5,7,9],more:[2,3,4,5,7,9],most:[0,3,6,9],mott:8,move:9,multipl:[0,8],must:[0,2,3,4,5,6,7,8],nacl:0,name:[0,2,3,5,6,7,8],nanomet:[0,5,7],nanoparticl:[4,9],napoleon:8,nation:4,natur:9,navig:[2,9],nbcmi:9,ndarrai:3,nearli:7,necessari:[2,3,5,9],need:[0,2,5,6,9],neg:3,neutron:[1,4,5,7,8],next:[2,9],ni300mesh_300k_nor_1:9,nickel:1,nicmd:9,nois:5,noisi:[5,9],non:[3,9],none:[3,5,9],nonzero:9,normal:[0,5,9],notabl:9,note:[1,3,5,6,7,9],notebook:9,noth:9,notic:[1,9],now:[8,9],nsl:9,number:[3,5,9],numer:[0,6,9],numpi:[2,3,8],nykypanchuk:9,object:[3,5,8,9],obsolet:8,obtain:[2,9],off:5,offset:[5,8,9],often:[5,7],older:2,oleg:9,omit:5,onc:[0,2,3,5,8,9],one:[2,3,5,6,8,9],ones:5,onli:[0,3,4,5,6,7,8,9],open:[2,5,6,7,8,9],oper:[1,2,6,7,8],optimum:4,option:[0,1,2,3,6,7,8,9],order:[5,7],org:[2,9],orient:2,origin:9,oscil:9,other:[0,1,2,3,7,8,9],otherwis:[2,5],out:[5,6,9],outpufil:9,output:[1,3,7,8],outputtyp:[0,5,9],outsid:9,overal:9,overlap:[5,9],overrul:9,overwrit:[5,8,9],own:[5,9],packag:[1,2,8],page:[1,6],pair:[3,4],paper:4,paragraph:2,paramet:[0,1,3,4,7,8],parent:9,parenthes:[5,8],pars:9,part:[2,9],parti:[2,4],pass:[0,3,6,7,9],path:[0,2,3,5,8],pattern:[0,3,5,6,8,9],pavol:4,pbti0:5,pdf:[1,2,3,4,7,8],pdfconfig:[3,8],pdfgetn3:[0,1,2,3,4,5,8,9],pdfgets3:[1,2,4,5,8,9],pdfgetter:[3,5,9],pdfgetx2:[3,9],pdfgetx3:[0,1,2,3,4,5,6,8,9],pdfgetx3path:8,pdfgetx:[2,3,4,6,8,9],pdfgetx_env:2,pdfgetxn3:9,pearl:9,per:[0,5,6,8,9],perform:3,perman:2,permit:[4,5],photon:9,pip:[2,9],place:[2,9],plain:5,plan:2,platform:[8,9],platinum:1,pleas:[4,7],plot:[2,3,4,5,6,7,8,9],plotdata:[1,2,3,8,9],plotid:3,plotpdfcomparison:9,point:[3,8,9],polynomi:[0,5,9],pop:9,posit:[5,8],possibl:5,powder:[0,3,4,5,7,9],power:[4,9],pre:[3,6],preced:[3,5,6,7],prefer:7,prefix:2,preload:9,prepend:[2,5],prerequisit:9,present:[5,7,9],preserv:[2,8],press:7,previou:[0,3,8],previous:[5,7],print:[3,5,7,9],privileg:2,problem:9,procedur:9,process:[0,2,3,4,5,6,7,8],processfil:[3,8,9],produc:[0,3,5,6,9],prof:[4,9],profil:2,profile_default:2,program:[0,1,2,3,4,7,8,9],prohibit:4,prompt:[2,6,9],proper:[5,8],protocol:9,provid:[0,2,5,6,8,9],pt_bulk:[7,9],pt_bulk_ramp03:9,publish:9,purpos:8,push:8,put:9,pyplot:[3,6,8],python37:2,python3:2,python:[1,2,4,5,6,8,9],pythonxi:2,qmax:[3,5,7,8,9],qmaxinst:[5,7,8,9],qmin:[5,8,9],qnm:5,qualiti:9,quick:1,quot:[5,6,9],radiat:[5,7],rai:[1,4,5,7],rang:[3,5,6,8,9],rapid:4,rather:8,raw:[3,9],read:[0,3,5],readabl:8,reason:9,recalcul:9,recip:8,recogn:[6,9],recommend:[2,9],red:9,redo:[7,9],reduc:[0,7,9],refer:[1,3,7,9],referenc:7,refin:9,regular:[0,9],rel:9,relat:[3,7,9],releas:[1,2],reliabl:9,remark:9,remov:[5,9],renam:8,repeat:[5,8],replac:[2,9],report:5,repositori:2,reproduc:[0,8],requir:[1,5,7,9],resampl:9,rescal:9,research:4,reset:[3,5,9],residu:9,resolv:9,respect:[3,4,7,9],result:[0,3,4,5,7,9],reus:[3,5,8,9],right:7,rmax:[5,9],rmin:[5,9],root:2,round:9,row:[3,6,9],rpoli:[5,8,9],rstep:[5,8,9],run:[2,4,7,8,9],safe:[2,9],safer:8,safeti:9,same:[0,2,3,5,6,7,8,9],sampl:[0,5,7,9],sapphir:9,sapphire755:9,sas:[5,7,8,9],saspdf:[1,4],satisfi:3,save:[3,5,6,7,9],sb2896:4,scalar:8,scale:[3,5,6,8,9],scan:[7,9],scatter:[0,1,3,4,5,7,8],scienc:2,scientif:[2,4],screen:9,script:[2,4,8],search:[0,1,2,3,5,6,7,8],second:[0,3,6,7,9],section:[0,2,5,6,7,8,9],sectionnam:[0,5],see:[2,5,6,9],seem:3,select:[0,1,3,5,8,9],selector:3,self:9,separ:[0,3,4,5,6,7,8,9],sequenc:3,sequenti:3,seri:[1,4],serv:3,session:[2,3,5,6,7,8,9],set:[0,2,3,5,6,7,8,9],setup:[5,8,9],setuptool:[2,8],sever:[0,3,5,6,9],shall:9,shape:9,share:[0,9],shell:[2,3,5,6,7,8,9],shortcut:9,shorter:5,should:[0,2,3,9],show:[3,6,9],side:9,sign:7,signal:5,similar:[2,6,7,9],simon:4,simpl:[0,4,6,7,8,9],simul:9,sin:6,sinc:9,sinco:6,sine:3,singl:[2,3,5,6,7,8,9],six:2,skip:[2,3],slash:[8,9],slice:[3,8],slider:[8,9],slightli:9,slist:8,small:[1,4,5,7,8],smaller:5,smooth:5,softwar:[1,4,6,7,8,9],solid:0,solut:9,some:[2,5,9],songsheng:4,sourc:9,space:[0,5],special:[3,5,6,9],specif:[2,6,8,9],specifi:[0,3,5,6,7,9],specimen:5,spectra:9,split:3,squar:6,stai:9,stand:[6,7],standard:[2,5,9],start:[0,1,2,3,5,6,8,9],state:9,statement:[5,9],step:[2,6,7,9],still:9,stoichiometri:[5,8],stop:[6,8],store:[3,9],str:3,string:[2,3,5,7,8,9],strip:9,structur:[0,7],style:[3,6,8],sub:8,subdirectori:9,subfold:9,subject:4,subplot:[3,9],subsequ:[3,5,8,9],substr:9,subtract:9,successfulli:9,sudden:9,sudo:2,suffici:3,suffix:9,suitabl:9,summari:7,suppli:7,support:[0,2,3,5,6,8],suppress:5,symbol:[3,5,8],symlink:8,synapt:2,syntax:[0,3,5,6,9],system:[2,3,6,9],tabl:8,tail:5,take:[3,7,8],taken:[5,9],talapin:4,tao:4,technolog:[2,9],tell:7,temperatur:9,templat:[0,5],tend:9,termin:[2,9],terribl:9,test:[0,2,8],text:[0,2,3,5,6,7,9],than:[0,3,8],thank:9,thei:[0,2,3,5,6,9],them:[0,3,4,5,6,7,8,9],thereaft:9,therefor:[2,5,7,9],theta:7,thi:[0,2,3,4,5,6,7,8,9],third:2,those:[2,3,9],three:[2,4,5],threshold:5,through:7,thu:[0,2,6,7,9],tif:7,time:[5,8,9],timothi:4,timur:4,togeth:[6,9],token:[5,9],told:7,too:5,tool:[2,7,8],top:9,total:[0,4,9],trail:5,transfer:[0,5,7,9],transform:[3,5,7,9],transformbackground:9,transformfqgrid:9,transformfqtogr:9,transformqgridregular:9,transformsqnormrpoli:9,transformsqtofq:9,transformtwothetatoqa:9,transformxrayasfnormchri:9,translat:3,transpos:3,truste:4,tunabl:9,tune:[1,3,4,5],tuneconfig:[3,8,9],tupl:3,turn:[5,9],tutori:[1,3,5,7,8],two:[0,5,7,9],twotheta1:3,twotheta2:3,twotheta:[5,7,9],twothetazero:[1,5,8],type:[0,2,3,5,7,8,9],typic:7,ubuntu:2,uncorrect:9,undefin:5,under:[4,8],understood:[0,9],unexpect:5,unicod:8,uniqu:[5,6,9],unit:[0,5,7,8],univers:[4,8,9],unix:[2,5,9],unless:[5,7,8,9],unpack:3,unreli:5,unseemli:9,unsupport:8,updat:[3,7,9],upon:9,upper:[5,7],usag:[5,6,8],use:[2,3,4,5,6,7,8,9],usecol:[3,8],used:[1,2,3,4,5,6,7,8,9],useful:[0,2,5,6,9],user:[0,1,2,4,5,6,7,8,9],uses:9,using:[0,2,3,4,5,6,7,8,9],usual:[0,2,9],util:[4,6],utilis:4,valid:[0,2,5,9],valu:[0,3,4,5,6,7,8,9],van:[4,9],variabl:[2,3,6,8,9],variant:5,varnam:0,ventur:2,verbos:[5,7,9],veri:[2,5,7,9],verifi:[2,5,7,9],version:[1,2,5,6,9],virtual:[2,7],visual:[4,9],vogt:4,vuong:4,wai:[0,2,6,7,8,9],want:2,warn:[5,9],wavelength:[4,5,7,8,9],web:[5,6],well:[2,7],were:[0,2,5,7,9],what:[0,3,5,9],wheel:[2,8],when:[0,2,3,5,6,7,8,9],where:[0,5,6,7],wherea:7,whether:4,which:[2,3,4,5,6,8,9],whitespac:3,whl:[2,9],who:2,whole:9,wide:3,window:[2,5,6,7,8,9],within:[2,5,6,8],without:[4,5,8,9],word:5,work:[0,2,3,5,6,7,9],wors:9,would:[0,2,3,5,6,9],wright:4,writabl:2,write:[5,7,9],written:[2,4,5,9],www:[2,9],x21:9,xrai:[5,9],yes:[5,8,9],yet:[4,7,9],yield:7,york:4,you:[0,2,4,9],your:[0,4,9],zero:[3,5,8,9],zip:9,zoom:9},titles:["Files used in PDF extraction","diffpy.pdfgetx","Installation","Interactive mode","Introduction","Options and parameters","The plotdata program","Quick-start guide","Release notes","Tutorial"],titleterms:{Added:8,The:6,angl:9,author:4,chang:8,command:[2,7],configur:[0,5,9],content:1,data:[6,9],deprec:8,diffpi:1,exampl:6,extract:0,file:[0,5,6,9],fit:9,fix:8,from:9,guid:7,indic:1,input:[0,5,9],instal:2,interact:[3,9],introduct:4,ipython:2,licens:4,magic:2,match:9,mode:3,name:9,neutron:9,nickel:9,note:8,notic:4,oper:5,option:5,other:5,output:[0,5,9],paramet:[5,9],path:9,pdf:[0,5,9],pdfgetn3:7,pdfgets3:7,pdfgetx3:7,pdfgetx:1,platinum:9,plotdata:6,predefin:9,process:9,program:[5,6],quick:7,rai:9,refer:4,releas:8,remov:8,requir:2,saspdf:9,scatter:9,scratch:9,search:9,select:6,seri:9,small:9,softwar:2,start:7,tabl:1,tune:9,tutori:9,twothetazero:9,used:0,version:8}}) \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.1.2/tutorial.html b/static_root/doc/pdfgetx/2.1.2/tutorial.html deleted file mode 100644 index ea4be469..00000000 --- a/static_root/doc/pdfgetx/2.1.2/tutorial.html +++ /dev/null @@ -1,819 +0,0 @@ - - - - - - Tutorial — diffpy.pdfgetx 2.1.2 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Tutorial

-

In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the examples -folder included with the PDFgetX3 distribution. The examples -folder can be found in the parent “doc” directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -https://www.diffpy.org/doc/pdfgetx/2.1.2/pdfgetxn3-examples.zip.

-
-

Nickel X-ray PDF

-
-

predefined configuration file

-

Change to the Ni directory. The file named -ni300mesh_300k_nor_1-5.chi contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the 2Θ scattering -angles and X-ray intensities. The second file -kapton_bgrd_300k_nor_2-3.chi contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the pdfgetx3.cfg contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -pdfgetx3 program -with the powder data file as an argument:

-
$ pdfgetx3 ni300mesh_300k_nor_1-5.chi
-
-
-

For the first run there should be no output on the screen, -however a new file, ni300mesh_300k_nor_1-5.gr should appear -in the work directory. -We can use the plotdata program, -included with this software, to plot the output data:

-
$ plotdata ni300mesh_300k_nor_1-5.gr
-
-
-

This will open a graph window and start an IPython interactive session. -To exit and close the figure, type exit() on the IPython prompt. -Let’s run the program again, but now with a ---verbose=info -option, to show more details about the program actions.

-
$ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi
-
-INFO:applying pdfgetx3 defaults
-INFO:set config.mode = xray
-INFO:searching for default config file /home/user/.pdfgetx3.cfg
-INFO:searching for default config file .pdfgetx3.cfg
-INFO:searching for default config file pdfgetx3.cfg
-INFO:loaded default config file pdfgetx3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi
-INFO:set config.outputtypes = gr
-INFO:set config.wavelength = 0.142774
-INFO:set config.composition = Ni
-INFO:set config.qmaxinst = 26.5
-INFO:set config.qmax = 26.0
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 30.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'xray'
-INFO:calling config_xray
-INFO:started PDF processing.
-INFO:processing 'ni300mesh_300k_nor_1-5.chi'
-INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr'
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-INFO:elapsed time: 0.095
-
-
-

Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the --verbose option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the --force=yes option, upon -which pdfgetx3 would overwrite any existing files.

-

PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the --c option. Another option, --plot=[iq,sq,fq,gr] turns on plotting of the final PDF or of some other result. A -side effect of the --plot option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function F(Q) and the PDF curve G(r). This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:

-
$ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr
-
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-
-Variables related to PDF processing:
-
-pdfgetter    -- PDFGetter used for calculation.
-config       -- configuration data used by PDFGetter.
-                See config.inputfiles for a list of inputs.
-iraw         -- matrix of input raw intensities with 2 rows per file.
-iq sq fq gr  -- intermediate results per each input file stored
-                as matrix rows.
-
-Functions:
-
-tuneconfig   -- dynamically tune configuration variables.
-processfiles -- process specified data files.
-clearsession -- clear all elements from the inputfiles, iraw,
-                iq, sq, fq and gr variables.
-plotdata     -- plot all or selected columns from a text data file.
-loaddata     -- load all or selected columns from a text data file.
-findfiles    -- search for files matching the specified patterns.
-
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-In [1]:
-
-
-

This will open a plot figure similar to

-_images/nickelfqgr.png -

Because of the interactive mode implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -config variable stores all the configuration parameters, -and its content can be displayed with the print() -function as

-
In [1]: print(config)
-
-configfile = ni300mesh_300k_nor_1-5.gr
-configsection = DEFAULT
-dataformat = twotheta
-...
-qmax = 26.0
-...
-
-
-

The processfiles() function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the F(Q) and G(r) -curves calculated at Qmax = 22 Å-1, we can call -processfiles() and pass it a keyword argument for -the new qmax as follows:

-
In [2]: processfiles(qmax=22)
-
-# the qmax parameter was updated to a new value, thus
-In [3]: config.qmax
-Out[3]: 22
-
-
-

There should be now two lines in each plot axis corresponding to -the results at Qmax equal 26 and 22 Å-1. To exit the program, -type exit().

-
-
-

processing from scratch

-

We have already encountered the command-line option -c -for specifying a custom configuration file. A special argument “NONE”, -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-ERROR:Configuration error: wavelength not specified.
-ERROR:See "--help" for more hints.
-
-
-

There is an error, for the wavelength is necessary to convert -the scattering angle 2Θ to momentum transfer Q. The -X-ray wavelength was 0.142774 Å, which can be passed with the --w, --wavelength option:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774
-
-...
-ERROR:Configuration error: Chemical composition not known.
-ERROR:See "--help" for more hints.
-
-
-

There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the --composition option. The example -below uses a “\” character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-...
-
-
-

There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the -t, --outputtypes option. -The outputtypes option recognizes the following result types: -“iq”, “sq”, “fq”, “gr”. One or more of these type strings, -separated by a comma, can be included with the --t option, which will produce the corresponding -output files. An empty string, such as -t "", or -t NONE -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings.

-

At this point, we will not write any output files, but will use the ---plot option to display the calculated curves. The ---plot accepts the same arguments as outputtypes, so to -display the F(Q) and G(r) curves we shall run

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni --plot=fq,gr
-
-WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161
-WARNING:qmax reset to the data boundary qmaxinst=28.0865680161
-
-
-

which should open the following plot window:

-_images/nickelfqgrnoisy.png -

The graphs look terrible. The PDF is very noisy and the F(Q) curve -shows a sudden break at about 27 Å-1. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -iraw, iq, sq, -fq, gr -variables for the original raw data and intermediate results. We -are going to plot the “iq” variable that has the input intensities -resampled on the Q grid. The matplotlib function -clf() clears the figure, -the iq variable is a two-row matrix with Q and I rows, and the -axis() -function lets us zoom to a given range:

-
In [1]: clf()
-In [2]: plot(iq[0], iq[1])
-Out[2]: [<matplotlib.lines.Line2D at 0x3e20f50>]
-In [3]: axis([20, 29, 0, 3000])
-Out[3]: [20, 29, 0, 3000]
-
-
-

The graph shows a sudden drop in the raw intensities at 27 Å-1. -The qmaxinst variable defines a Q cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 Å-1

-
In [4]: processfiles(qmaxinst=26.5)
-WARNING:qmax reset to the data boundary qmaxinst=26.5
-
-
-

The updated curves looks reasonable without any oscillations and -breakpoints. The tuneconfig() function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type tuneconfig() to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the F(Q) and G(r) curves change. -The rpoly parameter controls the degree of data-correction -polynomial and is an approximate low-r bound of reliable G -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the G(r) -curve and save it to an output file nicmd.gr:

-
In [14]: config.qmax = 26
-In [15]: config.outputtypes = 'gr'
-In [16]: config.output = 'nicmd'
-In [17]: processfiles()
-
-
-
-
-
-

Platinum X-ray series

-

PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(z-shell being a notable exception).

-
-

matching input files

-

The pdfgetx3 program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the -f, --find option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option --l, --list makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files.

-

We will try out this file search on platinum example files. Open a -terminal and navigate to the Pt directory. There should be a -series subdirectory with 6 chi files indexed from 903 to 908. -At first, let’s stay in the Pt directory and run the following -command

-
$ pdfgetx3 --list --find
-
-Pt_bulk-00055-pdfgetx2.gr
-Pt_bulk-00055-pdfgetx3.gr
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-pdfgetx3.cfg
-plotpdfcomparison.py
-
-
-

Without any patterns the file search matches all files in the current -directory. Now let’s try to add name patterns. There are few special -patterns, for example ^ matches at the beginning of the filename, $ at the end and <N-M> matches a range of integer values from -N to M. The patterns containing ^$<> need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works.

-

Filenames containing “y”:

-
$ pdfgetx3 --list --find y
-empty_capillary-00032.chi
-plotpdfcomparison.py
-
-
-

Filenames that containing both “y” and “chi”, here we use the -options --list and --find in an abbreviated -form -l and -f:

-
$ pdfgetx3 -lf y chi
-empty_capillary-00032.chi
-
-
-

Filenames that start with “e”:

-
$ pdfgetx3 --list --find "^e"
-empty_capillary-00032.chi
-
-
-

Filenames that contain character “2”:

-
$ pdfgetx3 --list --find 2
-Pt_bulk-00055-pdfgetx2.gr
-empty_capillary-00032.chi
-
-
-

Filenames that contain numeric value “2”:

-
$ pdfgetx3 -lf "<2>"
-Pt_bulk-00055-pdfgetx2.gr
-
-
-

The special argument + starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both “bulk” and “chi” substrings and then -also those that have “empty” and “chi” in their names, use:

-
$ pdfgetx3 -lf bulk chi + empty chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-

When pattern groups overlap the resulting matches are -made unique and each file is listed only once

-
$ pdfgetx3 -lf bulk chi + chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-
-
-

data search path

-

Each group of PDFgetX3 patterns can have one entry containing -forward slash “/” to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered “903” to “905” and “908” from the -series subdirectory can be therefore matched using

-
$ pdfgetx3 -lf series/ "<903-905>" + 908
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-

The current directory can be selected using ./

-
$ pdfgetx3 -lf series/ 903 + ./ bulk chi
-series/Pt_bulk_ramp03-00903.chi
-Pt_bulk-00055.chi
-
-
-

When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -“.chi”-ending files in the current and series -directories can be thus found using

-
$ pdfgetx3 -lf ".chi$" + series/
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00906.chi
-series/Pt_bulk_ramp03-00907.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-
-
-

output file names

-

By default the output files are saved in the current directory. The -output path, can be changed with the -o, --output option. -The -o recognizes several tokens that are replaced with -parts of the input file name, for example, “@b” expands to an -extension-stripped base name. In similar faction, “@o” is replaced -with the output type extension. Thus to generate PDFs for all files -in the series directory and save them in the -series-gr subfolder do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o
-
-
-

The extension “.@o” is automatic when not included anywhere in the -output file name. Thus to process the Pt series at Qmax = 18 Å-1 -while saving the results in the same folder, but with a “_qmax18” suffix -in their filenames do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18
-
-
-

For input file Pt_bulk_ramp03-00903.chi the -o option -above expands to output path series-gr/Pt_bulk_ramp03-00903_qmax18.gr. -The series-gr directory should now contain 12 “gr” files, -6 of them processed at Qmax = 27 Å-1 as given by configuration -file and 6 others processed at Qmax = 18 Å-1.

-
-

See also

-

-o, --output for a list of output tokens

-
-
-
-
-

Interactive tuning of parameters

-

One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the Ni directory in the shell and process -the nickel PDF while plotting the F(Q) and G(r) curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -tuneconfig() -function from the IPython environment

-
$ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi
-...
-In [1]: tuneconfig()
-
-
-

The -tuneconfig() -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot.

-_images/tunenickelfqgr.png -

The constant data scale check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -PDF parameters section. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the bgscale parameter -if PDF has been processed without any background data.

-

By default the -tuneconfig() -function displays the same curves as -specified by the --plot option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the describe() method of the -pdfgetter() object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object t4 that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the tuneconfig() function

-
$ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi
-...
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-
-In [1]: fig, ax = subplots(2)
-In [2]: pdfgetter.describe()
-0   TransformTwoThetaToQA
-    convert x data from twotheta to Q in 1/A
-1   TransformQGridRegular
-    Remove the data outside the (qmin, qmaxinst) range
-2   TransformBackground
-    subtract background intensity
-3   TransformXrayASFnormChris
-    scale and normalize intensities by x-ray scattering factors
-4   TransformSQnormRPoly
-    Normalize S(Q) by fitting a polynomial
-5   TransformSQToFQ
-    Convert S(Q) to F(Q).
-6   TransformFQgrid
-    Resample F(Q) to a regular grid suitable for FFT
-7   TransformFQToGr
-    Convert F(Q) to G(r).
-In [3]: t4 = pdfgetter.getTransformation(4)
-In [4]: tuneconfig([t4, 'gr'], axeslist=ax)
-In [5]: ax[0].legend(loc=2)
-
-
-

The subplots() function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window:

-_images/tunenickelt4gr.png -

The tuning can be finished by clicking the Done button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the config -object, for example:

-
In [5]: config.bgscale = 1.5
-
-
-

Finally, to save the new results, we shall first confirm -outputtypes have been correctly set and then use the -processfiles() function to redo the calculations, plots and -data output for the updated configuration. Note that the -processfiles() function accepts keyword arguments for -configuration parameters. This is used at line In [8] to -turn on the force flag and is in effect a shortcut -for an extra config.force = True statement.

-
In [6]: config.outputtypes
-Out[6]: ['gr']
-In [7]: processfiles()
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-In [8]: processfiles(force=True)
-
-
-

ni300mesh_300k_nor_1-5.gr was successfully saved at an -updated configuration for there were no warnings after the last call.

-
-
-

Neutron PDF

-

This example illustrates PDF extraction from -neutron powder data using pdfgetn3. -Navigate to the n-Sapphire directory in the shell. -The sapphire755.dat file contains powder diffraction data from -sapphire (α-Al2O3) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The pdfgetn3.cfg configuration file specifies -processing parameters such as wavelength, -twothetazero, composition, and mode.

-

To extract the sapphire neutron PDF run

-
$ pdfgetn3 --verbose=info sapphire755.dat
-
-INFO:applying pdfgetn3 defaults
-INFO:set config.mode = neutron
-INFO:searching for default config file /home/user/.pdfgetn3.cfg
-INFO:searching for default config file .pdfgetn3.cfg
-INFO:searching for default config file pdfgetn3.cfg
-INFO:loaded default config file pdfgetn3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.mode = neutron
-INFO:set config.wavelength = 1.0989
-INFO:set config.twothetazero = -0.38
-INFO:set config.composition = Al2O3
-INFO:set config.qmaxinst = 11.2
-INFO:set config.qmax = 11.2
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 20.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'neutron'
-INFO:calling config_neutron
-INFO:started PDF processing.
-INFO:processing 'sapphire755.dat'
-INFO:resolved output file '' as 'sapphire755.fq'
-INFO:written outpufile sapphire755.fq
-INFO:resolved output file '' as 'sapphire755.gr'
-INFO:written outpufile sapphire755.gr
-INFO:elapsed time: 0.097
-
-
-

This will produce two files sapphire755.fq, sapphire755.gr -for the F(Q) and G(r) functions. -To compare them with expected results use

-
$ plotdata sapphire755-expected.fq sapphire755.fq
-$ plotdata sapphire755-expected.gr sapphire755.gr
-
-
-
-
-

Fit twothetazero

-

For a good quality PDF it is essential to use powder patterns with -accurate values of Q. Some instruments may produce spectra with -a slightly offset scattering angle 2Θ which -causes inaccurate Q and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the twothetazero correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples.

-

This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -diffpy.cmi, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use Anaconda Python and set up a dedicated -Anaconda environment nbcmi for this tutorial. -This can be accomplished using the following steps:

-
$ conda create -n nbcmi -c diffpy python=2 diffpy.cmi
-$ conda activate nbcmi
-$ pip install path/to/diffpy.pdfgetx-VERSION.whl
-
-
-

When these prerequisites are in place, -change to the n-twothetazero-fit directory -and open the self documented Jupyter notebook as follows

-
$ jupyter notebook fit-twothetazero.ipynb
-
-
-

The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted twothetazero. -After running all cells the notebook should produce similar graphs -as in the figure below.

-
-_images/twothetazerofit.svgz

Refinement of nickel neutron PDF for (a) uncorrected data -and (b) with a refined zero correction. -The extracted PDFs are plotted as blue circles, -simulated PDFs as red lines and -the difference is plotted offset in green below.

-
-

The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual Rw which is lowered from (a) 0.18 to (b) 0.05.

-
-
-

Small-angle-scattering PDF (sasPDF)

-

Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using pdfgets3. -To do this, navigate to the Au_DNA_NPA directory in your terminal. -In this folder, you will find Au_DNA_NPA.chi and -Au_DNA_FF.chi files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008).. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The pdfgets3.cfg -configuration file specifies processing parameters such as formfactorfile (required by sas mode), qmin, qmax, and mode.

-

To extract the PDF of DNA-capped DNA nanoparticle assemblies

-
$ pdfgets3 --verbose=info Au_DNA_NPA.chi
-
-INFO:applying pdfgets3 defaults
-INFO:set config.mode = sas
-INFO:searching for default config file /home/user/.pdfgets3.cfg
-INFO:searching for default config file .pdfgets3.cfg
-INFO:searching for default config file pdfgets3.cfg
-INFO:loaded default config file pdfgets3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = QA
-INFO:set config.backgroundfile =
-INFO:set config.datapath = []
-INFO:set config.formfactorfile = Au_DNA_FF.chi
-INFO:set config.output =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.force = yes
-INFO:set config.mode = sas
-INFO:set config.rpoly = 240.605
-INFO:set config.qmaxinst = 0.075
-INFO:set config.qmin = 0.01
-INFO:set config.qmax = 0.072
-INFO:set config.rmin = 100.0
-INFO:set config.rmax = 5000.0
-INFO:set config.rstep = 1.0
-INFO:set config.plot = iq, fq, gr
-INFO:set config.verbose = info
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'sas'
-INFO:calling config_sas
-INFO:started PDF processing.
-INFO:processing 'Au_DNA_NPA.chi'
-INFO:resolved output file '' as 'Au_DNA_NPA.fq'
-INFO:written outpufile Au_DNA_NPA.fq
-INFO:resolved output file '' as 'Au_DNA_NPA.gr'
-INFO:written outpufile Au_DNA_NPA.gr
-INFO:elapsed time: 0.947
-
-
-

This will save two files Au_DNA_NPA.fq, Au_DNA_NPA.gr in the same directoy for the F(Q) and G(r) functions. This also plots F(Q) and G(r) functions in a pop-up window and the processing parameters such as rpoly or so may be tuned interactively by issuing command tuneconfig() in the IPython session as discussed above.

-
-
- - -
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/PDFgetXNS3_manual.pdf b/static_root/doc/pdfgetx/2.2.0/PDFgetXNS3_manual.pdf deleted file mode 100644 index 795385af..00000000 Binary files a/static_root/doc/pdfgetx/2.2.0/PDFgetXNS3_manual.pdf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.0/_images/nickelfqgr.png b/static_root/doc/pdfgetx/2.2.0/_images/nickelfqgr.png deleted file mode 100644 index 3fbc12de..00000000 Binary files a/static_root/doc/pdfgetx/2.2.0/_images/nickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.0/_images/nickelfqgrnoisy.png b/static_root/doc/pdfgetx/2.2.0/_images/nickelfqgrnoisy.png deleted file mode 100644 index caab8cf3..00000000 Binary files a/static_root/doc/pdfgetx/2.2.0/_images/nickelfqgrnoisy.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.0/_images/tunenickelfqgr.png b/static_root/doc/pdfgetx/2.2.0/_images/tunenickelfqgr.png deleted file mode 100644 index 14accde4..00000000 Binary files a/static_root/doc/pdfgetx/2.2.0/_images/tunenickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.0/_images/tunenickelt4gr.png b/static_root/doc/pdfgetx/2.2.0/_images/tunenickelt4gr.png deleted file mode 100644 index c95278cd..00000000 Binary files a/static_root/doc/pdfgetx/2.2.0/_images/tunenickelt4gr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.0/_images/twothetazerofit.svgz b/static_root/doc/pdfgetx/2.2.0/_images/twothetazerofit.svgz deleted file mode 100644 index 80e48d71..00000000 Binary files a/static_root/doc/pdfgetx/2.2.0/_images/twothetazerofit.svgz and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.0/_sources/files.rst.txt b/static_root/doc/pdfgetx/2.2.0/_sources/files.rst.txt deleted file mode 100644 index edc63d96..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_sources/files.rst.txt +++ /dev/null @@ -1,102 +0,0 @@ -Files used in PDF extraction -======================================================================== - -.. include:: abbreviations.txt -.. _my-configfile: -.. program:: pdfgetx3 - -Configuration file ------------------------------------------------------------------------- - -Configuration files may define the PDF processing parameters. -By default, the :program:`pdfgetx3` program attempts to read -:file:`.pdfgetx3.cfg` file from the user HOME directory, -then :file:`.pdfgetx3.cfg` and :file:`pdfgetx3.cfg` files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the :option:`-c, --config <-c>` option. -The :program:`pdfgetn3` program works in the same way, -except it checks for configuration files -:file:`~/.pdfgetn3.cfg`, :file:`.pdfgetn3.cfg` and :file:`pdfgetn3.cfg`. - -The easiest way of creating a configuration file is to generate -a template content using the :option:`--createconfig` option as :: - - pdfgetx3 --createconfig=test.cfg - -and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple "varname=value" syntax, -any lines starting with "#" are ignored as comments. - -The configuration file has several sections marked as ``[SECTIONNAME]``. -The ``[DEFAULT]`` section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the :option:`-s, --section <-s>` option on the -command line. Thus :: - - pdfgetx3 --config=test.cfg --section=nacl - -would read the parameters from the ``[nacl]`` section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section. - - -Input files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -|twotheta| in degrees, momentum transfer *Q* in inverse nanometers or *Q* -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the :confval:`dataformat` parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values. - -The input files are usually passed as command-line arguments to -:program:`pdfgetx3` or :program:`pdfgetn3` programs and must be paths -accessible from the current working directory. - -Input files can be also defined by setting the :confval:`inputfile` -value in the configuration file. The :option:`-d, --datapath <-d>` -option can be then used to provide additional data directories to -search for these inputs and for the :confval:`backgroundfile`. -This is to support configuration files located in a different -directory than the data. - -When the :option:`--find <-f>` option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory. - - -Output files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 can produce up to four different output data files: - -* .iq -- |IQ|, the background-corrected - intensities sampled on a regular *Q*-space grid in inverse ångströms, - -* .sq -- |SQ|, the total scattering structure function, - with intensities normalized by average scattering factors and - corrected by a polynomial fit, - -* .fq -- |FQ|, the reduced structure function equal to *Q*\ (|SQ| - 1), - -* .gr -- |Gr|, the resultant PDF, where the first column is the - separation *r* in ångströms and the second is the function *G* in - Å\ :sup:`-2`. - -You can specify what output files should be produced by setting the -:confval:`outputtypes` parameter in the configuration file or by -passing the :option:`-t, --outputtypes <-t>` on the command line. - -The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the :option:`--config <-c>` option, -the PDFgetX3 will reproduce the previous calculation. diff --git a/static_root/doc/pdfgetx/2.2.0/_sources/index.rst.txt b/static_root/doc/pdfgetx/2.2.0/_sources/index.rst.txt deleted file mode 100644 index c7bf373e..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_sources/index.rst.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. PDFgetX3 documentation master file, created by - sphinx-quickstart on Tue Sep 21 18:35:11 2010. - You can adapt this file completely to your liking, - but it should at least contain the root `toctree` directive. - -######################################################################## -diffpy.pdfgetx -######################################################################## - -User manual for PDFgetX3, PDFgetN3, PDFgetS3 and Python package diffpy.pdfgetx. - -| Release |release| -| |today| - -======================================================================== -Table of contents -======================================================================== - - -.. toctree:: - :maxdepth: 2 - - intro - install - quick-start - tutorial - files - interact - options - plotdata - release - -======================================================================== -Indices -======================================================================== - -* :ref:`genindex` -* :ref:`search` diff --git a/static_root/doc/pdfgetx/2.2.0/_sources/install.rst.txt b/static_root/doc/pdfgetx/2.2.0/_sources/install.rst.txt deleted file mode 100644 index 667637dd..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_sources/install.rst.txt +++ /dev/null @@ -1,146 +0,0 @@ -Installation -======================================================================== - -.. include:: abbreviations.txt - -Software requirements ------------------------------------------------------------------------- - -This software is written in Python programming language, therefore -you must have Python 3.10, 3.9, 3.8, 3.7 or 2.7 installed. In addition, -the following third-party Python libraries are also required: - -* pip - Python package installer -* setuptools - tools for installing Python packages -* six - Python 2 and 3 compatibility library -* NumPy - library for scientific computing with Python -* matplotlib - Python plotting library -* IPython - enhanced interactive Python shell - -Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -`Python Package Index `__ -or using any Internet search engine. - -Another more convenient option is to obtain one of the science-oriented -Python distributions such as -`Anaconda Python`_, -`Enthought Canopy `_ or -`PythonXY `_, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step. - -On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command :: - - sudo apt-get install \ - python3-pip python3-setuptools python3-six \ - python3-numpy python3-matplotlib ipython3 - -This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above. - -On Windows operating system, it may be necessary to add the -``C:\Python37`` directory and the scripts directory -``C:\Python37\Scripts`` to the system :envvar:`!PATH`. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the :program:`Command Prompt`, type -there ``python`` and see if this starts the Python interpreter. - -Alternately, if you want to run the diffpy.pdfgetx software with a specific version of Python, -we recommend using a virtual environment, such as ``conda``. For example, if you have Anaconda Python installed, -you can create a conda virtual environment to install the software as follow :: - - conda create --name pdfgetx_env python=3.8 numpy matplotlib ipython - -You can choose the name of the environment and python version as you desire. You can choose any of the -supported Python versions. Then, activate this environment and follow the instructions in the -next section to install the software :: - - conda activate pdfgetx_env - -Installation ------------------------------------------------------------------------- - -The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -`Columbia Technology Ventures -`__. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:: - - pip install ./diffpy.pdfgetx-VERSION.whl - -Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending ``sudo`` to the command line above. If root access is not available, use the ``pip install`` options :option:`!--user` or :option:`!--prefix` to install the software to a user-writable directory. - -The package provides three programs for PDF conversion, :program:`pdfgetx3`, :program:`pdfgetn3` and :program:`pdfgets3`. To check if they are correctly installed run :: - - pdfgetx3 --version - pdfgetn3 --version - pdfgets3 --version - -This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a :program:`plotdata` -command for an easy plotting of text data files. To verify -if plotdata works, run the ``plotdata --version`` command. -Finally, a comprehensive test of the installed software can -be executed using :: - - python -m diffpy.pdfgetx.tests.run - -.. note:: - - Older versions of diffpy.pdfgetx use Python egg format - instead of Python wheel. - To install these use the easy_install command as follows:: - - python -m easy_install ./diffpy.pdfgetx-VERSION.egg - -.. index:: %pdfgetx3 IPython magic -.. index:: %pdfgetn3 IPython magic -.. index:: %pdfgets3 IPython magic - -IPython magic command ------------------------------------------------------------------------- - -These instructions are intended for `IPython`_ users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don't plan to customize IPython in such way you can safely skip -this paragraph. - -When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session. - -The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up - -#. find the ``profile_default/ipython_config.py`` file and open it - in a text editor. If that file does not exists, - create it first by executing :: - - ipython profile create - -#. navigate to the paragraph that contains the - :py:data:`!c.InteractiveShellApp.extensions` and add there - the following line :: - - c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics'] - - There must be no leading indent, i.e., the text must start at the - very first column. diff --git a/static_root/doc/pdfgetx/2.2.0/_sources/interact.rst.txt b/static_root/doc/pdfgetx/2.2.0/_sources/interact.rst.txt deleted file mode 100644 index 0d4fb746..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_sources/interact.rst.txt +++ /dev/null @@ -1,154 +0,0 @@ -Interactive mode -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. py:currentmodule:: _interactive_ - -The interactive mode is activated by using either the -:option:`-i, --interact <-i>` option or a non-empty -:option:`--plot <-p>` option. In the interactive mode -the program starts an `IPython`_ interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands ``%pdfgetx3`` and ``%pdfgetn3``, which can be used with -the same syntax as the :program:`pdfgetx3` and :program:`pdfgetn3` in -system shell. -The interactive session is also initialized with all functions from the -:py:mod:`matplotlib.pyplot` module for convenient plotting. -The functions and variables related to PDF processing are: - -.. py:function:: pdfgetter(x=None, y=None, filename='', **kwargs) - - Instance of the :py:class:`!PDFGetter` class which serves as a - low-level function that calculates the PDF. This is a callable - object, which takes as an argument a pair of input arrays for - (*Q*, intensity) or (|twotheta|, intensity) depending on - :confval:`dataformat`. It can be also called with a keyword - argument ``filename=FILE``, which would read the input arrays - from the specified file. When called with no arguments, - it calculates PDF from the last input data. - - :parameters: - * **x** (*numpy.ndarray, optional*) -- - The *Q* or |twotheta| values in powder diffraction pattern. - - * **y** (*numpy.ndarray, optional*) -- - The scattered intensities in powder diffraction pattern - - * **filename** (*str, optional*) -- - The text data file for loading the `x`, `y` values when - they are not specified. - - * **kwargs** (*misc, optional*) -- - Extra keyword arguments that are applied to - the :data:`!config` object, for example ``qmax=20``. - - :return: - A pair of output arrays *(r, G)*. - -.. interactvar:: config - - Instance of the :py:class:`!PDFConfig` class that stores the - :ref:`parameters and input files ` for the program. - Use ``print(config)`` to display the current configuration values. - This is the same object as :data:`!pdfgetter.config`. Configuration - may be changed by setting a respective attribute of the - :interactvar:`!config` object, for example:: - - In [1]: config.qmax = 21 - - The :py:data:`!config` values may be also changed by calling the - :py:func:`pdfgetter` or :py:func:`processfiles` function with a - corresponding keyword argument, for example - ``processfiles(qmax=20, force="once")``. - -.. interactvar:: iraw - iq - sq - fq - gr - - These variables are assigned the input raw intensities and the - intermediate results, stored as matrix rows. The matrix rows - correspond to twotheta1, intensity1, twotheta2, intensity2, etc. - Because matrices are iterated row first, the raw intensities - from all input files can be plotted with the matplotlib plot - function as ``plot(*iraw)``. - - These variables should be considered read-only and are reset - with subsequent PDF calculations. - -.. py:function:: tuneconfig(plotids=None, pdfgetter=None, axeslist=None) - - Show a GUI dialog for interactive tuning of configuration variables. - - :arg plotids: - The string or iterable that specify what interactive plots should be - tuned. By default the same as ``config.plot``. It can be also an - integer index or name of a transformation in :py:func:`pdfgetter` or - a reference to a :py:class:`!Transformation` object. - - :arg pdfgetter: - The optional :py:class:`!PDFGetter` object to be tuned. - This is by default the interactive :py:func:`!pdfgetter` object. - - :arg axeslist: - An optional list of matplotlib Axes for showing interactive plots. - When None, use ``subplot(N, 1, i)`` to create any necessary axes. - - .. note:: - - Changes from :py:func:`!tuneconfig` apply only to the configuration - and results in memory. Use the :py:func:`processfiles` function - to save them to disk. - - .. seealso:: :ref:`my-tuneconfig` tutorial - -.. py:function:: processfiles(filename=None, **kwargs) - - Process all input files again with the current configuration values. - This is a higher-level function than :py:func:`pdfgetter`, as - it also saves output files and produces plots as specified by the - :interactvar:`config` object. - - :arg filename: - One or more input files to be converted to PDFs and saved or - plotted according to the :py:data:`!config` settings. Use the - previous list of input files when not specified. - - :arg kwargs: - An optional keyword arguments to set for the :py:data:`!config` - object, for example ``(force="once", qmax=18)``. - - This function updates the :interactvar:`config.inputfiles ` - list and the :interactvar:`iraw`, :interactvar:`iq`, - :interactvar:`sq`, :interactvar:`fq` and :interactvar:`gr` - interactive variables. - -.. py:function:: clearsession() - - Clear all elements from the :interactvar:`config.inputfiles ` - and also the - :interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, - :interactvar:`fq` and :interactvar:`gr` variables. - - :return: - No return value. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: loaddata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. - -.. py:currentmodule:: diffpy.pdfgetx.plotdata -.. autofunction:: plotdata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx.plotdata` module. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: findfiles - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. diff --git a/static_root/doc/pdfgetx/2.2.0/_sources/intro.rst.txt b/static_root/doc/pdfgetx/2.2.0/_sources/intro.rst.txt deleted file mode 100644 index a97972cd..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_sources/intro.rst.txt +++ /dev/null @@ -1,71 +0,0 @@ -Introduction -======================================================================== - -diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts. - - -.. index:: license - -License notice ------------------------------------------------------------------------- - -.. include:: ../../LICENSENOTICE.txt - - -.. index:: authors - -Authors ------------------------------------------------------------------------- - -This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Connor J. Bracy, -Hung Vuong, -Songsheng Tao, -Simon Billinge. - - -.. index:: citations, references - -References ------------------------------------------------------------------------- - -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: - - P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge - `PDFgetX3: A rapid and highly automatable program for processing - powder diffraction data into total scattering pair distribution - functions `__, - *J. Appl. Crystallogr.* **46**, 560-566 (2013) - -For research publications that use this software to process neutron -diffraction data we ask you to also cite: - - P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, - S. J. L. Billinge - `PDFgetN3: atomic pair distribution functions from neutron - powder diffraction data using ad hoc corrections - `__, - *J. Appl. Crystallogr.* **51** (2018) - -For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication: - - CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge - `sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data `__. diff --git a/static_root/doc/pdfgetx/2.2.0/_sources/options.rst.txt b/static_root/doc/pdfgetx/2.2.0/_sources/options.rst.txt deleted file mode 100644 index c02220f2..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_sources/options.rst.txt +++ /dev/null @@ -1,370 +0,0 @@ -Options and parameters -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program. - - -.. Note :: - - The command line options start with a leading "-" and can - be only used as command line arguments when starting the - :program:`pdfgetx3` program. Within configuration file the parameter - names are plain words without any leading dashes. Finally, - parameters can be also set in the interactive mode as attributes of - the :interactvar:`config` object, but the assignments must be valid - Python statements. Here are examples of setting composition of - a processed specimen using each of these forms: - - #. assigned in configuration file:: - - ... - composition = CaTiO3 - ... - - #. set as a command-line option when starting :program:`pdfgetx3` or - :program:`pdfgetn3`:: - - pdfgetx3 --composition=CaTiO3 - - #. set in the IPython interactive mode:: - - pdfgetx3 -i - ... - In [1]: config.composition = "CaTiO3" - - -Program operation ------------------------------------------------------------------------- - -.. option:: -h, --help - - Display a brief usage information with a list of command line options - and exit. - -.. option:: -V, --version - - Display the program version and exit. - -.. option:: --manual - - Open this manual in a Web browser and exit. - -.. option:: -f, --find -.. _my-findpatterns: - - Select input files that match all patterns. The command - line arguments are by default taken as input files. However, - with the :option:`!--find` option they are processed as - file patterns and the matching files are then used as inputs. - The input files are by default searched in the current directory - unless there is a path entry (e.g., :file:`data/`) that - selects a different search path. The search patterns are - interpreted as fixed strings, all of which must be present - in the file name. A single argument ``+`` starts - a new group of patterns to match more files that are not - covered by one set of patterns. Additional pattern - groups reuse the current search path unless they provide - their own path value. Pattern groups containing only - a path entry reuse file patterns from the last group. - When pattern groups overlap the repeated matches are ignored - to make the resulting list of files unique. Files starting - with ``.`` are ignored unless there is ``^.`` pattern - that explicitly matches them. The search - syntax provides the following special patterns: - - .. tabularcolumns:: |l|p{0.75\textwidth}| - - +---------+------------------------------------------------------------+ - | ^ | match at the beginning of the string, i.e., ``^start`` | - | | matches only filenames that start with "start". | - +---------+------------------------------------------------------------+ - | $ | match at the end of string, for example, ``.chi$`` selects | - | | file names ending with ".chi". A ``$`` on its own | - | | matches every string and can be used to select all files. | - +---------+------------------------------------------------------------+ - | | match number *N* preceded by any number of leading zeros, | - | | e.g., ``<7>`` would match in "f7.chi", "f007.chi", but not | - | | in "f77.chi". | - +---------+------------------------------------------------------------+ - | | match an integer range from *N* to *M* inclusive. | - | | The matched number may have one or more leading zeros. | - +---------+------------------------------------------------------------+ - | <7-> | match number 7 or larger. | - +---------+------------------------------------------------------------+ - | <-7> | match number 7 or smaller. | - +---------+------------------------------------------------------------+ - | <-> | match any integer number. | - +---------+------------------------------------------------------------+ - | \+ | start a new pattern group, for example, ``.chi$ + .dat$`` | - +---------+------------------------------------------------------------+ - | / | set search path. An argument containing the ``/`` symbol | - | | is taken as the search path, for example, ``data/`` or | - | | ``./``. Each pattern group may provide its own search | - | | path effective for that and any subsequent pattern group. | - +---------+------------------------------------------------------------+ - - The ``^$<>`` characters are often special to Unix or Windows - command shells, therefore they need to be enclosed in double - quotes (\\") when used on command line. - - .. seealso:: tutorial on :ref:`my-findexamples` - -.. option:: -l, --list - - List all input files and exit. This is useful with the - :option:`!--find` option to verify if input files - are matched as intended. - - -Configuration file options ------------------------------------------------------------------------- - -.. option:: -c CONFIG, --config=CONFIG - - Read custom configuration file after loading the default ones. - Do not load any configuration file when "NONE". - -.. option:: -s NAME, --section=NAME - - Load the custom configuration file section ``[SectionName]`` after - loading the ``[DEFAULT]`` section. This is useful for creating - several configuration variants in a single configuration file. - -.. option:: --createconfig=FILE - - Write template configuration to a new FILE and exit. Write - to the standard output when FILE is "-". - -See also the :ref:`configuration file ` section -for further details. - -.. _my-ioparameters: - -Input and output options ------------------------------------------------------------------------- - -.. confval:: inputfile - - This parameter allows to specify one or more input files in the - configuration file, one file per line. The :confval:`!inputfile` - is only used if no input files were provided on the - :program:`pdfgetx3` or :program:`pdfgetn3` command line. - -.. confval:: dataformat -.. option:: --format=FORMAT - - Format of input files. Available formats are: ``twotheta``, ``QA``, - ``Qnm`` corresponding to a two-column text data where the first - column is either the scattering angle |twotheta| in degrees, *Q* in - inverse ångströms or *Q* in inverse nanometers. - -.. confval:: backgroundfile -.. option:: -b FILE, --background=FILE - - Optional datafile with background intensities from an empty sample - holder. It must be in the same dataformat as other input files. - -.. Note :: - - The following input is only used in ``sas`` mode. - -.. confval:: formfactorfile -.. option:: -ff FILE, --formfactorfile=FILE - - Form factor intensities of the scatterers. This is required for ``sas`` mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1. - -.. _my-datapath: -.. confval:: datapath -.. option:: -d DATAPATH, --datapath=DATAPATH - - One or more extra directories to be searched for input or - background data files. The :option:`!-d` option can be specified - several times to add more directories, these are prepended in front - of any default value. Within configuration file the datapath - directories have to be listed each on a separate line. - - A special value "NONE" (or "none") clears any previously defined - paths and only the further paths, if any, would be searched for - inputs. - -.. confval:: output -.. option:: -o OUTPUT, --output=OUTPUT - - Output file name, write to the standard output when "-". The - :option:`-t, --outputtypes <-t>` option controls what results are - being saved. Normally the OUTPUT is used as a custom basename for - the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o - tokens, which are expanded as follows: - - ===== ================== ======================================= - token example definition - ===== ================== ======================================= - @h dir1/dir2 the input file directory or "." - @r dir1/dir2/filename the input path with extension removed - @e dat the input file extension without "." - @t filename.dat the tail component of the input file - @b filename the tail component with extension removed - @o gr the output extension iq, sq, fq or gr - ===== ================== ======================================= - - An empty value works the same as "@b.@o" and saves the data - in the current directory with a proper extension for the - saved results. When "@o" is not present in the OUTPUT, it is - appended as a default filename extension. - -.. confval:: outputtypes -.. option:: -t TYPES, --outputtypes=TYPES - - Result types to be saved, one or more comma separated values. - Supported values are "iq", "sq", "fq", "gr", corresponding to the - |IQ|, |SQ|, |FQ| and |Gr| curves; these are also used as output - file extensions. - - Result files are not written when empty, "none" or "NONE". - -.. confval:: force -.. option:: --force=FORCE - - Overwrite existing output files. By default the output - files are not written if they already exist. Possible values - in a configuration file are "true", "yes", "on", "1" or - "false", "no", "off", "0" or "once". The special value "once" - permits one overwrite and then resets ``config.force`` to - ``False``. Note that in interactive mode the values assigned - to ``config.force`` are converted to Python :py:class:`bool` - unless equal to "once". - - -.. _my-pdfparameters: - -PDF parameters ------------------------------------------------------------------------- - - -.. confval:: mode -.. option:: --mode=STRING - - The PDF conversion mode, i.e., the name of the - :py:func:`.pdfgetter` setup. The available modes correspond - to the radiation type used in powder diffraction experiment and can - be "xray" or "neutron". - -.. confval:: wavelength -.. option:: -w FLOAT, --wavelength=FLOAT - - X-ray wavelength in ångströms. This value is required - for the "twotheta" dataformat in order to convert the scattering - angles |twotheta| to a momentum transfer *Q*. For other data formats - the wavelength is not necessary and may be left undefined. - -.. confval:: twothetazero -.. option:: --twothetazero=FLOAT - - Position of the zero scattering angle in diffractometer degrees. - This parameter corrects for a constant offset in the - measured |twotheta| values. When loading configuration file - it is assumed 0 unless specified otherwise. This parameter - is only effective for the "twotheta" dataformat. - -.. confval:: composition -.. option:: --composition=STRING - - Chemical composition of the sample. Supported formats are - "PbTi0.5Zr0.5O3", "Pb 1 Ti 1/2 Zr 1/2 O 3" or "CH3 (CH2)3 OH". - Space characters are ignored, unit counts can be omitted, but it is - important to use a proper upper and lower case in atom symbols. - Elements can appear several times in the formula, e.g., "CH3 CH3", - and the formula may contain parentheses or fractional - stoichiometries. - -.. confval:: bgscale -.. option:: --bgscale=FLOAT - - Scaling of the background intensities loaded from the - :confval:`backgroundfile`, by default 1. - -.. confval:: rpoly -.. option:: --rpoly=FLOAT - - *r*-limit for the maximum frequency in the |FQ| correction polynomial. - The PDF is unreliable at shorter *r*, however a - very small :confval:`!rpoly` would disable polynomial correction and - give noisy PDF. - Larger values produce closer fits with a higher degree polynomial, - but when too large, they might smooth-out a useful signal in the - data. The default is 0.9. - -.. confval:: qmaxinst -.. option:: --qmaxinst - - The *Q* cutoff for the meaningful input intensities in inverse - ångströms. Some data files may contain trailing zeros - or unreliable intensities at the upper bound of the detector range. - The :confval:`!qmaxinst` defines a threshold for unreliable data. - The parameter is also used as an upper boundary for the polynomial - fit correction of the |SQ| data. - -.. confval:: qmin -.. option:: --qmin - - The lower *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. - -.. confval:: qmax -.. option:: --qmax - - The upper *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. This is essentially a limit, where sample - signal decays to the level of data noise. - -.. confval:: rmin -.. option:: --rmin=FLOAT - - Lower bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rmax -.. option:: --rmax=FLOAT - - Upper bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rstep -.. option:: --rstep=FLOAT - - Spacing of the *r*-grid for the calculated PDF in ångströms. - - -Other parameters ------------------------------------------------------------------------- - -.. confval:: plot -.. option:: -p TYPES, --plot=TYPES - - Plot the specified results. A comma separated list with one or - more items from "iq", "sq", "fq", "gr". No plot is produced when - empty, "none" or "NONE". Setting this option turns on the - interactive mode. - -.. confval:: interact -.. option:: -i, --interact - - Start an IPython interactive session after processing all files. - Useful for tuning the configuration parameters or interactive - plotting. This is always on when plot option has been set. - See also :doc:`interact` for further details. - -.. confval:: verbose -.. option:: --verbose=VALUE - - Level of detail for the program to report about its actions. - Possible values are "error", "warning", "info", "debug", "all" or an - integer number from 0 to 5. Messages are completely suppressed when - 0, all messages are printed when verbose is 5 ("all") or higher. - This option is useful for diagnostics of any unexpected behavior - in the program. diff --git a/static_root/doc/pdfgetx/2.2.0/_sources/plotdata.rst.txt b/static_root/doc/pdfgetx/2.2.0/_sources/plotdata.rst.txt deleted file mode 100644 index d1c02156..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_sources/plotdata.rst.txt +++ /dev/null @@ -1,161 +0,0 @@ -.. index:: plotdata (program) -.. _cmd-plotdata: - -The plotdata program -======================================================================== - -.. include:: abbreviations.txt -.. program:: plotdata - -The PDFgetX3 software includes a simple stand-alone utility -:program:`plotdata` for plotting text data files. In most cases -this program can be invoked from a command-shell as :: - - plotdata file1.dat file2.dat - -which plots the numerical data from the text files :file:`file1.dat`, -:file:`file2.dat` together in a single graph. By default the first -column is used as an *x* variable and the second column is used for the -*y* values. After displaying the plot the program starts an `IPython`_ -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the :data:`!filenames` variable -containing a list of plotted files. It also pre-loads the -|plotdata| and |findfiles| functions just as in PDFgetX3 -interactive session. The :py:func:`!plotdata` -function works in a similar way as the :program:`plotdata` program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -:py:func:`!plotdata` function would be:: - - In [1]: plotdata(['file1.dat', 'file2.dat']) - - -Selecting files ------------------------------------------------------------------------- - -The :program:`plotdata` program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as ``*.dat``. The file search feature is controlled by the -following options: - -.. option:: -f, --find - - Use command line arguments as filename patterns and plot all matching - files. This option works in the same way as for - :program:`pdfgetx3`, for full details see the - :option:`pdfgetx3 --find ` documentation. Note that - within command line the special patterns ``^$<>`` need to be quoted - in double quotes (\\") so they are not processed by command shell. - -.. option:: -l, --list - - List the input files and exit. This is useful in conjunction - with the :option:`!-f, --find` option to check if data files - are selected as intended. - -Assuming the current directory contains 20 files named -:file:`file1.dat`, :file:`file2.dat`, ..., :file:`file20.dat`, -the plotting of files 9 to 13 could be done (with a check listing) -as follows :: - - $ plotdata -fl "<9-13>.dat" - file9.dat - file10.dat - file11.dat - file12.dat - file13.dat - $ plotdata -f "<9-13>.dat" - -Within an interactive IPython session the equivalent plot could be -produced by combining the |plotdata| and |findfiles| functions as :: - - In [1]: plotdata(findfiles("<9-13>.dat")) - - -Selecting x and y data ------------------------------------------------------------------------- - -The :program:`plotdata` program provides several ways of selecting -columns for *x* or *y* data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is "0" -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function): - - -.. option:: -x X - - index or name of the *x*-column to plot. See the :option:`-y` option - for the supported syntax, but note that ``X`` may select only one - column. When set to "." use the data-row index for *x*. - -.. option:: -y Y - - index or name of the *y*-column or columns to plot. The ``Y`` column - specification can be a comma separated list of indices, column names - or Python-like ranges, for example "1,2", "G", "1:4" (START:STOP, - same as "1,2,3"), "1:4:2" (START:STOP:STEP, same as "1,3"), or - "-2:" (same as "-2,-1", i.e, the last 2 columns). Because column - indexing starts at "0" the second column must be specified as "1". - - The column names work if the data section in the file is preceded by - a headline of unique column names, for example:: - - x square cube - 1 1 1 - 2 4 8 - 3 9 27 - 4 16 64 - - For such data file the plotdata program will recognize column names - "x", "square" and "cube" and an implicit "." for row index. - -.. option:: -s STYLE, --style=STYLE - - optional plot format specification. See the - :func:`matplotlib.pyplot.plot` function - for a list of available formats. - -.. option:: -L LOG, --log=LOG - - axes to be plotted with logarithmic scaling, for example, "x", "y" or - "xy". Axes not listed in ``LOG`` will use linear scaling. - -.. option:: -h, --help - - display a brief usage info and exit. - -.. option:: -V, --version - - show program version and exit. - -.. option:: --manual - - Open this manual page in a Web browser and exit. - - -Examples ------------------------------------------------------------------------- - -The examples directory :file:`plotdata` contains a :file:`sincos.dat` -file that has 3-columns of values labeled as "x", "sin" and "cos". -Here are several examples of the :program:`plotdata` capabilities -when used from command line - the user is encouraged to try them out:: - - plotdata sincos.dat - plotdata -y 1,2 sincos.dat - plotdata -x . -y 0:3 sincos.dat - plotdata -y cos sincos.dat - plotdata -x sin -y cos -sr-- sincos.dat - -An equivalent usage from a general IPython session would be:: - - ipython --matplotlib=auto - In [1]: from diffpy.pdfgetx.plotdata import plotdata - In [2]: plotdata('sincos.dat') - In [3]: plotdata('sincos.dat', y=[1,2]) - In [4]: plotdata('sincos.dat', x='.', y=':3') - In [5]: plotdata('sincos.dat', y='cos') - In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--') diff --git a/static_root/doc/pdfgetx/2.2.0/_sources/quick-start.rst.txt b/static_root/doc/pdfgetx/2.2.0/_sources/quick-start.rst.txt deleted file mode 100644 index 0b2fffd1..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_sources/quick-start.rst.txt +++ /dev/null @@ -1,163 +0,0 @@ -Quick-start guide -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing :program:`pdfgetx3`, :program:`pdfgetn3`, or -:program:`pdfgets3` in a shell window. Please, refer to the :doc:`installation ` section if this is not working yet. - -.. index:: pdfgetx3 (program) -.. _cmd-pdfgetx3: - -pdfgetx3 command ------------------------------------------------------------------------- - -The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as :: - - pdfgetx3 [options] input1 input2 ... inputN - -The :file:`inputN` stands for an input powder diffraction data. The -:file:`inputN` file is a simple two-column text file, where the first -column corresponds to either the |twotheta| diffraction angle, or a -momentum transfer, *Q*, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -`FIT2D program `_ using -its "chi" output format, thus we will also refer to them as "chi-files". -A typical content of a "chi" file looks as folows: - -.. code-block:: none - - Pt_bulk-00055.tif: 2-theta Scan - 2-Theta Angle (Degrees) - - 1465 - 2.0003892E-02 0.0000000E+00 - 6.0011677E-02 0.0000000E+00 - 1.0001946E-01 0.0000000E+00 - 1.4002724E-01 0.0000000E+00 - 1.8003502E-01 0.0000000E+00 - ... - -The command-line options are arguments that start with a dash "-" and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash ``--``. Options may require values. For short options, -the value may be joined to the option string, for example -:option:`!-w0.142774`, while for the long options it has to be separated -with an equal sign, e.g., :option:`!--wavelength=0.142774`. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the :doc:`options` section of -this manual. A brief summary of options can be also displayed by -executing :: - - pdfgetx3 --help - -The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the :doc:`tutorial`. -In general, the first step is to create a commented configuration file ``pdfgetx3.cfg`` using:: - - pdfgetx3 --createconfig=pdfgetx3.cfg - -The configuration file can have any name, but it is preferable -to use either :file:`pdfgetx3.cfg` or :file:`.pdfgetx3.cfg`, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the :option:`-c, --config <-c>` option. - -Open the pdfgetx3.cfg file in a **text** editor. The lines that -start with a hash mark ``#`` are comments and are not used. The lines -starting with a right brace ``[`` denote sections in the configuration -file. The active lines are all formatted as -"NAME=VALUE". Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation: - -* :confval:`dataformat` -- specifies the input data format - -* :confval:`wavelength` -- radiation wavelength in Å required for the - "twotheta" format. - -* :confval:`composition` -- chemical composition of the sample - -* :confval:`qmaxinst` -- upper *Q* boundary for a meaningful measurement - intensities. - -* :confval:`qmax` -- *Q*-cutoff for the Fourier transformation that - yields the PDF. - -Save the updated configuration file and run pdfgetx3 on the input data -:file:`FILENAME.chi` as :: - - pdfgetx3 --verbose=info -t gr FILENAME.chi - -Here the :option:`--verbose=info <--verbose>` option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The :option:`-t gr <-t>` option -tells the program to save the final |Gr| curve as a -:file:`FILENAME.gr` file in the working directory. - -The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation :: - - pdfgetx3 -c FILENAME.gr --plot=fq,gr - -Note this command does not include any .chi file and this will as -a result process the previously used input :file:`FILENAME.chi`. -The :option:`--plot=fq,gr <-p>` option tells PDFgetX3 to -display 2 plots for the reduced structure function |FQ| and the -final PDF |Gr|. The :option:`!--plot` option also implies an -:doc:`interactive mode ` -therefore the program does not exit, but starts an -interactive `IPython`_ session. To exit the interactive mode, -type ``exit()`` and press Enter. - -.. index:: pdfgetn3 (program) -.. _cmd-pdfgetn3: - -pdfgetn3 command ------------------------------------------------------------------------- - -The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the -:option:`--mode` option. Running ``pdfgetn3`` is nearly identical -to executing ``pdfgetx3 --mode=neutron``. The only difference between -these commands is that pdfgetx3 checks for configuration files -:file:`pdfgetx3.cfg` and :file:`.pdfgetx3.cfg`, whereas -pdfgetn3 looks for :file:`pdfgetn3.cfg` and :file:`.pdfgetn3.cfg`. - -.. index:: pdfgets3 (program) -.. _cmd-pdfgets3: - -pdfgets3 command ------------------------------------------------------------------------- - -The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying ``mode = sas`` in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named :file:`pdfgets3.cfg` and -:file:`.pdfgets3.cfg` in order, when no configuration file is specified. - -Please refer to the :doc:`tutorial section ` for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3. diff --git a/static_root/doc/pdfgetx/2.2.0/_sources/release.rst.txt b/static_root/doc/pdfgetx/2.2.0/_sources/release.rst.txt deleted file mode 100644 index 7ede93fa..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_sources/release.rst.txt +++ /dev/null @@ -1,3 +0,0 @@ -.. index:: release notes - -.. mdinclude:: ../../CHANGELOG.md diff --git a/static_root/doc/pdfgetx/2.2.0/_sources/tutorial.rst.txt b/static_root/doc/pdfgetx/2.2.0/_sources/tutorial.rst.txt deleted file mode 100644 index c87a993f..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_sources/tutorial.rst.txt +++ /dev/null @@ -1,807 +0,0 @@ -Tutorial -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. index:: example files -.. py:currentmodule:: diffpy.pdfgetx - -In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the :file:`examples` -folder included with the PDFgetX3 distribution. The :file:`examples` -folder can be found in the parent "doc" directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -|zipped-examples|. - - -.. index:: examples - -Nickel X-ray PDF ------------------------------------------------------------------------- - -predefined configuration file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -Change to the :file:`Ni` directory. The file named -:file:`ni300mesh_300k_nor_1-5.chi` contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the |twotheta| scattering -angles and X-ray intensities. The second file -:file:`kapton_bgrd_300k_nor_2-3.chi` contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the :file:`pdfgetx3.cfg` contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -:ref:`pdfgetx3 ` program -with the powder data file as an argument:: - - $ pdfgetx3 ni300mesh_300k_nor_1-5.chi - -For the first run there should be no output on the screen, -however a new file, :file:`ni300mesh_300k_nor_1-5.gr` should appear -in the work directory. -We can use the :ref:`plotdata ` program, -included with this software, to plot the output data:: - - $ plotdata ni300mesh_300k_nor_1-5.gr - -This will open a graph window and start an `IPython`_ interactive session. -To exit and close the figure, type ``exit()`` on the IPython prompt. -Let's run the program again, but now with a -:option:`--verbose=info <--verbose>` -option, to show more details about the program actions. :: - - $ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi - - INFO:applying pdfgetx3 defaults - INFO:set config.mode = xray - INFO:searching for default config file /home/user/.pdfgetx3.cfg - INFO:searching for default config file .pdfgetx3.cfg - INFO:searching for default config file pdfgetx3.cfg - INFO:loaded default config file pdfgetx3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi - INFO:set config.outputtypes = gr - INFO:set config.wavelength = 0.142774 - INFO:set config.composition = Ni - INFO:set config.qmaxinst = 26.5 - INFO:set config.qmax = 26.0 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 30.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'xray' - INFO:calling config_xray - INFO:started PDF processing. - INFO:processing 'ni300mesh_300k_nor_1-5.chi' - INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr' - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - INFO:elapsed time: 0.095 - -Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the :option:`!--verbose` option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the :option:`--force=yes <--force>` option, upon -which pdfgetx3 would overwrite any existing files. - -PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the -:option:`-c` option. Another option, :option:`--plot=[iq,sq,fq,gr] -<-p>` turns on plotting of the final PDF or of some other result. A -side effect of the :option:`!--plot` option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function |FQ| and the PDF curve |Gr|. This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:: - - $ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr - - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - - Variables related to PDF processing: - - pdfgetter -- PDFGetter used for calculation. - config -- configuration data used by PDFGetter. - See config.inputfiles for a list of inputs. - iraw -- matrix of input raw intensities with 2 rows per file. - iq sq fq gr -- intermediate results per each input file stored - as matrix rows. - - Functions: - - tuneconfig -- dynamically tune configuration variables. - processfiles -- process specified data files. - clearsession -- clear all elements from the inputfiles, iraw, - iq, sq, fq and gr variables. - plotdata -- plot all or selected columns from a text data file. - loaddata -- load all or selected columns from a text data file. - findfiles -- search for files matching the specified patterns. - - Use "%pdfgetx3" for a fresh run without exiting IPython. - In [1]: - -This will open a plot figure similar to - -.. image:: images/nickelfqgr.png - -Because of the :doc:`interactive mode ` implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -:interactvar:`config` variable stores all the configuration parameters, -and its content can be displayed with the :py:func:`print` -function as :: - - In [1]: print(config) - - configfile = ni300mesh_300k_nor_1-5.gr - configsection = DEFAULT - dataformat = twotheta - ... - qmax = 26.0 - ... - -The :py:func:`.processfiles` function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the |FQ| and |Gr| -curves calculated at |Qmax| = 22 |Ainv|, we can call -:py:func:`!processfiles` and pass it a keyword argument for -the new qmax as follows:: - - In [2]: processfiles(qmax=22) - - # the qmax parameter was updated to a new value, thus - In [3]: config.qmax - Out[3]: 22 - -There should be now two lines in each plot axis corresponding to -the results at |Qmax| equal 26 and 22 |Ainv|. To exit the program, -type ``exit()``. - - -processing from scratch -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -We have already encountered the command-line :option:`option -c <-c>` -for specifying a custom configuration file. A special argument "NONE", -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi - - WARNING:Nothing to do, use "-t" or "--plot" options. - ERROR:Configuration error: wavelength not specified. - ERROR:See "--help" for more hints. - -There is an error, for the wavelength is necessary to convert -the scattering angle |twotheta| to momentum transfer *Q*. The -X-ray wavelength was 0.142774 Å, which can be passed with the -:option:`-w, --wavelength <-w>` option:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 - - ... - ERROR:Configuration error: Chemical composition not known. - ERROR:See "--help" for more hints. - -There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the :option:`--composition` option. The example -below uses a "\\\\" character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni - - WARNING:Nothing to do, use "-t" or "--plot" options. - ... - -There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the :option:`-t, --outputtypes <-t>` option. -The outputtypes option recognizes the following result types: -"iq", "sq", "fq", "gr". One or more of these type strings, -separated by a comma, can be included with the -:option:`!-t` option, which will produce the corresponding -output files. An empty string, such as ``-t ""``, or ``-t NONE`` -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings. - -At this point, we will not write any output files, but will use the -:option:`--plot <-p>` option to display the calculated curves. The -:option:`!--plot` accepts the same arguments as outputtypes, so to -display the |FQ| and |Gr| curves we shall run :: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni --plot=fq,gr - - WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161 - WARNING:qmax reset to the data boundary qmaxinst=28.0865680161 - -which should open the following plot window: - -.. image:: images/nickelfqgrnoisy.png - -The graphs look terrible. The PDF is very noisy and the |FQ| curve -shows a sudden break at about 27 |Ainv|. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -:interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, -:interactvar:`fq`, :interactvar:`gr` -variables for the original raw data and intermediate results. We -are going to plot the "iq" variable that has the input intensities -resampled on the *Q* grid. The matplotlib function -:py:func:`~matplotlib.pyplot.clf` clears the figure, -the iq variable is a two-row matrix with *Q* and *I* rows, and the -:py:func:`~matplotlib.pyplot.axis` -function lets us zoom to a given range:: - - In [1]: clf() - In [2]: plot(iq[0], iq[1]) - Out[2]: [] - In [3]: axis([20, 29, 0, 3000]) - Out[3]: [20, 29, 0, 3000] - -The graph shows a sudden drop in the raw intensities at 27 |Ainv|. -The :confval:`qmaxinst` variable defines a *Q* cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 |Ainv| :: - - In [4]: processfiles(qmaxinst=26.5) - WARNING:qmax reset to the data boundary qmaxinst=26.5 - -The updated curves looks reasonable without any oscillations and -breakpoints. The :py:func:`.tuneconfig` function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type ``tuneconfig()`` to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the |FQ| and |Gr| curves change. -The :confval:`rpoly` parameter controls the degree of data-correction -polynomial and is an approximate low-*r* bound of reliable *G* -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the |Gr| -curve and save it to an output file :file:`nicmd.gr`:: - - In [14]: config.qmax = 26 - In [15]: config.outputtypes = 'gr' - In [16]: config.output = 'nicmd' - In [17]: processfiles() - - -Platinum X-ray series ------------------------------------------------------------------------- - -PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(`z-shell `_ being a notable exception). - -.. _my-findexamples: - -matching input files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The :program:`pdfgetx3` program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the :option:`-f, --find <-f>` option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option -:option:`-l, --list <-l>` makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files. - -We will try out this file search on platinum example files. Open a -terminal and navigate to the :file:`Pt` directory. There should be a -:file:`series` subdirectory with 6 chi files indexed from 903 to 908. -At first, let's stay in the :file:`Pt` directory and run the following -command :: - - $ pdfgetx3 --list --find - - Pt_bulk-00055-pdfgetx2.gr - Pt_bulk-00055-pdfgetx3.gr - Pt_bulk-00055.chi - empty_capillary-00032.chi - pdfgetx3.cfg - plotpdfcomparison.py - -Without any patterns the file search matches all files in the current -directory. Now let's try to add name patterns. There are few special -patterns, for example ``^`` matches at the beginning of the filename, ``$`` at the end and ```` matches a range of integer values from -*N* to *M*. The patterns containing ``^$<>`` need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works. - -Filenames containing "y":: - - $ pdfgetx3 --list --find y - empty_capillary-00032.chi - plotpdfcomparison.py - -Filenames that containing both "y" and "chi", here we use the -options :option:`!--list` and :option:`!--find` in an abbreviated -form :option:`!-l` and :option:`!-f`:: - - $ pdfgetx3 -lf y chi - empty_capillary-00032.chi - -Filenames that start with "e":: - - $ pdfgetx3 --list --find "^e" - empty_capillary-00032.chi - -Filenames that contain *character* "2":: - - $ pdfgetx3 --list --find 2 - Pt_bulk-00055-pdfgetx2.gr - empty_capillary-00032.chi - -Filenames that contain *numeric value* "2":: - - $ pdfgetx3 -lf "<2>" - Pt_bulk-00055-pdfgetx2.gr - -The special argument ``+`` starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both "bulk" and "chi" substrings and then -also those that have "empty" and "chi" in their names, use:: - - $ pdfgetx3 -lf bulk chi + empty chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - -When pattern groups overlap the resulting matches are -made unique and each file is listed only once :: - - $ pdfgetx3 -lf bulk chi + chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - - -data search path -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Each group of PDFgetX3 patterns can have one entry containing -forward slash "/" to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered "903" to "905" and "908" from the -:file:`series` subdirectory can be therefore matched using :: - - $ pdfgetx3 -lf series/ "<903-905>" + 908 - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00908.chi - -The current directory can be selected using `./` :: - - $ pdfgetx3 -lf series/ 903 + ./ bulk chi - series/Pt_bulk_ramp03-00903.chi - Pt_bulk-00055.chi - -When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -".chi"-ending files in the current and :file:`series` -directories can be thus found using :: - - $ pdfgetx3 -lf ".chi$" + series/ - Pt_bulk-00055.chi - empty_capillary-00032.chi - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00906.chi - series/Pt_bulk_ramp03-00907.chi - series/Pt_bulk_ramp03-00908.chi - - -output file names -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -By default the output files are saved in the current directory. The -output path, can be changed with the :option:`-o, --output <-o>` option. -The :option:`!-o` recognizes several tokens that are replaced with -parts of the input file name, for example, "@b" expands to an -extension-stripped base name. In similar faction, "@o" is replaced -with the output type extension. Thus to generate PDFs for all files -in the :file:`series` directory and save them in the -:file:`series-gr` subfolder do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o - -The extension ".@o" is automatic when not included anywhere in the -output file name. Thus to process the Pt series at |Qmax| = 18 |Ainv| -while saving the results in the same folder, but with a "_qmax18" suffix -in their filenames do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18 - -For input file :file:`Pt_bulk_ramp03-00903.chi` the :option:`!-o` option -above expands to output path :file:`series-gr/Pt_bulk_ramp03-00903_qmax18.gr`. -The :file:`series-gr` directory should now contain 12 "gr" files, -6 of them processed at |Qmax| = 27 |Ainv| as given by configuration -file and 6 others processed at |Qmax| = 18 |Ainv|. - -.. seealso:: :option:`-o, --output <-o>` for a list of output tokens - -.. index:: tuneconfig (example) -.. _my-tuneconfig: - -Interactive tuning of parameters ------------------------------------------------------------------------- - -One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the :file:`Ni` directory in the shell and process -the nickel PDF while plotting the |FQ| and |Gr| curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -:py:func:`.tuneconfig` -function from the IPython environment :: - - $ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi - ... - In [1]: tuneconfig() - -The -:py:func:`!tuneconfig` -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot. - -.. image:: images/tunenickelfqgr.png - -The *constant data scale* check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -:ref:`PDF parameters section `. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the :confval:`bgscale` parameter -if PDF has been processed without any background data. - -By default the -:py:func:`!tuneconfig` -function displays the same curves as -specified by the :option:`--plot <-p>` option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the :py:meth:`!describe` method of the -:py:func:`.pdfgetter` object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object *t4* that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the :py:func:`!tuneconfig` function :: - - $ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi - ... - Use "%pdfgetx3" for a fresh run without exiting IPython. - - In [1]: fig, ax = subplots(2) - In [2]: pdfgetter.describe() - 0 TransformTwoThetaToQA - convert x data from twotheta to Q in 1/A - 1 TransformQGridRegular - Remove the data outside the (qmin, qmaxinst) range - 2 TransformBackground - subtract background intensity - 3 TransformXrayASFnormChris - scale and normalize intensities by x-ray scattering factors - 4 TransformSQnormRPoly - Normalize S(Q) by fitting a polynomial - 5 TransformSQToFQ - Convert S(Q) to F(Q). - 6 TransformFQgrid - Resample F(Q) to a regular grid suitable for FFT - 7 TransformFQToGr - Convert F(Q) to G(r). - In [3]: t4 = pdfgetter.getTransformation(4) - In [4]: tuneconfig([t4, 'gr'], axeslist=ax) - In [5]: ax[0].legend(loc=2) - -The :py:func:`~matplotlib.pyplot.subplots` function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window: - -.. image:: images/tunenickelt4gr.png - -The tuning can be finished by clicking the ``Done`` button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the :interactvar:`config` -object, for example:: - - In [5]: config.bgscale = 1.5 - -Finally, to save the new results, we shall first confirm -:confval:`outputtypes` have been correctly set and then use the -:py:func:`.processfiles` function to redo the calculations, plots and -data output for the updated configuration. Note that the -:py:func:`!processfiles` function accepts keyword arguments for -configuration parameters. This is used at line ``In [8]`` to -turn on the :confval:`force` flag and is in effect a shortcut -for an extra ``config.force = True`` statement. :: - - In [6]: config.outputtypes - Out[6]: ['gr'] - In [7]: processfiles() - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - In [8]: processfiles(force=True) - -:file:`ni300mesh_300k_nor_1-5.gr` was successfully saved at an -updated configuration for there were no warnings after the last call. - - -Neutron PDF ------------------------------------------------------------------------- - -This example illustrates PDF extraction from -neutron powder data using :ref:`pdfgetn3 `. -Navigate to the :file:`n-Sapphire` directory in the shell. -The :file:`sapphire755.dat` file contains powder diffraction data from -sapphire (α-Al\ :sub:`2`\ O\ :sub:`3`) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The :file:`pdfgetn3.cfg` configuration file specifies -processing parameters such as :confval:`wavelength`, -:confval:`twothetazero`, :confval:`composition`, and :confval:`mode`. - -To extract the sapphire neutron PDF run :: - - $ pdfgetn3 --verbose=info sapphire755.dat - - INFO:applying pdfgetn3 defaults - INFO:set config.mode = neutron - INFO:searching for default config file /home/user/.pdfgetn3.cfg - INFO:searching for default config file .pdfgetn3.cfg - INFO:searching for default config file pdfgetn3.cfg - INFO:loaded default config file pdfgetn3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = - INFO:set config.outputtypes = fq, gr - INFO:set config.mode = neutron - INFO:set config.wavelength = 1.0989 - INFO:set config.twothetazero = -0.38 - INFO:set config.composition = Al2O3 - INFO:set config.qmaxinst = 11.2 - INFO:set config.qmax = 11.2 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 20.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'neutron' - INFO:calling config_neutron - INFO:started PDF processing. - INFO:processing 'sapphire755.dat' - INFO:resolved output file '' as 'sapphire755.fq' - INFO:written outpufile sapphire755.fq - INFO:resolved output file '' as 'sapphire755.gr' - INFO:written outpufile sapphire755.gr - INFO:elapsed time: 0.097 - -This will produce two files :file:`sapphire755.fq`, :file:`sapphire755.gr` -for the |FQ| and |Gr| functions. -To compare them with expected results use :: - - $ plotdata sapphire755-expected.fq sapphire755.fq - $ plotdata sapphire755-expected.gr sapphire755.gr - - -Fit twothetazero ------------------------------------------------------------------------- - -For a good quality PDF it is essential to use powder patterns with -accurate values of *Q*. Some instruments may produce spectra with -a slightly offset scattering angle |twotheta| which -causes inaccurate *Q* and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the :confval:`twothetazero` correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples. - -This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -`diffpy.cmi `__, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use `Anaconda Python`_ and set up a dedicated -Anaconda environment *nbcmi* for this tutorial. -This can be accomplished using the following steps:: - - $ conda create -n nbcmi -c diffpy python=2 diffpy.cmi - $ conda activate nbcmi - $ pip install path/to/diffpy.pdfgetx-VERSION.whl - -When these prerequisites are in place, -change to the :file:`n-twothetazero-fit` directory -and open the self documented Jupyter notebook as follows :: - - $ jupyter notebook fit-twothetazero.ipynb - -.. |tthzero| replace:: :confval:`!twothetazero` - -The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted |tthzero|. -After running all cells the notebook should produce similar graphs -as in the figure below. - -.. figure:: images/twothetazerofit.* - - Refinement of nickel neutron PDF for **(a)** uncorrected data - and **(b)** with a refined zero correction. - The extracted PDFs are plotted as blue circles, - simulated PDFs as red lines and - the difference is plotted offset in green below. - -The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual R\ :sub:`w` which is lowered from (a) 0.18 to (b) 0.05. - - -Small-angle-scattering PDF (sasPDF) ------------------------------------------------------------------------- - -Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using :ref:`pdfgets3 `. -To do this, navigate to the :file:`Au_DNA_NPA` directory in your terminal. -In this folder, you will find :file:`Au_DNA_NPA.chi` and -:file:`Au_DNA_FF.chi` files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in `D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008). -`_. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The :file:`pdfgets3.cfg` -configuration file specifies processing parameters such as :confval:`formfactorfile` (required by ``sas`` mode), :confval:`qmin`, :confval:`qmax`, and :confval:`mode`. - -To extract the PDF of DNA-capped DNA nanoparticle assemblies :: - - $ pdfgets3 --verbose=info Au_DNA_NPA.chi - - INFO:applying pdfgets3 defaults - INFO:set config.mode = sas - INFO:searching for default config file /home/user/.pdfgets3.cfg - INFO:searching for default config file .pdfgets3.cfg - INFO:searching for default config file pdfgets3.cfg - INFO:loaded default config file pdfgets3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = QA - INFO:set config.backgroundfile = - INFO:set config.datapath = [] - INFO:set config.formfactorfile = Au_DNA_FF.chi - INFO:set config.output = - INFO:set config.outputtypes = fq, gr - INFO:set config.force = yes - INFO:set config.mode = sas - INFO:set config.rpoly = 240.605 - INFO:set config.qmaxinst = 0.075 - INFO:set config.qmin = 0.01 - INFO:set config.qmax = 0.072 - INFO:set config.rmin = 100.0 - INFO:set config.rmax = 5000.0 - INFO:set config.rstep = 1.0 - INFO:set config.plot = iq, fq, gr - INFO:set config.verbose = info - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'sas' - INFO:calling config_sas - INFO:started PDF processing. - INFO:processing 'Au_DNA_NPA.chi' - INFO:resolved output file '' as 'Au_DNA_NPA.fq' - INFO:written outpufile Au_DNA_NPA.fq - INFO:resolved output file '' as 'Au_DNA_NPA.gr' - INFO:written outpufile Au_DNA_NPA.gr - INFO:elapsed time: 0.947 - - -This will save two files :file:`Au_DNA_NPA.fq`, :file:`Au_DNA_NPA.gr` in the same directoy for the |FQ| and |Gr| functions. This also plots |FQ| and |Gr| functions in a pop-up window and the processing parameters such as :confval:`rpoly` or so may be tuned interactively by issuing command :py:func:`!tuneconfig` in the `IPython`_ session as discussed above. - - -Multiple Background Subtraction ------------------------------------------------------------------------- - -Predefined configuration file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -In this tutorial, we will show how to use the multiple-background subtraction -functionality by obtainining equivalent outputs from different, but equivalent, -subtractions. Change directory to the :file:`doc/examples/ -Multiple_Background_Subtraction` directory. The file named -:file:`ni300mesh_300k_nor_1-5.chi` contains powder X-ray data measured from -nickel at the Advanced Photon Source beamline 6ID-D. The file contains two -columns for the |twotheta| scattering angles and X-ray intensities. Similarly, -:file:`kapton_bgrd_300k_nor_2-3.chi` contains the background data (i.e., the -intensities from an empty kapton capillary), and a duplicate file -:file:`kapton_bgrd_300k_nor_2-3_copy.chi` contains the same dataset (this -duplication of the data is necessary when using the same background multiple -times as the internal system only stores a set of unique background filenames). -The last :file:`.chi` file, :file:`TEST_blank-00000.chi`, simply stores a null -dataset and can be used to show the invariance of the PDF under permutation of -the order of background subtractions as well as the fact that more than just -two backgrounds can be subtracted. There are also two config files -:file:`nickel.cfg` and :file:`nickel_sub_two_half_backgrounds.cfg`, each of -which contain a set of complete configuration parameters for converting the Ni -powder pattern to a PDF for the case of doing so via a single background -subtraction and a multiple background subtraction, respectively. Finally, there -is a fully processed G(r) file :file:`ni300mesh_300k_nor_1-5-expected.gr` which -contains the expected output of producing the PDF of the Ni sample after -subtracting the kapton background. Since all processing parameters are already -defined in these configuration files, producing the PDF using multiple -background subtractions is very simple and involves running the :ref:`pdfgetx3 -` program and specifying the multiple background subtraction -config file and the powder data file as arguments:: - - $ pdfgetx3 -c nickel_sub_two_half_backgrounds.cfg ni300mesh_300k_nor_1-5.chi - -The resulting G(r) file, :file:`ni300mesh_300k_nor_1-5.gr`, is the result of -producing the PDF according to:: - - "ni300mesh_300k_nor_1-5.chi" - 0.5*"kapton_bgrd_300k_nor_2-3.chi" - - 0.5*"kapton_bgrd_300k_nor_2-3.chi" - -Which should be equivalent to the case where the following single background -subtraction had been performed:: - - "ni300mesh_300k_nor_1-5.chi" - 1.0*"kapton_bgrd_300k_nor_2-3.chi" - -The fact that both of these result in the same PDF can be verified by comparing -the produced G(r) with the expected G(r) provided in the example:: - - $ plotdata ni300mesh_300k_nor_1-5-expected.gr ni300mesh_300k_nor_1-5.gr - - -Interactive Multiple Background Subtraction -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The multiple background subtraction functionality can also be carried out -interactively, as per the :ref:`my-tuneconfig` section, using the plural forms -of the relevant variables (i.e., `config.bgscales`, `config.backgroundfiles`, -etc.). diff --git a/static_root/doc/pdfgetx/2.2.0/_static/basic.css b/static_root/doc/pdfgetx/2.2.0/_static/basic.css deleted file mode 100644 index bf18350b..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_static/basic.css +++ /dev/null @@ -1,906 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- 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: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -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: 450px; - 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.brackets:before, -span.brackets > a:before{ - content: "["; -} - -a.brackets:after, -span.brackets > a:after { - content: "]"; -} - -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; -} - -div.admonition, div.topic, blockquote { - clear: left; -} - -/* -- topics ---------------------------------------------------------------- */ - -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, -div.topic > :last-child, -div.admonition > :last-child { - margin-bottom: 0; -} - -div.sidebar::after, -aside.sidebar::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; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -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; -} - -dl.footnote > dt, -dl.citation > dt { - float: left; - margin-right: 0.5em; -} - -dl.footnote > dd, -dl.citation > dd { - margin-bottom: 0em; -} - -dl.footnote > dd:after, -dl.citation > dd: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 > dt:after { - content: ":"; -} - -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; -} - -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_root/doc/pdfgetx/2.2.0/_static/classic.css b/static_root/doc/pdfgetx/2.2.0/_static/classic.css deleted file mode 100644 index e7f5610e..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_static/classic.css +++ /dev/null @@ -1,271 +0,0 @@ -/* - * classic.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- classic theme. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -html { - /* CSS hack for macOS's scrollbar (see #1125) */ - background-color: #FFFFFF; -} - -body { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; - font-size: 100%; - background-color: white; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: white; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: white; - color: #222222; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #555555; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #555555; - text-decoration: underline; -} - -div.related { - background-color: white; - line-height: 30px; - color: #666666; -} - -div.related a { - color: #444444; -} - -div.sphinxsidebar { -} - -div.sphinxsidebar h3 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #444444; -} - -div.sphinxsidebar h4 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #444444; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #444444; -} - -div.sphinxsidebar a { - color: #444444; -} - -div.sphinxsidebar input { - border: 1px solid #444444; - font-family: sans-serif; - font-size: 1em; -} - - -/* for collapsible sidebar */ -div#sidebarbutton { - background-color: #3c6e83; -} - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #00608f; - text-decoration: none; -} - -a:visited { - color: #30306f; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - background-color: white; - font-weight: normal; - color: #1a1a1a; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #aaaaaa; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #aaaaaa; - color: white; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: unset; - color: unset; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -code { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th, dl.field-list > dt { - background-color: #ede; -} - -.warning code { - background: #efc2c2; -} - -.note code { - background: #d6d6d6; -} - -.viewcode-back { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -div.code-block-caption { - color: #efefef; - background-color: #1c4e63; -} \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/_static/copybutton.js b/static_root/doc/pdfgetx/2.2.0/_static/copybutton.js deleted file mode 100644 index ca9f489f..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_static/copybutton.js +++ /dev/null @@ -1,57 +0,0 @@ -$(document).ready(function() { - /* Add a [>>>] button on the top-right corner of code samples to hide - * the >>> and ... prompts and the output and thus make the code - * copyable. */ - var div = $('.highlight-python .highlight,' + - '.highlight-pycon .highlight,' + - '.highlight-python3 .highlight') - var pre = div.find('pre'); - - // get the styles from the current theme - pre.parent().parent().css('position', 'relative'); - var hide_text = 'Hide the prompts and output'; - var show_text = 'Show the prompts and output'; - var border_width = pre.css('border-top-width'); - var border_style = pre.css('border-top-style'); - var border_color = pre.css('border-top-color'); - var button_styles = { - 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', - 'border-color': border_color, 'border-style': border_style, - 'border-width': border_width, 'color': border_color, 'text-size': '75%', - 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', - 'border-radius': '0 3px 0 0' - } - - // create and add the button to all the code blocks that contain >>> - div.each(function(index) { - var jthis = $(this); - if (jthis.find('.gp').length > 0) { - var button = $('>>>'); - button.css(button_styles) - button.attr('title', hide_text); - jthis.prepend(button); - } - // tracebacks (.gt) contain bare text elements that need to be - // wrapped in a span to work with .nextUntil() (see later) - jthis.find('pre:has(.gt)').contents().filter(function() { - return ((this.nodeType == 3) && (this.data.trim().length > 0)); - }).wrap(''); - }); - - // define the behavior of the button when it's clicked - $('.copybutton').toggle( - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').hide(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); - button.css('text-decoration', 'line-through'); - button.attr('title', show_text); - }, - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').show(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); - button.css('text-decoration', 'none'); - button.attr('title', hide_text); - }); -}); diff --git a/static_root/doc/pdfgetx/2.2.0/_static/doctools.js b/static_root/doc/pdfgetx/2.2.0/_static/doctools.js deleted file mode 100644 index e509e483..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_static/doctools.js +++ /dev/null @@ -1,326 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * 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; -} - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { - this.initOnKeyListeners(); - } - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return 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 : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - var url = new URL(window.location); - url.searchParams.delete('highlight'); - window.history.replaceState({}, '', url); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keydown(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box, textarea, dropdown or button - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey - && !event.shiftKey) { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - break; - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - break; - } - } - }); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); diff --git a/static_root/doc/pdfgetx/2.2.0/_static/documentation_options.js b/static_root/doc/pdfgetx/2.2.0/_static/documentation_options.js deleted file mode 100644 index 77bace5c..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_static/documentation_options.js +++ /dev/null @@ -1,12 +0,0 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '2.2.0', - LANGUAGE: 'None', - COLLAPSE_INDEX: false, - BUILDER: 'html', - FILE_SUFFIX: '.html', - LINK_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: true -}; \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/_static/favicon.png b/static_root/doc/pdfgetx/2.2.0/_static/favicon.png deleted file mode 100644 index 93e4a02c..00000000 Binary files a/static_root/doc/pdfgetx/2.2.0/_static/favicon.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.0/_static/file.png b/static_root/doc/pdfgetx/2.2.0/_static/file.png deleted file mode 100644 index a858a410..00000000 Binary files a/static_root/doc/pdfgetx/2.2.0/_static/file.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.0/_static/jquery-3.5.1.js b/static_root/doc/pdfgetx/2.2.0/_static/jquery-3.5.1.js deleted file mode 100644 index 50937333..00000000 --- a/static_root/doc/pdfgetx/2.2.0/_static/jquery-3.5.1.js +++ /dev/null @@ -1,10872 +0,0 @@ -/*! - * jQuery JavaScript Library v3.5.1 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2020-05-04T22:49Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var flat = arr.flat ? function( array ) { - return arr.flat.call( array ); -} : function( array ) { - return arr.concat.apply( [], array ); -}; - - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - -var isFunction = function isFunction( obj ) { - - // Support: Chrome <=57, Firefox <=52 - // In some browsers, typeof returns "function" for HTML elements - // (i.e., `typeof document.createElement( "object" ) === "function"`). - // We don't want to classify *any* DOM node as a function. - return typeof obj === "function" && typeof obj.nodeType !== "number"; - }; - - -var isWindow = function isWindow( obj ) { - return obj != null && obj === obj.window; - }; - - -var document = window.document; - - - - var preservedScriptAttributes = { - type: true, - src: true, - nonce: true, - noModule: true - }; - - function DOMEval( code, node, doc ) { - doc = doc || document; - - var i, val, - script = doc.createElement( "script" ); - - script.text = code; - if ( node ) { - for ( i in preservedScriptAttributes ) { - - // Support: Firefox 64+, Edge 18+ - // Some browsers don't support the "nonce" property on scripts. - // On the other hand, just using `getAttribute` is not enough as - // the `nonce` attribute is reset to an empty string whenever it - // becomes browsing-context connected. - // See https://github.com/whatwg/html/issues/2369 - // See https://html.spec.whatwg.org/#nonce-attributes - // The `node.getAttribute` check was added for the sake of - // `jQuery.globalEval` so that it can fake a nonce-containing node - // via an object. - val = node[ i ] || node.getAttribute && node.getAttribute( i ); - if ( val ) { - script.setAttribute( i, val ); - } - } - } - doc.head.appendChild( script ).parentNode.removeChild( script ); - } - - -function toType( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; -} -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.5.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - even: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return ( i + 1 ) % 2; - } ) ); - }, - - odd: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return i % 2; - } ) ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - copy = options[ name ]; - - // Prevent Object.prototype pollution - // Prevent never-ending loop - if ( name === "__proto__" || target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - src = target[ name ]; - - // Ensure proper type for the source value - if ( copyIsArray && !Array.isArray( src ) ) { - clone = []; - } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { - clone = {}; - } else { - clone = src; - } - copyIsArray = false; - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - // Evaluates a script in a provided context; falls back to the global one - // if not specified. - globalEval: function( code, options, doc ) { - DOMEval( code, { nonce: options && options.nonce }, doc ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return flat( ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( _i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = toType( obj ); - - if ( isFunction( obj ) || isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.5 - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://js.foundation/ - * - * Date: 2020-03-14 - */ -( function( window ) { -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - nonnativeSelectorCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ( {} ).hasOwnProperty, - arr = [], - pop = arr.pop, - pushNative = arr.push, - push = arr.push, - slice = arr.slice, - - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[ i ] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + - "ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram - identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + - "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - - // "Attribute values must be CSS identifiers [capture 5] - // or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + - whitespace + "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + - whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + - "*" ), - rdescend = new RegExp( whitespace + "|>" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + - whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + - whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + - "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + - "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rhtml = /HTML$/i, - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), - funescape = function( escape, nonHex ) { - var high = "0x" + escape.slice( 1 ) - 0x10000; - - return nonHex ? - - // Strip the backslash prefix from a non-hex escape sequence - nonHex : - - // Replace a hexadecimal escape sequence with the encoded Unicode code point - // Support: IE <=11+ - // For values outside the Basic Multilingual Plane (BMP), manually construct a - // surrogate pair - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + - ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - inDisabledFieldset = addCombinator( - function( elem ) { - return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - ( arr = slice.call( preferredDoc.childNodes ) ), - preferredDoc.childNodes - ); - - // Support: Android<4.0 - // Detect silently failing push.apply - // eslint-disable-next-line no-unused-expressions - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - pushNative.apply( target, slice.call( els ) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - - // Can't trust NodeList.length - while ( ( target[ j++ ] = els[ i++ ] ) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - setDocument( context ); - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { - - // ID selector - if ( ( m = match[ 1 ] ) ) { - - // Document context - if ( nodeType === 9 ) { - if ( ( elem = context.getElementById( m ) ) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && ( elem = newContext.getElementById( m ) ) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[ 2 ] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !nonnativeSelectorCache[ selector + " " ] && - ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && - - // Support: IE 8 only - // Exclude object elements - ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { - - newSelector = selector; - newContext = context; - - // qSA considers elements outside a scoping root when evaluating child or - // descendant combinators, which is not what we want. - // In such cases, we work around the behavior by prefixing every selector in the - // list with an ID selector referencing the scope context. - // The technique has to be used as well when a leading combinator is used - // as such selectors are not recognized by querySelectorAll. - // Thanks to Andrew Dupont for this technique. - if ( nodeType === 1 && - ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - - // We can use :scope instead of the ID hack if the browser - // supports it & if we're not changing the context. - if ( newContext !== context || !support.scope ) { - - // Capture the context ID, setting it first if necessary - if ( ( nid = context.getAttribute( "id" ) ) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", ( nid = expando ) ); - } - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + - toSelector( groups[ i ] ); - } - newSelector = groups.join( "," ); - } - - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - nonnativeSelectorCache( selector, true ); - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return ( cache[ key + " " ] = value ); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement( "fieldset" ); - - try { - return !!fn( el ); - } catch ( e ) { - return false; - } finally { - - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split( "|" ), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[ i ] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( ( cur = cur.nextSibling ) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return ( name === "input" || name === "button" ) && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || - - // Where there is no isDisabled, check manually - /* jshint -W018 */ - elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; - } - - return elem.disabled === disabled; - - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } - - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction( function( argument ) { - argument = +argument; - return markFunction( function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ ( j = matchIndexes[ i ] ) ] ) { - seed[ j ] = !( matches[ j ] = seed[ j ] ); - } - } - } ); - } ); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - var namespace = elem.namespaceURI, - docElem = ( elem.ownerDocument || elem ).documentElement; - - // Support: IE <=8 - // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes - // https://bugs.jquery.com/ticket/4833 - return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9 - 11+, Edge 12 - 18+ - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( preferredDoc != document && - ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, - // Safari 4 - 5 only, Opera <=11.6 - 12.x only - // IE/Edge & older browsers don't support the :scope pseudo-class. - // Support: Safari 6.0 only - // Safari 6.0 supports :scope but it's an alias of :root there. - support.scope = assert( function( el ) { - docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); - return typeof el.querySelectorAll !== "undefined" && - !el.querySelectorAll( ":scope fieldset div" ).length; - } ); - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert( function( el ) { - el.className = "i"; - return !el.getAttribute( "className" ); - } ); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert( function( el ) { - el.appendChild( document.createComment( "" ) ); - return !el.getElementsByTagName( "*" ).length; - } ); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert( function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - } ); - - // ID filter and find - if ( support.getById ) { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute( "id" ) === attrId; - }; - }; - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode( "id" ); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( ( elem = elems[ i++ ] ) ) { - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find[ "TAG" ] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert( function( el ) { - - var input; - - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll( "[selected]" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push( "~=" ); - } - - // Support: IE 11+, Edge 15 - 18+ - // IE 11/Edge don't find elements on a `[name='']` query in some cases. - // Adding a temporary attribute to the document before the selection works - // around the issue. - // Interestingly, IE 10 & older don't seem to have the issue. - input = document.createElement( "input" ); - input.setAttribute( "name", "" ); - el.appendChild( input ); - if ( !el.querySelectorAll( "[name='']" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + - whitespace + "*(?:''|\"\")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll( ":checked" ).length ) { - rbuggyQSA.push( ":checked" ); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push( ".#.+[+~]" ); - } - - // Support: Firefox <=3.6 - 5 only - // Old Firefox doesn't throw on a badly-escaped identifier. - el.querySelectorAll( "\\\f" ); - rbuggyQSA.push( "[\\r\\n\\f]" ); - } ); - - assert( function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement( "input" ); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll( "[name=d]" ).length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: Opera 10 - 11 only - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll( "*,:x" ); - rbuggyQSA.push( ",.*:" ); - } ); - } - - if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector ) ) ) ) { - - assert( function( el ) { - - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - } ); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - ) ); - } : - function( a, b ) { - if ( b ) { - while ( ( b = b.parentNode ) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { - - // Choose the first element that is related to our preferred document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( a == document || a.ownerDocument == preferredDoc && - contains( preferredDoc, a ) ) { - return -1; - } - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( b == document || b.ownerDocument == preferredDoc && - contains( preferredDoc, b ) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - return a == document ? -1 : - b == document ? 1 : - /* eslint-enable eqeqeq */ - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( ( cur = cur.parentNode ) ) { - ap.unshift( cur ); - } - cur = b; - while ( ( cur = cur.parentNode ) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[ i ] === bp[ i ] ) { - i++; - } - - return i ? - - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[ i ], bp[ i ] ) : - - // Otherwise nodes in our document sort first - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - ap[ i ] == preferredDoc ? -1 : - bp[ i ] == preferredDoc ? 1 : - /* eslint-enable eqeqeq */ - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - setDocument( elem ); - - if ( support.matchesSelector && documentIsHTML && - !nonnativeSelectorCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch ( e ) { - nonnativeSelectorCache( expr, true ); - } - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( context.ownerDocument || context ) != document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( elem.ownerDocument || elem ) != document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return ( sel + "" ).replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - - // If no nodeType, this is expected to be an array - while ( ( node = elem[ i++ ] ) ) { - - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[ 1 ] = match[ 1 ].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[ 3 ] = ( match[ 3 ] || match[ 4 ] || - match[ 5 ] || "" ).replace( runescape, funescape ); - - if ( match[ 2 ] === "~=" ) { - match[ 3 ] = " " + match[ 3 ] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[ 1 ] = match[ 1 ].toLowerCase(); - - if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { - - // nth-* requires argument - if ( !match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[ 4 ] = +( match[ 4 ] ? - match[ 5 ] + ( match[ 6 ] || 1 ) : - 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); - match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); - - // other types prohibit arguments - } else if ( match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[ 6 ] && match[ 2 ]; - - if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[ 3 ] ) { - match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - - // Get excess from tokenize (recursively) - ( excess = tokenize( unquoted, true ) ) && - - // advance to the next closing parenthesis - ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { - - // excess is a negative index - match[ 0 ] = match[ 0 ].slice( 0, excess ); - match[ 2 ] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { - return true; - } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - ( pattern = new RegExp( "(^|" + whitespace + - ")" + className + "(" + whitespace + "|$)" ) ) && classCache( - className, function( elem ) { - return pattern.test( - typeof elem.className === "string" && elem.className || - typeof elem.getAttribute !== "undefined" && - elem.getAttribute( "class" ) || - "" - ); - } ); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - /* eslint-disable max-len */ - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - /* eslint-enable max-len */ - - }; - }, - - "CHILD": function( type, what, _argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, _context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( ( node = node[ dir ] ) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( ( node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - - // Use previously-cached element index if available - if ( useCache ) { - - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - - // Use the same loop as above to seek `elem` from the start - while ( ( node = ++nodeIndex && node && node[ dir ] || - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || - ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction( function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[ i ] ); - seed[ idx ] = !( matches[ idx ] = matched[ i ] ); - } - } ) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - - // Potentially complex pseudos - "not": markFunction( function( selector ) { - - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction( function( seed, matches, _context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( ( elem = unmatched[ i ] ) ) { - seed[ i ] = !( matches[ i ] = elem ); - } - } - } ) : - function( elem, _context, xml ) { - input[ 0 ] = elem; - matcher( input, null, xml, results ); - - // Don't keep the element (issue #299) - input[ 0 ] = null; - return !results.pop(); - }; - } ), - - "has": markFunction( function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - } ), - - "contains": markFunction( function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; - }; - } ), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - - // lang value must be a valid identifier - if ( !ridentifier.test( lang || "" ) ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( ( elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); - return false; - }; - } ), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && - ( !document.hasFocus || document.hasFocus() ) && - !!( elem.type || elem.href || ~elem.tabIndex ); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return ( nodeName === "input" && !!elem.checked ) || - ( nodeName === "option" && !!elem.selected ); - }, - - "selected": function( elem ) { - - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - // eslint-disable-next-line no-unused-expressions - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos[ "empty" ]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( ( attr = elem.getAttribute( "type" ) ) == null || - attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo( function() { - return [ 0 ]; - } ), - - "last": createPositionalPseudo( function( _matchIndexes, length ) { - return [ length - 1 ]; - } ), - - "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - } ), - - "even": createPositionalPseudo( function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "odd": createPositionalPseudo( function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? - argument + length : - argument > length ? - length : - argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ) - } -}; - -Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || ( match = rcomma.exec( soFar ) ) ) { - if ( match ) { - - // Don't consume trailing commas as valid - soFar = soFar.slice( match[ 0 ].length ) || soFar; - } - groups.push( ( tokens = [] ) ); - } - - matched = false; - - // Combinators - if ( ( match = rcombinators.exec( soFar ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - - // Cast descendant combinators to space - type: match[ 0 ].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || - ( match = preFilters[ type ]( match ) ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[ i ].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || ( elem[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || - ( outerCache[ elem.uniqueID ] = {} ); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( ( oldCache = uniqueCache[ key ] ) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return ( newCache[ 2 ] = oldCache[ 2 ] ); - } else { - - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[ i ]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[ 0 ]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[ i ], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( ( elem = unmatched[ i ] ) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction( function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( - selector || "*", - context.nodeType ? [ context ] : context, - [] - ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( ( elem = temp[ i ] ) ) { - matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) ) { - - // Restore matcherIn since elem is not yet a final match - temp.push( ( matcherIn[ i ] = elem ) ); - } - } - postFinder( null, ( matcherOut = [] ), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) && - ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { - - seed[ temp ] = !( results[ temp ] = elem ); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - } ); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[ 0 ].type ], - implicitRelative = leadingRelative || Expr.relative[ " " ], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - ( checkContext = context ).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { - matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; - } else { - matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[ j ].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens - .slice( 0, i - 1 ) - .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), - - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), - len = elems.length; - - if ( outermost ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - outermostContext = context == document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( !context && elem.ownerDocument != document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( ( matcher = elementMatchers[ j++ ] ) ) { - if ( matcher( elem, context || document, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - - // They will have gone through all possible matchers - if ( ( elem = !matcher && elem ) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( ( matcher = setMatchers[ j++ ] ) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !( unmatched[ i ] || setMatched[ i ] ) ) { - setMatched[ i ] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[ i ] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( - selector, - matcherFromGroupMatchers( elementMatchers, setMatchers ) - ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( ( selector = compiled.selector || selector ) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[ 0 ] = match[ 0 ].slice( 0 ); - if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { - - context = ( Expr.find[ "ID" ]( token.matches[ 0 ] - .replace( runescape, funescape ), context ) || [] )[ 0 ]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[ i ]; - - // Abort if we hit a combinator - if ( Expr.relative[ ( type = token.type ) ] ) { - break; - } - if ( ( find = Expr.find[ type ] ) ) { - - // Search, expanding context for leading sibling combinators - if ( ( seed = find( - token.matches[ 0 ].replace( runescape, funescape ), - rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || - context - ) ) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert( function( el ) { - - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; -} ); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert( function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute( "href" ) === "#"; -} ) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - } ); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert( function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -} ) ) { - addHandle( "value", function( elem, _name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - } ); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert( function( el ) { - return el.getAttribute( "disabled" ) == null; -} ) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; - } - } ); -} - -return Sizzle; - -} )( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -}; -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Filtered directly for both simple and complex selectors - return jQuery.filter( qualifier, elements, not ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, _i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, _i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, _i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( elem.contentDocument != null && - - // Support: IE 11+ - // elements with no `data` attribute has an object - // `contentDocument` with a `null` prototype. - getProto( elem.contentDocument ) ) { - - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && toType( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( _i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && - - // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // rejected_handlers.disable - // fulfilled_handlers.disable - tuples[ 3 - i ][ 3 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock, - - // progress_handlers.lock - tuples[ 0 ][ 3 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the master Deferred - master = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || - isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return master.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); - } - - return master.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( toType( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, _key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; - - -// Matches dashed string for camelizing -var rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g; - -// Used by camelCase as callback to replace() -function fcamelCase( _all, letter ) { - return letter.toUpperCase(); -} - -// Convert dashed to camelCase; used by the css and data modules -// Support: IE <=9 - 11, Edge 12 - 15 -// Microsoft forgot to hump their vendor prefix (#9572) -function camelCase( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); -} -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( camelCase ); - } else { - key = camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var documentElement = document.documentElement; - - - - var isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ); - }, - composed = { composed: true }; - - // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only - // Check attachment across shadow DOM boundaries when possible (gh-3504) - // Support: iOS 10.0-10.2 only - // Early iOS 10 versions support `attachShadow` but not `getRootNode`, - // leading to errors. We need to check for `getRootNode`. - if ( documentElement.getRootNode ) { - isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ) || - elem.getRootNode( composed ) === elem.ownerDocument; - }; - } -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && - - // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - isAttached( elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, scale, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = elem.nodeType && - ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Support: Firefox <=54 - // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) - initial = initial / 2; - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - while ( maxIterations-- ) { - - // Evaluate and update our best guess (doubling guesses that zero out). - // Finish if the scale equals or crosses 1 (making the old*new product non-positive). - jQuery.style( elem, prop, initialInUnit + unit ); - if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { - maxIterations = 0; - } - initialInUnit = initialInUnit / scale; - - } - - initialInUnit = initialInUnit * 2; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); - -var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); - - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; - - // Support: IE <=9 only - // IE <=9 replaces "; - support.option = !!div.lastChild; -} )(); - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] -}; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: IE <=9 only -if ( !support.option ) { - wrapMap.optgroup = wrapMap.option = [ 1, "" ]; -} - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, attached, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( toType( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - attached = isAttached( elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( attached ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 - 11+ -// focus() and blur() are asynchronous, except when they are no-op. -// So expect focus to be synchronous when the element is already active, -// and blur to be synchronous when the element is not already active. -// (focus and blur are always synchronous in other supported browsers, -// this just defines when we can count on it). -function expectSync( elem, type ) { - return ( elem === safeActiveElement() ) === ( type === "focus" ); -} - -// Support: IE <=9 only -// Accessing document.activeElement can throw unexpectedly -// https://bugs.jquery.com/ticket/13393 -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Only attach events to objects that accept data - if ( !acceptData( elem ) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = Object.create( null ); - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( nativeEvent ), - - handlers = ( - dataPriv.get( this, "events" ) || Object.create( null ) - )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // If the event is namespaced, then each handler is only invoked if it is - // specially universal or its namespaces are a superset of the event's. - if ( !event.rnamespace || handleObj.namespace === false || - event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && - - // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && - - // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - - // Utilize native event to ensure correct state for checkable inputs - setup: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Claim the first handler - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - // dataPriv.set( el, "click", ... ) - leverageNative( el, "click", returnTrue ); - } - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Force setup before triggering a click - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - leverageNative( el, "click" ); - } - - // Return non-false to allow normal event-path propagation - return true; - }, - - // For cross-browser consistency, suppress native .click() on links - // Also prevent it if we're currently inside a leveraged native-event stack - _default: function( event ) { - var target = event.target; - return rcheckableType.test( target.type ) && - target.click && nodeName( target, "input" ) && - dataPriv.get( target, "click" ) || - nodeName( target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -// Ensure the presence of an event listener that handles manually-triggered -// synthetic events by interrupting progress until reinvoked in response to -// *native* events that it fires directly, ensuring that state changes have -// already occurred before other listeners are invoked. -function leverageNative( el, type, expectSync ) { - - // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add - if ( !expectSync ) { - if ( dataPriv.get( el, type ) === undefined ) { - jQuery.event.add( el, type, returnTrue ); - } - return; - } - - // Register the controller as a special universal handler for all event namespaces - dataPriv.set( el, type, false ); - jQuery.event.add( el, type, { - namespace: false, - handler: function( event ) { - var notAsync, result, - saved = dataPriv.get( this, type ); - - if ( ( event.isTrigger & 1 ) && this[ type ] ) { - - // Interrupt processing of the outer synthetic .trigger()ed event - // Saved data should be false in such cases, but might be a leftover capture object - // from an async native handler (gh-4350) - if ( !saved.length ) { - - // Store arguments for use when handling the inner native event - // There will always be at least one argument (an event object), so this array - // will not be confused with a leftover capture object. - saved = slice.call( arguments ); - dataPriv.set( this, type, saved ); - - // Trigger the native event and capture its result - // Support: IE <=9 - 11+ - // focus() and blur() are asynchronous - notAsync = expectSync( this, type ); - this[ type ](); - result = dataPriv.get( this, type ); - if ( saved !== result || notAsync ) { - dataPriv.set( this, type, false ); - } else { - result = {}; - } - if ( saved !== result ) { - - // Cancel the outer synthetic event - event.stopImmediatePropagation(); - event.preventDefault(); - return result.value; - } - - // If this is an inner synthetic event for an event with a bubbling surrogate - // (focus or blur), assume that the surrogate already propagated from triggering the - // native event and prevent that from happening again here. - // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the - // bubbling surrogate propagates *after* the non-bubbling base), but that seems - // less bad than duplication. - } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { - event.stopPropagation(); - } - - // If this is a native event triggered above, everything is now in order - // Fire an inner synthetic event with the original arguments - } else if ( saved.length ) { - - // ...and capture the result - dataPriv.set( this, type, { - value: jQuery.event.trigger( - - // Support: IE <=9 - 11+ - // Extend with the prototype to reset the above stopImmediatePropagation() - jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), - saved.slice( 1 ), - this - ) - } ); - - // Abort handling of the native event - event.stopImmediatePropagation(); - } - } - } ); -} - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || Date.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - code: true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } -}, jQuery.event.addProp ); - -jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { - jQuery.event.special[ type ] = { - - // Utilize native event if possible so blur/focus sequence is correct - setup: function() { - - // Claim the first handler - // dataPriv.set( this, "focus", ... ) - // dataPriv.set( this, "blur", ... ) - leverageNative( this, type, expectSync ); - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function() { - - // Force setup before trigger - leverageNative( this, type ); - - // Return non-false to allow normal event-path propagation - return true; - }, - - delegateType: delegateType - }; -} ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - // Support: IE <=10 - 11, Edge 12 - 13 only - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( elem ).children( "tbody" )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { - elem.type = elem.type.slice( 5 ); - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.get( src ); - events = pdataOld.events; - - if ( events ) { - dataPriv.remove( dest, "handle events" ); - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = flat( args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - valueIsFunction = isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( valueIsFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( valueIsFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl && !node.noModule ) { - jQuery._evalUrl( node.src, { - nonce: node.nonce || node.getAttribute( "nonce" ) - }, doc ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && isAttached( node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html; - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = isAttached( elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - -var swap = function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - -var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - container.style.cssText = "position:absolute;left:-11111px;width:60px;" + - "margin-top:1px;padding:0;border:0"; - div.style.cssText = - "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + - "margin:auto;border:1px;padding:1px;" + - "width:60%;top:1%"; - documentElement.appendChild( container ).appendChild( div ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; - - // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 - // Some styles come back with percentage values, even though they shouldn't - div.style.right = "60%"; - pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; - - // Support: IE 9 - 11 only - // Detect misreporting of content dimensions for box-sizing:border-box elements - boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; - - // Support: IE 9 only - // Detect overflow:scroll screwiness (gh-3699) - // Support: Chrome <=64 - // Don't get tricked when zoom affects offsetWidth (gh-4029) - div.style.position = "absolute"; - scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - function roundPixelMeasures( measure ) { - return Math.round( parseFloat( measure ) ); - } - - var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, - reliableTrDimensionsVal, reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - jQuery.extend( support, { - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelBoxStyles: function() { - computeStyleTests(); - return pixelBoxStylesVal; - }, - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - }, - scrollboxSize: function() { - computeStyleTests(); - return scrollboxSizeVal; - }, - - // Support: IE 9 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Behavior in IE 9 is more subtle than in newer versions & it passes - // some versions of this test; make sure not to make it pass there! - reliableTrDimensions: function() { - var table, tr, trChild, trStyle; - if ( reliableTrDimensionsVal == null ) { - table = document.createElement( "table" ); - tr = document.createElement( "tr" ); - trChild = document.createElement( "div" ); - - table.style.cssText = "position:absolute;left:-11111px"; - tr.style.height = "1px"; - trChild.style.height = "9px"; - - documentElement - .appendChild( table ) - .appendChild( tr ) - .appendChild( trChild ); - - trStyle = window.getComputedStyle( tr ); - reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; - - documentElement.removeChild( table ); - } - return reliableTrDimensionsVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !isAttached( elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style, - vendorProps = {}; - -// Return a vendor-prefixed property or undefined -function vendorPropName( name ) { - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a potentially-mapped jQuery.cssProps or vendor prefixed property -function finalPropName( name ) { - var final = jQuery.cssProps[ name ] || vendorProps[ name ]; - - if ( final ) { - return final; - } - if ( name in emptyStyle ) { - return name; - } - return vendorProps[ name ] = vendorPropName( name ) || name; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }; - -function setPositiveNumber( _elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { - var i = dimension === "width" ? 1 : 0, - extra = 0, - delta = 0; - - // Adjustment may not be necessary - if ( box === ( isBorderBox ? "border" : "content" ) ) { - return 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin - if ( box === "margin" ) { - delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); - } - - // If we get here with a content-box, we're seeking "padding" or "border" or "margin" - if ( !isBorderBox ) { - - // Add padding - delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // For "border" or "margin", add border - if ( box !== "padding" ) { - delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - - // But still keep track of it otherwise - } else { - extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - - // If we get here with a border-box (content + padding + border), we're seeking "content" or - // "padding" or "margin" - } else { - - // For "content", subtract padding - if ( box === "content" ) { - delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // For "content" or "padding", subtract border - if ( box !== "margin" ) { - delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - // Account for positive content-box scroll gutter when requested by providing computedVal - if ( !isBorderBox && computedVal >= 0 ) { - - // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border - // Assuming integer scroll gutter, subtract the rest and round down - delta += Math.max( 0, Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - computedVal - - delta - - extra - - 0.5 - - // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter - // Use an explicit zero to avoid NaN (gh-3964) - ) ) || 0; - } - - return delta; -} - -function getWidthOrHeight( elem, dimension, extra ) { - - // Start with computed style - var styles = getStyles( elem ), - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). - // Fake content-box until we know it's needed to know the true value. - boxSizingNeeded = !support.boxSizingReliable() || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - valueIsBorderBox = isBorderBox, - - val = curCSS( elem, dimension, styles ), - offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); - - // Support: Firefox <=54 - // Return a confounding non-pixel value or feign ignorance, as appropriate. - if ( rnumnonpx.test( val ) ) { - if ( !extra ) { - return val; - } - val = "auto"; - } - - - // Support: IE 9 - 11 only - // Use offsetWidth/offsetHeight for when box sizing is unreliable. - // In those cases, the computed value can be trusted to be border-box. - if ( ( !support.boxSizingReliable() && isBorderBox || - - // Support: IE 10 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Interestingly, in some cases IE 9 doesn't suffer from this issue. - !support.reliableTrDimensions() && nodeName( elem, "tr" ) || - - // Fall back to offsetWidth/offsetHeight when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - val === "auto" || - - // Support: Android <=4.1 - 4.3 only - // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && - - // Make sure the element is visible & connected - elem.getClientRects().length ) { - - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Where available, offsetWidth/offsetHeight approximate border box dimensions. - // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the - // retrieved value as a content box dimension. - valueIsBorderBox = offsetProp in elem; - if ( valueIsBorderBox ) { - val = elem[ offsetProp ]; - } - } - - // Normalize "" and auto - val = parseFloat( val ) || 0; - - // Adjust for the element's box model - return ( val + - boxModelAdjustment( - elem, - dimension, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles, - - // Provide the current computed size to request scroll gutter calculation (gh-3589) - val - ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "gridArea": true, - "gridColumn": true, - "gridColumnEnd": true, - "gridColumnStart": true, - "gridRow": true, - "gridRowEnd": true, - "gridRowStart": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: {}, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append - // "px" to a few hardcoded values. - if ( type === "number" && !isCustomProp ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( _i, dimension ) { - jQuery.cssHooks[ dimension ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && - - // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, dimension, extra ); - } ) : - getWidthOrHeight( elem, dimension, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = getStyles( elem ), - - // Only read styles.position if the test has a chance to fail - // to avoid forcing a reflow. - scrollboxSizeBuggy = !support.scrollboxSize() && - styles.position === "absolute", - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) - boxSizingNeeded = scrollboxSizeBuggy || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - subtract = extra ? - boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ) : - 0; - - // Account for unreliable border-box dimensions by comparing offset* to computed and - // faking a content-box to get border and padding (gh-3699) - if ( isBorderBox && scrollboxSizeBuggy ) { - subtract -= Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - parseFloat( styles[ dimension ] ) - - boxModelAdjustment( elem, dimension, "border", false, styles ) - - 0.5 - ); - } - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ dimension ] = value; - value = jQuery.css( elem, dimension ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || - elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( prefix !== "margin" ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || - tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = Date.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 15 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY and Edge just mirrors - // the overflowX value there. - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - result.stop.bind( result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = Date.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && - elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -function classesToArray( value ) { - if ( Array.isArray( value ) ) { - return value; - } - if ( typeof value === "string" ) { - return value.match( rnothtmlwhite ) || []; - } - return []; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isValidValue = type === "string" || Array.isArray( value ); - - if ( typeof stateVal === "boolean" && isValidValue ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( isValidValue ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = classesToArray( value ); - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, valueIsFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - valueIsFunction = isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( valueIsFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - - // Don't return options that are disabled or in a disabled optgroup - !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -support.focusin = "onfocusin" in window; - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - stopPropagationCallback = function( e ) { - e.stopPropagation(); - }; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = lastElement = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - lastElement = cur; - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( - dataPriv.get( cur, "events" ) || Object.create( null ) - )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - - if ( event.isPropagationStopped() ) { - lastElement.addEventListener( type, stopPropagationCallback ); - } - - elem[ type ](); - - if ( event.isPropagationStopped() ) { - lastElement.removeEventListener( type, stopPropagationCallback ); - } - - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - - // Handle: regular nodes (via `this.ownerDocument`), window - // (via `this.document`) & document (via `this`). - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = { guid: Date.now() }; - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } - - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && toType( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - if ( a == null ) { - return ""; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( _i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response - * Also sets the responseXXX fields on the jqXHR instance - */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /\bxml\b/, - html: /\bhtml/, - json: /\bjson\b/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": JSON.parse, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() + " " ] = - ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) - .concat( match[ 2 ] ); - } - } - match = responseHeaders[ key.toLowerCase() + " " ]; - } - return match == null ? null : match.join( ", " ); - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 15 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available and should be processed, append data to url - if ( s.data && ( s.processData || typeof s.data === "string" ) ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + - uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Use a noop converter for missing script - if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { - s.converters[ "text script" ] = function() {}; - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( _i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - -jQuery.ajaxPrefilter( function( s ) { - var i; - for ( i in s.headers ) { - if ( i.toLowerCase() === "content-type" ) { - s.contentType = s.headers[ i ] || ""; - } - } -} ); - - -jQuery._evalUrl = function( url, options, doc ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - - // Only evaluate the response if it is successful (gh-4126) - // dataFilter is not invoked for failure responses, so using it instead - // of the default converter is kludgy but it works. - converters: { - "text script": function() {} - }, - dataFilter: function( response ) { - jQuery.globalEval( response, options, doc ); - } - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var htmlIsFunction = isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.ontimeout = - xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain or forced-by-attrs requests - if ( s.crossDomain || s.scriptAttrs ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( " - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Files used in PDF extraction

-
-

Configuration file

-

Configuration files may define the PDF processing parameters. -By default, the pdfgetx3 program attempts to read -.pdfgetx3.cfg file from the user HOME directory, -then .pdfgetx3.cfg and pdfgetx3.cfg files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the -c, --config option. -The pdfgetn3 program works in the same way, -except it checks for configuration files -~/.pdfgetn3.cfg, .pdfgetn3.cfg and pdfgetn3.cfg.

-

The easiest way of creating a configuration file is to generate -a template content using the --createconfig option as

-
pdfgetx3 --createconfig=test.cfg
-
-
-

and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple “varname=value” syntax, -any lines starting with “#” are ignored as comments.

-

The configuration file has several sections marked as [SECTIONNAME]. -The [DEFAULT] section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the -s, --section option on the -command line. Thus

-
pdfgetx3 --config=test.cfg --section=nacl
-
-
-

would read the parameters from the [nacl] section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section.

-
-
-

Input files

-

PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -2Θ in degrees, momentum transfer Q in inverse nanometers or Q -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the dataformat parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values.

-

The input files are usually passed as command-line arguments to -pdfgetx3 or pdfgetn3 programs and must be paths -accessible from the current working directory.

-

Input files can be also defined by setting the inputfile -value in the configuration file. The -d, --datapath -option can be then used to provide additional data directories to -search for these inputs and for the backgroundfile. -This is to support configuration files located in a different -directory than the data.

-

When the --find option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory.

-
-
-

Output files

-

PDFgetX3 and PDFgetN3 can produce up to four different output data files:

-
    -
  • .iq – I(Q), the background-corrected -intensities sampled on a regular Q-space grid in inverse ångströms,

  • -
  • .sq – S(Q), the total scattering structure function, -with intensities normalized by average scattering factors and -corrected by a polynomial fit,

  • -
  • .fq – F(Q), the reduced structure function equal to Q(S(Q) - 1),

  • -
  • .gr – G(r), the resultant PDF, where the first column is the -separation r in ångströms and the second is the function G in -Å-2.

  • -
-

You can specify what output files should be produced by setting the -outputtypes parameter in the configuration file or by -passing the -t, --outputtypes on the command line.

-

The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the --config option, -the PDFgetX3 will reproduce the previous calculation.

-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/genindex.html b/static_root/doc/pdfgetx/2.2.0/genindex.html deleted file mode 100644 index 0a7077e1..00000000 --- a/static_root/doc/pdfgetx/2.2.0/genindex.html +++ /dev/null @@ -1,839 +0,0 @@ - - - - - - - Index — diffpy.pdfgetx 2.2.0 documentation - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - -

Index

- -
- Symbols - | A - | B - | C - | D - | E - | F - | G - | I - | L - | M - | O - | P - | Q - | R - | S - | T - | V - | W - -
-

Symbols

- - - -
- -

A

- - -
- -

B

- - - -
- -

C

- - - -
- -

D

- - - -
- -

E

- - - -
- -

F

- - - -
- -

G

- - -
- -

I

- - - -
- -

L

- - - -
- -

M

- - -
- -

O

- - - -
- -

P

- - - -
- -

Q

- - - -
- -

R

- - - -
- -

S

- - -
- -

T

- - - -
- -

V

- - -
- -

W

- - -
- - - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/index.html b/static_root/doc/pdfgetx/2.2.0/index.html deleted file mode 100644 index 346e1a8f..00000000 --- a/static_root/doc/pdfgetx/2.2.0/index.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - diffpy.pdfgetx — diffpy.pdfgetx 2.2.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/install.html b/static_root/doc/pdfgetx/2.2.0/install.html deleted file mode 100644 index 3cfa01a8..00000000 --- a/static_root/doc/pdfgetx/2.2.0/install.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - Installation — diffpy.pdfgetx 2.2.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Installation

-
-

Software requirements

-

This software is written in Python programming language, therefore -you must have Python 3.10, 3.9, 3.8, 3.7 or 2.7 installed. In addition, -the following third-party Python libraries are also required:

-
    -
  • pip - Python package installer

  • -
  • setuptools - tools for installing Python packages

  • -
  • six - Python 2 and 3 compatibility library

  • -
  • NumPy - library for scientific computing with Python

  • -
  • matplotlib - Python plotting library

  • -
  • IPython - enhanced interactive Python shell

  • -
-

Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -Python Package Index -or using any Internet search engine.

-

Another more convenient option is to obtain one of the science-oriented -Python distributions such as -Anaconda Python, -Enthought Canopy or -PythonXY, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step.

-

On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command

-
sudo apt-get install \
-  python3-pip python3-setuptools python3-six \
-  python3-numpy python3-matplotlib ipython3
-
-
-

This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above.

-

On Windows operating system, it may be necessary to add the -C:\Python37 directory and the scripts directory -C:\Python37\Scripts to the system PATH. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the Command Prompt, type -there python and see if this starts the Python interpreter.

-

Alternately, if you want to run the diffpy.pdfgetx software with a specific version of Python, -we recommend using a virtual environment, such as conda. For example, if you have Anaconda Python installed, -you can create a conda virtual environment to install the software as follow

-
conda create --name pdfgetx_env python=3.8 numpy matplotlib ipython
-
-
-

You can choose the name of the environment and python version as you desire. You can choose any of the -supported Python versions. Then, activate this environment and follow the instructions in the -next section to install the software

-
conda activate pdfgetx_env
-
-
-
-
-

Installation

-

The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -Columbia Technology Ventures. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:

-
pip install ./diffpy.pdfgetx-VERSION.whl
-
-
-

Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending sudo to the command line above. If root access is not available, use the pip install options --user or --prefix to install the software to a user-writable directory.

-

The package provides three programs for PDF conversion, pdfgetx3, pdfgetn3 and pdfgets3. To check if they are correctly installed run

-
pdfgetx3 --version
-pdfgetn3 --version
-pdfgets3 --version
-
-
-

This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a plotdata -command for an easy plotting of text data files. To verify -if plotdata works, run the plotdata --version command. -Finally, a comprehensive test of the installed software can -be executed using

-
python -m diffpy.pdfgetx.tests.run
-
-
-
-

Note

-

Older versions of diffpy.pdfgetx use Python egg format -instead of Python wheel. -To install these use the easy_install command as follows:

-
python -m easy_install ./diffpy.pdfgetx-VERSION.egg
-
-
-
-
-
-

IPython magic command

-

These instructions are intended for IPython users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don’t plan to customize IPython in such way you can safely skip -this paragraph.

-

When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The %pdfgetx3, %pdfgetn3 and %pdfgets3 magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session.

-

The %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up

-
    -
  1. find the profile_default/ipython_config.py file and open it -in a text editor. If that file does not exists, -create it first by executing

    -
    ipython profile create
    -
    -
    -
  2. -
  3. navigate to the paragraph that contains the -c.InteractiveShellApp.extensions and add there -the following line

    -
    c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics']
    -
    -
    -

    There must be no leading indent, i.e., the text must start at the -very first column.

    -
  4. -
-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/interact.html b/static_root/doc/pdfgetx/2.2.0/interact.html deleted file mode 100644 index 4a7ff8e5..00000000 --- a/static_root/doc/pdfgetx/2.2.0/interact.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - Interactive mode — diffpy.pdfgetx 2.2.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Interactive mode

-

The interactive mode is activated by using either the --i, --interact option or a non-empty ---plot option. In the interactive mode -the program starts an IPython interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands %pdfgetx3 and %pdfgetn3, which can be used with -the same syntax as the pdfgetx3 and pdfgetn3 in -system shell. -The interactive session is also initialized with all functions from the -matplotlib.pyplot module for convenient plotting. -The functions and variables related to PDF processing are:

-
-
-pdfgetter(x=None, y=None, filename='', **kwargs)
-

Instance of the PDFGetter class which serves as a -low-level function that calculates the PDF. This is a callable -object, which takes as an argument a pair of input arrays for -(Q, intensity) or (2Θ, intensity) depending on -dataformat. It can be also called with a keyword -argument filename=FILE, which would read the input arrays -from the specified file. When called with no arguments, -it calculates PDF from the last input data.

-
-
Parameters
-
    -
  • x (numpy.ndarray, optional) – -The Q or 2Θ values in powder diffraction pattern.

  • -
  • y (numpy.ndarray, optional) – -The scattered intensities in powder diffraction pattern

  • -
  • filename (str, optional) – -The text data file for loading the x, y values when -they are not specified.

  • -
  • kwargs (misc, optional) – -Extra keyword arguments that are applied to -the config object, for example qmax=20.

  • -
-
-
Returns
-

A pair of output arrays (r, G).

-
-
-
- -
-
-config
-

Instance of the PDFConfig class that stores the -parameters and input files for the program. -Use print(config) to display the current configuration values. -This is the same object as pdfgetter.config. Configuration -may be changed by setting a respective attribute of the -config object, for example:

-
In [1]: config.qmax = 21
-
-
-

The config values may be also changed by calling the -pdfgetter() or processfiles() function with a -corresponding keyword argument, for example -processfiles(qmax=20, force="once").

-
- -
-
-iraw
-
-iq
-
-sq
-
-fq
-
-gr
-

These variables are assigned the input raw intensities and the -intermediate results, stored as matrix rows. The matrix rows -correspond to twotheta1, intensity1, twotheta2, intensity2, etc. -Because matrices are iterated row first, the raw intensities -from all input files can be plotted with the matplotlib plot -function as plot(*iraw).

-

These variables should be considered read-only and are reset -with subsequent PDF calculations.

-
- -
-
-tuneconfig(plotids=None, pdfgetter=None, axeslist=None)
-

Show a GUI dialog for interactive tuning of configuration variables.

-
-
Parameters
-
    -
  • plotids – The string or iterable that specify what interactive plots should be -tuned. By default the same as config.plot. It can be also an -integer index or name of a transformation in pdfgetter() or -a reference to a Transformation object.

  • -
  • pdfgetter – The optional PDFGetter object to be tuned. -This is by default the interactive pdfgetter() object.

  • -
  • axeslist – An optional list of matplotlib Axes for showing interactive plots. -When None, use subplot(N, 1, i) to create any necessary axes.

  • -
-
-
-
-

Note

-

Changes from tuneconfig() apply only to the configuration -and results in memory. Use the processfiles() function -to save them to disk.

-
-
-

See also

-

Interactive tuning of parameters tutorial

-
-
- -
-
-processfiles(filename=None, **kwargs)
-

Process all input files again with the current configuration values. -This is a higher-level function than pdfgetter(), as -it also saves output files and produces plots as specified by the -config object.

-
-
Parameters
-
    -
  • filename – One or more input files to be converted to PDFs and saved or -plotted according to the config settings. Use the -previous list of input files when not specified.

  • -
  • kwargs – An optional keyword arguments to set for the config -object, for example (force="once", qmax=18).

  • -
-
-
-

This function updates the config.inputfiles -list and the iraw, iq, -sq, fq and gr -interactive variables.

-
- -
-
-clearsession()
-

Clear all elements from the config.inputfiles -and also the -iraw, iq, sq, -fq and gr variables.

-
-
Returns
-

No return value.

-
-
-
- -
-
-loaddata(filename, minrows=10, usecols=None, **kwargs)
-

Find and load data from a text file.

-

The data reading starts at the first matrix block of at least minrows rows -and constant number of columns. This seems to work for most of the -datafiles including those generated by PDFGetX2.

-
-
Parameters
-
    -
  • filename (str) – Name of the file to load the text data from.

  • -
  • minrows (int, optional) – Minimum number of rows in the first data block, by default 10. -All rows must have the same number of floating point values.

  • -
  • usecols (int, str, slice, iterable, optional) – Indices or names of the columns to be loaded from the data block, -the default is all columns. Data blocks that do not contain -sufficient number of columns are skipped. When usecols contain -string items, they are translated to column indices by looking -up a header line preceding the data block. String items formatted -as i:j:k are converted to slice objects. When usecols type -is string it is split to a list of names at comma and whitespace -characters.

  • -
  • unpack (bool, optional) – Return data as a sequence of columns that allows tuple unpacking -such as x, y = loaddata(FILENAME, unpack=True). Note that -transposing the loaded array as loaddata(FILENAME).T has -the same effect. The default is False.

  • -
  • kwargs (misc, optional) – Extra keyword arguments that are passed to numpy.loadtxt.

  • -
-
-
Returns
-

data (numpy.ndarray) – The data block loaded from the text file.

-
-
-
-

See also

-

numpy.loadtxt

-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
-
-plotdata(filenames, style=None, x=None, y=None, log=None, ax=None, **kwargs)
-

Plot one or more text data files.

-

The files are searched for data blocks which have enough columns -to satisfy both x and y selectors of the plotted data. This -may result in an empty plot when file has none wide-enough data -block (e.g., when y=100).

-
-
Parameters
-
    -
  • filenames (str or an iterable of string file names) – One or more text data files to be plotted.

  • -
  • style (str) – Optional style argument for the matplotlib plot() function.

  • -
  • x (int, str, or iterable, optional) – The column to be used for the x data. This can be a zero-based -index of the desired column or a column name from data header. -A special symbol “.” can be used for a sequential data index. -When not specified, use the first column.

  • -
  • y (int, str, iterable, or slice, optional) – One or more columns to be used for the y data. This can be -a single zero-based index of the desired column or an iterable -of several indices. The y value can be also a string which -is split at commas and converted to integers, column names -or slice objects, e.g. “0,sine,4:7”. The slice instances -are applied to the entire data block from each loaded file. -Use the second column when not specified.

  • -
  • log ({‘x’, ‘y’}, optional) – Set logarithmic scaling for the specified axis and linear scaling -for all others. For example, log="y" applies linear scaling -to the x-axis and logarithmic to the y-axis. Keep the current -axis scaling when not specified.

  • -
  • ax (matplotlib.axes.Axes, optional) – The axes to plot to. The plotting will be performed using the -ax.plot method. The default is pyplot.gca().

  • -
  • kwargs (misc, optional) – Keyword arguments for the matplotlib plot() function.

  • -
-
-
Returns
-

lines (list) – The matplotlib Line2D objects added to the current axis.

-
-
- -

This function can be imported from the -diffpy.pdfgetx.plotdata module.

-
- -
-
-findfiles(patterns=(), path='.', dotfiles=False)
-

Find files that match all specified patterns.

-

Pattern syntax:

-
    -
  • ^start - match “start” only at the beginning of the string.

  • -
  • end$ - match “end” only at the end of string.

  • -
  • <7> - match number 7 preceded by any number of leading zeros.

  • -
  • <1-34> - match an integer range from 1 to 34 inclusive.

  • -
  • <7-> - match an integer greater or equal 7.

  • -
  • <-> - match any integer.

  • -
  • + - start a new group of patterns to match more files.

  • -
  • dir/ - set search path effective from the current pattern group.

  • -
-

All integer ranges <N-M> above allow one or more leading zeros. -The range syntax does not support matching of negative numbers.

-
-
Parameters
-
    -
  • patterns (iterable of strings or str, optional) – String patterns that must all match in returned filenames. -Can be also a single string with patterns separated by -whitespace characters. When empty match all files in the -current directory or in the path. A single + starts -a new pattern group for additional matches. Each pattern -group may have one entry containing /, for example, -dir/ or ./, which sets the search directory for -this and subsequent pattern groups. When pattern group -contains only the path entry it reuses file patterns from -the previous group.

  • -
  • path (str, optional) – Directory to be searched for the files. The default is “.” -to search the current directory.

  • -
  • dotfiles (bool, optional) – When True search also the hidden “.” starting files. These -files are by default ignored, but can be explicitly selected -by adding the ^. pattern.

  • -
-
-
Returns
-

filenames (list) – The list of matching filenames. Return all files when -patterns are not specified.

-
-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/intro.html b/static_root/doc/pdfgetx/2.2.0/intro.html deleted file mode 100644 index 638c5b6f..00000000 --- a/static_root/doc/pdfgetx/2.2.0/intro.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - Introduction — diffpy.pdfgetx 2.2.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Introduction

-

diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts.

-
-

License notice

-

Use of this software is subject to and permitted only under a separate, -written Use License granted by Columbia University. If you or your employer -is not a party to such an agreement, then your use of this software is -prohibited. If you don’t know whether or not your anticipated use is under -a license, you must contact Prof. Simon Billinge at sb2896@columbia.edu. -Use of this software without a license is prohibited.

-

Copyright 2009-2020, Trustees of Columbia University in the City of New York.

-

For more information please email Prof. Simon Billinge at sb2896@columbia.edu

-
-
-

Authors

-

This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Connor J. Bracy, -Hung Vuong, -Songsheng Tao, -Simon Billinge.

-
-
-

References

-

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:

-
-

P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge -PDFgetX3: A rapid and highly automatable program for processing -powder diffraction data into total scattering pair distribution -functions, -J. Appl. Crystallogr. 46, 560-566 (2013)

-
-

For research publications that use this software to process neutron -diffraction data we ask you to also cite:

-
-

P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, -S. J. L. Billinge -PDFgetN3: atomic pair distribution functions from neutron -powder diffraction data using ad hoc corrections, -J. Appl. Crystallogr. 51 (2018)

-
-

For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication:

-
-

CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge -sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data.

-
-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/options.html b/static_root/doc/pdfgetx/2.2.0/options.html deleted file mode 100644 index 5b4df7c2..00000000 --- a/static_root/doc/pdfgetx/2.2.0/options.html +++ /dev/null @@ -1,670 +0,0 @@ - - - - - - - Options and parameters — diffpy.pdfgetx 2.2.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Options and parameters

-

PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program.

-
-

Note

-

The command line options start with a leading “-” and can -be only used as command line arguments when starting the -pdfgetx3 program. Within configuration file the parameter -names are plain words without any leading dashes. Finally, -parameters can be also set in the interactive mode as attributes of -the config object, but the assignments must be valid -Python statements. Here are examples of setting composition of -a processed specimen using each of these forms:

-
    -
  1. assigned in configuration file:

    -
    ...
    -composition = CaTiO3
    -...
    -
    -
    -
  2. -
  3. set as a command-line option when starting pdfgetx3 or -pdfgetn3:

    -
    pdfgetx3 --composition=CaTiO3
    -
    -
    -
  4. -
  5. set in the IPython interactive mode:

    -
    pdfgetx3 -i
    -...
    -In [1]: config.composition = "CaTiO3"
    -
    -
    -
  6. -
-
-
-

Program operation

-
-
--h, --help
-

Display a brief usage information with a list of command line options -and exit.

-
- -
-
--V, --version
-

Display the program version and exit.

-
- -
-
---manual
-

Open this manual in a Web browser and exit.

-
- -
-
--f, --find
-
- -
-

Select input files that match all patterns. The command -line arguments are by default taken as input files. However, -with the --find option they are processed as -file patterns and the matching files are then used as inputs. -The input files are by default searched in the current directory -unless there is a path entry (e.g., data/) that -selects a different search path. The search patterns are -interpreted as fixed strings, all of which must be present -in the file name. A single argument + starts -a new group of patterns to match more files that are not -covered by one set of patterns. Additional pattern -groups reuse the current search path unless they provide -their own path value. Pattern groups containing only -a path entry reuse file patterns from the last group. -When pattern groups overlap the repeated matches are ignored -to make the resulting list of files unique. Files starting -with . are ignored unless there is ^. pattern -that explicitly matches them. The search -syntax provides the following special patterns:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

^

match at the beginning of the string, i.e., ^start -matches only filenames that start with “start”.

$

match at the end of string, for example, .chi$ selects -file names ending with “.chi”. A $ on its own -matches every string and can be used to select all files.

<N>

match number N preceded by any number of leading zeros, -e.g., <7> would match in “f7.chi”, “f007.chi”, but not -in “f77.chi”.

<N-M>

match an integer range from N to M inclusive. -The matched number may have one or more leading zeros.

<7->

match number 7 or larger.

<-7>

match number 7 or smaller.

<->

match any integer number.

+

start a new pattern group, for example, .chi$ + .dat$

/

set search path. An argument containing the / symbol -is taken as the search path, for example, data/ or -./. Each pattern group may provide its own search -path effective for that and any subsequent pattern group.

-

The ^$<> characters are often special to Unix or Windows -command shells, therefore they need to be enclosed in double -quotes (\”) when used on command line.

-
-

See also

-

tutorial on matching input files

-
-
-
-
--l, --list
-

List all input files and exit. This is useful with the ---find option to verify if input files -are matched as intended.

-
- -
-
-

Configuration file options

-
-
--c CONFIG, --config=CONFIG
-

Read custom configuration file after loading the default ones. -Do not load any configuration file when “NONE”.

-
- -
-
--s NAME, --section=NAME
-

Load the custom configuration file section [SectionName] after -loading the [DEFAULT] section. This is useful for creating -several configuration variants in a single configuration file.

-
- -
-
---createconfig=FILE
-

Write template configuration to a new FILE and exit. Write -to the standard output when FILE is “-“.

-
- -

See also the configuration file section -for further details.

-
-
-

Input and output options

-
-
-inputfile
-

This parameter allows to specify one or more input files in the -configuration file, one file per line. The inputfile -is only used if no input files were provided on the -pdfgetx3 or pdfgetn3 command line.

-
- -
-
-dataformat
-
- -
-
---format=FORMAT
-

Format of input files. Available formats are: twotheta, QA, -Qnm corresponding to a two-column text data where the first -column is either the scattering angle 2Θ in degrees, Q in -inverse ångströms or Q in inverse nanometers.

-
- -
-
-backgroundfile
-
- -
-
--b FILE, --background=FILE
-

Optional datafile with background intensities from an empty sample -holder. It must be in the same dataformat as other input files.

-
- -
-

Note

-

The following input is only used in sas mode.

-
-
-
-formfactorfile
-
- -
-
--ff FILE, --formfactorfile=FILE
-

Form factor intensities of the scatterers. This is required for sas mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1.

-
- -
-
-datapath
-
- -
-
--d DATAPATH, --datapath=DATAPATH
-

One or more extra directories to be searched for input or -background data files. The -d option can be specified -several times to add more directories, these are prepended in front -of any default value. Within configuration file the datapath -directories have to be listed each on a separate line.

-

A special value “NONE” (or “none”) clears any previously defined -paths and only the further paths, if any, would be searched for -inputs.

-
- -
-
-output
-
- -
-
--o OUTPUT, --output=OUTPUT
-

Output file name, write to the standard output when “-“. The --t, --outputtypes option controls what results are -being saved. Normally the OUTPUT is used as a custom basename for -the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o -tokens, which are expanded as follows:

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

token

example

definition

@h

dir1/dir2

the input file directory or “.”

@r

dir1/dir2/filename

the input path with extension removed

@e

dat

the input file extension without “.”

@t

filename.dat

the tail component of the input file

@b

filename

the tail component with extension removed

@o

gr

the output extension iq, sq, fq or gr

-

An empty value works the same as “@b.@o” and saves the data -in the current directory with a proper extension for the -saved results. When “@o” is not present in the OUTPUT, it is -appended as a default filename extension.

-
- -
-
-outputtypes
-
- -
-
--t TYPES, --outputtypes=TYPES
-

Result types to be saved, one or more comma separated values. -Supported values are “iq”, “sq”, “fq”, “gr”, corresponding to the -I(Q), S(Q), F(Q) and G(r) curves; these are also used as output -file extensions.

-

Result files are not written when empty, “none” or “NONE”.

-
- -
-
-force
-
- -
-
---force=FORCE
-

Overwrite existing output files. By default the output -files are not written if they already exist. Possible values -in a configuration file are “true”, “yes”, “on”, “1” or -“false”, “no”, “off”, “0” or “once”. The special value “once” -permits one overwrite and then resets config.force to -False. Note that in interactive mode the values assigned -to config.force are converted to Python bool -unless equal to “once”.

-
- -
-
-

PDF parameters

-
-
-mode
-
- -
-
---mode=STRING
-

The PDF conversion mode, i.e., the name of the -pdfgetter() setup. The available modes correspond -to the radiation type used in powder diffraction experiment and can -be “xray” or “neutron”.

-
- -
-
-wavelength
-
- -
-
--w FLOAT, --wavelength=FLOAT
-

X-ray wavelength in ångströms. This value is required -for the “twotheta” dataformat in order to convert the scattering -angles 2Θ to a momentum transfer Q. For other data formats -the wavelength is not necessary and may be left undefined.

-
- -
-
-twothetazero
-
- -
-
---twothetazero=FLOAT
-

Position of the zero scattering angle in diffractometer degrees. -This parameter corrects for a constant offset in the -measured 2Θ values. When loading configuration file -it is assumed 0 unless specified otherwise. This parameter -is only effective for the “twotheta” dataformat.

-
- -
-
-composition
-
- -
-
---composition=STRING
-

Chemical composition of the sample. Supported formats are -“PbTi0.5Zr0.5O3”, “Pb 1 Ti 1/2 Zr 1/2 O 3” or “CH3 (CH2)3 OH”. -Space characters are ignored, unit counts can be omitted, but it is -important to use a proper upper and lower case in atom symbols. -Elements can appear several times in the formula, e.g., “CH3 CH3”, -and the formula may contain parentheses or fractional -stoichiometries.

-
- -
-
-bgscale
-
- -
-
---bgscale=FLOAT
-

Scaling of the background intensities loaded from the -backgroundfile, by default 1.

-
- -
-
-rpoly
-
- -
-
---rpoly=FLOAT
-

r-limit for the maximum frequency in the F(Q) correction polynomial. -The PDF is unreliable at shorter r, however a -very small rpoly would disable polynomial correction and -give noisy PDF. -Larger values produce closer fits with a higher degree polynomial, -but when too large, they might smooth-out a useful signal in the -data. The default is 0.9.

-
- -
-
-qmaxinst
-
- -
-
---qmaxinst
-

The Q cutoff for the meaningful input intensities in inverse -ångströms. Some data files may contain trailing zeros -or unreliable intensities at the upper bound of the detector range. -The qmaxinst defines a threshold for unreliable data. -The parameter is also used as an upper boundary for the polynomial -fit correction of the S(Q) data.

-
- -
-
-qmin
-
- -
-
---qmin
-

The lower Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms.

-
- -
-
-qmax
-
- -
-
---qmax
-

The upper Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms. This is essentially a limit, where sample -signal decays to the level of data noise.

-
- -
-
-rmin
-
- -
-
---rmin=FLOAT
-

Lower bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rmax
-
- -
-
---rmax=FLOAT
-

Upper bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rstep
-
- -
-
---rstep=FLOAT
-

Spacing of the r-grid for the calculated PDF in ångströms.

-
- -
-
-

Other parameters

-
-
-plot
-
- -
-
--p TYPES, --plot=TYPES
-

Plot the specified results. A comma separated list with one or -more items from “iq”, “sq”, “fq”, “gr”. No plot is produced when -empty, “none” or “NONE”. Setting this option turns on the -interactive mode.

-
- -
-
-interact
-
- -
-
--i, --interact
-

Start an IPython interactive session after processing all files. -Useful for tuning the configuration parameters or interactive -plotting. This is always on when plot option has been set. -See also Interactive mode for further details.

-
- -
-
-verbose
-
- -
-
---verbose=VALUE
-

Level of detail for the program to report about its actions. -Possible values are “error”, “warning”, “info”, “debug”, “all” or an -integer number from 0 to 5. Messages are completely suppressed when -0, all messages are printed when verbose is 5 (“all”) or higher. -This option is useful for diagnostics of any unexpected behavior -in the program.

-
- -
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/pdfgetxn3-examples.zip b/static_root/doc/pdfgetx/2.2.0/pdfgetxn3-examples.zip deleted file mode 100644 index 50d1936c..00000000 Binary files a/static_root/doc/pdfgetx/2.2.0/pdfgetxn3-examples.zip and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.0/plotdata.html b/static_root/doc/pdfgetx/2.2.0/plotdata.html deleted file mode 100644 index e7dfa074..00000000 --- a/static_root/doc/pdfgetx/2.2.0/plotdata.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - The plotdata program — diffpy.pdfgetx 2.2.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

The plotdata program

-

The PDFgetX3 software includes a simple stand-alone utility -plotdata for plotting text data files. In most cases -this program can be invoked from a command-shell as

-
plotdata file1.dat file2.dat
-
-
-

which plots the numerical data from the text files file1.dat, -file2.dat together in a single graph. By default the first -column is used as an x variable and the second column is used for the -y values. After displaying the plot the program starts an IPython -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the filenames variable -containing a list of plotted files. It also pre-loads the -plotdata() and findfiles() functions just as in PDFgetX3 -interactive session. The plotdata() -function works in a similar way as the plotdata program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -plotdata() function would be:

-
In [1]: plotdata(['file1.dat', 'file2.dat'])
-
-
-
-

Selecting files

-

The plotdata program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as *.dat. The file search feature is controlled by the -following options:

-
-
--f, --find
-

Use command line arguments as filename patterns and plot all matching -files. This option works in the same way as for -pdfgetx3, for full details see the -pdfgetx3 --find documentation. Note that -within command line the special patterns ^$<> need to be quoted -in double quotes (\”) so they are not processed by command shell.

-
- -
-
--l, --list
-

List the input files and exit. This is useful in conjunction -with the -f, --find option to check if data files -are selected as intended.

-
- -

Assuming the current directory contains 20 files named -file1.dat, file2.dat, …, file20.dat, -the plotting of files 9 to 13 could be done (with a check listing) -as follows

-
$ plotdata -fl "<9-13>.dat"
-file9.dat
-file10.dat
-file11.dat
-file12.dat
-file13.dat
-$ plotdata -f "<9-13>.dat"
-
-
-

Within an interactive IPython session the equivalent plot could be -produced by combining the plotdata() and findfiles() functions as

-
In [1]: plotdata(findfiles("<9-13>.dat"))
-
-
-
-
-

Selecting x and y data

-

The plotdata program provides several ways of selecting -columns for x or y data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is “0” -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function):

-
-
--x X
-

index or name of the x-column to plot. See the -y option -for the supported syntax, but note that X may select only one -column. When set to “.” use the data-row index for x.

-
- -
-
--y Y
-

index or name of the y-column or columns to plot. The Y column -specification can be a comma separated list of indices, column names -or Python-like ranges, for example “1,2”, “G”, “1:4” (START:STOP, -same as “1,2,3”), “1:4:2” (START:STOP:STEP, same as “1,3”), or -“-2:” (same as “-2,-1”, i.e, the last 2 columns). Because column -indexing starts at “0” the second column must be specified as “1”.

-

The column names work if the data section in the file is preceded by -a headline of unique column names, for example:

-
x     square      cube
-1     1           1
-2     4           8
-3     9           27
-4     16          64
-
-
-

For such data file the plotdata program will recognize column names -“x”, “square” and “cube” and an implicit “.” for row index.

-
- -
-
--s STYLE, --style=STYLE
-

optional plot format specification. See the -matplotlib.pyplot.plot() function -for a list of available formats.

-
- -
-
--L LOG, --log=LOG
-

axes to be plotted with logarithmic scaling, for example, “x”, “y” or -“xy”. Axes not listed in LOG will use linear scaling.

-
- -
-
--h, --help
-

display a brief usage info and exit.

-
- -
-
--V, --version
-

show program version and exit.

-
- -
-
---manual
-

Open this manual page in a Web browser and exit.

-
- -
-
-

Examples

-

The examples directory plotdata contains a sincos.dat -file that has 3-columns of values labeled as “x”, “sin” and “cos”. -Here are several examples of the plotdata capabilities -when used from command line - the user is encouraged to try them out:

-
plotdata sincos.dat
-plotdata -y 1,2 sincos.dat
-plotdata -x . -y 0:3 sincos.dat
-plotdata -y cos sincos.dat
-plotdata -x sin -y cos -sr-- sincos.dat
-
-
-

An equivalent usage from a general IPython session would be:

-
ipython --matplotlib=auto
-In [1]: from diffpy.pdfgetx.plotdata import plotdata
-In [2]: plotdata('sincos.dat')
-In [3]: plotdata('sincos.dat', y=[1,2])
-In [4]: plotdata('sincos.dat', x='.', y=':3')
-In [5]: plotdata('sincos.dat', y='cos')
-In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--')
-
-
-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/quick-start.html b/static_root/doc/pdfgetx/2.2.0/quick-start.html deleted file mode 100644 index 8d8864df..00000000 --- a/static_root/doc/pdfgetx/2.2.0/quick-start.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - Quick-start guide — diffpy.pdfgetx 2.2.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Quick-start guide

-

This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing pdfgetx3, pdfgetn3, or -pdfgets3 in a shell window. Please, refer to the installation section if this is not working yet.

-
-

pdfgetx3 command

-

The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as

-
pdfgetx3 [options] input1 input2 ... inputN
-
-
-

The inputN stands for an input powder diffraction data. The -inputN file is a simple two-column text file, where the first -column corresponds to either the 2Θ diffraction angle, or a -momentum transfer, Q, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -FIT2D program using -its “chi” output format, thus we will also refer to them as “chi-files”. -A typical content of a “chi” file looks as folows:

-
Pt_bulk-00055.tif: 2-theta Scan
-2-Theta Angle (Degrees)
-
-       1465
- 2.0003892E-02  0.0000000E+00
- 6.0011677E-02  0.0000000E+00
- 1.0001946E-01  0.0000000E+00
- 1.4002724E-01  0.0000000E+00
- 1.8003502E-01  0.0000000E+00
- ...
-
-
-

The command-line options are arguments that start with a dash “-” and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash --. Options may require values. For short options, -the value may be joined to the option string, for example --w0.142774, while for the long options it has to be separated -with an equal sign, e.g., --wavelength=0.142774. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the Options and parameters section of -this manual. A brief summary of options can be also displayed by -executing

-
pdfgetx3 --help
-
-
-

The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the Tutorial. -In general, the first step is to create a commented configuration file pdfgetx3.cfg using:

-
pdfgetx3 --createconfig=pdfgetx3.cfg
-
-
-

The configuration file can have any name, but it is preferable -to use either pdfgetx3.cfg or .pdfgetx3.cfg, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the -c, --config option.

-

Open the pdfgetx3.cfg file in a text editor. The lines that -start with a hash mark # are comments and are not used. The lines -starting with a right brace [ denote sections in the configuration -file. The active lines are all formatted as -“NAME=VALUE”. Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation:

-
    -
  • dataformat – specifies the input data format

  • -
  • wavelength – radiation wavelength in Å required for the -“twotheta” format.

  • -
  • composition – chemical composition of the sample

  • -
  • qmaxinst – upper Q boundary for a meaningful measurement -intensities.

  • -
  • qmaxQ-cutoff for the Fourier transformation that -yields the PDF.

  • -
-

Save the updated configuration file and run pdfgetx3 on the input data -FILENAME.chi as

-
pdfgetx3 --verbose=info -t gr FILENAME.chi
-
-
-

Here the --verbose=info option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The -t gr option -tells the program to save the final G(r) curve as a -FILENAME.gr file in the working directory.

-

The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation

-
pdfgetx3 -c FILENAME.gr --plot=fq,gr
-
-
-

Note this command does not include any .chi file and this will as -a result process the previously used input FILENAME.chi. -The --plot=fq,gr option tells PDFgetX3 to -display 2 plots for the reduced structure function F(Q) and the -final PDF G(r). The --plot option also implies an -interactive mode -therefore the program does not exit, but starts an -interactive IPython session. To exit the interactive mode, -type exit() and press Enter.

-
-
-

pdfgetn3 command

-

The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the ---mode option. Running pdfgetn3 is nearly identical -to executing pdfgetx3 --mode=neutron. The only difference between -these commands is that pdfgetx3 checks for configuration files -pdfgetx3.cfg and .pdfgetx3.cfg, whereas -pdfgetn3 looks for pdfgetn3.cfg and .pdfgetn3.cfg.

-
-
-

pdfgets3 command

-

The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying mode = sas in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named pdfgets3.cfg and -.pdfgets3.cfg in order, when no configuration file is specified.

-

Please refer to the tutorial section for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3.

-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/release.html b/static_root/doc/pdfgetx/2.2.0/release.html deleted file mode 100644 index 0eff93b1..00000000 --- a/static_root/doc/pdfgetx/2.2.0/release.html +++ /dev/null @@ -1,414 +0,0 @@ - - - - - - - Release notes — diffpy.pdfgetx 2.2.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Release notes

-
-

Version 2.2.0 - 2022-02-10

-
-

Added

-
    -
  • Support for Python 3.10

  • -
  • Support for Python 3.9

  • -
  • Unittests for testing CLI functionality.

  • -
  • Tutorial example for multiple background subtractions (see -diffpy.pdfgetx/doc/examples/Multiple_Background_Subtraction).

  • -
  • New functionality for allowing multiple backgrounds to be subtracted from a -dataset accessed via using the plural name equivalent of any previously -singularly named variable (i.e., bgscale->bgscales, backgroundfile-> -backgroundfiles, etc.) in both static config files (i.e., *.cfg) and -interactive plotting sessions. Each set of parameters corresponding to a -given background subtraction can also be manipulated by a set of sliders -present in the tuneconfig window of an interactive shell session. In total, -the multiple background subtraction functionality should work identically to -the previous single background subtraction functionality except that the -multiple background files and initial scale values cannot be specified -through a pure CLI command (i.e., it must be specified either in a config file -or added/modified during an interactive plotting session).

  • -
  • Added extra test cases for testing the PDFGetter class.

  • -
  • Added extra test cases for testing the PDFConfig class.

  • -
-
-
-

Changed

-
    -
  • Changed python versions specified in requirements.txt files to be in the -range of the respective minor version rather than fixed to the Python X.Y.0 -version

  • -
  • Python version support policy now follows NEP 29

  • -
  • Changed versions used in conda-recipe/build.sh to reflect currently -supported Python versions.

  • -
  • Changed Sphinx dependency m2r to m2r2.

  • -
  • Added Connor J. Bracy and Zach Thatcher to contributors in AUTHORS.txt

  • -
  • Added Connor J. Bracy to internal authors list and PDFgetXNS3_manual.pdf

  • -
-
-
-

Removed

-
    -
  • Support for Python 3.5 and 3.6.

  • -
-
-
-
-

Version 2.1.2 - 2021-12-24

-
-

Fixed

-
    -
  • Fixed the command provided to the users in the installation instructions which -incorrectly instructed them to setup a Python environment in which pdfgetx -could be installed by using the flag --python=3.8 to the correct usage of -this flag as python=3.8.

  • -
-
-
-
-

Version 2.1.1 - 2020-09-01

-
-

Added

-
    -
  • Support for Python 3.8

  • -
-
-
-
-

Version 2.1.0 – 2020-07-15

-
-

Added

-
    -
  • New mode sas for processing Small Angle Scattering data and -for using custom scattering factors.

  • -
  • qmax-pushes-qmin coupling of sliders in the tuneconfig tool.

  • -
  • New program pdfgets3 and IPython magic %pdfgets3.

  • -
-
-
-

Changed

-
    -
  • Software distribution format to a universal Python wheel.

  • -
  • tuneconfig dialog to access full Q-range with all qmin, qmax, and -qmaxinst sliders. Increased range for the rpoly slider.

  • -
-
-
-

Deprecated

-
    -
  • Software distribution in setuptools egg package.

  • -
-
-
-

Removed

-
    -
  • Support for Python 3.4.

  • -
-
-
-

Fixed

-
    -
  • Support backslash in the --find option path argument on Windows. -Both forward and back slashes are allowed on Windows, but other -platforms must use forward slash.

  • -
  • Recipe for platform-dependent Anaconda package.

  • -
  • Bogus test failure when installed in symlinked directory.

  • -
-
-
-
-

Version 2.0.0 – 2018-11-02

-
-

Added

-
    -
  • New mode neutron for processing constant-wavelength -neutron scattering data.

  • -
  • Correction for an offset of diffractometer zero angle.

  • -
  • Configuration parameter twothetazero and command-line option ---twothetazero for position of the actual zero angle -in diffractometer degrees.

  • -
  • New program pdfgetn3 and IPython magic %pdfgetn3.

  • -
  • Separate configuration file pdfgetn3.cfg for the pdfgetn3 program.

  • -
  • New sub-package diffpy.pdfgetx.apps for entry points to all programs.

  • -
  • Table of electron scattering factors from E. J. Kirkland, -Advanced Computing in Electron Microscopy.

  • -
  • The + operator for additive pattern groups when matching input files -with pdfgetx3 --find.

  • -
  • An optional slash-containing entry, e.g., dir/, to set the search path -for pdfgetx3 --find. Each pattern group may have one path entry which -affects the current and subsequent pattern groups. Pattern groups that -have only the path entry reuse the previous file patterns, for example, -dir1/ .dat$ + dir2/ + dir3/.

  • -
  • The dotfiles flag argument to functs.findfiles to also find -dot-starting files without an explicit pattern.

  • -
  • Support for Python 3.7.

  • -
  • Tutorial examples for constant-wavelength neutron diffraction data.

  • -
-
-
-

Changed

-
    -
  • Initialization arguments of PDFConfig to set initial configuration values.

  • -
  • path argument of functs.findfiles to give one search path instead -of a list of paths.

  • -
  • pdfgetx3 --find to search only the current directory and stop searching -in --datapath.

  • -
  • Improved PDF accuracy by removing repeated Q-grid interpolation.

  • -
  • Handling of dot files by pdfgetx3 --find and the functs.findfiles -function. The dotfiles are by default ignored unless explicitly selected -by a "^." pattern.

  • -
  • Return type of functs.findfiles from IPython SList to a simple list.

  • -
  • Rename camel case interactive functions to lowercase, i.e., to loaddata, -processfiles, clearsession.

  • -
  • Use config.datapath lookup in processfiles(filename).

  • -
-
-
-

Deprecated

-
    -
  • Function cromermann.felectronatq for electron scattering -factors calculation using Mott-Bethe approximate formula.

  • -
  • IPython extension module diffpy.pdfgetx.ipy_pdfgetx3. -Use diffpy.pdfgetx.ipy_magics instead.

  • -
  • Camel case functions loadData, processFiles, clearSession.

  • -
-
-
-

Removed

-
    -
  • Support for Python 2.6.

  • -
  • Processing of environment variable PDFGETX3PATH.

  • -
  • Support for IPython 0.x.

  • -
  • Obsolete variable __gitsha__ from the version module.

  • -
  • Processing of command line options in PDFConfig class.

  • -
  • Implicit loading of configuration files in PDFConfig instantiation.

  • -
-
-
-

Fixed

-
    -
  • Import of all objects from matplotlib.pyplot into -an interactive session started by plotdata.

  • -
  • Inaccurate G interpolation when rstep is comparable to pi / qmax.

  • -
  • Lone anchor patterns ^, $ to match everything.

  • -
-
-
-
-

Version 1.2 – 2018-01-12

-
-

Added

-
    -
  • Support for Python 3.4, 3.5, 3.6 in addition to Python 2.6 and 2.7.

  • -
  • Support for IPython 5.0 with preserved -compatibility with IPython 0.10 and later.

  • -
  • Support for matplotlib 2.0.

  • -
  • New option --log=LOG for the plotdata program to set logarithmic -scale for either of x or y axis. The plotdata() function learnt -a new log argument with the same purpose.

  • -
  • New argument ax for the plotdata() function that select a specific -matplotlib axis for plotting.

  • -
  • Support for Unicode filenames and values in the config -interactive variable.

  • -
  • Processing of parentheses and fractional stoichiometries in chemical -formulas as in Pb (Ti Zr)1/2 O3.

  • -
  • Explanatory error message when PDFgetX3 was installed for -unsupported Python.

  • -
-
-
-

Changed

-
    -
  • The egg package file was enhanced to support all Python -versions. The software is now distributed in a single -egg rather than multiple eggs per each Python version.

  • -
  • PDFgetX3 option --force to take a boolean argument -(yes, no, true, etc.) or once. The configuration -parameter force can be likewise set to a bool or to -a string "once". This enables a safer one-time -overwrite of existing output files.

  • -
  • Plot labels to use a proper Unicode “Å” (Ångström) symbols. -The “Å” symbol is also used within units in output files.

  • -
  • The usecols argument of the loadData() function to also -accept scalars, open-end slice objects and string-denoted -slices such as "1:3" or "1:".

  • -
  • The plotdata program and plotdata() function to accept -open-end slices for the y-columns selection.

  • -
  • The IPython magic function %pdfgetx3 to set the _exit_code -variable as do generic shell commands run from IPython.

  • -
  • Inline documentation to use NumPy-style Napoleon format, -which is human readable and can be included in the manual.

  • -
  • Release scripts to build software package bundles and -documentation in binary-reproducible way.

  • -
-
-
-

Deprecated

-
    -
  • Compatibility with Python 2.6.

  • -
  • Support for IPython 0.x.

  • -
  • Variable __gitsha__ in the version module which was renamed -to __git_commit__.

  • -
-
-
-

Removed

-
    -
  • The hold argument of the plotdata() function, -because it was deprecated in matplotlib.

  • -
  • Support for multiple x-columns in plotdata program and -plotdata() function.

  • -
  • Import of all objects from numpy module into the interactive -session. NumPy is available under the np name instead.

  • -
-
-
-

Fixed

-
    -
  • Avoid duplicate “.gr.gr” extension when pdfgetx3 is run -with option --output=f.gr.

  • -
  • Crash on loading custom configuration section from a local -file, when that section is missing in global configuration.

  • -
  • Missing checkbox in the tuneconfig dialog caused by matplotlib bug.

  • -
-
-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/search.html b/static_root/doc/pdfgetx/2.2.0/search.html deleted file mode 100644 index 77403cff..00000000 --- a/static_root/doc/pdfgetx/2.2.0/search.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - Search — diffpy.pdfgetx 2.2.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -

Search

- - - - -

- Searching for multiple words only shows matches that contain - all words. -

- - -
- - - -
- - - -
- -
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/searchindex.js b/static_root/doc/pdfgetx/2.2.0/searchindex.js deleted file mode 100644 index ff989744..00000000 --- a/static_root/doc/pdfgetx/2.2.0/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({docnames:["files","index","install","interact","intro","options","plotdata","quick-start","release","tutorial"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,sphinx:56},filenames:["files.rst","index.rst","install.rst","interact.rst","intro.rst","options.rst","plotdata.rst","quick-start.rst","release.rst","tutorial.rst"],objects:{"":[[5,1,1,"-","backgroundfile"],[5,1,1,"-","bgscale"],[5,1,1,"-","composition"],[3,2,1,"-","config"],[5,1,1,"-","dataformat"],[5,1,1,"-","datapath"],[5,1,1,"-","force"],[5,1,1,"-","formfactorfile"],[3,2,1,"-","fq"],[3,2,1,"-","gr"],[5,1,1,"-","inputfile"],[5,1,1,"-","interact"],[3,2,1,"-","iq"],[3,2,1,"-","iraw"],[5,1,1,"-","mode"],[5,1,1,"-","output"],[5,1,1,"-","outputtypes"],[5,1,1,"-","plot"],[5,1,1,"-","qmax"],[5,1,1,"-","qmaxinst"],[5,1,1,"-","qmin"],[5,1,1,"-","rmax"],[5,1,1,"-","rmin"],[5,1,1,"-","rpoly"],[5,1,1,"-","rstep"],[3,2,1,"-","sq"],[5,1,1,"-","twothetazero"],[5,1,1,"-","verbose"],[5,1,1,"-","wavelength"]],"diffpy.pdfgetx":[[3,0,1,"","findfiles"],[3,0,1,"","loaddata"]],"diffpy.pdfgetx.plotdata":[[3,0,1,"","plotdata"]],_interactive_:[[3,0,1,"interactive_.clearsession","clearsession"],[3,0,1,"interactive_.pdfgetter","pdfgetter"],[3,0,1,"interactive_.processfiles","processfiles"],[3,0,1,"interactive_.tuneconfig","tuneconfig"]],pdfgetx3:[[5,3,1,"cmdoption-pdfgetx3-b","--background"],[5,3,1,"cmdoption-pdfgetx3-bgscale","--bgscale"],[5,3,1,"cmdoption-pdfgetx3-composition","--composition"],[5,3,1,"cmdoption-pdfgetx3-c","--config"],[5,3,1,"cmdoption-pdfgetx3-createconfig","--createconfig"],[5,3,1,"cmdoption-pdfgetx3-d","--datapath"],[5,3,1,"cmdoption-pdfgetx3-f","--find"],[5,3,1,"cmdoption-pdfgetx3-force","--force"],[5,3,1,"cmdoption-pdfgetx3-format","--format"],[5,3,1,"cmdoption-pdfgetx3-ff","--formfactorfile"],[5,3,1,"cmdoption-pdfgetx3-h","--help"],[5,3,1,"cmdoption-pdfgetx3-i","--interact"],[5,3,1,"cmdoption-pdfgetx3-l","--list"],[5,3,1,"cmdoption-pdfgetx3-manual","--manual"],[5,3,1,"cmdoption-pdfgetx3-mode","--mode"],[5,3,1,"cmdoption-pdfgetx3-o","--output"],[5,3,1,"cmdoption-pdfgetx3-t","--outputtypes"],[5,3,1,"cmdoption-pdfgetx3-p","--plot"],[5,3,1,"cmdoption-pdfgetx3-qmax","--qmax"],[5,3,1,"cmdoption-pdfgetx3-qmaxinst","--qmaxinst"],[5,3,1,"cmdoption-pdfgetx3-qmin","--qmin"],[5,3,1,"cmdoption-pdfgetx3-rmax","--rmax"],[5,3,1,"cmdoption-pdfgetx3-rmin","--rmin"],[5,3,1,"cmdoption-pdfgetx3-rpoly","--rpoly"],[5,3,1,"cmdoption-pdfgetx3-rstep","--rstep"],[5,3,1,"cmdoption-pdfgetx3-s","--section"],[5,3,1,"cmdoption-pdfgetx3-twothetazero","--twothetazero"],[5,3,1,"cmdoption-pdfgetx3-verbose","--verbose"],[5,3,1,"cmdoption-pdfgetx3-V","--version"],[5,3,1,"cmdoption-pdfgetx3-w","--wavelength"],[5,3,1,"cmdoption-pdfgetx3-V","-V"],[5,3,1,"cmdoption-pdfgetx3-b","-b"],[5,3,1,"cmdoption-pdfgetx3-c","-c"],[5,3,1,"cmdoption-pdfgetx3-d","-d"],[5,3,1,"cmdoption-pdfgetx3-f","-f"],[5,3,1,"cmdoption-pdfgetx3-ff","-ff"],[5,3,1,"cmdoption-pdfgetx3-h","-h"],[5,3,1,"cmdoption-pdfgetx3-i","-i"],[5,3,1,"cmdoption-pdfgetx3-l","-l"],[5,3,1,"cmdoption-pdfgetx3-o","-o"],[5,3,1,"cmdoption-pdfgetx3-p","-p"],[5,3,1,"cmdoption-pdfgetx3-s","-s"],[5,3,1,"cmdoption-pdfgetx3-t","-t"],[5,3,1,"cmdoption-pdfgetx3-w","-w"]],plotdata:[[6,3,1,"cmdoption-plotdata-f","--find"],[6,3,1,"cmdoption-plotdata-h","--help"],[6,3,1,"cmdoption-plotdata-l","--list"],[6,3,1,"cmdoption-plotdata-L","--log"],[6,3,1,"cmdoption-plotdata-manual","--manual"],[6,3,1,"cmdoption-plotdata-s","--style"],[6,3,1,"cmdoption-plotdata-V","--version"],[6,3,1,"cmdoption-plotdata-L","-L"],[6,3,1,"cmdoption-plotdata-V","-V"],[6,3,1,"cmdoption-plotdata-f","-f"],[6,3,1,"cmdoption-plotdata-h","-h"],[6,3,1,"cmdoption-plotdata-l","-l"],[6,3,1,"cmdoption-plotdata-s","-s"],[6,3,1,"cmdoption-plotdata-x","-x"],[6,3,1,"cmdoption-plotdata-y","-y"]]},objnames:{"0":["py","function","Python function"],"1":["std","confval","configuration value"],"2":["std","interactvar","interactive variable"],"3":["std","cmdoption","program option"]},objtypes:{"0":"py:function","1":"std:confval","2":"std:interactvar","3":"std:cmdoption"},terms:{"0":[0,1,2,3,4,5,6,7,9],"00":7,"00000":9,"0000000e":7,"0001946e":7,"00032":9,"0003892e":7,"00055":[7,9],"0011677e":7,"00903":9,"00903_qmax18":9,"00904":9,"00905":9,"00906":9,"00907":9,"00908":9,"01":[1,7,9],"02":[1,7],"05":9,"07":1,"072":9,"075":9,"0865680161":9,"09":1,"095":9,"097":9,"0989":9,"0x3e20f50":9,"1":[0,1,2,3,5,6,7,9],"10":[1,2,3],"100":[3,9],"11":[1,9],"12":[1,9],"13":6,"14":9,"142774":[7,9],"1465":7,"15":[1,9],"16":[6,9],"17":9,"18":[3,9],"2":[0,1,2,3,4,5,6,7,9],"20":[3,6,9],"2008":9,"2009":4,"2013":4,"2018":[1,4],"2020":[1,4],"2021":1,"2022":1,"21":3,"22":9,"24":1,"240":9,"26":9,"27":[6,9],"28":9,"29":[8,9],"2\u03b8":[0,2,3,5,6,7,9],"3":[2,5,6,8,9],"30":9,"3000":9,"34":3,"36":9,"38":9,"3_copi":9,"4":[3,6,8,9],"4002724e":7,"451":9,"46":4,"5":[5,6,8,9],"5000":9,"51":4,"549":9,"560":4,"566":4,"5o3":5,"5zr0":5,"6":[6,7,8,9],"605":9,"64":6,"6id":9,"7":[2,3,5,8,9],"8":[2,6,8,9],"8003502e":7,"9":[2,5,6,8],"900":9,"903":9,"905":9,"908":9,"910":9,"947":9,"\u00e5":[0,2,3,5,6,7,8,9],"\u00e5ngstr\u00f6m":[0,5,7,8],"\u03b1":9,"boolean":8,"break":9,"case":[5,6,8,9],"class":[3,8],"default":[0,3,5,6,7,8,9],"do":[2,3,5,6,8,9],"final":[2,5,7,9],"float":[3,5],"function":[0,3,4,6,7,8,9],"import":[3,5,6,8,9],"int":3,"juh\u00e1":4,"long":[0,7],"new":[3,4,5,8,9],"null":9,"public":4,"return":[3,8],"short":7,"static":8,"true":[3,5,8,9],"try":[6,9],"while":[0,2,7,9],A:[3,4,5,7,9],At:9,By:[0,3,5,6,9],For:[2,3,4,5,6,7,9],If:[0,2,4,9],In:[2,3,4,5,6,7,8,9],It:[2,3,5,6],No:[3,5],On:2,One:[3,5,9],Such:9,The:[0,1,2,3,4,5,7,8,9],Then:2,There:[2,9],These:[2,3],To:[2,7,9],With:9,__git_commit__:8,__gitsha__:8,_exit_cod:8,_qmax18:9,abbrevi:9,abil:9,about:[5,7,9],abov:[2,3,9],accept:[0,8,9],access:[0,2,8],accomplish:[2,9],accord:[3,9],accur:9,accuraci:8,acknowledg:4,action:[5,9],activ:[0,2,3,7,9],actual:[0,2,8],ad:[3,4],add:[2,5,9],addit:[0,2,3,4,5,8,9],adjust:[4,9],advanc:[8,9],affect:[8,9],after:[0,5,6,9],again:[3,9],agre:2,agreement:4,al2o3:9,al:9,all:[0,2,3,5,6,7,8,9],allow:[3,4,5,6,8,9],alon:6,alreadi:[2,5,9],also:[0,2,3,4,5,6,7,8,9],altern:2,although:7,alwai:5,an:[0,2,3,4,5,6,7,8,9],anaconda:[2,8,9],analysi:4,anchor:8,angl:[0,1,4,5,7,8],angular:9,ani:[0,2,3,4,5,7,8,9],anoth:[2,9],anticip:4,anywher:9,apart:7,app:8,appear:[5,9],append:5,appl:4,appli:[0,3,9],applic:7,approxim:[8,9],apt:2,ar:[0,2,3,4,5,6,7,8,9],arbitrari:9,area:9,argument:[0,2,3,5,6,7,8,9],arrai:3,ask:4,assembl:[4,9],assess:9,assign:[3,5,7],assum:[5,6,7],atom:[4,5],attempt:0,attribut:[3,5,9],au:9,au_dna_ff:9,au_dna_npa:9,author:[1,8],auto:6,automat:[4,7,9],avail:[2,5,6,8,9],averag:[0,9],avoid:[8,9],ax:[3,6,8,9],axeslist:[3,9],axi:[3,8,9],b:[5,9],b_qmax18:9,back:8,background:[0,1,5,8],backgroundfil:[0,5,8,9],backslash:8,base:[3,9],basenam:5,batch:4,beamlin:9,becaus:[3,6,8,9],been:[5,7,9],begin:[3,5,9],behavior:[5,7],being:[5,7,9],below:9,best:7,beth:8,better:9,between:7,bgscale:[5,8,9],billing:4,binari:8,block:3,blue:9,bogu:8,bool:[3,5,8],both:[3,7,8,9],bound:[5,9],boundari:[5,7,9],box:9,brace:7,braci:[4,8],breakpoint:9,brief:[5,6,7],brookhaven:4,browser:[5,6],bug:8,build:8,built:9,bulk:9,bundl:[4,8],button:9,c:[0,2,4,5,7,9],calcul:[0,3,5,7,8,9],calibr:9,call:[3,6,9],callabl:3,camel:8,can:[0,2,3,4,5,6,7,8,9],cannot:[6,8,9],canopi:2,cap:9,capabl:[6,7],capillari:9,carri:9,catio3:5,caus:[8,9],cell:9,cfg:[0,7,8,9],ch2:5,ch3:5,ch:4,chain:9,chang:[0,3,9],charact:[3,5,7,9],check:[0,2,6,7,9],checkbox:8,chemic:[0,5,7,8,9],chi:[5,7,9],chia:4,choos:2,christoph:4,circl:9,cite:4,citi:4,clear:[3,5,9],clearsess:[3,8,9],clf:9,cli:8,click:9,close:9,closer:5,cmi:9,co:6,code:[2,4,9],colloid:9,columbia:[2,4,9],column:[0,2,3,5,6,7,8,9],combin:6,comma:[3,5,6,9],command:[0,1,3,4,5,6,8,9],comment:[0,7],compar:[8,9],compat:[2,8],complain:9,complet:[5,9],compon:5,composit:[0,5,7,9],comprehens:2,comput:[2,8],conda:[2,8,9],conduct:9,config:[0,3,5,7,8,9],config_neutron:9,config_sa:9,config_xrai:9,configfil:9,configsect:9,configur:[1,3,7,8],confirm:9,conjunct:6,connor:[4,8],consid:3,consist:7,constant:[3,4,5,8,9],contact:4,contain:[0,2,3,5,6,7,8,9],content:[0,7,9],continu:9,contributor:8,control:[4,5,6,9],conveni:[2,3,6,7],convent:6,convers:[2,5],convert:[3,4,5,9],copyright:4,correct:[0,4,5,8,9],correctli:[2,7,9],correspond:[0,3,5,7,8,9],could:[6,8],count:5,counterpart:7,coupl:8,cours:2,cover:[5,9],crash:8,creat:[0,2,3,5,7,9],createconfig:[0,5,7],critic:[2,7],cromermann:8,crystallogr:4,cube:6,current:[0,3,5,6,8,9],curv:[5,7,9],custom:[2,4,5,8,9],cutoff:[5,7,9],d:[0,4,5,9],dash:[5,7],dat:[5,6,8,9],data:[0,1,2,3,4,5,7,8],datafil:[3,5],dataformat:[0,3,5,7,9],datapath:[0,5,8,9],dataset:[8,9],davi:4,debug:5,decai:5,dedic:9,defin:[0,2,3,5,7,9],definit:5,degre:[0,5,7,8,9],delft:9,demonstr:[7,9],denot:[7,8],depend:[2,3,8],der:9,describ:[7,9],descript:[5,7],design:9,desir:[2,3,9],detail:[5,6,9],detector:[5,9],diagnost:5,dialog:[3,8,9],did:9,differ:[0,2,5,7,9],difficult:9,diffpi:[0,2,3,4,5,6,7,8,9],diffract:[0,3,4,5,7,8,9],diffractomet:[5,8,9],dir1:[5,8],dir2:[5,8],dir3:8,dir:[3,8],directoi:9,directori:[0,2,3,5,6,7,8,9],disabl:5,discuss:9,disk:3,displai:[2,3,5,6,7,9],distribut:[2,4,8,9],dna:9,doc:[0,1,2,3,4,5,6,7,8,9],document:[6,7,8,9],doe:[2,3,7,9],don:[2,4],done:[6,9],dot:8,dotfil:[3,8],doubl:[5,6,7],download:2,driven:[2,9],drop:9,duplic:[8,9],dure:8,dynam:9,e:[2,3,4,5,6,7,8,9],each:[0,3,5,8,9],easi:[2,9],easiest:[0,2],easy_instal:2,editor:[0,2,7],edu:4,effect:[3,4,5,9],egg:[2,8],eijck:4,either:[0,3,5,7,8,9],elaps:9,electron:8,element:[3,5,9],email:4,employ:4,empti:[3,5,9],empty_capillari:9,enabl:[7,8],enclos:5,encount:9,encourag:6,end:[3,5,8,9],engin:2,enhanc:[2,8],enough:3,enter:[7,9],enthought:2,entir:3,entri:[3,5,8,9],environ:[2,8,9],equal:[0,3,5,7,9],equival:[6,8,9],error:[5,8,9],essenti:[5,9],etc:[3,8,9],even:9,everi:5,everyth:8,exact:9,exampl:[0,1,2,3,4,5,7,8,9],except:[0,8,9],execut:[2,7,9],exist:[2,5,8,9],exit:[5,6,7,9],expand:[5,9],expans:6,expect:[5,9],experi:5,experiment:9,explanatori:8,explicit:8,explicitli:[3,5,7,8],extens:[2,5,8,9],extra:[2,3,5,8,9],extract:[1,4,9],f007:5,f2avg:5,f77:5,f7:5,f:[0,2,3,5,6,7,8,9],fact:9,faction:9,factor:[0,5,7,8,9],failur:8,fals:[3,5],familiar:7,farrow:4,fashion:[2,7],fast:9,favg2:5,favorit:0,featur:[6,9],februari:1,felectronatq:8,few:[0,7,9],ff:5,fft:9,fig:9,figur:9,file10:6,file11:6,file12:6,file13:6,file1:6,file20:6,file2:6,file9:6,file:[1,2,3,4,7,8],filenam:[0,2,3,5,6,7,8,9],find:[0,2,3,5,6,8,9],findfil:[0,2,3,5,6,7,8,9],finish:9,first:[0,2,3,5,6,7,9],fit2d:7,fit:[0,1,5],fix:5,fl:6,flag:[8,9],fledg:9,flexibl:5,folder:9,follow:[0,2,4,5,6,8,9],folow:7,forc:[3,5,8,9],form:[0,5,7,9],format:[2,3,5,6,7,8],formfactorfil:[5,9],formula:[5,8],forward:[8,9],found:[0,2,9],four:0,fourier:[5,7],fq:[0,3,5,7,9],fraction:[5,8],frequenc:5,fresh:9,from:[0,2,3,4,5,6,7,8],front:5,full:[6,8,9],fulli:9,funct:8,further:5,g:[0,2,3,5,6,7,8,9],gang:[4,9],gca:3,gener:[0,3,6,7,8,9],get:[2,7,9],gettransform:9,give:[5,8],given:[8,9],global:[0,8],go:9,good:9,gr:[0,3,5,7,8,9],grant:4,graph:[6,9],greater:3,green:9,grid:[0,5,8,9],group:[3,4,5,8,9],gui:[2,3,9],guid:1,h:[5,6],ha:[0,3,5,6,7,9],had:9,handl:[8,9],hao:4,happen:9,hash:7,have:[0,2,3,5,7,8,9],header:[0,3,7,9],headlin:6,help:[5,6,7,9],here:[2,5,6,7,9],hidden:3,higher:[3,5],highli:4,hint:9,hoc:4,hold:8,holder:5,home:[0,9],how:9,howev:[5,9],http:[0,1,2,3,4,5,6,7,8,9],human:8,hundr:9,hung:4,i:[0,2,3,5,6,7,8,9],ident:[7,8],identifi:[0,9],ignor:[0,3,5,7,8,9],illustr:9,immedi:9,impli:[7,9],implicit:[6,8],improv:8,inaccur:[8,9],includ:[2,3,4,6,7,8,9],inclus:[3,5],incorrectli:8,increas:8,inde:7,indent:2,index:[1,2,3,6,9],indic:[3,6,9],info:[5,6,7,9],inform:[4,5,7],initi:[3,6,8],inlin:8,input1:7,input2:7,input:[1,3,6,7,8],inputfil:[0,3,5,9],inputn:7,instal:[1,7,8,9],instanc:3,instanti:8,instead:[2,6,7,8],instruct:[2,8,9],instrument:9,integ:[3,5,6,9],integr:2,intend:[2,5,6,7,9],intens:[0,3,5,7,9],intensity1:3,intensity2:3,interact:[1,2,4,5,6,7,8],interactiveshellapp:2,intermedi:[3,4,9],intern:[8,9],internet:2,interpol:8,interpret:[2,5],intervent:4,introduct:1,invari:9,invers:[0,5,7],invok:6,involv:9,ipy_mag:[2,8],ipy_pdfgetx3:8,ipynb:9,ipython3:2,ipython:[1,3,5,6,7,8,9],ipython_config:2,iq:[0,3,5,9],iraw:[3,9],issu:9,item:[3,5],iter:3,its:[5,6,7,9],itself:0,j:[3,4,8],jank:4,join:7,jupyt:9,just:[0,6,9],k:3,kapton:9,kapton_bgrd_300k_nor_2:9,keep:[3,6],keyword:[3,9],kirkland:8,know:4,known:9,kwarg:3,l:[4,5,6,9],label:[6,8],laboratori:4,lack:9,languag:2,larg:[5,6,9],larger:5,last:[3,5,6,9],later:8,lead:[2,3,4,5,7],learnt:8,least:3,left:5,legend:9,leli:9,let:9,level:[3,5],lf:9,li:4,librari:[2,4],licens:1,like:[2,6,9],likewis:8,limit:5,line2d:[0,2,3,5,6,7,9],line:[0,2,3,4,5,6,7,8,9],linear:[3,6],linux:[2,9],list:[3,5,6,8,9],liu:4,live:9,load:[3,5,6,7,8,9],loaddata:[0,2,3,5,6,7,8,9],loadtxt:3,loc:9,local:8,locat:0,log:[3,6,8],logarithm:[3,6,8],lone:8,look:[3,7,9],lookup:8,louwen:4,low:[3,9],lower:[5,9],lowercas:8,m2r2:8,m2r:8,m:[2,3,5,9],mac:[2,9],made:9,magic:[1,8],mai:[0,2,3,5,6,7,8,9],make:[5,7,9],manag:2,mandatori:0,mani:7,manipul:[8,9],manual:[1,5,6,7,8],mark:[0,7],marker:6,match:[2,3,5,6,8],materi:9,matplotlib:[2,3,6,8,9],matric:3,matrix:[3,9],max:[0,2,3,5,6,7,9],maximum:[5,9],may:9,mean:9,meaning:[5,7,9],measur:[0,5,7,9],member:4,memori:3,mention:9,messag:[5,8,9],metadata:[0,7],method:[3,9],microscopi:8,might:5,mind:6,minimum:3,minor:8,minrow:3,misc:3,miss:8,mode:[1,2,4,5,7,8,9],modifi:[6,7,8],modul:[3,8],momentum:[0,5,7,9],more:[2,3,4,5,7,9],most:[0,3,6,9],mott:8,move:9,multipl:[0,1,8],multiple_background_subtract:[8,9],must:[0,2,3,4,5,6,7,8],n:[3,4,5,9],nacl:0,name:[0,2,3,5,6,7,8],nanomet:[0,5,7],nanoparticl:[4,9],napoleon:8,nation:4,natur:9,navig:[2,9],nbcmi:9,ndarrai:3,nearli:7,necessari:[2,3,5,9],need:[0,2,5,6,9],neg:3,nep:8,neutron:[1,4,5,7,8],next:[2,9],ni300mesh_300k_nor_1:9,ni:9,nickel:1,nickel_sub_two_half_background:9,nicmd:9,nois:5,noisi:[5,9],non:[3,9],none:[3,5,9],nonzero:9,normal:[0,5,9],notabl:9,note:[1,3,5,6,7,9],notebook:9,noth:9,notic:[1,9],now:[8,9],np:8,nsl:9,number:[3,5,9],numer:[0,6,9],numpi:[2,3,8],nykypanchuk:9,o3:8,o:[4,5,9],object:[3,5,8,9],obsolet:8,obtain:[2,9],obtainin:9,off:5,offset:[5,8,9],often:[5,7],oh:5,older:2,oleg:9,omit:5,onc:[0,2,3,5,8,9],one:[2,3,5,6,8,9],ones:5,onli:[0,3,4,5,6,7,8,9],open:[2,5,6,7,8,9],oper:[1,2,6,7,8],optimum:4,option:[0,1,2,3,6,7,8,9],order:[5,7,9],org:[0,1,2,3,4,5,6,7,8,9],orient:2,origin:9,os:9,oscil:9,other:[0,1,2,3,7,8,9],otherwis:[2,5],out:[5,6,9],outpufil:9,output:[1,3,7,8],outputtyp:[0,5,9],outsid:9,overal:9,overlap:[5,9],overrul:9,overwrit:[5,8,9],own:[5,9],p:[4,5],packag:[1,2,8],page:[1,6],pair:[3,4],paper:4,paragraph:2,paramet:[0,1,3,4,7,8],parent:9,parenthes:[5,8],pars:9,part:[2,9],parti:[2,4],pass:[0,3,6,7,9],path:[0,2,3,5,8],pattern:[0,3,5,6,8,9],pavol:4,pb:[5,8],pbti0:5,pdf:[1,2,3,4,7,8],pdfconfig:[3,8],pdfgetn3:[0,1,2,3,4,5,8,9],pdfgets3:[1,2,4,5,8,9],pdfgetter:[3,5,8,9],pdfgetx2:[3,9],pdfgetx3:[0,1,2,3,4,5,6,8,9],pdfgetx3path:8,pdfgetx:[0,2,3,4,5,6,7,8,9],pdfgetx_env:2,pdfgetxn3:[0,1,2,3,4,5,6,7,8,9],pdfgetxns3_manu:8,pearl:9,per:[0,5,6,8,9],perform:[3,9],perman:2,permit:[4,5],permut:9,photon:9,pi:8,pip:[2,9],place:[2,9],plain:5,plan:2,platform:[8,9],platinum:1,pleas:[4,7],plot:[0,2,3,4,5,6,7,8,9],plotdata:[0,1,2,3,5,7,8,9],plotid:3,plotpdfcomparison:9,plural:[8,9],point:[3,8,9],polici:8,polynomi:[0,5,9],pop:9,posit:[5,8],possibl:5,powder:[0,3,4,5,7,9],power:[4,9],pre:[3,6],preced:[3,5,6,7],prefer:7,prefix:2,preload:9,prepend:[2,5],prerequisit:9,present:[5,7,8,9],preserv:[2,8],press:7,previou:[0,3,8],previous:[5,7,8],print:[3,5,7,9],privileg:2,problem:9,procedur:9,process:[0,2,3,4,5,6,7,8],processfil:[3,8,9],produc:[0,3,5,6,9],prof:[4,9],profil:2,profile_default:2,program:[0,1,2,3,4,7,8,9],prohibit:4,prompt:[2,6,9],proper:[5,8],protocol:9,provid:[0,2,5,6,8,9],pt:9,pt_bulk:[7,9],pt_bulk_ramp03:9,publish:9,pure:8,purpos:8,push:8,put:9,py:[2,9],pyplot:[3,6,8],python37:2,python3:2,python:[1,2,4,5,6,8,9],pythonxi:2,q:[0,2,3,5,6,7,8,9],qa:[5,9],qmax:[3,5,7,8,9],qmaxinst:[5,7,8,9],qmin:[5,8,9],qnm:5,qualiti:9,quick:1,quot:[5,6,9],r:[0,2,3,4,5,6,7,9],radiat:[5,7],rai:[1,4,5,7],rang:[3,5,6,8,9],rapid:4,rather:8,raw:[3,9],read:[0,3,5],readabl:8,reason:9,recalcul:9,recip:8,recogn:[6,9],recommend:[2,9],red:9,redo:[7,9],reduc:[0,7,9],refer:[1,3,7,9],referenc:7,refin:9,reflect:8,regular:[0,9],rel:9,relat:[3,7,9],releas:[1,2],relev:9,reliabl:9,remark:9,remov:[5,9],renam:8,repeat:[5,8],replac:[2,9],report:5,repositori:2,reproduc:[0,8],requir:[1,5,7,8,9],resampl:9,rescal:9,research:4,reset:[3,5,9],residu:9,resolv:9,respect:[3,4,7,8,9],result:[0,3,4,5,7,9],reus:[3,5,8,9],right:7,rmax:[5,9],rmin:[5,9],root:2,round:9,row:[3,6,9],rpoli:[5,8,9],rstep:[5,8,9],run:[2,4,7,8,9],s:[0,2,3,4,5,6,7,9],sa:[4,5,7,8,9],safe:[2,9],safer:8,safeti:9,same:[0,2,3,5,6,7,8,9],sampl:[0,5,7,9],sapphir:9,sapphire755:9,saspdf:[1,4],satisfi:3,save:[3,5,6,7,9],sb2896:4,scalar:8,scale:[3,5,6,8,9],scan:[7,9],scatter:[0,1,3,4,5,7,8],scienc:2,scientif:[2,4],screen:9,script:[2,4,8],search:[0,1,2,3,5,6,7,8],second:[0,3,6,7,9],section:[0,2,5,6,7,8,9],sectionnam:[0,5],see:[2,5,6,8,9],seem:3,select:[0,1,3,5,8,9],selector:3,self:9,separ:[0,3,4,5,6,7,8,9],sequenc:3,sequenti:3,seri:[1,4],serv:3,session:[2,3,5,6,7,8,9],set:[0,2,3,5,6,7,8,9],setup:[5,8,9],setuptool:[2,8],sever:[0,3,5,6,9],sh:8,shall:9,shape:9,share:[0,9],shell:[2,3,5,6,7,8,9],shortcut:9,shorter:5,should:[0,2,3,8,9],show:[3,6,9],side:9,sign:7,signal:5,similar:[2,6,7,9],similarli:9,simon:4,simpl:[0,4,6,7,8,9],simpli:9,simul:9,sin:6,sinc:9,sinco:6,sine:3,singl:[2,3,5,6,7,8,9],singularli:8,six:2,skip:[2,3],slash:[8,9],slice:[3,8],slider:[8,9],slightli:9,slist:8,small:[1,4,5,7,8],smaller:5,smooth:5,so:[2,6,7,9],softwar:[1,4,6,7,8,9],solid:0,solut:9,some:[2,5,9],songsheng:4,sourc:9,space:[0,5],special:[3,5,6,9],specif:[2,6,8,9],specifi:[0,3,5,6,7,8,9],specimen:5,spectra:9,sphinx:8,split:3,sq:[0,3,5,9],squar:6,sr:6,stai:9,stand:[6,7],standard:[2,5,9],start:[0,1,2,3,5,6,8,9],state:9,statement:[5,9],step:[2,6,7,9],still:9,stoichiometri:[5,8],stop:[6,8],store:[3,9],str:3,string:[2,3,5,7,8,9],strip:9,structur:[0,7],style:[3,6,8],sub:8,subdirectori:9,subfold:9,subject:4,subplot:[3,9],subsequ:[3,5,8,9],substr:9,subtract:[1,8],successfulli:9,sudden:9,sudo:2,suffici:3,suffix:9,suitabl:9,summari:7,suppli:7,support:[0,2,3,5,6,8],suppress:5,symbol:[3,5,8],symlink:8,synapt:2,syntax:[0,3,5,6,9],system:[2,3,6,9],t4:9,t:[0,2,3,4,5,7,9],tabl:8,tail:5,take:[3,7,8],taken:[5,9],talapin:4,tao:4,technolog:[2,9],tell:7,temperatur:9,templat:[0,5],tend:9,termin:[2,9],terribl:9,test:[0,2,8],test_blank:9,text:[0,2,3,5,6,7,9],than:[0,3,8,9],thank:9,thatcher:8,thei:[0,2,3,5,6,9],them:[0,3,4,5,6,7,8,9],thereaft:9,therefor:[2,5,7,9],theta:7,thi:[0,2,3,4,5,6,7,8,9],third:2,those:[2,3,9],three:[2,4,5],threshold:5,through:[7,8],thu:[0,2,6,7,9],ti:[5,8],tif:7,time:[5,8,9],timothi:4,timur:4,togeth:[6,9],token:[5,9],told:7,too:5,tool:[2,7,8],top:9,total:[0,4,8,9],trail:5,transfer:[0,5,7,9],transform:[3,5,7,9],transformbackground:9,transformfqgrid:9,transformfqtogr:9,transformqgridregular:9,transformsqnormrpoli:9,transformsqtofq:9,transformtwothetatoqa:9,transformxrayasfnormchri:9,translat:3,transpos:3,truste:4,tunabl:9,tune:[1,3,4,5],tuneconfig:[3,8,9],tupl:3,turn:[5,9],tutori:[1,3,5,7,8],two:[0,5,7,9],twotheta1:3,twotheta2:3,twotheta:[5,7,9],twothetazero:[1,5,8],txt:8,type:[0,2,3,5,7,8,9],typic:7,ubuntu:2,uncorrect:9,undefin:5,under:[4,8,9],understood:[0,9],unexpect:5,unicod:8,uniqu:[5,6,9],unit:[0,5,7,8],unittest:8,univers:[4,8,9],unix:[2,5,9],unless:[5,7,8,9],unpack:3,unreli:5,unseemli:9,unsupport:8,up:[0,2,3,9],updat:[3,7,9],upon:9,upper:[5,7],us:[1,2,3,4,5,6,7,8,9],usag:[5,6,8],usecol:[3,8],user:[0,1,2,4,5,6,7,8,9],usual:[0,2,9],util:[4,6],utilis:4,v:[4,5,6],valid:[0,2,5,9],valu:[0,3,4,5,6,7,8,9],van:[4,9],variabl:[2,3,6,8,9],variant:5,varnam:0,ventur:2,verbos:[5,7,9],veri:[2,5,7,9],verifi:[2,5,7,9],version:[1,2,5,6,9],via:[8,9],virtual:[2,7],visual:[4,9],vogt:4,vuong:4,w0:7,w:[5,9],wa:[4,8,9],wai:[0,2,6,7,8,9],want:2,warn:[5,9],wavelength:[4,5,7,8,9],we:[2,4,7,9],web:[5,6],well:[2,7,9],were:[0,2,5,7,9],what:[0,3,5,9],wheel:[2,8],when:[0,2,3,5,6,7,8,9],where:[0,5,6,7,9],wherea:7,whether:4,which:[2,3,4,5,6,8,9],whitespac:3,whl:[2,9],who:2,whole:9,wide:3,window:[2,5,6,7,8,9],within:[2,5,6,8],without:[4,5,8,9],word:5,work:[0,2,3,5,6,7,8,9],wors:9,would:[0,2,3,5,6,9],wright:4,writabl:2,write:[5,7,9],written:[2,4,5,9],www:[0,1,2,3,4,5,6,7,8,9],x21:9,x:[0,1,3,4,5,7,8],xrai:[5,9],xy:6,y:[0,1,3,8,9],ye:[5,8,9],yet:[4,7,9],yield:7,york:4,you:[0,2,4,9],your:[0,4,9],z:9,zach:8,zero:[3,5,8,9],zip:[0,1,2,3,4,5,6,7,8,9],zoom:9,zr:[5,8]},titles:["Files used in PDF extraction","diffpy.pdfgetx","Installation","Interactive mode","Introduction","Options and parameters","The plotdata program","Quick-start guide","Release notes","Tutorial"],titleterms:{"0":8,"01":8,"02":8,"07":8,"09":8,"1":8,"10":8,"11":8,"12":8,"15":8,"2":8,"2018":8,"2020":8,"2021":8,"2022":8,"24":8,The:6,ad:8,angl:9,author:4,background:9,chang:8,command:[2,7],configur:[0,5,9],content:1,data:[6,9],deprec:8,diffpi:1,exampl:6,extract:0,file:[0,5,6,9],fit:9,fix:8,from:9,guid:7,indic:1,input:[0,5,9],instal:2,interact:[3,9],introduct:4,ipython:2,licens:4,magic:2,match:9,mode:3,multipl:9,name:9,neutron:9,nickel:9,note:8,notic:4,oper:5,option:5,other:5,output:[0,5,9],paramet:[5,9],path:9,pdf:[0,5,9],pdfgetn3:7,pdfgets3:7,pdfgetx3:7,pdfgetx:1,platinum:9,plotdata:6,predefin:9,process:9,program:[5,6],quick:7,rai:9,refer:4,releas:8,remov:8,requir:2,saspdf:9,scatter:9,scratch:9,search:9,select:6,seri:9,small:9,softwar:2,start:7,subtract:9,tabl:1,tune:9,tutori:9,twothetazero:9,us:0,version:8,x:[6,9],y:6}}) \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.0/tutorial.html b/static_root/doc/pdfgetx/2.2.0/tutorial.html deleted file mode 100644 index c68e86aa..00000000 --- a/static_root/doc/pdfgetx/2.2.0/tutorial.html +++ /dev/null @@ -1,889 +0,0 @@ - - - - - - - Tutorial — diffpy.pdfgetx 2.2.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Tutorial

-

In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the examples -folder included with the PDFgetX3 distribution. The examples -folder can be found in the parent “doc” directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -https://www.diffpy.org/doc/pdfgetx/2.2.0/pdfgetxn3-examples.zip.

-
-

Nickel X-ray PDF

-
-

predefined configuration file

-

Change to the Ni directory. The file named -ni300mesh_300k_nor_1-5.chi contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the 2Θ scattering -angles and X-ray intensities. The second file -kapton_bgrd_300k_nor_2-3.chi contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the pdfgetx3.cfg contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -pdfgetx3 program -with the powder data file as an argument:

-
$ pdfgetx3 ni300mesh_300k_nor_1-5.chi
-
-
-

For the first run there should be no output on the screen, -however a new file, ni300mesh_300k_nor_1-5.gr should appear -in the work directory. -We can use the plotdata program, -included with this software, to plot the output data:

-
$ plotdata ni300mesh_300k_nor_1-5.gr
-
-
-

This will open a graph window and start an IPython interactive session. -To exit and close the figure, type exit() on the IPython prompt. -Let’s run the program again, but now with a ---verbose=info -option, to show more details about the program actions.

-
$ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi
-
-INFO:applying pdfgetx3 defaults
-INFO:set config.mode = xray
-INFO:searching for default config file /home/user/.pdfgetx3.cfg
-INFO:searching for default config file .pdfgetx3.cfg
-INFO:searching for default config file pdfgetx3.cfg
-INFO:loaded default config file pdfgetx3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi
-INFO:set config.outputtypes = gr
-INFO:set config.wavelength = 0.142774
-INFO:set config.composition = Ni
-INFO:set config.qmaxinst = 26.5
-INFO:set config.qmax = 26.0
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 30.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'xray'
-INFO:calling config_xray
-INFO:started PDF processing.
-INFO:processing 'ni300mesh_300k_nor_1-5.chi'
-INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr'
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-INFO:elapsed time: 0.095
-
-
-

Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the --verbose option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the --force=yes option, upon -which pdfgetx3 would overwrite any existing files.

-

PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the --c option. Another option, --plot=[iq,sq,fq,gr] turns on plotting of the final PDF or of some other result. A -side effect of the --plot option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function F(Q) and the PDF curve G(r). This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:

-
$ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr
-
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-
-Variables related to PDF processing:
-
-pdfgetter    -- PDFGetter used for calculation.
-config       -- configuration data used by PDFGetter.
-                See config.inputfiles for a list of inputs.
-iraw         -- matrix of input raw intensities with 2 rows per file.
-iq sq fq gr  -- intermediate results per each input file stored
-                as matrix rows.
-
-Functions:
-
-tuneconfig   -- dynamically tune configuration variables.
-processfiles -- process specified data files.
-clearsession -- clear all elements from the inputfiles, iraw,
-                iq, sq, fq and gr variables.
-plotdata     -- plot all or selected columns from a text data file.
-loaddata     -- load all or selected columns from a text data file.
-findfiles    -- search for files matching the specified patterns.
-
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-In [1]:
-
-
-

This will open a plot figure similar to

-_images/nickelfqgr.png -

Because of the interactive mode implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -config variable stores all the configuration parameters, -and its content can be displayed with the print() -function as

-
In [1]: print(config)
-
-configfile = ni300mesh_300k_nor_1-5.gr
-configsection = DEFAULT
-dataformat = twotheta
-...
-qmax = 26.0
-...
-
-
-

The processfiles() function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the F(Q) and G(r) -curves calculated at Qmax = 22 Å-1, we can call -processfiles() and pass it a keyword argument for -the new qmax as follows:

-
In [2]: processfiles(qmax=22)
-
-# the qmax parameter was updated to a new value, thus
-In [3]: config.qmax
-Out[3]: 22
-
-
-

There should be now two lines in each plot axis corresponding to -the results at Qmax equal 26 and 22 Å-1. To exit the program, -type exit().

-
-
-

processing from scratch

-

We have already encountered the command-line option -c -for specifying a custom configuration file. A special argument “NONE”, -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-ERROR:Configuration error: wavelength not specified.
-ERROR:See "--help" for more hints.
-
-
-

There is an error, for the wavelength is necessary to convert -the scattering angle 2Θ to momentum transfer Q. The -X-ray wavelength was 0.142774 Å, which can be passed with the --w, --wavelength option:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774
-
-...
-ERROR:Configuration error: Chemical composition not known.
-ERROR:See "--help" for more hints.
-
-
-

There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the --composition option. The example -below uses a “\\” character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-...
-
-
-

There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the -t, --outputtypes option. -The outputtypes option recognizes the following result types: -“iq”, “sq”, “fq”, “gr”. One or more of these type strings, -separated by a comma, can be included with the --t option, which will produce the corresponding -output files. An empty string, such as -t "", or -t NONE -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings.

-

At this point, we will not write any output files, but will use the ---plot option to display the calculated curves. The ---plot accepts the same arguments as outputtypes, so to -display the F(Q) and G(r) curves we shall run

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni --plot=fq,gr
-
-WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161
-WARNING:qmax reset to the data boundary qmaxinst=28.0865680161
-
-
-

which should open the following plot window:

-_images/nickelfqgrnoisy.png -

The graphs look terrible. The PDF is very noisy and the F(Q) curve -shows a sudden break at about 27 Å-1. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -iraw, iq, sq, -fq, gr -variables for the original raw data and intermediate results. We -are going to plot the “iq” variable that has the input intensities -resampled on the Q grid. The matplotlib function -clf() clears the figure, -the iq variable is a two-row matrix with Q and I rows, and the -axis() -function lets us zoom to a given range:

-
In [1]: clf()
-In [2]: plot(iq[0], iq[1])
-Out[2]: [<matplotlib.lines.Line2D at 0x3e20f50>]
-In [3]: axis([20, 29, 0, 3000])
-Out[3]: [20, 29, 0, 3000]
-
-
-

The graph shows a sudden drop in the raw intensities at 27 Å-1. -The qmaxinst variable defines a Q cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 Å-1

-
In [4]: processfiles(qmaxinst=26.5)
-WARNING:qmax reset to the data boundary qmaxinst=26.5
-
-
-

The updated curves looks reasonable without any oscillations and -breakpoints. The tuneconfig() function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type tuneconfig() to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the F(Q) and G(r) curves change. -The rpoly parameter controls the degree of data-correction -polynomial and is an approximate low-r bound of reliable G -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the G(r) -curve and save it to an output file nicmd.gr:

-
In [14]: config.qmax = 26
-In [15]: config.outputtypes = 'gr'
-In [16]: config.output = 'nicmd'
-In [17]: processfiles()
-
-
-
-
-
-

Platinum X-ray series

-

PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(z-shell being a notable exception).

-
-

matching input files

-

The pdfgetx3 program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the -f, --find option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option --l, --list makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files.

-

We will try out this file search on platinum example files. Open a -terminal and navigate to the Pt directory. There should be a -series subdirectory with 6 chi files indexed from 903 to 908. -At first, let’s stay in the Pt directory and run the following -command

-
$ pdfgetx3 --list --find
-
-Pt_bulk-00055-pdfgetx2.gr
-Pt_bulk-00055-pdfgetx3.gr
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-pdfgetx3.cfg
-plotpdfcomparison.py
-
-
-

Without any patterns the file search matches all files in the current -directory. Now let’s try to add name patterns. There are few special -patterns, for example ^ matches at the beginning of the filename, $ at the end and <N-M> matches a range of integer values from -N to M. The patterns containing ^$<> need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works.

-

Filenames containing “y”:

-
$ pdfgetx3 --list --find y
-empty_capillary-00032.chi
-plotpdfcomparison.py
-
-
-

Filenames that containing both “y” and “chi”, here we use the -options --list and --find in an abbreviated -form -l and -f:

-
$ pdfgetx3 -lf y chi
-empty_capillary-00032.chi
-
-
-

Filenames that start with “e”:

-
$ pdfgetx3 --list --find "^e"
-empty_capillary-00032.chi
-
-
-

Filenames that contain character “2”:

-
$ pdfgetx3 --list --find 2
-Pt_bulk-00055-pdfgetx2.gr
-empty_capillary-00032.chi
-
-
-

Filenames that contain numeric value “2”:

-
$ pdfgetx3 -lf "<2>"
-Pt_bulk-00055-pdfgetx2.gr
-
-
-

The special argument + starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both “bulk” and “chi” substrings and then -also those that have “empty” and “chi” in their names, use:

-
$ pdfgetx3 -lf bulk chi + empty chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-

When pattern groups overlap the resulting matches are -made unique and each file is listed only once

-
$ pdfgetx3 -lf bulk chi + chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-
-
-

data search path

-

Each group of PDFgetX3 patterns can have one entry containing -forward slash “/” to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered “903” to “905” and “908” from the -series subdirectory can be therefore matched using

-
$ pdfgetx3 -lf series/ "<903-905>" + 908
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-

The current directory can be selected using ./

-
$ pdfgetx3 -lf series/ 903 + ./ bulk chi
-series/Pt_bulk_ramp03-00903.chi
-Pt_bulk-00055.chi
-
-
-

When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -“.chi”-ending files in the current and series -directories can be thus found using

-
$ pdfgetx3 -lf ".chi$" + series/
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00906.chi
-series/Pt_bulk_ramp03-00907.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-
-
-

output file names

-

By default the output files are saved in the current directory. The -output path, can be changed with the -o, --output option. -The -o recognizes several tokens that are replaced with -parts of the input file name, for example, “@b” expands to an -extension-stripped base name. In similar faction, “@o” is replaced -with the output type extension. Thus to generate PDFs for all files -in the series directory and save them in the -series-gr subfolder do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o
-
-
-

The extension “.@o” is automatic when not included anywhere in the -output file name. Thus to process the Pt series at Qmax = 18 Å-1 -while saving the results in the same folder, but with a “_qmax18” suffix -in their filenames do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18
-
-
-

For input file Pt_bulk_ramp03-00903.chi the -o option -above expands to output path series-gr/Pt_bulk_ramp03-00903_qmax18.gr. -The series-gr directory should now contain 12 “gr” files, -6 of them processed at Qmax = 27 Å-1 as given by configuration -file and 6 others processed at Qmax = 18 Å-1.

-
-

See also

-

-o, --output for a list of output tokens

-
-
-
-
-

Interactive tuning of parameters

-

One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the Ni directory in the shell and process -the nickel PDF while plotting the F(Q) and G(r) curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -tuneconfig() -function from the IPython environment

-
$ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi
-...
-In [1]: tuneconfig()
-
-
-

The -tuneconfig() -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot.

-_images/tunenickelfqgr.png -

The constant data scale check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -PDF parameters section. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the bgscale parameter -if PDF has been processed without any background data.

-

By default the -tuneconfig() -function displays the same curves as -specified by the --plot option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the describe() method of the -pdfgetter() object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object t4 that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the tuneconfig() function

-
$ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi
-...
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-
-In [1]: fig, ax = subplots(2)
-In [2]: pdfgetter.describe()
-0   TransformTwoThetaToQA
-    convert x data from twotheta to Q in 1/A
-1   TransformQGridRegular
-    Remove the data outside the (qmin, qmaxinst) range
-2   TransformBackground
-    subtract background intensity
-3   TransformXrayASFnormChris
-    scale and normalize intensities by x-ray scattering factors
-4   TransformSQnormRPoly
-    Normalize S(Q) by fitting a polynomial
-5   TransformSQToFQ
-    Convert S(Q) to F(Q).
-6   TransformFQgrid
-    Resample F(Q) to a regular grid suitable for FFT
-7   TransformFQToGr
-    Convert F(Q) to G(r).
-In [3]: t4 = pdfgetter.getTransformation(4)
-In [4]: tuneconfig([t4, 'gr'], axeslist=ax)
-In [5]: ax[0].legend(loc=2)
-
-
-

The subplots() function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window:

-_images/tunenickelt4gr.png -

The tuning can be finished by clicking the Done button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the config -object, for example:

-
In [5]: config.bgscale = 1.5
-
-
-

Finally, to save the new results, we shall first confirm -outputtypes have been correctly set and then use the -processfiles() function to redo the calculations, plots and -data output for the updated configuration. Note that the -processfiles() function accepts keyword arguments for -configuration parameters. This is used at line In [8] to -turn on the force flag and is in effect a shortcut -for an extra config.force = True statement.

-
In [6]: config.outputtypes
-Out[6]: ['gr']
-In [7]: processfiles()
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-In [8]: processfiles(force=True)
-
-
-

ni300mesh_300k_nor_1-5.gr was successfully saved at an -updated configuration for there were no warnings after the last call.

-
-
-

Neutron PDF

-

This example illustrates PDF extraction from -neutron powder data using pdfgetn3. -Navigate to the n-Sapphire directory in the shell. -The sapphire755.dat file contains powder diffraction data from -sapphire (α-Al2O3) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The pdfgetn3.cfg configuration file specifies -processing parameters such as wavelength, -twothetazero, composition, and mode.

-

To extract the sapphire neutron PDF run

-
$ pdfgetn3 --verbose=info sapphire755.dat
-
-INFO:applying pdfgetn3 defaults
-INFO:set config.mode = neutron
-INFO:searching for default config file /home/user/.pdfgetn3.cfg
-INFO:searching for default config file .pdfgetn3.cfg
-INFO:searching for default config file pdfgetn3.cfg
-INFO:loaded default config file pdfgetn3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.mode = neutron
-INFO:set config.wavelength = 1.0989
-INFO:set config.twothetazero = -0.38
-INFO:set config.composition = Al2O3
-INFO:set config.qmaxinst = 11.2
-INFO:set config.qmax = 11.2
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 20.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'neutron'
-INFO:calling config_neutron
-INFO:started PDF processing.
-INFO:processing 'sapphire755.dat'
-INFO:resolved output file '' as 'sapphire755.fq'
-INFO:written outpufile sapphire755.fq
-INFO:resolved output file '' as 'sapphire755.gr'
-INFO:written outpufile sapphire755.gr
-INFO:elapsed time: 0.097
-
-
-

This will produce two files sapphire755.fq, sapphire755.gr -for the F(Q) and G(r) functions. -To compare them with expected results use

-
$ plotdata sapphire755-expected.fq sapphire755.fq
-$ plotdata sapphire755-expected.gr sapphire755.gr
-
-
-
-
-

Fit twothetazero

-

For a good quality PDF it is essential to use powder patterns with -accurate values of Q. Some instruments may produce spectra with -a slightly offset scattering angle 2Θ which -causes inaccurate Q and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the twothetazero correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples.

-

This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -diffpy.cmi, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use Anaconda Python and set up a dedicated -Anaconda environment nbcmi for this tutorial. -This can be accomplished using the following steps:

-
$ conda create -n nbcmi -c diffpy python=2 diffpy.cmi
-$ conda activate nbcmi
-$ pip install path/to/diffpy.pdfgetx-VERSION.whl
-
-
-

When these prerequisites are in place, -change to the n-twothetazero-fit directory -and open the self documented Jupyter notebook as follows

-
$ jupyter notebook fit-twothetazero.ipynb
-
-
-

The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted twothetazero. -After running all cells the notebook should produce similar graphs -as in the figure below.

-
-_images/twothetazerofit.svgz

Refinement of nickel neutron PDF for (a) uncorrected data -and (b) with a refined zero correction. -The extracted PDFs are plotted as blue circles, -simulated PDFs as red lines and -the difference is plotted offset in green below.

-
-

The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual Rw which is lowered from (a) 0.18 to (b) 0.05.

-
-
-

Small-angle-scattering PDF (sasPDF)

-

Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using pdfgets3. -To do this, navigate to the Au_DNA_NPA directory in your terminal. -In this folder, you will find Au_DNA_NPA.chi and -Au_DNA_FF.chi files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008).. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The pdfgets3.cfg -configuration file specifies processing parameters such as formfactorfile (required by sas mode), qmin, qmax, and mode.

-

To extract the PDF of DNA-capped DNA nanoparticle assemblies

-
$ pdfgets3 --verbose=info Au_DNA_NPA.chi
-
-INFO:applying pdfgets3 defaults
-INFO:set config.mode = sas
-INFO:searching for default config file /home/user/.pdfgets3.cfg
-INFO:searching for default config file .pdfgets3.cfg
-INFO:searching for default config file pdfgets3.cfg
-INFO:loaded default config file pdfgets3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = QA
-INFO:set config.backgroundfile =
-INFO:set config.datapath = []
-INFO:set config.formfactorfile = Au_DNA_FF.chi
-INFO:set config.output =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.force = yes
-INFO:set config.mode = sas
-INFO:set config.rpoly = 240.605
-INFO:set config.qmaxinst = 0.075
-INFO:set config.qmin = 0.01
-INFO:set config.qmax = 0.072
-INFO:set config.rmin = 100.0
-INFO:set config.rmax = 5000.0
-INFO:set config.rstep = 1.0
-INFO:set config.plot = iq, fq, gr
-INFO:set config.verbose = info
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'sas'
-INFO:calling config_sas
-INFO:started PDF processing.
-INFO:processing 'Au_DNA_NPA.chi'
-INFO:resolved output file '' as 'Au_DNA_NPA.fq'
-INFO:written outpufile Au_DNA_NPA.fq
-INFO:resolved output file '' as 'Au_DNA_NPA.gr'
-INFO:written outpufile Au_DNA_NPA.gr
-INFO:elapsed time: 0.947
-
-
-

This will save two files Au_DNA_NPA.fq, Au_DNA_NPA.gr in the same directoy for the F(Q) and G(r) functions. This also plots F(Q) and G(r) functions in a pop-up window and the processing parameters such as rpoly or so may be tuned interactively by issuing command tuneconfig() in the IPython session as discussed above.

-
-
-

Multiple Background Subtraction

-
-

Predefined configuration file

-

In this tutorial, we will show how to use the multiple-background subtraction -functionality by obtainining equivalent outputs from different, but equivalent, -subtractions. Change directory to the doc/examples/ -Multiple_Background_Subtraction directory. The file named -ni300mesh_300k_nor_1-5.chi contains powder X-ray data measured from -nickel at the Advanced Photon Source beamline 6ID-D. The file contains two -columns for the 2Θ scattering angles and X-ray intensities. Similarly, -kapton_bgrd_300k_nor_2-3.chi contains the background data (i.e., the -intensities from an empty kapton capillary), and a duplicate file -kapton_bgrd_300k_nor_2-3_copy.chi contains the same dataset (this -duplication of the data is necessary when using the same background multiple -times as the internal system only stores a set of unique background filenames). -The last .chi file, TEST_blank-00000.chi, simply stores a null -dataset and can be used to show the invariance of the PDF under permutation of -the order of background subtractions as well as the fact that more than just -two backgrounds can be subtracted. There are also two config files -nickel.cfg and nickel_sub_two_half_backgrounds.cfg, each of -which contain a set of complete configuration parameters for converting the Ni -powder pattern to a PDF for the case of doing so via a single background -subtraction and a multiple background subtraction, respectively. Finally, there -is a fully processed G(r) file ni300mesh_300k_nor_1-5-expected.gr which -contains the expected output of producing the PDF of the Ni sample after -subtracting the kapton background. Since all processing parameters are already -defined in these configuration files, producing the PDF using multiple -background subtractions is very simple and involves running the pdfgetx3 program and specifying the multiple background subtraction -config file and the powder data file as arguments:

-
$ pdfgetx3 -c nickel_sub_two_half_backgrounds.cfg ni300mesh_300k_nor_1-5.chi
-
-
-

The resulting G(r) file, ni300mesh_300k_nor_1-5.gr, is the result of -producing the PDF according to:

-
"ni300mesh_300k_nor_1-5.chi" - 0.5*"kapton_bgrd_300k_nor_2-3.chi"
-- 0.5*"kapton_bgrd_300k_nor_2-3.chi"
-
-
-

Which should be equivalent to the case where the following single background -subtraction had been performed:

-
"ni300mesh_300k_nor_1-5.chi" - 1.0*"kapton_bgrd_300k_nor_2-3.chi"
-
-
-

The fact that both of these result in the same PDF can be verified by comparing -the produced G(r) with the expected G(r) provided in the example:

-
$ plotdata ni300mesh_300k_nor_1-5-expected.gr ni300mesh_300k_nor_1-5.gr
-
-
-
-
-

Interactive Multiple Background Subtraction

-

The multiple background subtraction functionality can also be carried out -interactively, as per the Interactive tuning of parameters section, using the plural forms -of the relevant variables (i.e., config.bgscales, config.backgroundfiles, -etc.).

-
-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/PDFgetXNS3_manual.pdf b/static_root/doc/pdfgetx/2.2.1/PDFgetXNS3_manual.pdf deleted file mode 100644 index 3199e5c4..00000000 Binary files a/static_root/doc/pdfgetx/2.2.1/PDFgetXNS3_manual.pdf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.1/_images/nickelfqgr.png b/static_root/doc/pdfgetx/2.2.1/_images/nickelfqgr.png deleted file mode 100644 index 3fbc12de..00000000 Binary files a/static_root/doc/pdfgetx/2.2.1/_images/nickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.1/_images/nickelfqgrnoisy.png b/static_root/doc/pdfgetx/2.2.1/_images/nickelfqgrnoisy.png deleted file mode 100644 index caab8cf3..00000000 Binary files a/static_root/doc/pdfgetx/2.2.1/_images/nickelfqgrnoisy.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.1/_images/tunenickelfqgr.png b/static_root/doc/pdfgetx/2.2.1/_images/tunenickelfqgr.png deleted file mode 100644 index 14accde4..00000000 Binary files a/static_root/doc/pdfgetx/2.2.1/_images/tunenickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.1/_images/tunenickelt4gr.png b/static_root/doc/pdfgetx/2.2.1/_images/tunenickelt4gr.png deleted file mode 100644 index c95278cd..00000000 Binary files a/static_root/doc/pdfgetx/2.2.1/_images/tunenickelt4gr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.1/_images/twothetazerofit.svgz b/static_root/doc/pdfgetx/2.2.1/_images/twothetazerofit.svgz deleted file mode 100644 index 80e48d71..00000000 Binary files a/static_root/doc/pdfgetx/2.2.1/_images/twothetazerofit.svgz and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.1/_sources/files.rst.txt b/static_root/doc/pdfgetx/2.2.1/_sources/files.rst.txt deleted file mode 100644 index edc63d96..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_sources/files.rst.txt +++ /dev/null @@ -1,102 +0,0 @@ -Files used in PDF extraction -======================================================================== - -.. include:: abbreviations.txt -.. _my-configfile: -.. program:: pdfgetx3 - -Configuration file ------------------------------------------------------------------------- - -Configuration files may define the PDF processing parameters. -By default, the :program:`pdfgetx3` program attempts to read -:file:`.pdfgetx3.cfg` file from the user HOME directory, -then :file:`.pdfgetx3.cfg` and :file:`pdfgetx3.cfg` files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the :option:`-c, --config <-c>` option. -The :program:`pdfgetn3` program works in the same way, -except it checks for configuration files -:file:`~/.pdfgetn3.cfg`, :file:`.pdfgetn3.cfg` and :file:`pdfgetn3.cfg`. - -The easiest way of creating a configuration file is to generate -a template content using the :option:`--createconfig` option as :: - - pdfgetx3 --createconfig=test.cfg - -and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple "varname=value" syntax, -any lines starting with "#" are ignored as comments. - -The configuration file has several sections marked as ``[SECTIONNAME]``. -The ``[DEFAULT]`` section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the :option:`-s, --section <-s>` option on the -command line. Thus :: - - pdfgetx3 --config=test.cfg --section=nacl - -would read the parameters from the ``[nacl]`` section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section. - - -Input files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -|twotheta| in degrees, momentum transfer *Q* in inverse nanometers or *Q* -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the :confval:`dataformat` parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values. - -The input files are usually passed as command-line arguments to -:program:`pdfgetx3` or :program:`pdfgetn3` programs and must be paths -accessible from the current working directory. - -Input files can be also defined by setting the :confval:`inputfile` -value in the configuration file. The :option:`-d, --datapath <-d>` -option can be then used to provide additional data directories to -search for these inputs and for the :confval:`backgroundfile`. -This is to support configuration files located in a different -directory than the data. - -When the :option:`--find <-f>` option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory. - - -Output files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 can produce up to four different output data files: - -* .iq -- |IQ|, the background-corrected - intensities sampled on a regular *Q*-space grid in inverse ångströms, - -* .sq -- |SQ|, the total scattering structure function, - with intensities normalized by average scattering factors and - corrected by a polynomial fit, - -* .fq -- |FQ|, the reduced structure function equal to *Q*\ (|SQ| - 1), - -* .gr -- |Gr|, the resultant PDF, where the first column is the - separation *r* in ångströms and the second is the function *G* in - Å\ :sup:`-2`. - -You can specify what output files should be produced by setting the -:confval:`outputtypes` parameter in the configuration file or by -passing the :option:`-t, --outputtypes <-t>` on the command line. - -The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the :option:`--config <-c>` option, -the PDFgetX3 will reproduce the previous calculation. diff --git a/static_root/doc/pdfgetx/2.2.1/_sources/index.rst.txt b/static_root/doc/pdfgetx/2.2.1/_sources/index.rst.txt deleted file mode 100644 index c7bf373e..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_sources/index.rst.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. PDFgetX3 documentation master file, created by - sphinx-quickstart on Tue Sep 21 18:35:11 2010. - You can adapt this file completely to your liking, - but it should at least contain the root `toctree` directive. - -######################################################################## -diffpy.pdfgetx -######################################################################## - -User manual for PDFgetX3, PDFgetN3, PDFgetS3 and Python package diffpy.pdfgetx. - -| Release |release| -| |today| - -======================================================================== -Table of contents -======================================================================== - - -.. toctree:: - :maxdepth: 2 - - intro - install - quick-start - tutorial - files - interact - options - plotdata - release - -======================================================================== -Indices -======================================================================== - -* :ref:`genindex` -* :ref:`search` diff --git a/static_root/doc/pdfgetx/2.2.1/_sources/install.rst.txt b/static_root/doc/pdfgetx/2.2.1/_sources/install.rst.txt deleted file mode 100644 index 667637dd..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_sources/install.rst.txt +++ /dev/null @@ -1,146 +0,0 @@ -Installation -======================================================================== - -.. include:: abbreviations.txt - -Software requirements ------------------------------------------------------------------------- - -This software is written in Python programming language, therefore -you must have Python 3.10, 3.9, 3.8, 3.7 or 2.7 installed. In addition, -the following third-party Python libraries are also required: - -* pip - Python package installer -* setuptools - tools for installing Python packages -* six - Python 2 and 3 compatibility library -* NumPy - library for scientific computing with Python -* matplotlib - Python plotting library -* IPython - enhanced interactive Python shell - -Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -`Python Package Index `__ -or using any Internet search engine. - -Another more convenient option is to obtain one of the science-oriented -Python distributions such as -`Anaconda Python`_, -`Enthought Canopy `_ or -`PythonXY `_, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step. - -On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command :: - - sudo apt-get install \ - python3-pip python3-setuptools python3-six \ - python3-numpy python3-matplotlib ipython3 - -This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above. - -On Windows operating system, it may be necessary to add the -``C:\Python37`` directory and the scripts directory -``C:\Python37\Scripts`` to the system :envvar:`!PATH`. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the :program:`Command Prompt`, type -there ``python`` and see if this starts the Python interpreter. - -Alternately, if you want to run the diffpy.pdfgetx software with a specific version of Python, -we recommend using a virtual environment, such as ``conda``. For example, if you have Anaconda Python installed, -you can create a conda virtual environment to install the software as follow :: - - conda create --name pdfgetx_env python=3.8 numpy matplotlib ipython - -You can choose the name of the environment and python version as you desire. You can choose any of the -supported Python versions. Then, activate this environment and follow the instructions in the -next section to install the software :: - - conda activate pdfgetx_env - -Installation ------------------------------------------------------------------------- - -The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -`Columbia Technology Ventures -`__. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:: - - pip install ./diffpy.pdfgetx-VERSION.whl - -Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending ``sudo`` to the command line above. If root access is not available, use the ``pip install`` options :option:`!--user` or :option:`!--prefix` to install the software to a user-writable directory. - -The package provides three programs for PDF conversion, :program:`pdfgetx3`, :program:`pdfgetn3` and :program:`pdfgets3`. To check if they are correctly installed run :: - - pdfgetx3 --version - pdfgetn3 --version - pdfgets3 --version - -This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a :program:`plotdata` -command for an easy plotting of text data files. To verify -if plotdata works, run the ``plotdata --version`` command. -Finally, a comprehensive test of the installed software can -be executed using :: - - python -m diffpy.pdfgetx.tests.run - -.. note:: - - Older versions of diffpy.pdfgetx use Python egg format - instead of Python wheel. - To install these use the easy_install command as follows:: - - python -m easy_install ./diffpy.pdfgetx-VERSION.egg - -.. index:: %pdfgetx3 IPython magic -.. index:: %pdfgetn3 IPython magic -.. index:: %pdfgets3 IPython magic - -IPython magic command ------------------------------------------------------------------------- - -These instructions are intended for `IPython`_ users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don't plan to customize IPython in such way you can safely skip -this paragraph. - -When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session. - -The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up - -#. find the ``profile_default/ipython_config.py`` file and open it - in a text editor. If that file does not exists, - create it first by executing :: - - ipython profile create - -#. navigate to the paragraph that contains the - :py:data:`!c.InteractiveShellApp.extensions` and add there - the following line :: - - c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics'] - - There must be no leading indent, i.e., the text must start at the - very first column. diff --git a/static_root/doc/pdfgetx/2.2.1/_sources/interact.rst.txt b/static_root/doc/pdfgetx/2.2.1/_sources/interact.rst.txt deleted file mode 100644 index 0d4fb746..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_sources/interact.rst.txt +++ /dev/null @@ -1,154 +0,0 @@ -Interactive mode -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. py:currentmodule:: _interactive_ - -The interactive mode is activated by using either the -:option:`-i, --interact <-i>` option or a non-empty -:option:`--plot <-p>` option. In the interactive mode -the program starts an `IPython`_ interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands ``%pdfgetx3`` and ``%pdfgetn3``, which can be used with -the same syntax as the :program:`pdfgetx3` and :program:`pdfgetn3` in -system shell. -The interactive session is also initialized with all functions from the -:py:mod:`matplotlib.pyplot` module for convenient plotting. -The functions and variables related to PDF processing are: - -.. py:function:: pdfgetter(x=None, y=None, filename='', **kwargs) - - Instance of the :py:class:`!PDFGetter` class which serves as a - low-level function that calculates the PDF. This is a callable - object, which takes as an argument a pair of input arrays for - (*Q*, intensity) or (|twotheta|, intensity) depending on - :confval:`dataformat`. It can be also called with a keyword - argument ``filename=FILE``, which would read the input arrays - from the specified file. When called with no arguments, - it calculates PDF from the last input data. - - :parameters: - * **x** (*numpy.ndarray, optional*) -- - The *Q* or |twotheta| values in powder diffraction pattern. - - * **y** (*numpy.ndarray, optional*) -- - The scattered intensities in powder diffraction pattern - - * **filename** (*str, optional*) -- - The text data file for loading the `x`, `y` values when - they are not specified. - - * **kwargs** (*misc, optional*) -- - Extra keyword arguments that are applied to - the :data:`!config` object, for example ``qmax=20``. - - :return: - A pair of output arrays *(r, G)*. - -.. interactvar:: config - - Instance of the :py:class:`!PDFConfig` class that stores the - :ref:`parameters and input files ` for the program. - Use ``print(config)`` to display the current configuration values. - This is the same object as :data:`!pdfgetter.config`. Configuration - may be changed by setting a respective attribute of the - :interactvar:`!config` object, for example:: - - In [1]: config.qmax = 21 - - The :py:data:`!config` values may be also changed by calling the - :py:func:`pdfgetter` or :py:func:`processfiles` function with a - corresponding keyword argument, for example - ``processfiles(qmax=20, force="once")``. - -.. interactvar:: iraw - iq - sq - fq - gr - - These variables are assigned the input raw intensities and the - intermediate results, stored as matrix rows. The matrix rows - correspond to twotheta1, intensity1, twotheta2, intensity2, etc. - Because matrices are iterated row first, the raw intensities - from all input files can be plotted with the matplotlib plot - function as ``plot(*iraw)``. - - These variables should be considered read-only and are reset - with subsequent PDF calculations. - -.. py:function:: tuneconfig(plotids=None, pdfgetter=None, axeslist=None) - - Show a GUI dialog for interactive tuning of configuration variables. - - :arg plotids: - The string or iterable that specify what interactive plots should be - tuned. By default the same as ``config.plot``. It can be also an - integer index or name of a transformation in :py:func:`pdfgetter` or - a reference to a :py:class:`!Transformation` object. - - :arg pdfgetter: - The optional :py:class:`!PDFGetter` object to be tuned. - This is by default the interactive :py:func:`!pdfgetter` object. - - :arg axeslist: - An optional list of matplotlib Axes for showing interactive plots. - When None, use ``subplot(N, 1, i)`` to create any necessary axes. - - .. note:: - - Changes from :py:func:`!tuneconfig` apply only to the configuration - and results in memory. Use the :py:func:`processfiles` function - to save them to disk. - - .. seealso:: :ref:`my-tuneconfig` tutorial - -.. py:function:: processfiles(filename=None, **kwargs) - - Process all input files again with the current configuration values. - This is a higher-level function than :py:func:`pdfgetter`, as - it also saves output files and produces plots as specified by the - :interactvar:`config` object. - - :arg filename: - One or more input files to be converted to PDFs and saved or - plotted according to the :py:data:`!config` settings. Use the - previous list of input files when not specified. - - :arg kwargs: - An optional keyword arguments to set for the :py:data:`!config` - object, for example ``(force="once", qmax=18)``. - - This function updates the :interactvar:`config.inputfiles ` - list and the :interactvar:`iraw`, :interactvar:`iq`, - :interactvar:`sq`, :interactvar:`fq` and :interactvar:`gr` - interactive variables. - -.. py:function:: clearsession() - - Clear all elements from the :interactvar:`config.inputfiles ` - and also the - :interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, - :interactvar:`fq` and :interactvar:`gr` variables. - - :return: - No return value. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: loaddata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. - -.. py:currentmodule:: diffpy.pdfgetx.plotdata -.. autofunction:: plotdata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx.plotdata` module. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: findfiles - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. diff --git a/static_root/doc/pdfgetx/2.2.1/_sources/intro.rst.txt b/static_root/doc/pdfgetx/2.2.1/_sources/intro.rst.txt deleted file mode 100644 index a97972cd..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_sources/intro.rst.txt +++ /dev/null @@ -1,71 +0,0 @@ -Introduction -======================================================================== - -diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts. - - -.. index:: license - -License notice ------------------------------------------------------------------------- - -.. include:: ../../LICENSENOTICE.txt - - -.. index:: authors - -Authors ------------------------------------------------------------------------- - -This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Connor J. Bracy, -Hung Vuong, -Songsheng Tao, -Simon Billinge. - - -.. index:: citations, references - -References ------------------------------------------------------------------------- - -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: - - P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge - `PDFgetX3: A rapid and highly automatable program for processing - powder diffraction data into total scattering pair distribution - functions `__, - *J. Appl. Crystallogr.* **46**, 560-566 (2013) - -For research publications that use this software to process neutron -diffraction data we ask you to also cite: - - P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, - S. J. L. Billinge - `PDFgetN3: atomic pair distribution functions from neutron - powder diffraction data using ad hoc corrections - `__, - *J. Appl. Crystallogr.* **51** (2018) - -For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication: - - CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge - `sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data `__. diff --git a/static_root/doc/pdfgetx/2.2.1/_sources/options.rst.txt b/static_root/doc/pdfgetx/2.2.1/_sources/options.rst.txt deleted file mode 100644 index c02220f2..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_sources/options.rst.txt +++ /dev/null @@ -1,370 +0,0 @@ -Options and parameters -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program. - - -.. Note :: - - The command line options start with a leading "-" and can - be only used as command line arguments when starting the - :program:`pdfgetx3` program. Within configuration file the parameter - names are plain words without any leading dashes. Finally, - parameters can be also set in the interactive mode as attributes of - the :interactvar:`config` object, but the assignments must be valid - Python statements. Here are examples of setting composition of - a processed specimen using each of these forms: - - #. assigned in configuration file:: - - ... - composition = CaTiO3 - ... - - #. set as a command-line option when starting :program:`pdfgetx3` or - :program:`pdfgetn3`:: - - pdfgetx3 --composition=CaTiO3 - - #. set in the IPython interactive mode:: - - pdfgetx3 -i - ... - In [1]: config.composition = "CaTiO3" - - -Program operation ------------------------------------------------------------------------- - -.. option:: -h, --help - - Display a brief usage information with a list of command line options - and exit. - -.. option:: -V, --version - - Display the program version and exit. - -.. option:: --manual - - Open this manual in a Web browser and exit. - -.. option:: -f, --find -.. _my-findpatterns: - - Select input files that match all patterns. The command - line arguments are by default taken as input files. However, - with the :option:`!--find` option they are processed as - file patterns and the matching files are then used as inputs. - The input files are by default searched in the current directory - unless there is a path entry (e.g., :file:`data/`) that - selects a different search path. The search patterns are - interpreted as fixed strings, all of which must be present - in the file name. A single argument ``+`` starts - a new group of patterns to match more files that are not - covered by one set of patterns. Additional pattern - groups reuse the current search path unless they provide - their own path value. Pattern groups containing only - a path entry reuse file patterns from the last group. - When pattern groups overlap the repeated matches are ignored - to make the resulting list of files unique. Files starting - with ``.`` are ignored unless there is ``^.`` pattern - that explicitly matches them. The search - syntax provides the following special patterns: - - .. tabularcolumns:: |l|p{0.75\textwidth}| - - +---------+------------------------------------------------------------+ - | ^ | match at the beginning of the string, i.e., ``^start`` | - | | matches only filenames that start with "start". | - +---------+------------------------------------------------------------+ - | $ | match at the end of string, for example, ``.chi$`` selects | - | | file names ending with ".chi". A ``$`` on its own | - | | matches every string and can be used to select all files. | - +---------+------------------------------------------------------------+ - | | match number *N* preceded by any number of leading zeros, | - | | e.g., ``<7>`` would match in "f7.chi", "f007.chi", but not | - | | in "f77.chi". | - +---------+------------------------------------------------------------+ - | | match an integer range from *N* to *M* inclusive. | - | | The matched number may have one or more leading zeros. | - +---------+------------------------------------------------------------+ - | <7-> | match number 7 or larger. | - +---------+------------------------------------------------------------+ - | <-7> | match number 7 or smaller. | - +---------+------------------------------------------------------------+ - | <-> | match any integer number. | - +---------+------------------------------------------------------------+ - | \+ | start a new pattern group, for example, ``.chi$ + .dat$`` | - +---------+------------------------------------------------------------+ - | / | set search path. An argument containing the ``/`` symbol | - | | is taken as the search path, for example, ``data/`` or | - | | ``./``. Each pattern group may provide its own search | - | | path effective for that and any subsequent pattern group. | - +---------+------------------------------------------------------------+ - - The ``^$<>`` characters are often special to Unix or Windows - command shells, therefore they need to be enclosed in double - quotes (\\") when used on command line. - - .. seealso:: tutorial on :ref:`my-findexamples` - -.. option:: -l, --list - - List all input files and exit. This is useful with the - :option:`!--find` option to verify if input files - are matched as intended. - - -Configuration file options ------------------------------------------------------------------------- - -.. option:: -c CONFIG, --config=CONFIG - - Read custom configuration file after loading the default ones. - Do not load any configuration file when "NONE". - -.. option:: -s NAME, --section=NAME - - Load the custom configuration file section ``[SectionName]`` after - loading the ``[DEFAULT]`` section. This is useful for creating - several configuration variants in a single configuration file. - -.. option:: --createconfig=FILE - - Write template configuration to a new FILE and exit. Write - to the standard output when FILE is "-". - -See also the :ref:`configuration file ` section -for further details. - -.. _my-ioparameters: - -Input and output options ------------------------------------------------------------------------- - -.. confval:: inputfile - - This parameter allows to specify one or more input files in the - configuration file, one file per line. The :confval:`!inputfile` - is only used if no input files were provided on the - :program:`pdfgetx3` or :program:`pdfgetn3` command line. - -.. confval:: dataformat -.. option:: --format=FORMAT - - Format of input files. Available formats are: ``twotheta``, ``QA``, - ``Qnm`` corresponding to a two-column text data where the first - column is either the scattering angle |twotheta| in degrees, *Q* in - inverse ångströms or *Q* in inverse nanometers. - -.. confval:: backgroundfile -.. option:: -b FILE, --background=FILE - - Optional datafile with background intensities from an empty sample - holder. It must be in the same dataformat as other input files. - -.. Note :: - - The following input is only used in ``sas`` mode. - -.. confval:: formfactorfile -.. option:: -ff FILE, --formfactorfile=FILE - - Form factor intensities of the scatterers. This is required for ``sas`` mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1. - -.. _my-datapath: -.. confval:: datapath -.. option:: -d DATAPATH, --datapath=DATAPATH - - One or more extra directories to be searched for input or - background data files. The :option:`!-d` option can be specified - several times to add more directories, these are prepended in front - of any default value. Within configuration file the datapath - directories have to be listed each on a separate line. - - A special value "NONE" (or "none") clears any previously defined - paths and only the further paths, if any, would be searched for - inputs. - -.. confval:: output -.. option:: -o OUTPUT, --output=OUTPUT - - Output file name, write to the standard output when "-". The - :option:`-t, --outputtypes <-t>` option controls what results are - being saved. Normally the OUTPUT is used as a custom basename for - the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o - tokens, which are expanded as follows: - - ===== ================== ======================================= - token example definition - ===== ================== ======================================= - @h dir1/dir2 the input file directory or "." - @r dir1/dir2/filename the input path with extension removed - @e dat the input file extension without "." - @t filename.dat the tail component of the input file - @b filename the tail component with extension removed - @o gr the output extension iq, sq, fq or gr - ===== ================== ======================================= - - An empty value works the same as "@b.@o" and saves the data - in the current directory with a proper extension for the - saved results. When "@o" is not present in the OUTPUT, it is - appended as a default filename extension. - -.. confval:: outputtypes -.. option:: -t TYPES, --outputtypes=TYPES - - Result types to be saved, one or more comma separated values. - Supported values are "iq", "sq", "fq", "gr", corresponding to the - |IQ|, |SQ|, |FQ| and |Gr| curves; these are also used as output - file extensions. - - Result files are not written when empty, "none" or "NONE". - -.. confval:: force -.. option:: --force=FORCE - - Overwrite existing output files. By default the output - files are not written if they already exist. Possible values - in a configuration file are "true", "yes", "on", "1" or - "false", "no", "off", "0" or "once". The special value "once" - permits one overwrite and then resets ``config.force`` to - ``False``. Note that in interactive mode the values assigned - to ``config.force`` are converted to Python :py:class:`bool` - unless equal to "once". - - -.. _my-pdfparameters: - -PDF parameters ------------------------------------------------------------------------- - - -.. confval:: mode -.. option:: --mode=STRING - - The PDF conversion mode, i.e., the name of the - :py:func:`.pdfgetter` setup. The available modes correspond - to the radiation type used in powder diffraction experiment and can - be "xray" or "neutron". - -.. confval:: wavelength -.. option:: -w FLOAT, --wavelength=FLOAT - - X-ray wavelength in ångströms. This value is required - for the "twotheta" dataformat in order to convert the scattering - angles |twotheta| to a momentum transfer *Q*. For other data formats - the wavelength is not necessary and may be left undefined. - -.. confval:: twothetazero -.. option:: --twothetazero=FLOAT - - Position of the zero scattering angle in diffractometer degrees. - This parameter corrects for a constant offset in the - measured |twotheta| values. When loading configuration file - it is assumed 0 unless specified otherwise. This parameter - is only effective for the "twotheta" dataformat. - -.. confval:: composition -.. option:: --composition=STRING - - Chemical composition of the sample. Supported formats are - "PbTi0.5Zr0.5O3", "Pb 1 Ti 1/2 Zr 1/2 O 3" or "CH3 (CH2)3 OH". - Space characters are ignored, unit counts can be omitted, but it is - important to use a proper upper and lower case in atom symbols. - Elements can appear several times in the formula, e.g., "CH3 CH3", - and the formula may contain parentheses or fractional - stoichiometries. - -.. confval:: bgscale -.. option:: --bgscale=FLOAT - - Scaling of the background intensities loaded from the - :confval:`backgroundfile`, by default 1. - -.. confval:: rpoly -.. option:: --rpoly=FLOAT - - *r*-limit for the maximum frequency in the |FQ| correction polynomial. - The PDF is unreliable at shorter *r*, however a - very small :confval:`!rpoly` would disable polynomial correction and - give noisy PDF. - Larger values produce closer fits with a higher degree polynomial, - but when too large, they might smooth-out a useful signal in the - data. The default is 0.9. - -.. confval:: qmaxinst -.. option:: --qmaxinst - - The *Q* cutoff for the meaningful input intensities in inverse - ångströms. Some data files may contain trailing zeros - or unreliable intensities at the upper bound of the detector range. - The :confval:`!qmaxinst` defines a threshold for unreliable data. - The parameter is also used as an upper boundary for the polynomial - fit correction of the |SQ| data. - -.. confval:: qmin -.. option:: --qmin - - The lower *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. - -.. confval:: qmax -.. option:: --qmax - - The upper *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. This is essentially a limit, where sample - signal decays to the level of data noise. - -.. confval:: rmin -.. option:: --rmin=FLOAT - - Lower bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rmax -.. option:: --rmax=FLOAT - - Upper bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rstep -.. option:: --rstep=FLOAT - - Spacing of the *r*-grid for the calculated PDF in ångströms. - - -Other parameters ------------------------------------------------------------------------- - -.. confval:: plot -.. option:: -p TYPES, --plot=TYPES - - Plot the specified results. A comma separated list with one or - more items from "iq", "sq", "fq", "gr". No plot is produced when - empty, "none" or "NONE". Setting this option turns on the - interactive mode. - -.. confval:: interact -.. option:: -i, --interact - - Start an IPython interactive session after processing all files. - Useful for tuning the configuration parameters or interactive - plotting. This is always on when plot option has been set. - See also :doc:`interact` for further details. - -.. confval:: verbose -.. option:: --verbose=VALUE - - Level of detail for the program to report about its actions. - Possible values are "error", "warning", "info", "debug", "all" or an - integer number from 0 to 5. Messages are completely suppressed when - 0, all messages are printed when verbose is 5 ("all") or higher. - This option is useful for diagnostics of any unexpected behavior - in the program. diff --git a/static_root/doc/pdfgetx/2.2.1/_sources/plotdata.rst.txt b/static_root/doc/pdfgetx/2.2.1/_sources/plotdata.rst.txt deleted file mode 100644 index d1c02156..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_sources/plotdata.rst.txt +++ /dev/null @@ -1,161 +0,0 @@ -.. index:: plotdata (program) -.. _cmd-plotdata: - -The plotdata program -======================================================================== - -.. include:: abbreviations.txt -.. program:: plotdata - -The PDFgetX3 software includes a simple stand-alone utility -:program:`plotdata` for plotting text data files. In most cases -this program can be invoked from a command-shell as :: - - plotdata file1.dat file2.dat - -which plots the numerical data from the text files :file:`file1.dat`, -:file:`file2.dat` together in a single graph. By default the first -column is used as an *x* variable and the second column is used for the -*y* values. After displaying the plot the program starts an `IPython`_ -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the :data:`!filenames` variable -containing a list of plotted files. It also pre-loads the -|plotdata| and |findfiles| functions just as in PDFgetX3 -interactive session. The :py:func:`!plotdata` -function works in a similar way as the :program:`plotdata` program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -:py:func:`!plotdata` function would be:: - - In [1]: plotdata(['file1.dat', 'file2.dat']) - - -Selecting files ------------------------------------------------------------------------- - -The :program:`plotdata` program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as ``*.dat``. The file search feature is controlled by the -following options: - -.. option:: -f, --find - - Use command line arguments as filename patterns and plot all matching - files. This option works in the same way as for - :program:`pdfgetx3`, for full details see the - :option:`pdfgetx3 --find ` documentation. Note that - within command line the special patterns ``^$<>`` need to be quoted - in double quotes (\\") so they are not processed by command shell. - -.. option:: -l, --list - - List the input files and exit. This is useful in conjunction - with the :option:`!-f, --find` option to check if data files - are selected as intended. - -Assuming the current directory contains 20 files named -:file:`file1.dat`, :file:`file2.dat`, ..., :file:`file20.dat`, -the plotting of files 9 to 13 could be done (with a check listing) -as follows :: - - $ plotdata -fl "<9-13>.dat" - file9.dat - file10.dat - file11.dat - file12.dat - file13.dat - $ plotdata -f "<9-13>.dat" - -Within an interactive IPython session the equivalent plot could be -produced by combining the |plotdata| and |findfiles| functions as :: - - In [1]: plotdata(findfiles("<9-13>.dat")) - - -Selecting x and y data ------------------------------------------------------------------------- - -The :program:`plotdata` program provides several ways of selecting -columns for *x* or *y* data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is "0" -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function): - - -.. option:: -x X - - index or name of the *x*-column to plot. See the :option:`-y` option - for the supported syntax, but note that ``X`` may select only one - column. When set to "." use the data-row index for *x*. - -.. option:: -y Y - - index or name of the *y*-column or columns to plot. The ``Y`` column - specification can be a comma separated list of indices, column names - or Python-like ranges, for example "1,2", "G", "1:4" (START:STOP, - same as "1,2,3"), "1:4:2" (START:STOP:STEP, same as "1,3"), or - "-2:" (same as "-2,-1", i.e, the last 2 columns). Because column - indexing starts at "0" the second column must be specified as "1". - - The column names work if the data section in the file is preceded by - a headline of unique column names, for example:: - - x square cube - 1 1 1 - 2 4 8 - 3 9 27 - 4 16 64 - - For such data file the plotdata program will recognize column names - "x", "square" and "cube" and an implicit "." for row index. - -.. option:: -s STYLE, --style=STYLE - - optional plot format specification. See the - :func:`matplotlib.pyplot.plot` function - for a list of available formats. - -.. option:: -L LOG, --log=LOG - - axes to be plotted with logarithmic scaling, for example, "x", "y" or - "xy". Axes not listed in ``LOG`` will use linear scaling. - -.. option:: -h, --help - - display a brief usage info and exit. - -.. option:: -V, --version - - show program version and exit. - -.. option:: --manual - - Open this manual page in a Web browser and exit. - - -Examples ------------------------------------------------------------------------- - -The examples directory :file:`plotdata` contains a :file:`sincos.dat` -file that has 3-columns of values labeled as "x", "sin" and "cos". -Here are several examples of the :program:`plotdata` capabilities -when used from command line - the user is encouraged to try them out:: - - plotdata sincos.dat - plotdata -y 1,2 sincos.dat - plotdata -x . -y 0:3 sincos.dat - plotdata -y cos sincos.dat - plotdata -x sin -y cos -sr-- sincos.dat - -An equivalent usage from a general IPython session would be:: - - ipython --matplotlib=auto - In [1]: from diffpy.pdfgetx.plotdata import plotdata - In [2]: plotdata('sincos.dat') - In [3]: plotdata('sincos.dat', y=[1,2]) - In [4]: plotdata('sincos.dat', x='.', y=':3') - In [5]: plotdata('sincos.dat', y='cos') - In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--') diff --git a/static_root/doc/pdfgetx/2.2.1/_sources/quick-start.rst.txt b/static_root/doc/pdfgetx/2.2.1/_sources/quick-start.rst.txt deleted file mode 100644 index 0b2fffd1..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_sources/quick-start.rst.txt +++ /dev/null @@ -1,163 +0,0 @@ -Quick-start guide -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing :program:`pdfgetx3`, :program:`pdfgetn3`, or -:program:`pdfgets3` in a shell window. Please, refer to the :doc:`installation ` section if this is not working yet. - -.. index:: pdfgetx3 (program) -.. _cmd-pdfgetx3: - -pdfgetx3 command ------------------------------------------------------------------------- - -The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as :: - - pdfgetx3 [options] input1 input2 ... inputN - -The :file:`inputN` stands for an input powder diffraction data. The -:file:`inputN` file is a simple two-column text file, where the first -column corresponds to either the |twotheta| diffraction angle, or a -momentum transfer, *Q*, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -`FIT2D program `_ using -its "chi" output format, thus we will also refer to them as "chi-files". -A typical content of a "chi" file looks as folows: - -.. code-block:: none - - Pt_bulk-00055.tif: 2-theta Scan - 2-Theta Angle (Degrees) - - 1465 - 2.0003892E-02 0.0000000E+00 - 6.0011677E-02 0.0000000E+00 - 1.0001946E-01 0.0000000E+00 - 1.4002724E-01 0.0000000E+00 - 1.8003502E-01 0.0000000E+00 - ... - -The command-line options are arguments that start with a dash "-" and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash ``--``. Options may require values. For short options, -the value may be joined to the option string, for example -:option:`!-w0.142774`, while for the long options it has to be separated -with an equal sign, e.g., :option:`!--wavelength=0.142774`. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the :doc:`options` section of -this manual. A brief summary of options can be also displayed by -executing :: - - pdfgetx3 --help - -The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the :doc:`tutorial`. -In general, the first step is to create a commented configuration file ``pdfgetx3.cfg`` using:: - - pdfgetx3 --createconfig=pdfgetx3.cfg - -The configuration file can have any name, but it is preferable -to use either :file:`pdfgetx3.cfg` or :file:`.pdfgetx3.cfg`, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the :option:`-c, --config <-c>` option. - -Open the pdfgetx3.cfg file in a **text** editor. The lines that -start with a hash mark ``#`` are comments and are not used. The lines -starting with a right brace ``[`` denote sections in the configuration -file. The active lines are all formatted as -"NAME=VALUE". Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation: - -* :confval:`dataformat` -- specifies the input data format - -* :confval:`wavelength` -- radiation wavelength in Å required for the - "twotheta" format. - -* :confval:`composition` -- chemical composition of the sample - -* :confval:`qmaxinst` -- upper *Q* boundary for a meaningful measurement - intensities. - -* :confval:`qmax` -- *Q*-cutoff for the Fourier transformation that - yields the PDF. - -Save the updated configuration file and run pdfgetx3 on the input data -:file:`FILENAME.chi` as :: - - pdfgetx3 --verbose=info -t gr FILENAME.chi - -Here the :option:`--verbose=info <--verbose>` option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The :option:`-t gr <-t>` option -tells the program to save the final |Gr| curve as a -:file:`FILENAME.gr` file in the working directory. - -The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation :: - - pdfgetx3 -c FILENAME.gr --plot=fq,gr - -Note this command does not include any .chi file and this will as -a result process the previously used input :file:`FILENAME.chi`. -The :option:`--plot=fq,gr <-p>` option tells PDFgetX3 to -display 2 plots for the reduced structure function |FQ| and the -final PDF |Gr|. The :option:`!--plot` option also implies an -:doc:`interactive mode ` -therefore the program does not exit, but starts an -interactive `IPython`_ session. To exit the interactive mode, -type ``exit()`` and press Enter. - -.. index:: pdfgetn3 (program) -.. _cmd-pdfgetn3: - -pdfgetn3 command ------------------------------------------------------------------------- - -The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the -:option:`--mode` option. Running ``pdfgetn3`` is nearly identical -to executing ``pdfgetx3 --mode=neutron``. The only difference between -these commands is that pdfgetx3 checks for configuration files -:file:`pdfgetx3.cfg` and :file:`.pdfgetx3.cfg`, whereas -pdfgetn3 looks for :file:`pdfgetn3.cfg` and :file:`.pdfgetn3.cfg`. - -.. index:: pdfgets3 (program) -.. _cmd-pdfgets3: - -pdfgets3 command ------------------------------------------------------------------------- - -The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying ``mode = sas`` in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named :file:`pdfgets3.cfg` and -:file:`.pdfgets3.cfg` in order, when no configuration file is specified. - -Please refer to the :doc:`tutorial section ` for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3. diff --git a/static_root/doc/pdfgetx/2.2.1/_sources/release.rst.txt b/static_root/doc/pdfgetx/2.2.1/_sources/release.rst.txt deleted file mode 100644 index 7ede93fa..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_sources/release.rst.txt +++ /dev/null @@ -1,3 +0,0 @@ -.. index:: release notes - -.. mdinclude:: ../../CHANGELOG.md diff --git a/static_root/doc/pdfgetx/2.2.1/_sources/tutorial.rst.txt b/static_root/doc/pdfgetx/2.2.1/_sources/tutorial.rst.txt deleted file mode 100644 index c87a993f..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_sources/tutorial.rst.txt +++ /dev/null @@ -1,807 +0,0 @@ -Tutorial -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. index:: example files -.. py:currentmodule:: diffpy.pdfgetx - -In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the :file:`examples` -folder included with the PDFgetX3 distribution. The :file:`examples` -folder can be found in the parent "doc" directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -|zipped-examples|. - - -.. index:: examples - -Nickel X-ray PDF ------------------------------------------------------------------------- - -predefined configuration file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -Change to the :file:`Ni` directory. The file named -:file:`ni300mesh_300k_nor_1-5.chi` contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the |twotheta| scattering -angles and X-ray intensities. The second file -:file:`kapton_bgrd_300k_nor_2-3.chi` contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the :file:`pdfgetx3.cfg` contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -:ref:`pdfgetx3 ` program -with the powder data file as an argument:: - - $ pdfgetx3 ni300mesh_300k_nor_1-5.chi - -For the first run there should be no output on the screen, -however a new file, :file:`ni300mesh_300k_nor_1-5.gr` should appear -in the work directory. -We can use the :ref:`plotdata ` program, -included with this software, to plot the output data:: - - $ plotdata ni300mesh_300k_nor_1-5.gr - -This will open a graph window and start an `IPython`_ interactive session. -To exit and close the figure, type ``exit()`` on the IPython prompt. -Let's run the program again, but now with a -:option:`--verbose=info <--verbose>` -option, to show more details about the program actions. :: - - $ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi - - INFO:applying pdfgetx3 defaults - INFO:set config.mode = xray - INFO:searching for default config file /home/user/.pdfgetx3.cfg - INFO:searching for default config file .pdfgetx3.cfg - INFO:searching for default config file pdfgetx3.cfg - INFO:loaded default config file pdfgetx3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi - INFO:set config.outputtypes = gr - INFO:set config.wavelength = 0.142774 - INFO:set config.composition = Ni - INFO:set config.qmaxinst = 26.5 - INFO:set config.qmax = 26.0 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 30.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'xray' - INFO:calling config_xray - INFO:started PDF processing. - INFO:processing 'ni300mesh_300k_nor_1-5.chi' - INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr' - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - INFO:elapsed time: 0.095 - -Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the :option:`!--verbose` option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the :option:`--force=yes <--force>` option, upon -which pdfgetx3 would overwrite any existing files. - -PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the -:option:`-c` option. Another option, :option:`--plot=[iq,sq,fq,gr] -<-p>` turns on plotting of the final PDF or of some other result. A -side effect of the :option:`!--plot` option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function |FQ| and the PDF curve |Gr|. This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:: - - $ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr - - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - - Variables related to PDF processing: - - pdfgetter -- PDFGetter used for calculation. - config -- configuration data used by PDFGetter. - See config.inputfiles for a list of inputs. - iraw -- matrix of input raw intensities with 2 rows per file. - iq sq fq gr -- intermediate results per each input file stored - as matrix rows. - - Functions: - - tuneconfig -- dynamically tune configuration variables. - processfiles -- process specified data files. - clearsession -- clear all elements from the inputfiles, iraw, - iq, sq, fq and gr variables. - plotdata -- plot all or selected columns from a text data file. - loaddata -- load all or selected columns from a text data file. - findfiles -- search for files matching the specified patterns. - - Use "%pdfgetx3" for a fresh run without exiting IPython. - In [1]: - -This will open a plot figure similar to - -.. image:: images/nickelfqgr.png - -Because of the :doc:`interactive mode ` implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -:interactvar:`config` variable stores all the configuration parameters, -and its content can be displayed with the :py:func:`print` -function as :: - - In [1]: print(config) - - configfile = ni300mesh_300k_nor_1-5.gr - configsection = DEFAULT - dataformat = twotheta - ... - qmax = 26.0 - ... - -The :py:func:`.processfiles` function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the |FQ| and |Gr| -curves calculated at |Qmax| = 22 |Ainv|, we can call -:py:func:`!processfiles` and pass it a keyword argument for -the new qmax as follows:: - - In [2]: processfiles(qmax=22) - - # the qmax parameter was updated to a new value, thus - In [3]: config.qmax - Out[3]: 22 - -There should be now two lines in each plot axis corresponding to -the results at |Qmax| equal 26 and 22 |Ainv|. To exit the program, -type ``exit()``. - - -processing from scratch -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -We have already encountered the command-line :option:`option -c <-c>` -for specifying a custom configuration file. A special argument "NONE", -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi - - WARNING:Nothing to do, use "-t" or "--plot" options. - ERROR:Configuration error: wavelength not specified. - ERROR:See "--help" for more hints. - -There is an error, for the wavelength is necessary to convert -the scattering angle |twotheta| to momentum transfer *Q*. The -X-ray wavelength was 0.142774 Å, which can be passed with the -:option:`-w, --wavelength <-w>` option:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 - - ... - ERROR:Configuration error: Chemical composition not known. - ERROR:See "--help" for more hints. - -There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the :option:`--composition` option. The example -below uses a "\\\\" character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni - - WARNING:Nothing to do, use "-t" or "--plot" options. - ... - -There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the :option:`-t, --outputtypes <-t>` option. -The outputtypes option recognizes the following result types: -"iq", "sq", "fq", "gr". One or more of these type strings, -separated by a comma, can be included with the -:option:`!-t` option, which will produce the corresponding -output files. An empty string, such as ``-t ""``, or ``-t NONE`` -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings. - -At this point, we will not write any output files, but will use the -:option:`--plot <-p>` option to display the calculated curves. The -:option:`!--plot` accepts the same arguments as outputtypes, so to -display the |FQ| and |Gr| curves we shall run :: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni --plot=fq,gr - - WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161 - WARNING:qmax reset to the data boundary qmaxinst=28.0865680161 - -which should open the following plot window: - -.. image:: images/nickelfqgrnoisy.png - -The graphs look terrible. The PDF is very noisy and the |FQ| curve -shows a sudden break at about 27 |Ainv|. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -:interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, -:interactvar:`fq`, :interactvar:`gr` -variables for the original raw data and intermediate results. We -are going to plot the "iq" variable that has the input intensities -resampled on the *Q* grid. The matplotlib function -:py:func:`~matplotlib.pyplot.clf` clears the figure, -the iq variable is a two-row matrix with *Q* and *I* rows, and the -:py:func:`~matplotlib.pyplot.axis` -function lets us zoom to a given range:: - - In [1]: clf() - In [2]: plot(iq[0], iq[1]) - Out[2]: [] - In [3]: axis([20, 29, 0, 3000]) - Out[3]: [20, 29, 0, 3000] - -The graph shows a sudden drop in the raw intensities at 27 |Ainv|. -The :confval:`qmaxinst` variable defines a *Q* cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 |Ainv| :: - - In [4]: processfiles(qmaxinst=26.5) - WARNING:qmax reset to the data boundary qmaxinst=26.5 - -The updated curves looks reasonable without any oscillations and -breakpoints. The :py:func:`.tuneconfig` function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type ``tuneconfig()`` to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the |FQ| and |Gr| curves change. -The :confval:`rpoly` parameter controls the degree of data-correction -polynomial and is an approximate low-*r* bound of reliable *G* -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the |Gr| -curve and save it to an output file :file:`nicmd.gr`:: - - In [14]: config.qmax = 26 - In [15]: config.outputtypes = 'gr' - In [16]: config.output = 'nicmd' - In [17]: processfiles() - - -Platinum X-ray series ------------------------------------------------------------------------- - -PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(`z-shell `_ being a notable exception). - -.. _my-findexamples: - -matching input files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The :program:`pdfgetx3` program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the :option:`-f, --find <-f>` option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option -:option:`-l, --list <-l>` makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files. - -We will try out this file search on platinum example files. Open a -terminal and navigate to the :file:`Pt` directory. There should be a -:file:`series` subdirectory with 6 chi files indexed from 903 to 908. -At first, let's stay in the :file:`Pt` directory and run the following -command :: - - $ pdfgetx3 --list --find - - Pt_bulk-00055-pdfgetx2.gr - Pt_bulk-00055-pdfgetx3.gr - Pt_bulk-00055.chi - empty_capillary-00032.chi - pdfgetx3.cfg - plotpdfcomparison.py - -Without any patterns the file search matches all files in the current -directory. Now let's try to add name patterns. There are few special -patterns, for example ``^`` matches at the beginning of the filename, ``$`` at the end and ```` matches a range of integer values from -*N* to *M*. The patterns containing ``^$<>`` need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works. - -Filenames containing "y":: - - $ pdfgetx3 --list --find y - empty_capillary-00032.chi - plotpdfcomparison.py - -Filenames that containing both "y" and "chi", here we use the -options :option:`!--list` and :option:`!--find` in an abbreviated -form :option:`!-l` and :option:`!-f`:: - - $ pdfgetx3 -lf y chi - empty_capillary-00032.chi - -Filenames that start with "e":: - - $ pdfgetx3 --list --find "^e" - empty_capillary-00032.chi - -Filenames that contain *character* "2":: - - $ pdfgetx3 --list --find 2 - Pt_bulk-00055-pdfgetx2.gr - empty_capillary-00032.chi - -Filenames that contain *numeric value* "2":: - - $ pdfgetx3 -lf "<2>" - Pt_bulk-00055-pdfgetx2.gr - -The special argument ``+`` starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both "bulk" and "chi" substrings and then -also those that have "empty" and "chi" in their names, use:: - - $ pdfgetx3 -lf bulk chi + empty chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - -When pattern groups overlap the resulting matches are -made unique and each file is listed only once :: - - $ pdfgetx3 -lf bulk chi + chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - - -data search path -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Each group of PDFgetX3 patterns can have one entry containing -forward slash "/" to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered "903" to "905" and "908" from the -:file:`series` subdirectory can be therefore matched using :: - - $ pdfgetx3 -lf series/ "<903-905>" + 908 - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00908.chi - -The current directory can be selected using `./` :: - - $ pdfgetx3 -lf series/ 903 + ./ bulk chi - series/Pt_bulk_ramp03-00903.chi - Pt_bulk-00055.chi - -When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -".chi"-ending files in the current and :file:`series` -directories can be thus found using :: - - $ pdfgetx3 -lf ".chi$" + series/ - Pt_bulk-00055.chi - empty_capillary-00032.chi - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00906.chi - series/Pt_bulk_ramp03-00907.chi - series/Pt_bulk_ramp03-00908.chi - - -output file names -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -By default the output files are saved in the current directory. The -output path, can be changed with the :option:`-o, --output <-o>` option. -The :option:`!-o` recognizes several tokens that are replaced with -parts of the input file name, for example, "@b" expands to an -extension-stripped base name. In similar faction, "@o" is replaced -with the output type extension. Thus to generate PDFs for all files -in the :file:`series` directory and save them in the -:file:`series-gr` subfolder do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o - -The extension ".@o" is automatic when not included anywhere in the -output file name. Thus to process the Pt series at |Qmax| = 18 |Ainv| -while saving the results in the same folder, but with a "_qmax18" suffix -in their filenames do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18 - -For input file :file:`Pt_bulk_ramp03-00903.chi` the :option:`!-o` option -above expands to output path :file:`series-gr/Pt_bulk_ramp03-00903_qmax18.gr`. -The :file:`series-gr` directory should now contain 12 "gr" files, -6 of them processed at |Qmax| = 27 |Ainv| as given by configuration -file and 6 others processed at |Qmax| = 18 |Ainv|. - -.. seealso:: :option:`-o, --output <-o>` for a list of output tokens - -.. index:: tuneconfig (example) -.. _my-tuneconfig: - -Interactive tuning of parameters ------------------------------------------------------------------------- - -One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the :file:`Ni` directory in the shell and process -the nickel PDF while plotting the |FQ| and |Gr| curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -:py:func:`.tuneconfig` -function from the IPython environment :: - - $ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi - ... - In [1]: tuneconfig() - -The -:py:func:`!tuneconfig` -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot. - -.. image:: images/tunenickelfqgr.png - -The *constant data scale* check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -:ref:`PDF parameters section `. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the :confval:`bgscale` parameter -if PDF has been processed without any background data. - -By default the -:py:func:`!tuneconfig` -function displays the same curves as -specified by the :option:`--plot <-p>` option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the :py:meth:`!describe` method of the -:py:func:`.pdfgetter` object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object *t4* that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the :py:func:`!tuneconfig` function :: - - $ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi - ... - Use "%pdfgetx3" for a fresh run without exiting IPython. - - In [1]: fig, ax = subplots(2) - In [2]: pdfgetter.describe() - 0 TransformTwoThetaToQA - convert x data from twotheta to Q in 1/A - 1 TransformQGridRegular - Remove the data outside the (qmin, qmaxinst) range - 2 TransformBackground - subtract background intensity - 3 TransformXrayASFnormChris - scale and normalize intensities by x-ray scattering factors - 4 TransformSQnormRPoly - Normalize S(Q) by fitting a polynomial - 5 TransformSQToFQ - Convert S(Q) to F(Q). - 6 TransformFQgrid - Resample F(Q) to a regular grid suitable for FFT - 7 TransformFQToGr - Convert F(Q) to G(r). - In [3]: t4 = pdfgetter.getTransformation(4) - In [4]: tuneconfig([t4, 'gr'], axeslist=ax) - In [5]: ax[0].legend(loc=2) - -The :py:func:`~matplotlib.pyplot.subplots` function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window: - -.. image:: images/tunenickelt4gr.png - -The tuning can be finished by clicking the ``Done`` button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the :interactvar:`config` -object, for example:: - - In [5]: config.bgscale = 1.5 - -Finally, to save the new results, we shall first confirm -:confval:`outputtypes` have been correctly set and then use the -:py:func:`.processfiles` function to redo the calculations, plots and -data output for the updated configuration. Note that the -:py:func:`!processfiles` function accepts keyword arguments for -configuration parameters. This is used at line ``In [8]`` to -turn on the :confval:`force` flag and is in effect a shortcut -for an extra ``config.force = True`` statement. :: - - In [6]: config.outputtypes - Out[6]: ['gr'] - In [7]: processfiles() - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - In [8]: processfiles(force=True) - -:file:`ni300mesh_300k_nor_1-5.gr` was successfully saved at an -updated configuration for there were no warnings after the last call. - - -Neutron PDF ------------------------------------------------------------------------- - -This example illustrates PDF extraction from -neutron powder data using :ref:`pdfgetn3 `. -Navigate to the :file:`n-Sapphire` directory in the shell. -The :file:`sapphire755.dat` file contains powder diffraction data from -sapphire (α-Al\ :sub:`2`\ O\ :sub:`3`) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The :file:`pdfgetn3.cfg` configuration file specifies -processing parameters such as :confval:`wavelength`, -:confval:`twothetazero`, :confval:`composition`, and :confval:`mode`. - -To extract the sapphire neutron PDF run :: - - $ pdfgetn3 --verbose=info sapphire755.dat - - INFO:applying pdfgetn3 defaults - INFO:set config.mode = neutron - INFO:searching for default config file /home/user/.pdfgetn3.cfg - INFO:searching for default config file .pdfgetn3.cfg - INFO:searching for default config file pdfgetn3.cfg - INFO:loaded default config file pdfgetn3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = - INFO:set config.outputtypes = fq, gr - INFO:set config.mode = neutron - INFO:set config.wavelength = 1.0989 - INFO:set config.twothetazero = -0.38 - INFO:set config.composition = Al2O3 - INFO:set config.qmaxinst = 11.2 - INFO:set config.qmax = 11.2 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 20.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'neutron' - INFO:calling config_neutron - INFO:started PDF processing. - INFO:processing 'sapphire755.dat' - INFO:resolved output file '' as 'sapphire755.fq' - INFO:written outpufile sapphire755.fq - INFO:resolved output file '' as 'sapphire755.gr' - INFO:written outpufile sapphire755.gr - INFO:elapsed time: 0.097 - -This will produce two files :file:`sapphire755.fq`, :file:`sapphire755.gr` -for the |FQ| and |Gr| functions. -To compare them with expected results use :: - - $ plotdata sapphire755-expected.fq sapphire755.fq - $ plotdata sapphire755-expected.gr sapphire755.gr - - -Fit twothetazero ------------------------------------------------------------------------- - -For a good quality PDF it is essential to use powder patterns with -accurate values of *Q*. Some instruments may produce spectra with -a slightly offset scattering angle |twotheta| which -causes inaccurate *Q* and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the :confval:`twothetazero` correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples. - -This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -`diffpy.cmi `__, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use `Anaconda Python`_ and set up a dedicated -Anaconda environment *nbcmi* for this tutorial. -This can be accomplished using the following steps:: - - $ conda create -n nbcmi -c diffpy python=2 diffpy.cmi - $ conda activate nbcmi - $ pip install path/to/diffpy.pdfgetx-VERSION.whl - -When these prerequisites are in place, -change to the :file:`n-twothetazero-fit` directory -and open the self documented Jupyter notebook as follows :: - - $ jupyter notebook fit-twothetazero.ipynb - -.. |tthzero| replace:: :confval:`!twothetazero` - -The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted |tthzero|. -After running all cells the notebook should produce similar graphs -as in the figure below. - -.. figure:: images/twothetazerofit.* - - Refinement of nickel neutron PDF for **(a)** uncorrected data - and **(b)** with a refined zero correction. - The extracted PDFs are plotted as blue circles, - simulated PDFs as red lines and - the difference is plotted offset in green below. - -The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual R\ :sub:`w` which is lowered from (a) 0.18 to (b) 0.05. - - -Small-angle-scattering PDF (sasPDF) ------------------------------------------------------------------------- - -Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using :ref:`pdfgets3 `. -To do this, navigate to the :file:`Au_DNA_NPA` directory in your terminal. -In this folder, you will find :file:`Au_DNA_NPA.chi` and -:file:`Au_DNA_FF.chi` files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in `D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008). -`_. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The :file:`pdfgets3.cfg` -configuration file specifies processing parameters such as :confval:`formfactorfile` (required by ``sas`` mode), :confval:`qmin`, :confval:`qmax`, and :confval:`mode`. - -To extract the PDF of DNA-capped DNA nanoparticle assemblies :: - - $ pdfgets3 --verbose=info Au_DNA_NPA.chi - - INFO:applying pdfgets3 defaults - INFO:set config.mode = sas - INFO:searching for default config file /home/user/.pdfgets3.cfg - INFO:searching for default config file .pdfgets3.cfg - INFO:searching for default config file pdfgets3.cfg - INFO:loaded default config file pdfgets3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = QA - INFO:set config.backgroundfile = - INFO:set config.datapath = [] - INFO:set config.formfactorfile = Au_DNA_FF.chi - INFO:set config.output = - INFO:set config.outputtypes = fq, gr - INFO:set config.force = yes - INFO:set config.mode = sas - INFO:set config.rpoly = 240.605 - INFO:set config.qmaxinst = 0.075 - INFO:set config.qmin = 0.01 - INFO:set config.qmax = 0.072 - INFO:set config.rmin = 100.0 - INFO:set config.rmax = 5000.0 - INFO:set config.rstep = 1.0 - INFO:set config.plot = iq, fq, gr - INFO:set config.verbose = info - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'sas' - INFO:calling config_sas - INFO:started PDF processing. - INFO:processing 'Au_DNA_NPA.chi' - INFO:resolved output file '' as 'Au_DNA_NPA.fq' - INFO:written outpufile Au_DNA_NPA.fq - INFO:resolved output file '' as 'Au_DNA_NPA.gr' - INFO:written outpufile Au_DNA_NPA.gr - INFO:elapsed time: 0.947 - - -This will save two files :file:`Au_DNA_NPA.fq`, :file:`Au_DNA_NPA.gr` in the same directoy for the |FQ| and |Gr| functions. This also plots |FQ| and |Gr| functions in a pop-up window and the processing parameters such as :confval:`rpoly` or so may be tuned interactively by issuing command :py:func:`!tuneconfig` in the `IPython`_ session as discussed above. - - -Multiple Background Subtraction ------------------------------------------------------------------------- - -Predefined configuration file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -In this tutorial, we will show how to use the multiple-background subtraction -functionality by obtainining equivalent outputs from different, but equivalent, -subtractions. Change directory to the :file:`doc/examples/ -Multiple_Background_Subtraction` directory. The file named -:file:`ni300mesh_300k_nor_1-5.chi` contains powder X-ray data measured from -nickel at the Advanced Photon Source beamline 6ID-D. The file contains two -columns for the |twotheta| scattering angles and X-ray intensities. Similarly, -:file:`kapton_bgrd_300k_nor_2-3.chi` contains the background data (i.e., the -intensities from an empty kapton capillary), and a duplicate file -:file:`kapton_bgrd_300k_nor_2-3_copy.chi` contains the same dataset (this -duplication of the data is necessary when using the same background multiple -times as the internal system only stores a set of unique background filenames). -The last :file:`.chi` file, :file:`TEST_blank-00000.chi`, simply stores a null -dataset and can be used to show the invariance of the PDF under permutation of -the order of background subtractions as well as the fact that more than just -two backgrounds can be subtracted. There are also two config files -:file:`nickel.cfg` and :file:`nickel_sub_two_half_backgrounds.cfg`, each of -which contain a set of complete configuration parameters for converting the Ni -powder pattern to a PDF for the case of doing so via a single background -subtraction and a multiple background subtraction, respectively. Finally, there -is a fully processed G(r) file :file:`ni300mesh_300k_nor_1-5-expected.gr` which -contains the expected output of producing the PDF of the Ni sample after -subtracting the kapton background. Since all processing parameters are already -defined in these configuration files, producing the PDF using multiple -background subtractions is very simple and involves running the :ref:`pdfgetx3 -` program and specifying the multiple background subtraction -config file and the powder data file as arguments:: - - $ pdfgetx3 -c nickel_sub_two_half_backgrounds.cfg ni300mesh_300k_nor_1-5.chi - -The resulting G(r) file, :file:`ni300mesh_300k_nor_1-5.gr`, is the result of -producing the PDF according to:: - - "ni300mesh_300k_nor_1-5.chi" - 0.5*"kapton_bgrd_300k_nor_2-3.chi" - - 0.5*"kapton_bgrd_300k_nor_2-3.chi" - -Which should be equivalent to the case where the following single background -subtraction had been performed:: - - "ni300mesh_300k_nor_1-5.chi" - 1.0*"kapton_bgrd_300k_nor_2-3.chi" - -The fact that both of these result in the same PDF can be verified by comparing -the produced G(r) with the expected G(r) provided in the example:: - - $ plotdata ni300mesh_300k_nor_1-5-expected.gr ni300mesh_300k_nor_1-5.gr - - -Interactive Multiple Background Subtraction -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The multiple background subtraction functionality can also be carried out -interactively, as per the :ref:`my-tuneconfig` section, using the plural forms -of the relevant variables (i.e., `config.bgscales`, `config.backgroundfiles`, -etc.). diff --git a/static_root/doc/pdfgetx/2.2.1/_static/basic.css b/static_root/doc/pdfgetx/2.2.1/_static/basic.css deleted file mode 100644 index bf18350b..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_static/basic.css +++ /dev/null @@ -1,906 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- 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: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -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: 450px; - 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.brackets:before, -span.brackets > a:before{ - content: "["; -} - -a.brackets:after, -span.brackets > a:after { - content: "]"; -} - -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; -} - -div.admonition, div.topic, blockquote { - clear: left; -} - -/* -- topics ---------------------------------------------------------------- */ - -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, -div.topic > :last-child, -div.admonition > :last-child { - margin-bottom: 0; -} - -div.sidebar::after, -aside.sidebar::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; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -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; -} - -dl.footnote > dt, -dl.citation > dt { - float: left; - margin-right: 0.5em; -} - -dl.footnote > dd, -dl.citation > dd { - margin-bottom: 0em; -} - -dl.footnote > dd:after, -dl.citation > dd: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 > dt:after { - content: ":"; -} - -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; -} - -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_root/doc/pdfgetx/2.2.1/_static/classic.css b/static_root/doc/pdfgetx/2.2.1/_static/classic.css deleted file mode 100644 index e7f5610e..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_static/classic.css +++ /dev/null @@ -1,271 +0,0 @@ -/* - * classic.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- classic theme. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -html { - /* CSS hack for macOS's scrollbar (see #1125) */ - background-color: #FFFFFF; -} - -body { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; - font-size: 100%; - background-color: white; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: white; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: white; - color: #222222; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #555555; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #555555; - text-decoration: underline; -} - -div.related { - background-color: white; - line-height: 30px; - color: #666666; -} - -div.related a { - color: #444444; -} - -div.sphinxsidebar { -} - -div.sphinxsidebar h3 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #444444; -} - -div.sphinxsidebar h4 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - color: #444444; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #444444; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #444444; -} - -div.sphinxsidebar a { - color: #444444; -} - -div.sphinxsidebar input { - border: 1px solid #444444; - font-family: sans-serif; - font-size: 1em; -} - - -/* for collapsible sidebar */ -div#sidebarbutton { - background-color: #3c6e83; -} - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #00608f; - text-decoration: none; -} - -a:visited { - color: #30306f; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Myriad Pro', 'Trebuchet Ms', 'Segoe UI', sans-serif; - background-color: white; - font-weight: normal; - color: #1a1a1a; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #aaaaaa; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #aaaaaa; - color: white; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: unset; - color: unset; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -code { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th, dl.field-list > dt { - background-color: #ede; -} - -.warning code { - background: #efc2c2; -} - -.note code { - background: #d6d6d6; -} - -.viewcode-back { - font-family: 'Palatino', 'Palatino Linotype', 'URW Palladio L', 'Century Schoolbook L', 'Georgia', serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -div.code-block-caption { - color: #efefef; - background-color: #1c4e63; -} \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/_static/copybutton.js b/static_root/doc/pdfgetx/2.2.1/_static/copybutton.js deleted file mode 100644 index ca9f489f..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_static/copybutton.js +++ /dev/null @@ -1,57 +0,0 @@ -$(document).ready(function() { - /* Add a [>>>] button on the top-right corner of code samples to hide - * the >>> and ... prompts and the output and thus make the code - * copyable. */ - var div = $('.highlight-python .highlight,' + - '.highlight-pycon .highlight,' + - '.highlight-python3 .highlight') - var pre = div.find('pre'); - - // get the styles from the current theme - pre.parent().parent().css('position', 'relative'); - var hide_text = 'Hide the prompts and output'; - var show_text = 'Show the prompts and output'; - var border_width = pre.css('border-top-width'); - var border_style = pre.css('border-top-style'); - var border_color = pre.css('border-top-color'); - var button_styles = { - 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', - 'border-color': border_color, 'border-style': border_style, - 'border-width': border_width, 'color': border_color, 'text-size': '75%', - 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', - 'border-radius': '0 3px 0 0' - } - - // create and add the button to all the code blocks that contain >>> - div.each(function(index) { - var jthis = $(this); - if (jthis.find('.gp').length > 0) { - var button = $('>>>'); - button.css(button_styles) - button.attr('title', hide_text); - jthis.prepend(button); - } - // tracebacks (.gt) contain bare text elements that need to be - // wrapped in a span to work with .nextUntil() (see later) - jthis.find('pre:has(.gt)').contents().filter(function() { - return ((this.nodeType == 3) && (this.data.trim().length > 0)); - }).wrap(''); - }); - - // define the behavior of the button when it's clicked - $('.copybutton').toggle( - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').hide(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); - button.css('text-decoration', 'line-through'); - button.attr('title', show_text); - }, - function() { - var button = $(this); - button.parent().find('.go, .gp, .gt').show(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); - button.css('text-decoration', 'none'); - button.attr('title', hide_text); - }); -}); diff --git a/static_root/doc/pdfgetx/2.2.1/_static/doctools.js b/static_root/doc/pdfgetx/2.2.1/_static/doctools.js deleted file mode 100644 index e509e483..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_static/doctools.js +++ /dev/null @@ -1,326 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * 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; -} - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { - this.initOnKeyListeners(); - } - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return 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 : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - var url = new URL(window.location); - url.searchParams.delete('highlight'); - window.history.replaceState({}, '', url); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keydown(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box, textarea, dropdown or button - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey - && !event.shiftKey) { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - break; - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - break; - } - } - }); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); diff --git a/static_root/doc/pdfgetx/2.2.1/_static/documentation_options.js b/static_root/doc/pdfgetx/2.2.1/_static/documentation_options.js deleted file mode 100644 index dbd10312..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_static/documentation_options.js +++ /dev/null @@ -1,12 +0,0 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '2.2.1', - LANGUAGE: 'None', - COLLAPSE_INDEX: false, - BUILDER: 'html', - FILE_SUFFIX: '.html', - LINK_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: true -}; \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/_static/favicon.png b/static_root/doc/pdfgetx/2.2.1/_static/favicon.png deleted file mode 100644 index 93e4a02c..00000000 Binary files a/static_root/doc/pdfgetx/2.2.1/_static/favicon.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.1/_static/file.png b/static_root/doc/pdfgetx/2.2.1/_static/file.png deleted file mode 100644 index a858a410..00000000 Binary files a/static_root/doc/pdfgetx/2.2.1/_static/file.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.1/_static/jquery-3.5.1.js b/static_root/doc/pdfgetx/2.2.1/_static/jquery-3.5.1.js deleted file mode 100644 index 50937333..00000000 --- a/static_root/doc/pdfgetx/2.2.1/_static/jquery-3.5.1.js +++ /dev/null @@ -1,10872 +0,0 @@ -/*! - * jQuery JavaScript Library v3.5.1 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2020-05-04T22:49Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var flat = arr.flat ? function( array ) { - return arr.flat.call( array ); -} : function( array ) { - return arr.concat.apply( [], array ); -}; - - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - -var isFunction = function isFunction( obj ) { - - // Support: Chrome <=57, Firefox <=52 - // In some browsers, typeof returns "function" for HTML elements - // (i.e., `typeof document.createElement( "object" ) === "function"`). - // We don't want to classify *any* DOM node as a function. - return typeof obj === "function" && typeof obj.nodeType !== "number"; - }; - - -var isWindow = function isWindow( obj ) { - return obj != null && obj === obj.window; - }; - - -var document = window.document; - - - - var preservedScriptAttributes = { - type: true, - src: true, - nonce: true, - noModule: true - }; - - function DOMEval( code, node, doc ) { - doc = doc || document; - - var i, val, - script = doc.createElement( "script" ); - - script.text = code; - if ( node ) { - for ( i in preservedScriptAttributes ) { - - // Support: Firefox 64+, Edge 18+ - // Some browsers don't support the "nonce" property on scripts. - // On the other hand, just using `getAttribute` is not enough as - // the `nonce` attribute is reset to an empty string whenever it - // becomes browsing-context connected. - // See https://github.com/whatwg/html/issues/2369 - // See https://html.spec.whatwg.org/#nonce-attributes - // The `node.getAttribute` check was added for the sake of - // `jQuery.globalEval` so that it can fake a nonce-containing node - // via an object. - val = node[ i ] || node.getAttribute && node.getAttribute( i ); - if ( val ) { - script.setAttribute( i, val ); - } - } - } - doc.head.appendChild( script ).parentNode.removeChild( script ); - } - - -function toType( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; -} -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.5.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - even: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return ( i + 1 ) % 2; - } ) ); - }, - - odd: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return i % 2; - } ) ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - copy = options[ name ]; - - // Prevent Object.prototype pollution - // Prevent never-ending loop - if ( name === "__proto__" || target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - src = target[ name ]; - - // Ensure proper type for the source value - if ( copyIsArray && !Array.isArray( src ) ) { - clone = []; - } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { - clone = {}; - } else { - clone = src; - } - copyIsArray = false; - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - // Evaluates a script in a provided context; falls back to the global one - // if not specified. - globalEval: function( code, options, doc ) { - DOMEval( code, { nonce: options && options.nonce }, doc ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return flat( ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( _i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = toType( obj ); - - if ( isFunction( obj ) || isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.5 - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://js.foundation/ - * - * Date: 2020-03-14 - */ -( function( window ) { -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - nonnativeSelectorCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ( {} ).hasOwnProperty, - arr = [], - pop = arr.pop, - pushNative = arr.push, - push = arr.push, - slice = arr.slice, - - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[ i ] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + - "ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram - identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + - "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - - // "Attribute values must be CSS identifiers [capture 5] - // or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + - whitespace + "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + - whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + - "*" ), - rdescend = new RegExp( whitespace + "|>" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + - whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + - whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + - "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + - "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rhtml = /HTML$/i, - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), - funescape = function( escape, nonHex ) { - var high = "0x" + escape.slice( 1 ) - 0x10000; - - return nonHex ? - - // Strip the backslash prefix from a non-hex escape sequence - nonHex : - - // Replace a hexadecimal escape sequence with the encoded Unicode code point - // Support: IE <=11+ - // For values outside the Basic Multilingual Plane (BMP), manually construct a - // surrogate pair - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + - ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - inDisabledFieldset = addCombinator( - function( elem ) { - return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - ( arr = slice.call( preferredDoc.childNodes ) ), - preferredDoc.childNodes - ); - - // Support: Android<4.0 - // Detect silently failing push.apply - // eslint-disable-next-line no-unused-expressions - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - pushNative.apply( target, slice.call( els ) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - - // Can't trust NodeList.length - while ( ( target[ j++ ] = els[ i++ ] ) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - setDocument( context ); - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { - - // ID selector - if ( ( m = match[ 1 ] ) ) { - - // Document context - if ( nodeType === 9 ) { - if ( ( elem = context.getElementById( m ) ) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && ( elem = newContext.getElementById( m ) ) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[ 2 ] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !nonnativeSelectorCache[ selector + " " ] && - ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && - - // Support: IE 8 only - // Exclude object elements - ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { - - newSelector = selector; - newContext = context; - - // qSA considers elements outside a scoping root when evaluating child or - // descendant combinators, which is not what we want. - // In such cases, we work around the behavior by prefixing every selector in the - // list with an ID selector referencing the scope context. - // The technique has to be used as well when a leading combinator is used - // as such selectors are not recognized by querySelectorAll. - // Thanks to Andrew Dupont for this technique. - if ( nodeType === 1 && - ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - - // We can use :scope instead of the ID hack if the browser - // supports it & if we're not changing the context. - if ( newContext !== context || !support.scope ) { - - // Capture the context ID, setting it first if necessary - if ( ( nid = context.getAttribute( "id" ) ) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", ( nid = expando ) ); - } - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + - toSelector( groups[ i ] ); - } - newSelector = groups.join( "," ); - } - - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - nonnativeSelectorCache( selector, true ); - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return ( cache[ key + " " ] = value ); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement( "fieldset" ); - - try { - return !!fn( el ); - } catch ( e ) { - return false; - } finally { - - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split( "|" ), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[ i ] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( ( cur = cur.nextSibling ) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return ( name === "input" || name === "button" ) && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || - - // Where there is no isDisabled, check manually - /* jshint -W018 */ - elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; - } - - return elem.disabled === disabled; - - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } - - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction( function( argument ) { - argument = +argument; - return markFunction( function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ ( j = matchIndexes[ i ] ) ] ) { - seed[ j ] = !( matches[ j ] = seed[ j ] ); - } - } - } ); - } ); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - var namespace = elem.namespaceURI, - docElem = ( elem.ownerDocument || elem ).documentElement; - - // Support: IE <=8 - // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes - // https://bugs.jquery.com/ticket/4833 - return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9 - 11+, Edge 12 - 18+ - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( preferredDoc != document && - ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, - // Safari 4 - 5 only, Opera <=11.6 - 12.x only - // IE/Edge & older browsers don't support the :scope pseudo-class. - // Support: Safari 6.0 only - // Safari 6.0 supports :scope but it's an alias of :root there. - support.scope = assert( function( el ) { - docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); - return typeof el.querySelectorAll !== "undefined" && - !el.querySelectorAll( ":scope fieldset div" ).length; - } ); - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert( function( el ) { - el.className = "i"; - return !el.getAttribute( "className" ); - } ); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert( function( el ) { - el.appendChild( document.createComment( "" ) ); - return !el.getElementsByTagName( "*" ).length; - } ); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert( function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - } ); - - // ID filter and find - if ( support.getById ) { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute( "id" ) === attrId; - }; - }; - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode( "id" ); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( ( elem = elems[ i++ ] ) ) { - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find[ "TAG" ] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert( function( el ) { - - var input; - - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll( "[selected]" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push( "~=" ); - } - - // Support: IE 11+, Edge 15 - 18+ - // IE 11/Edge don't find elements on a `[name='']` query in some cases. - // Adding a temporary attribute to the document before the selection works - // around the issue. - // Interestingly, IE 10 & older don't seem to have the issue. - input = document.createElement( "input" ); - input.setAttribute( "name", "" ); - el.appendChild( input ); - if ( !el.querySelectorAll( "[name='']" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + - whitespace + "*(?:''|\"\")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll( ":checked" ).length ) { - rbuggyQSA.push( ":checked" ); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push( ".#.+[+~]" ); - } - - // Support: Firefox <=3.6 - 5 only - // Old Firefox doesn't throw on a badly-escaped identifier. - el.querySelectorAll( "\\\f" ); - rbuggyQSA.push( "[\\r\\n\\f]" ); - } ); - - assert( function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement( "input" ); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll( "[name=d]" ).length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: Opera 10 - 11 only - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll( "*,:x" ); - rbuggyQSA.push( ",.*:" ); - } ); - } - - if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector ) ) ) ) { - - assert( function( el ) { - - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - } ); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - ) ); - } : - function( a, b ) { - if ( b ) { - while ( ( b = b.parentNode ) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { - - // Choose the first element that is related to our preferred document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( a == document || a.ownerDocument == preferredDoc && - contains( preferredDoc, a ) ) { - return -1; - } - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( b == document || b.ownerDocument == preferredDoc && - contains( preferredDoc, b ) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - return a == document ? -1 : - b == document ? 1 : - /* eslint-enable eqeqeq */ - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( ( cur = cur.parentNode ) ) { - ap.unshift( cur ); - } - cur = b; - while ( ( cur = cur.parentNode ) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[ i ] === bp[ i ] ) { - i++; - } - - return i ? - - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[ i ], bp[ i ] ) : - - // Otherwise nodes in our document sort first - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - ap[ i ] == preferredDoc ? -1 : - bp[ i ] == preferredDoc ? 1 : - /* eslint-enable eqeqeq */ - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - setDocument( elem ); - - if ( support.matchesSelector && documentIsHTML && - !nonnativeSelectorCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch ( e ) { - nonnativeSelectorCache( expr, true ); - } - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( context.ownerDocument || context ) != document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( elem.ownerDocument || elem ) != document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return ( sel + "" ).replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - - // If no nodeType, this is expected to be an array - while ( ( node = elem[ i++ ] ) ) { - - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[ 1 ] = match[ 1 ].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[ 3 ] = ( match[ 3 ] || match[ 4 ] || - match[ 5 ] || "" ).replace( runescape, funescape ); - - if ( match[ 2 ] === "~=" ) { - match[ 3 ] = " " + match[ 3 ] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[ 1 ] = match[ 1 ].toLowerCase(); - - if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { - - // nth-* requires argument - if ( !match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[ 4 ] = +( match[ 4 ] ? - match[ 5 ] + ( match[ 6 ] || 1 ) : - 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); - match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); - - // other types prohibit arguments - } else if ( match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[ 6 ] && match[ 2 ]; - - if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[ 3 ] ) { - match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - - // Get excess from tokenize (recursively) - ( excess = tokenize( unquoted, true ) ) && - - // advance to the next closing parenthesis - ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { - - // excess is a negative index - match[ 0 ] = match[ 0 ].slice( 0, excess ); - match[ 2 ] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { - return true; - } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - ( pattern = new RegExp( "(^|" + whitespace + - ")" + className + "(" + whitespace + "|$)" ) ) && classCache( - className, function( elem ) { - return pattern.test( - typeof elem.className === "string" && elem.className || - typeof elem.getAttribute !== "undefined" && - elem.getAttribute( "class" ) || - "" - ); - } ); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - /* eslint-disable max-len */ - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - /* eslint-enable max-len */ - - }; - }, - - "CHILD": function( type, what, _argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, _context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( ( node = node[ dir ] ) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( ( node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - - // Use previously-cached element index if available - if ( useCache ) { - - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - - // Use the same loop as above to seek `elem` from the start - while ( ( node = ++nodeIndex && node && node[ dir ] || - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || - ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction( function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[ i ] ); - seed[ idx ] = !( matches[ idx ] = matched[ i ] ); - } - } ) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - - // Potentially complex pseudos - "not": markFunction( function( selector ) { - - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction( function( seed, matches, _context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( ( elem = unmatched[ i ] ) ) { - seed[ i ] = !( matches[ i ] = elem ); - } - } - } ) : - function( elem, _context, xml ) { - input[ 0 ] = elem; - matcher( input, null, xml, results ); - - // Don't keep the element (issue #299) - input[ 0 ] = null; - return !results.pop(); - }; - } ), - - "has": markFunction( function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - } ), - - "contains": markFunction( function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; - }; - } ), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - - // lang value must be a valid identifier - if ( !ridentifier.test( lang || "" ) ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( ( elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); - return false; - }; - } ), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && - ( !document.hasFocus || document.hasFocus() ) && - !!( elem.type || elem.href || ~elem.tabIndex ); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return ( nodeName === "input" && !!elem.checked ) || - ( nodeName === "option" && !!elem.selected ); - }, - - "selected": function( elem ) { - - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - // eslint-disable-next-line no-unused-expressions - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos[ "empty" ]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( ( attr = elem.getAttribute( "type" ) ) == null || - attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo( function() { - return [ 0 ]; - } ), - - "last": createPositionalPseudo( function( _matchIndexes, length ) { - return [ length - 1 ]; - } ), - - "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - } ), - - "even": createPositionalPseudo( function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "odd": createPositionalPseudo( function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? - argument + length : - argument > length ? - length : - argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ) - } -}; - -Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || ( match = rcomma.exec( soFar ) ) ) { - if ( match ) { - - // Don't consume trailing commas as valid - soFar = soFar.slice( match[ 0 ].length ) || soFar; - } - groups.push( ( tokens = [] ) ); - } - - matched = false; - - // Combinators - if ( ( match = rcombinators.exec( soFar ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - - // Cast descendant combinators to space - type: match[ 0 ].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || - ( match = preFilters[ type ]( match ) ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[ i ].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || ( elem[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || - ( outerCache[ elem.uniqueID ] = {} ); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( ( oldCache = uniqueCache[ key ] ) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return ( newCache[ 2 ] = oldCache[ 2 ] ); - } else { - - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[ i ]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[ 0 ]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[ i ], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( ( elem = unmatched[ i ] ) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction( function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( - selector || "*", - context.nodeType ? [ context ] : context, - [] - ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( ( elem = temp[ i ] ) ) { - matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) ) { - - // Restore matcherIn since elem is not yet a final match - temp.push( ( matcherIn[ i ] = elem ) ); - } - } - postFinder( null, ( matcherOut = [] ), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) && - ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { - - seed[ temp ] = !( results[ temp ] = elem ); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - } ); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[ 0 ].type ], - implicitRelative = leadingRelative || Expr.relative[ " " ], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - ( checkContext = context ).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { - matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; - } else { - matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[ j ].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens - .slice( 0, i - 1 ) - .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), - - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), - len = elems.length; - - if ( outermost ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - outermostContext = context == document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( !context && elem.ownerDocument != document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( ( matcher = elementMatchers[ j++ ] ) ) { - if ( matcher( elem, context || document, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - - // They will have gone through all possible matchers - if ( ( elem = !matcher && elem ) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( ( matcher = setMatchers[ j++ ] ) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !( unmatched[ i ] || setMatched[ i ] ) ) { - setMatched[ i ] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[ i ] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( - selector, - matcherFromGroupMatchers( elementMatchers, setMatchers ) - ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( ( selector = compiled.selector || selector ) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[ 0 ] = match[ 0 ].slice( 0 ); - if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { - - context = ( Expr.find[ "ID" ]( token.matches[ 0 ] - .replace( runescape, funescape ), context ) || [] )[ 0 ]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[ i ]; - - // Abort if we hit a combinator - if ( Expr.relative[ ( type = token.type ) ] ) { - break; - } - if ( ( find = Expr.find[ type ] ) ) { - - // Search, expanding context for leading sibling combinators - if ( ( seed = find( - token.matches[ 0 ].replace( runescape, funescape ), - rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || - context - ) ) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert( function( el ) { - - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; -} ); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert( function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute( "href" ) === "#"; -} ) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - } ); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert( function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -} ) ) { - addHandle( "value", function( elem, _name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - } ); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert( function( el ) { - return el.getAttribute( "disabled" ) == null; -} ) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; - } - } ); -} - -return Sizzle; - -} )( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -}; -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Filtered directly for both simple and complex selectors - return jQuery.filter( qualifier, elements, not ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, _i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, _i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, _i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( elem.contentDocument != null && - - // Support: IE 11+ - // elements with no `data` attribute has an object - // `contentDocument` with a `null` prototype. - getProto( elem.contentDocument ) ) { - - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && toType( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( _i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && - - // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // rejected_handlers.disable - // fulfilled_handlers.disable - tuples[ 3 - i ][ 3 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock, - - // progress_handlers.lock - tuples[ 0 ][ 3 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the master Deferred - master = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || - isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return master.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); - } - - return master.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( toType( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, _key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; - - -// Matches dashed string for camelizing -var rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g; - -// Used by camelCase as callback to replace() -function fcamelCase( _all, letter ) { - return letter.toUpperCase(); -} - -// Convert dashed to camelCase; used by the css and data modules -// Support: IE <=9 - 11, Edge 12 - 15 -// Microsoft forgot to hump their vendor prefix (#9572) -function camelCase( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); -} -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( camelCase ); - } else { - key = camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var documentElement = document.documentElement; - - - - var isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ); - }, - composed = { composed: true }; - - // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only - // Check attachment across shadow DOM boundaries when possible (gh-3504) - // Support: iOS 10.0-10.2 only - // Early iOS 10 versions support `attachShadow` but not `getRootNode`, - // leading to errors. We need to check for `getRootNode`. - if ( documentElement.getRootNode ) { - isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ) || - elem.getRootNode( composed ) === elem.ownerDocument; - }; - } -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && - - // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - isAttached( elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, scale, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = elem.nodeType && - ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Support: Firefox <=54 - // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) - initial = initial / 2; - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - while ( maxIterations-- ) { - - // Evaluate and update our best guess (doubling guesses that zero out). - // Finish if the scale equals or crosses 1 (making the old*new product non-positive). - jQuery.style( elem, prop, initialInUnit + unit ); - if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { - maxIterations = 0; - } - initialInUnit = initialInUnit / scale; - - } - - initialInUnit = initialInUnit * 2; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); - -var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); - - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; - - // Support: IE <=9 only - // IE <=9 replaces "; - support.option = !!div.lastChild; -} )(); - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] -}; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: IE <=9 only -if ( !support.option ) { - wrapMap.optgroup = wrapMap.option = [ 1, "" ]; -} - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, attached, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( toType( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - attached = isAttached( elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( attached ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 - 11+ -// focus() and blur() are asynchronous, except when they are no-op. -// So expect focus to be synchronous when the element is already active, -// and blur to be synchronous when the element is not already active. -// (focus and blur are always synchronous in other supported browsers, -// this just defines when we can count on it). -function expectSync( elem, type ) { - return ( elem === safeActiveElement() ) === ( type === "focus" ); -} - -// Support: IE <=9 only -// Accessing document.activeElement can throw unexpectedly -// https://bugs.jquery.com/ticket/13393 -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Only attach events to objects that accept data - if ( !acceptData( elem ) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = Object.create( null ); - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( nativeEvent ), - - handlers = ( - dataPriv.get( this, "events" ) || Object.create( null ) - )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // If the event is namespaced, then each handler is only invoked if it is - // specially universal or its namespaces are a superset of the event's. - if ( !event.rnamespace || handleObj.namespace === false || - event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && - - // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && - - // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - - // Utilize native event to ensure correct state for checkable inputs - setup: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Claim the first handler - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - // dataPriv.set( el, "click", ... ) - leverageNative( el, "click", returnTrue ); - } - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Force setup before triggering a click - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - leverageNative( el, "click" ); - } - - // Return non-false to allow normal event-path propagation - return true; - }, - - // For cross-browser consistency, suppress native .click() on links - // Also prevent it if we're currently inside a leveraged native-event stack - _default: function( event ) { - var target = event.target; - return rcheckableType.test( target.type ) && - target.click && nodeName( target, "input" ) && - dataPriv.get( target, "click" ) || - nodeName( target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -// Ensure the presence of an event listener that handles manually-triggered -// synthetic events by interrupting progress until reinvoked in response to -// *native* events that it fires directly, ensuring that state changes have -// already occurred before other listeners are invoked. -function leverageNative( el, type, expectSync ) { - - // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add - if ( !expectSync ) { - if ( dataPriv.get( el, type ) === undefined ) { - jQuery.event.add( el, type, returnTrue ); - } - return; - } - - // Register the controller as a special universal handler for all event namespaces - dataPriv.set( el, type, false ); - jQuery.event.add( el, type, { - namespace: false, - handler: function( event ) { - var notAsync, result, - saved = dataPriv.get( this, type ); - - if ( ( event.isTrigger & 1 ) && this[ type ] ) { - - // Interrupt processing of the outer synthetic .trigger()ed event - // Saved data should be false in such cases, but might be a leftover capture object - // from an async native handler (gh-4350) - if ( !saved.length ) { - - // Store arguments for use when handling the inner native event - // There will always be at least one argument (an event object), so this array - // will not be confused with a leftover capture object. - saved = slice.call( arguments ); - dataPriv.set( this, type, saved ); - - // Trigger the native event and capture its result - // Support: IE <=9 - 11+ - // focus() and blur() are asynchronous - notAsync = expectSync( this, type ); - this[ type ](); - result = dataPriv.get( this, type ); - if ( saved !== result || notAsync ) { - dataPriv.set( this, type, false ); - } else { - result = {}; - } - if ( saved !== result ) { - - // Cancel the outer synthetic event - event.stopImmediatePropagation(); - event.preventDefault(); - return result.value; - } - - // If this is an inner synthetic event for an event with a bubbling surrogate - // (focus or blur), assume that the surrogate already propagated from triggering the - // native event and prevent that from happening again here. - // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the - // bubbling surrogate propagates *after* the non-bubbling base), but that seems - // less bad than duplication. - } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { - event.stopPropagation(); - } - - // If this is a native event triggered above, everything is now in order - // Fire an inner synthetic event with the original arguments - } else if ( saved.length ) { - - // ...and capture the result - dataPriv.set( this, type, { - value: jQuery.event.trigger( - - // Support: IE <=9 - 11+ - // Extend with the prototype to reset the above stopImmediatePropagation() - jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), - saved.slice( 1 ), - this - ) - } ); - - // Abort handling of the native event - event.stopImmediatePropagation(); - } - } - } ); -} - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || Date.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - code: true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } -}, jQuery.event.addProp ); - -jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { - jQuery.event.special[ type ] = { - - // Utilize native event if possible so blur/focus sequence is correct - setup: function() { - - // Claim the first handler - // dataPriv.set( this, "focus", ... ) - // dataPriv.set( this, "blur", ... ) - leverageNative( this, type, expectSync ); - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function() { - - // Force setup before trigger - leverageNative( this, type ); - - // Return non-false to allow normal event-path propagation - return true; - }, - - delegateType: delegateType - }; -} ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - // Support: IE <=10 - 11, Edge 12 - 13 only - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( elem ).children( "tbody" )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { - elem.type = elem.type.slice( 5 ); - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.get( src ); - events = pdataOld.events; - - if ( events ) { - dataPriv.remove( dest, "handle events" ); - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = flat( args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - valueIsFunction = isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( valueIsFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( valueIsFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl && !node.noModule ) { - jQuery._evalUrl( node.src, { - nonce: node.nonce || node.getAttribute( "nonce" ) - }, doc ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && isAttached( node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html; - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = isAttached( elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - -var swap = function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - -var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - container.style.cssText = "position:absolute;left:-11111px;width:60px;" + - "margin-top:1px;padding:0;border:0"; - div.style.cssText = - "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + - "margin:auto;border:1px;padding:1px;" + - "width:60%;top:1%"; - documentElement.appendChild( container ).appendChild( div ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; - - // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 - // Some styles come back with percentage values, even though they shouldn't - div.style.right = "60%"; - pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; - - // Support: IE 9 - 11 only - // Detect misreporting of content dimensions for box-sizing:border-box elements - boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; - - // Support: IE 9 only - // Detect overflow:scroll screwiness (gh-3699) - // Support: Chrome <=64 - // Don't get tricked when zoom affects offsetWidth (gh-4029) - div.style.position = "absolute"; - scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - function roundPixelMeasures( measure ) { - return Math.round( parseFloat( measure ) ); - } - - var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, - reliableTrDimensionsVal, reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - jQuery.extend( support, { - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelBoxStyles: function() { - computeStyleTests(); - return pixelBoxStylesVal; - }, - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - }, - scrollboxSize: function() { - computeStyleTests(); - return scrollboxSizeVal; - }, - - // Support: IE 9 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Behavior in IE 9 is more subtle than in newer versions & it passes - // some versions of this test; make sure not to make it pass there! - reliableTrDimensions: function() { - var table, tr, trChild, trStyle; - if ( reliableTrDimensionsVal == null ) { - table = document.createElement( "table" ); - tr = document.createElement( "tr" ); - trChild = document.createElement( "div" ); - - table.style.cssText = "position:absolute;left:-11111px"; - tr.style.height = "1px"; - trChild.style.height = "9px"; - - documentElement - .appendChild( table ) - .appendChild( tr ) - .appendChild( trChild ); - - trStyle = window.getComputedStyle( tr ); - reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; - - documentElement.removeChild( table ); - } - return reliableTrDimensionsVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !isAttached( elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style, - vendorProps = {}; - -// Return a vendor-prefixed property or undefined -function vendorPropName( name ) { - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a potentially-mapped jQuery.cssProps or vendor prefixed property -function finalPropName( name ) { - var final = jQuery.cssProps[ name ] || vendorProps[ name ]; - - if ( final ) { - return final; - } - if ( name in emptyStyle ) { - return name; - } - return vendorProps[ name ] = vendorPropName( name ) || name; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }; - -function setPositiveNumber( _elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { - var i = dimension === "width" ? 1 : 0, - extra = 0, - delta = 0; - - // Adjustment may not be necessary - if ( box === ( isBorderBox ? "border" : "content" ) ) { - return 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin - if ( box === "margin" ) { - delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); - } - - // If we get here with a content-box, we're seeking "padding" or "border" or "margin" - if ( !isBorderBox ) { - - // Add padding - delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // For "border" or "margin", add border - if ( box !== "padding" ) { - delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - - // But still keep track of it otherwise - } else { - extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - - // If we get here with a border-box (content + padding + border), we're seeking "content" or - // "padding" or "margin" - } else { - - // For "content", subtract padding - if ( box === "content" ) { - delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // For "content" or "padding", subtract border - if ( box !== "margin" ) { - delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - // Account for positive content-box scroll gutter when requested by providing computedVal - if ( !isBorderBox && computedVal >= 0 ) { - - // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border - // Assuming integer scroll gutter, subtract the rest and round down - delta += Math.max( 0, Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - computedVal - - delta - - extra - - 0.5 - - // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter - // Use an explicit zero to avoid NaN (gh-3964) - ) ) || 0; - } - - return delta; -} - -function getWidthOrHeight( elem, dimension, extra ) { - - // Start with computed style - var styles = getStyles( elem ), - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). - // Fake content-box until we know it's needed to know the true value. - boxSizingNeeded = !support.boxSizingReliable() || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - valueIsBorderBox = isBorderBox, - - val = curCSS( elem, dimension, styles ), - offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); - - // Support: Firefox <=54 - // Return a confounding non-pixel value or feign ignorance, as appropriate. - if ( rnumnonpx.test( val ) ) { - if ( !extra ) { - return val; - } - val = "auto"; - } - - - // Support: IE 9 - 11 only - // Use offsetWidth/offsetHeight for when box sizing is unreliable. - // In those cases, the computed value can be trusted to be border-box. - if ( ( !support.boxSizingReliable() && isBorderBox || - - // Support: IE 10 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Interestingly, in some cases IE 9 doesn't suffer from this issue. - !support.reliableTrDimensions() && nodeName( elem, "tr" ) || - - // Fall back to offsetWidth/offsetHeight when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - val === "auto" || - - // Support: Android <=4.1 - 4.3 only - // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && - - // Make sure the element is visible & connected - elem.getClientRects().length ) { - - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Where available, offsetWidth/offsetHeight approximate border box dimensions. - // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the - // retrieved value as a content box dimension. - valueIsBorderBox = offsetProp in elem; - if ( valueIsBorderBox ) { - val = elem[ offsetProp ]; - } - } - - // Normalize "" and auto - val = parseFloat( val ) || 0; - - // Adjust for the element's box model - return ( val + - boxModelAdjustment( - elem, - dimension, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles, - - // Provide the current computed size to request scroll gutter calculation (gh-3589) - val - ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "gridArea": true, - "gridColumn": true, - "gridColumnEnd": true, - "gridColumnStart": true, - "gridRow": true, - "gridRowEnd": true, - "gridRowStart": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: {}, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append - // "px" to a few hardcoded values. - if ( type === "number" && !isCustomProp ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( _i, dimension ) { - jQuery.cssHooks[ dimension ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && - - // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, dimension, extra ); - } ) : - getWidthOrHeight( elem, dimension, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = getStyles( elem ), - - // Only read styles.position if the test has a chance to fail - // to avoid forcing a reflow. - scrollboxSizeBuggy = !support.scrollboxSize() && - styles.position === "absolute", - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) - boxSizingNeeded = scrollboxSizeBuggy || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - subtract = extra ? - boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ) : - 0; - - // Account for unreliable border-box dimensions by comparing offset* to computed and - // faking a content-box to get border and padding (gh-3699) - if ( isBorderBox && scrollboxSizeBuggy ) { - subtract -= Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - parseFloat( styles[ dimension ] ) - - boxModelAdjustment( elem, dimension, "border", false, styles ) - - 0.5 - ); - } - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ dimension ] = value; - value = jQuery.css( elem, dimension ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || - elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( prefix !== "margin" ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || - tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = Date.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 15 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY and Edge just mirrors - // the overflowX value there. - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - result.stop.bind( result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = Date.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && - elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -function classesToArray( value ) { - if ( Array.isArray( value ) ) { - return value; - } - if ( typeof value === "string" ) { - return value.match( rnothtmlwhite ) || []; - } - return []; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isValidValue = type === "string" || Array.isArray( value ); - - if ( typeof stateVal === "boolean" && isValidValue ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( isValidValue ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = classesToArray( value ); - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, valueIsFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - valueIsFunction = isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( valueIsFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - - // Don't return options that are disabled or in a disabled optgroup - !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -support.focusin = "onfocusin" in window; - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - stopPropagationCallback = function( e ) { - e.stopPropagation(); - }; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = lastElement = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - lastElement = cur; - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( - dataPriv.get( cur, "events" ) || Object.create( null ) - )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - - if ( event.isPropagationStopped() ) { - lastElement.addEventListener( type, stopPropagationCallback ); - } - - elem[ type ](); - - if ( event.isPropagationStopped() ) { - lastElement.removeEventListener( type, stopPropagationCallback ); - } - - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - - // Handle: regular nodes (via `this.ownerDocument`), window - // (via `this.document`) & document (via `this`). - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = { guid: Date.now() }; - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } - - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && toType( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - if ( a == null ) { - return ""; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( _i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response - * Also sets the responseXXX fields on the jqXHR instance - */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /\bxml\b/, - html: /\bhtml/, - json: /\bjson\b/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": JSON.parse, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() + " " ] = - ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) - .concat( match[ 2 ] ); - } - } - match = responseHeaders[ key.toLowerCase() + " " ]; - } - return match == null ? null : match.join( ", " ); - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 15 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available and should be processed, append data to url - if ( s.data && ( s.processData || typeof s.data === "string" ) ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + - uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Use a noop converter for missing script - if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { - s.converters[ "text script" ] = function() {}; - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( _i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - -jQuery.ajaxPrefilter( function( s ) { - var i; - for ( i in s.headers ) { - if ( i.toLowerCase() === "content-type" ) { - s.contentType = s.headers[ i ] || ""; - } - } -} ); - - -jQuery._evalUrl = function( url, options, doc ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - - // Only evaluate the response if it is successful (gh-4126) - // dataFilter is not invoked for failure responses, so using it instead - // of the default converter is kludgy but it works. - converters: { - "text script": function() {} - }, - dataFilter: function( response ) { - jQuery.globalEval( response, options, doc ); - } - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var htmlIsFunction = isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.ontimeout = - xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain or forced-by-attrs requests - if ( s.crossDomain || s.scriptAttrs ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( " - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Files used in PDF extraction

-
-

Configuration file

-

Configuration files may define the PDF processing parameters. -By default, the pdfgetx3 program attempts to read -.pdfgetx3.cfg file from the user HOME directory, -then .pdfgetx3.cfg and pdfgetx3.cfg files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the -c, --config option. -The pdfgetn3 program works in the same way, -except it checks for configuration files -~/.pdfgetn3.cfg, .pdfgetn3.cfg and pdfgetn3.cfg.

-

The easiest way of creating a configuration file is to generate -a template content using the --createconfig option as

-
pdfgetx3 --createconfig=test.cfg
-
-
-

and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple “varname=value” syntax, -any lines starting with “#” are ignored as comments.

-

The configuration file has several sections marked as [SECTIONNAME]. -The [DEFAULT] section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the -s, --section option on the -command line. Thus

-
pdfgetx3 --config=test.cfg --section=nacl
-
-
-

would read the parameters from the [nacl] section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section.

-
-
-

Input files

-

PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -2Θ in degrees, momentum transfer Q in inverse nanometers or Q -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the dataformat parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values.

-

The input files are usually passed as command-line arguments to -pdfgetx3 or pdfgetn3 programs and must be paths -accessible from the current working directory.

-

Input files can be also defined by setting the inputfile -value in the configuration file. The -d, --datapath -option can be then used to provide additional data directories to -search for these inputs and for the backgroundfile. -This is to support configuration files located in a different -directory than the data.

-

When the --find option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory.

-
-
-

Output files

-

PDFgetX3 and PDFgetN3 can produce up to four different output data files:

-
    -
  • .iq – I(Q), the background-corrected -intensities sampled on a regular Q-space grid in inverse ångströms,

  • -
  • .sq – S(Q), the total scattering structure function, -with intensities normalized by average scattering factors and -corrected by a polynomial fit,

  • -
  • .fq – F(Q), the reduced structure function equal to Q(S(Q) - 1),

  • -
  • .gr – G(r), the resultant PDF, where the first column is the -separation r in ångströms and the second is the function G in -Å-2.

  • -
-

You can specify what output files should be produced by setting the -outputtypes parameter in the configuration file or by -passing the -t, --outputtypes on the command line.

-

The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the --config option, -the PDFgetX3 will reproduce the previous calculation.

-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/genindex.html b/static_root/doc/pdfgetx/2.2.1/genindex.html deleted file mode 100644 index a47bdd66..00000000 --- a/static_root/doc/pdfgetx/2.2.1/genindex.html +++ /dev/null @@ -1,839 +0,0 @@ - - - - - - - Index — diffpy.pdfgetx 2.2.1 documentation - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - -

Index

- -
- Symbols - | A - | B - | C - | D - | E - | F - | G - | I - | L - | M - | O - | P - | Q - | R - | S - | T - | V - | W - -
-

Symbols

- - - -
- -

A

- - -
- -

B

- - - -
- -

C

- - - -
- -

D

- - - -
- -

E

- - - -
- -

F

- - - -
- -

G

- - -
- -

I

- - - -
- -

L

- - - -
- -

M

- - -
- -

O

- - - -
- -

P

- - - -
- -

Q

- - - -
- -

R

- - - -
- -

S

- - -
- -

T

- - - -
- -

V

- - -
- -

W

- - -
- - - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/index.html b/static_root/doc/pdfgetx/2.2.1/index.html deleted file mode 100644 index 18fbd473..00000000 --- a/static_root/doc/pdfgetx/2.2.1/index.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - diffpy.pdfgetx — diffpy.pdfgetx 2.2.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/install.html b/static_root/doc/pdfgetx/2.2.1/install.html deleted file mode 100644 index 2115f5d4..00000000 --- a/static_root/doc/pdfgetx/2.2.1/install.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - Installation — diffpy.pdfgetx 2.2.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Installation

-
-

Software requirements

-

This software is written in Python programming language, therefore -you must have Python 3.10, 3.9, 3.8, 3.7 or 2.7 installed. In addition, -the following third-party Python libraries are also required:

-
    -
  • pip - Python package installer

  • -
  • setuptools - tools for installing Python packages

  • -
  • six - Python 2 and 3 compatibility library

  • -
  • NumPy - library for scientific computing with Python

  • -
  • matplotlib - Python plotting library

  • -
  • IPython - enhanced interactive Python shell

  • -
-

Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -Python Package Index -or using any Internet search engine.

-

Another more convenient option is to obtain one of the science-oriented -Python distributions such as -Anaconda Python, -Enthought Canopy or -PythonXY, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step.

-

On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command

-
sudo apt-get install \
-  python3-pip python3-setuptools python3-six \
-  python3-numpy python3-matplotlib ipython3
-
-
-

This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above.

-

On Windows operating system, it may be necessary to add the -C:\Python37 directory and the scripts directory -C:\Python37\Scripts to the system PATH. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the Command Prompt, type -there python and see if this starts the Python interpreter.

-

Alternately, if you want to run the diffpy.pdfgetx software with a specific version of Python, -we recommend using a virtual environment, such as conda. For example, if you have Anaconda Python installed, -you can create a conda virtual environment to install the software as follow

-
conda create --name pdfgetx_env python=3.8 numpy matplotlib ipython
-
-
-

You can choose the name of the environment and python version as you desire. You can choose any of the -supported Python versions. Then, activate this environment and follow the instructions in the -next section to install the software

-
conda activate pdfgetx_env
-
-
-
-
-

Installation

-

The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -Columbia Technology Ventures. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:

-
pip install ./diffpy.pdfgetx-VERSION.whl
-
-
-

Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending sudo to the command line above. If root access is not available, use the pip install options --user or --prefix to install the software to a user-writable directory.

-

The package provides three programs for PDF conversion, pdfgetx3, pdfgetn3 and pdfgets3. To check if they are correctly installed run

-
pdfgetx3 --version
-pdfgetn3 --version
-pdfgets3 --version
-
-
-

This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a plotdata -command for an easy plotting of text data files. To verify -if plotdata works, run the plotdata --version command. -Finally, a comprehensive test of the installed software can -be executed using

-
python -m diffpy.pdfgetx.tests.run
-
-
-
-

Note

-

Older versions of diffpy.pdfgetx use Python egg format -instead of Python wheel. -To install these use the easy_install command as follows:

-
python -m easy_install ./diffpy.pdfgetx-VERSION.egg
-
-
-
-
-
-

IPython magic command

-

These instructions are intended for IPython users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don’t plan to customize IPython in such way you can safely skip -this paragraph.

-

When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The %pdfgetx3, %pdfgetn3 and %pdfgets3 magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session.

-

The %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up

-
    -
  1. find the profile_default/ipython_config.py file and open it -in a text editor. If that file does not exists, -create it first by executing

    -
    ipython profile create
    -
    -
    -
  2. -
  3. navigate to the paragraph that contains the -c.InteractiveShellApp.extensions and add there -the following line

    -
    c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics']
    -
    -
    -

    There must be no leading indent, i.e., the text must start at the -very first column.

    -
  4. -
-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/interact.html b/static_root/doc/pdfgetx/2.2.1/interact.html deleted file mode 100644 index c8d98266..00000000 --- a/static_root/doc/pdfgetx/2.2.1/interact.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - Interactive mode — diffpy.pdfgetx 2.2.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Interactive mode

-

The interactive mode is activated by using either the --i, --interact option or a non-empty ---plot option. In the interactive mode -the program starts an IPython interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands %pdfgetx3 and %pdfgetn3, which can be used with -the same syntax as the pdfgetx3 and pdfgetn3 in -system shell. -The interactive session is also initialized with all functions from the -matplotlib.pyplot module for convenient plotting. -The functions and variables related to PDF processing are:

-
-
-pdfgetter(x=None, y=None, filename='', **kwargs)
-

Instance of the PDFGetter class which serves as a -low-level function that calculates the PDF. This is a callable -object, which takes as an argument a pair of input arrays for -(Q, intensity) or (2Θ, intensity) depending on -dataformat. It can be also called with a keyword -argument filename=FILE, which would read the input arrays -from the specified file. When called with no arguments, -it calculates PDF from the last input data.

-
-
Parameters
-
    -
  • x (numpy.ndarray, optional) – -The Q or 2Θ values in powder diffraction pattern.

  • -
  • y (numpy.ndarray, optional) – -The scattered intensities in powder diffraction pattern

  • -
  • filename (str, optional) – -The text data file for loading the x, y values when -they are not specified.

  • -
  • kwargs (misc, optional) – -Extra keyword arguments that are applied to -the config object, for example qmax=20.

  • -
-
-
Returns
-

A pair of output arrays (r, G).

-
-
-
- -
-
-config
-

Instance of the PDFConfig class that stores the -parameters and input files for the program. -Use print(config) to display the current configuration values. -This is the same object as pdfgetter.config. Configuration -may be changed by setting a respective attribute of the -config object, for example:

-
In [1]: config.qmax = 21
-
-
-

The config values may be also changed by calling the -pdfgetter() or processfiles() function with a -corresponding keyword argument, for example -processfiles(qmax=20, force="once").

-
- -
-
-iraw
-
-iq
-
-sq
-
-fq
-
-gr
-

These variables are assigned the input raw intensities and the -intermediate results, stored as matrix rows. The matrix rows -correspond to twotheta1, intensity1, twotheta2, intensity2, etc. -Because matrices are iterated row first, the raw intensities -from all input files can be plotted with the matplotlib plot -function as plot(*iraw).

-

These variables should be considered read-only and are reset -with subsequent PDF calculations.

-
- -
-
-tuneconfig(plotids=None, pdfgetter=None, axeslist=None)
-

Show a GUI dialog for interactive tuning of configuration variables.

-
-
Parameters
-
    -
  • plotids – The string or iterable that specify what interactive plots should be -tuned. By default the same as config.plot. It can be also an -integer index or name of a transformation in pdfgetter() or -a reference to a Transformation object.

  • -
  • pdfgetter – The optional PDFGetter object to be tuned. -This is by default the interactive pdfgetter() object.

  • -
  • axeslist – An optional list of matplotlib Axes for showing interactive plots. -When None, use subplot(N, 1, i) to create any necessary axes.

  • -
-
-
-
-

Note

-

Changes from tuneconfig() apply only to the configuration -and results in memory. Use the processfiles() function -to save them to disk.

-
-
-

See also

-

Interactive tuning of parameters tutorial

-
-
- -
-
-processfiles(filename=None, **kwargs)
-

Process all input files again with the current configuration values. -This is a higher-level function than pdfgetter(), as -it also saves output files and produces plots as specified by the -config object.

-
-
Parameters
-
    -
  • filename – One or more input files to be converted to PDFs and saved or -plotted according to the config settings. Use the -previous list of input files when not specified.

  • -
  • kwargs – An optional keyword arguments to set for the config -object, for example (force="once", qmax=18).

  • -
-
-
-

This function updates the config.inputfiles -list and the iraw, iq, -sq, fq and gr -interactive variables.

-
- -
-
-clearsession()
-

Clear all elements from the config.inputfiles -and also the -iraw, iq, sq, -fq and gr variables.

-
-
Returns
-

No return value.

-
-
-
- -
-
-loaddata(filename, minrows=10, usecols=None, **kwargs)
-

Find and load data from a text file.

-

The data reading starts at the first matrix block of at least minrows rows -and constant number of columns. This seems to work for most of the -datafiles including those generated by PDFGetX2.

-
-
Parameters
-
    -
  • filename (str) – Name of the file to load the text data from.

  • -
  • minrows (int, optional) – Minimum number of rows in the first data block, by default 10. -All rows must have the same number of floating point values.

  • -
  • usecols (int, str, slice, iterable, optional) – Indices or names of the columns to be loaded from the data block, -the default is all columns. Data blocks that do not contain -sufficient number of columns are skipped. When usecols contain -string items, they are translated to column indices by looking -up a header line preceding the data block. String items formatted -as i:j:k are converted to slice objects. When usecols type -is string it is split to a list of names at comma and whitespace -characters.

  • -
  • unpack (bool, optional) – Return data as a sequence of columns that allows tuple unpacking -such as x, y = loaddata(FILENAME, unpack=True). Note that -transposing the loaded array as loaddata(FILENAME).T has -the same effect. The default is False.

  • -
  • kwargs (misc, optional) – Extra keyword arguments that are passed to numpy.loadtxt.

  • -
-
-
Returns
-

data (numpy.ndarray) – The data block loaded from the text file.

-
-
-
-

See also

-

numpy.loadtxt

-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
-
-plotdata(filenames, style=None, x=None, y=None, log=None, ax=None, **kwargs)
-

Plot one or more text data files.

-

The files are searched for data blocks which have enough columns -to satisfy both x and y selectors of the plotted data. This -may result in an empty plot when file has none wide-enough data -block (e.g., when y=100).

-
-
Parameters
-
    -
  • filenames (str or an iterable of string file names) – One or more text data files to be plotted.

  • -
  • style (str) – Optional style argument for the matplotlib plot() function.

  • -
  • x (int, str, or iterable, optional) – The column to be used for the x data. This can be a zero-based -index of the desired column or a column name from data header. -A special symbol “.” can be used for a sequential data index. -When not specified, use the first column.

  • -
  • y (int, str, iterable, or slice, optional) – One or more columns to be used for the y data. This can be -a single zero-based index of the desired column or an iterable -of several indices. The y value can be also a string which -is split at commas and converted to integers, column names -or slice objects, e.g. “0,sine,4:7”. The slice instances -are applied to the entire data block from each loaded file. -Use the second column when not specified.

  • -
  • log ({‘x’, ‘y’}, optional) – Set logarithmic scaling for the specified axis and linear scaling -for all others. For example, log="y" applies linear scaling -to the x-axis and logarithmic to the y-axis. Keep the current -axis scaling when not specified.

  • -
  • ax (matplotlib.axes.Axes, optional) – The axes to plot to. The plotting will be performed using the -ax.plot method. The default is pyplot.gca().

  • -
  • kwargs (misc, optional) – Keyword arguments for the matplotlib plot() function.

  • -
-
-
Returns
-

lines (list) – The matplotlib Line2D objects added to the current axis.

-
-
- -

This function can be imported from the -diffpy.pdfgetx.plotdata module.

-
- -
-
-findfiles(patterns=(), path='.', dotfiles=False)
-

Find files that match all specified patterns.

-

Pattern syntax:

-
    -
  • ^start - match “start” only at the beginning of the string.

  • -
  • end$ - match “end” only at the end of string.

  • -
  • <7> - match number 7 preceded by any number of leading zeros.

  • -
  • <1-34> - match an integer range from 1 to 34 inclusive.

  • -
  • <7-> - match an integer greater or equal 7.

  • -
  • <-> - match any integer.

  • -
  • + - start a new group of patterns to match more files.

  • -
  • dir/ - set search path effective from the current pattern group.

  • -
-

All integer ranges <N-M> above allow one or more leading zeros. -The range syntax does not support matching of negative numbers.

-
-
Parameters
-
    -
  • patterns (iterable of strings or str, optional) – String patterns that must all match in returned filenames. -Can be also a single string with patterns separated by -whitespace characters. When empty match all files in the -current directory or in the path. A single + starts -a new pattern group for additional matches. Each pattern -group may have one entry containing /, for example, -dir/ or ./, which sets the search directory for -this and subsequent pattern groups. When pattern group -contains only the path entry it reuses file patterns from -the previous group.

  • -
  • path (str, optional) – Directory to be searched for the files. The default is “.” -to search the current directory.

  • -
  • dotfiles (bool, optional) – When True search also the hidden “.” starting files. These -files are by default ignored, but can be explicitly selected -by adding the ^. pattern.

  • -
-
-
Returns
-

filenames (list) – The list of matching filenames. Return all files when -patterns are not specified.

-
-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/intro.html b/static_root/doc/pdfgetx/2.2.1/intro.html deleted file mode 100644 index 0e57c438..00000000 --- a/static_root/doc/pdfgetx/2.2.1/intro.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - Introduction — diffpy.pdfgetx 2.2.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Introduction

-

diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts.

-
-

License notice

-

Use of this software is subject to and permitted only under a separate, -written Use License granted by Columbia University. If you or your employer -is not a party to such an agreement, then your use of this software is -prohibited. If you don’t know whether or not your anticipated use is under -a license, you must contact Prof. Simon Billinge at sb2896@columbia.edu. -Use of this software without a license is prohibited.

-

Copyright 2009-2020, Trustees of Columbia University in the City of New York.

-

For more information please email Prof. Simon Billinge at sb2896@columbia.edu

-
-
-

Authors

-

This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Connor J. Bracy, -Hung Vuong, -Songsheng Tao, -Simon Billinge.

-
-
-

References

-

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:

-
-

P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge -PDFgetX3: A rapid and highly automatable program for processing -powder diffraction data into total scattering pair distribution -functions, -J. Appl. Crystallogr. 46, 560-566 (2013)

-
-

For research publications that use this software to process neutron -diffraction data we ask you to also cite:

-
-

P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, -S. J. L. Billinge -PDFgetN3: atomic pair distribution functions from neutron -powder diffraction data using ad hoc corrections, -J. Appl. Crystallogr. 51 (2018)

-
-

For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication:

-
-

CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge -sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data.

-
-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/options.html b/static_root/doc/pdfgetx/2.2.1/options.html deleted file mode 100644 index 76298190..00000000 --- a/static_root/doc/pdfgetx/2.2.1/options.html +++ /dev/null @@ -1,670 +0,0 @@ - - - - - - - Options and parameters — diffpy.pdfgetx 2.2.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Options and parameters

-

PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program.

-
-

Note

-

The command line options start with a leading “-” and can -be only used as command line arguments when starting the -pdfgetx3 program. Within configuration file the parameter -names are plain words without any leading dashes. Finally, -parameters can be also set in the interactive mode as attributes of -the config object, but the assignments must be valid -Python statements. Here are examples of setting composition of -a processed specimen using each of these forms:

-
    -
  1. assigned in configuration file:

    -
    ...
    -composition = CaTiO3
    -...
    -
    -
    -
  2. -
  3. set as a command-line option when starting pdfgetx3 or -pdfgetn3:

    -
    pdfgetx3 --composition=CaTiO3
    -
    -
    -
  4. -
  5. set in the IPython interactive mode:

    -
    pdfgetx3 -i
    -...
    -In [1]: config.composition = "CaTiO3"
    -
    -
    -
  6. -
-
-
-

Program operation

-
-
--h, --help
-

Display a brief usage information with a list of command line options -and exit.

-
- -
-
--V, --version
-

Display the program version and exit.

-
- -
-
---manual
-

Open this manual in a Web browser and exit.

-
- -
-
--f, --find
-
- -
-

Select input files that match all patterns. The command -line arguments are by default taken as input files. However, -with the --find option they are processed as -file patterns and the matching files are then used as inputs. -The input files are by default searched in the current directory -unless there is a path entry (e.g., data/) that -selects a different search path. The search patterns are -interpreted as fixed strings, all of which must be present -in the file name. A single argument + starts -a new group of patterns to match more files that are not -covered by one set of patterns. Additional pattern -groups reuse the current search path unless they provide -their own path value. Pattern groups containing only -a path entry reuse file patterns from the last group. -When pattern groups overlap the repeated matches are ignored -to make the resulting list of files unique. Files starting -with . are ignored unless there is ^. pattern -that explicitly matches them. The search -syntax provides the following special patterns:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

^

match at the beginning of the string, i.e., ^start -matches only filenames that start with “start”.

$

match at the end of string, for example, .chi$ selects -file names ending with “.chi”. A $ on its own -matches every string and can be used to select all files.

<N>

match number N preceded by any number of leading zeros, -e.g., <7> would match in “f7.chi”, “f007.chi”, but not -in “f77.chi”.

<N-M>

match an integer range from N to M inclusive. -The matched number may have one or more leading zeros.

<7->

match number 7 or larger.

<-7>

match number 7 or smaller.

<->

match any integer number.

+

start a new pattern group, for example, .chi$ + .dat$

/

set search path. An argument containing the / symbol -is taken as the search path, for example, data/ or -./. Each pattern group may provide its own search -path effective for that and any subsequent pattern group.

-

The ^$<> characters are often special to Unix or Windows -command shells, therefore they need to be enclosed in double -quotes (\”) when used on command line.

-
-

See also

-

tutorial on matching input files

-
-
-
-
--l, --list
-

List all input files and exit. This is useful with the ---find option to verify if input files -are matched as intended.

-
- -
-
-

Configuration file options

-
-
--c CONFIG, --config=CONFIG
-

Read custom configuration file after loading the default ones. -Do not load any configuration file when “NONE”.

-
- -
-
--s NAME, --section=NAME
-

Load the custom configuration file section [SectionName] after -loading the [DEFAULT] section. This is useful for creating -several configuration variants in a single configuration file.

-
- -
-
---createconfig=FILE
-

Write template configuration to a new FILE and exit. Write -to the standard output when FILE is “-“.

-
- -

See also the configuration file section -for further details.

-
-
-

Input and output options

-
-
-inputfile
-

This parameter allows to specify one or more input files in the -configuration file, one file per line. The inputfile -is only used if no input files were provided on the -pdfgetx3 or pdfgetn3 command line.

-
- -
-
-dataformat
-
- -
-
---format=FORMAT
-

Format of input files. Available formats are: twotheta, QA, -Qnm corresponding to a two-column text data where the first -column is either the scattering angle 2Θ in degrees, Q in -inverse ångströms or Q in inverse nanometers.

-
- -
-
-backgroundfile
-
- -
-
--b FILE, --background=FILE
-

Optional datafile with background intensities from an empty sample -holder. It must be in the same dataformat as other input files.

-
- -
-

Note

-

The following input is only used in sas mode.

-
-
-
-formfactorfile
-
- -
-
--ff FILE, --formfactorfile=FILE
-

Form factor intensities of the scatterers. This is required for sas mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1.

-
- -
-
-datapath
-
- -
-
--d DATAPATH, --datapath=DATAPATH
-

One or more extra directories to be searched for input or -background data files. The -d option can be specified -several times to add more directories, these are prepended in front -of any default value. Within configuration file the datapath -directories have to be listed each on a separate line.

-

A special value “NONE” (or “none”) clears any previously defined -paths and only the further paths, if any, would be searched for -inputs.

-
- -
-
-output
-
- -
-
--o OUTPUT, --output=OUTPUT
-

Output file name, write to the standard output when “-“. The --t, --outputtypes option controls what results are -being saved. Normally the OUTPUT is used as a custom basename for -the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o -tokens, which are expanded as follows:

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

token

example

definition

@h

dir1/dir2

the input file directory or “.”

@r

dir1/dir2/filename

the input path with extension removed

@e

dat

the input file extension without “.”

@t

filename.dat

the tail component of the input file

@b

filename

the tail component with extension removed

@o

gr

the output extension iq, sq, fq or gr

-

An empty value works the same as “@b.@o” and saves the data -in the current directory with a proper extension for the -saved results. When “@o” is not present in the OUTPUT, it is -appended as a default filename extension.

-
- -
-
-outputtypes
-
- -
-
--t TYPES, --outputtypes=TYPES
-

Result types to be saved, one or more comma separated values. -Supported values are “iq”, “sq”, “fq”, “gr”, corresponding to the -I(Q), S(Q), F(Q) and G(r) curves; these are also used as output -file extensions.

-

Result files are not written when empty, “none” or “NONE”.

-
- -
-
-force
-
- -
-
---force=FORCE
-

Overwrite existing output files. By default the output -files are not written if they already exist. Possible values -in a configuration file are “true”, “yes”, “on”, “1” or -“false”, “no”, “off”, “0” or “once”. The special value “once” -permits one overwrite and then resets config.force to -False. Note that in interactive mode the values assigned -to config.force are converted to Python bool -unless equal to “once”.

-
- -
-
-

PDF parameters

-
-
-mode
-
- -
-
---mode=STRING
-

The PDF conversion mode, i.e., the name of the -pdfgetter() setup. The available modes correspond -to the radiation type used in powder diffraction experiment and can -be “xray” or “neutron”.

-
- -
-
-wavelength
-
- -
-
--w FLOAT, --wavelength=FLOAT
-

X-ray wavelength in ångströms. This value is required -for the “twotheta” dataformat in order to convert the scattering -angles 2Θ to a momentum transfer Q. For other data formats -the wavelength is not necessary and may be left undefined.

-
- -
-
-twothetazero
-
- -
-
---twothetazero=FLOAT
-

Position of the zero scattering angle in diffractometer degrees. -This parameter corrects for a constant offset in the -measured 2Θ values. When loading configuration file -it is assumed 0 unless specified otherwise. This parameter -is only effective for the “twotheta” dataformat.

-
- -
-
-composition
-
- -
-
---composition=STRING
-

Chemical composition of the sample. Supported formats are -“PbTi0.5Zr0.5O3”, “Pb 1 Ti 1/2 Zr 1/2 O 3” or “CH3 (CH2)3 OH”. -Space characters are ignored, unit counts can be omitted, but it is -important to use a proper upper and lower case in atom symbols. -Elements can appear several times in the formula, e.g., “CH3 CH3”, -and the formula may contain parentheses or fractional -stoichiometries.

-
- -
-
-bgscale
-
- -
-
---bgscale=FLOAT
-

Scaling of the background intensities loaded from the -backgroundfile, by default 1.

-
- -
-
-rpoly
-
- -
-
---rpoly=FLOAT
-

r-limit for the maximum frequency in the F(Q) correction polynomial. -The PDF is unreliable at shorter r, however a -very small rpoly would disable polynomial correction and -give noisy PDF. -Larger values produce closer fits with a higher degree polynomial, -but when too large, they might smooth-out a useful signal in the -data. The default is 0.9.

-
- -
-
-qmaxinst
-
- -
-
---qmaxinst
-

The Q cutoff for the meaningful input intensities in inverse -ångströms. Some data files may contain trailing zeros -or unreliable intensities at the upper bound of the detector range. -The qmaxinst defines a threshold for unreliable data. -The parameter is also used as an upper boundary for the polynomial -fit correction of the S(Q) data.

-
- -
-
-qmin
-
- -
-
---qmin
-

The lower Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms.

-
- -
-
-qmax
-
- -
-
---qmax
-

The upper Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms. This is essentially a limit, where sample -signal decays to the level of data noise.

-
- -
-
-rmin
-
- -
-
---rmin=FLOAT
-

Lower bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rmax
-
- -
-
---rmax=FLOAT
-

Upper bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rstep
-
- -
-
---rstep=FLOAT
-

Spacing of the r-grid for the calculated PDF in ångströms.

-
- -
-
-

Other parameters

-
-
-plot
-
- -
-
--p TYPES, --plot=TYPES
-

Plot the specified results. A comma separated list with one or -more items from “iq”, “sq”, “fq”, “gr”. No plot is produced when -empty, “none” or “NONE”. Setting this option turns on the -interactive mode.

-
- -
-
-interact
-
- -
-
--i, --interact
-

Start an IPython interactive session after processing all files. -Useful for tuning the configuration parameters or interactive -plotting. This is always on when plot option has been set. -See also Interactive mode for further details.

-
- -
-
-verbose
-
- -
-
---verbose=VALUE
-

Level of detail for the program to report about its actions. -Possible values are “error”, “warning”, “info”, “debug”, “all” or an -integer number from 0 to 5. Messages are completely suppressed when -0, all messages are printed when verbose is 5 (“all”) or higher. -This option is useful for diagnostics of any unexpected behavior -in the program.

-
- -
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/pdfgetxn3-examples.zip b/static_root/doc/pdfgetx/2.2.1/pdfgetxn3-examples.zip deleted file mode 100644 index 50d1936c..00000000 Binary files a/static_root/doc/pdfgetx/2.2.1/pdfgetxn3-examples.zip and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.2.1/plotdata.html b/static_root/doc/pdfgetx/2.2.1/plotdata.html deleted file mode 100644 index c9bf3bb8..00000000 --- a/static_root/doc/pdfgetx/2.2.1/plotdata.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - The plotdata program — diffpy.pdfgetx 2.2.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

The plotdata program

-

The PDFgetX3 software includes a simple stand-alone utility -plotdata for plotting text data files. In most cases -this program can be invoked from a command-shell as

-
plotdata file1.dat file2.dat
-
-
-

which plots the numerical data from the text files file1.dat, -file2.dat together in a single graph. By default the first -column is used as an x variable and the second column is used for the -y values. After displaying the plot the program starts an IPython -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the filenames variable -containing a list of plotted files. It also pre-loads the -plotdata() and findfiles() functions just as in PDFgetX3 -interactive session. The plotdata() -function works in a similar way as the plotdata program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -plotdata() function would be:

-
In [1]: plotdata(['file1.dat', 'file2.dat'])
-
-
-
-

Selecting files

-

The plotdata program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as *.dat. The file search feature is controlled by the -following options:

-
-
--f, --find
-

Use command line arguments as filename patterns and plot all matching -files. This option works in the same way as for -pdfgetx3, for full details see the -pdfgetx3 --find documentation. Note that -within command line the special patterns ^$<> need to be quoted -in double quotes (\”) so they are not processed by command shell.

-
- -
-
--l, --list
-

List the input files and exit. This is useful in conjunction -with the -f, --find option to check if data files -are selected as intended.

-
- -

Assuming the current directory contains 20 files named -file1.dat, file2.dat, …, file20.dat, -the plotting of files 9 to 13 could be done (with a check listing) -as follows

-
$ plotdata -fl "<9-13>.dat"
-file9.dat
-file10.dat
-file11.dat
-file12.dat
-file13.dat
-$ plotdata -f "<9-13>.dat"
-
-
-

Within an interactive IPython session the equivalent plot could be -produced by combining the plotdata() and findfiles() functions as

-
In [1]: plotdata(findfiles("<9-13>.dat"))
-
-
-
-
-

Selecting x and y data

-

The plotdata program provides several ways of selecting -columns for x or y data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is “0” -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function):

-
-
--x X
-

index or name of the x-column to plot. See the -y option -for the supported syntax, but note that X may select only one -column. When set to “.” use the data-row index for x.

-
- -
-
--y Y
-

index or name of the y-column or columns to plot. The Y column -specification can be a comma separated list of indices, column names -or Python-like ranges, for example “1,2”, “G”, “1:4” (START:STOP, -same as “1,2,3”), “1:4:2” (START:STOP:STEP, same as “1,3”), or -“-2:” (same as “-2,-1”, i.e, the last 2 columns). Because column -indexing starts at “0” the second column must be specified as “1”.

-

The column names work if the data section in the file is preceded by -a headline of unique column names, for example:

-
x     square      cube
-1     1           1
-2     4           8
-3     9           27
-4     16          64
-
-
-

For such data file the plotdata program will recognize column names -“x”, “square” and “cube” and an implicit “.” for row index.

-
- -
-
--s STYLE, --style=STYLE
-

optional plot format specification. See the -matplotlib.pyplot.plot() function -for a list of available formats.

-
- -
-
--L LOG, --log=LOG
-

axes to be plotted with logarithmic scaling, for example, “x”, “y” or -“xy”. Axes not listed in LOG will use linear scaling.

-
- -
-
--h, --help
-

display a brief usage info and exit.

-
- -
-
--V, --version
-

show program version and exit.

-
- -
-
---manual
-

Open this manual page in a Web browser and exit.

-
- -
-
-

Examples

-

The examples directory plotdata contains a sincos.dat -file that has 3-columns of values labeled as “x”, “sin” and “cos”. -Here are several examples of the plotdata capabilities -when used from command line - the user is encouraged to try them out:

-
plotdata sincos.dat
-plotdata -y 1,2 sincos.dat
-plotdata -x . -y 0:3 sincos.dat
-plotdata -y cos sincos.dat
-plotdata -x sin -y cos -sr-- sincos.dat
-
-
-

An equivalent usage from a general IPython session would be:

-
ipython --matplotlib=auto
-In [1]: from diffpy.pdfgetx.plotdata import plotdata
-In [2]: plotdata('sincos.dat')
-In [3]: plotdata('sincos.dat', y=[1,2])
-In [4]: plotdata('sincos.dat', x='.', y=':3')
-In [5]: plotdata('sincos.dat', y='cos')
-In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--')
-
-
-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/quick-start.html b/static_root/doc/pdfgetx/2.2.1/quick-start.html deleted file mode 100644 index a74478b3..00000000 --- a/static_root/doc/pdfgetx/2.2.1/quick-start.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - Quick-start guide — diffpy.pdfgetx 2.2.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Quick-start guide

-

This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing pdfgetx3, pdfgetn3, or -pdfgets3 in a shell window. Please, refer to the installation section if this is not working yet.

-
-

pdfgetx3 command

-

The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as

-
pdfgetx3 [options] input1 input2 ... inputN
-
-
-

The inputN stands for an input powder diffraction data. The -inputN file is a simple two-column text file, where the first -column corresponds to either the 2Θ diffraction angle, or a -momentum transfer, Q, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -FIT2D program using -its “chi” output format, thus we will also refer to them as “chi-files”. -A typical content of a “chi” file looks as folows:

-
Pt_bulk-00055.tif: 2-theta Scan
-2-Theta Angle (Degrees)
-
-       1465
- 2.0003892E-02  0.0000000E+00
- 6.0011677E-02  0.0000000E+00
- 1.0001946E-01  0.0000000E+00
- 1.4002724E-01  0.0000000E+00
- 1.8003502E-01  0.0000000E+00
- ...
-
-
-

The command-line options are arguments that start with a dash “-” and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash --. Options may require values. For short options, -the value may be joined to the option string, for example --w0.142774, while for the long options it has to be separated -with an equal sign, e.g., --wavelength=0.142774. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the Options and parameters section of -this manual. A brief summary of options can be also displayed by -executing

-
pdfgetx3 --help
-
-
-

The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the Tutorial. -In general, the first step is to create a commented configuration file pdfgetx3.cfg using:

-
pdfgetx3 --createconfig=pdfgetx3.cfg
-
-
-

The configuration file can have any name, but it is preferable -to use either pdfgetx3.cfg or .pdfgetx3.cfg, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the -c, --config option.

-

Open the pdfgetx3.cfg file in a text editor. The lines that -start with a hash mark # are comments and are not used. The lines -starting with a right brace [ denote sections in the configuration -file. The active lines are all formatted as -“NAME=VALUE”. Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation:

-
    -
  • dataformat – specifies the input data format

  • -
  • wavelength – radiation wavelength in Å required for the -“twotheta” format.

  • -
  • composition – chemical composition of the sample

  • -
  • qmaxinst – upper Q boundary for a meaningful measurement -intensities.

  • -
  • qmaxQ-cutoff for the Fourier transformation that -yields the PDF.

  • -
-

Save the updated configuration file and run pdfgetx3 on the input data -FILENAME.chi as

-
pdfgetx3 --verbose=info -t gr FILENAME.chi
-
-
-

Here the --verbose=info option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The -t gr option -tells the program to save the final G(r) curve as a -FILENAME.gr file in the working directory.

-

The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation

-
pdfgetx3 -c FILENAME.gr --plot=fq,gr
-
-
-

Note this command does not include any .chi file and this will as -a result process the previously used input FILENAME.chi. -The --plot=fq,gr option tells PDFgetX3 to -display 2 plots for the reduced structure function F(Q) and the -final PDF G(r). The --plot option also implies an -interactive mode -therefore the program does not exit, but starts an -interactive IPython session. To exit the interactive mode, -type exit() and press Enter.

-
-
-

pdfgetn3 command

-

The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the ---mode option. Running pdfgetn3 is nearly identical -to executing pdfgetx3 --mode=neutron. The only difference between -these commands is that pdfgetx3 checks for configuration files -pdfgetx3.cfg and .pdfgetx3.cfg, whereas -pdfgetn3 looks for pdfgetn3.cfg and .pdfgetn3.cfg.

-
-
-

pdfgets3 command

-

The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying mode = sas in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named pdfgets3.cfg and -.pdfgets3.cfg in order, when no configuration file is specified.

-

Please refer to the tutorial section for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3.

-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/release.html b/static_root/doc/pdfgetx/2.2.1/release.html deleted file mode 100644 index aff0062a..00000000 --- a/static_root/doc/pdfgetx/2.2.1/release.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - - Release notes — diffpy.pdfgetx 2.2.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Release notes

-
-

Version 2.2.1 - 2022-03-23

-
-

Added

-
    -
  • Added new API for accessing intermediate I(Q) plots as properties on -PDFGetter instances via properties following a naming convention of -PDFGetter.iq_<i>, where i is a zero-based index of the intermediate I(Q) -to be returned. That is, rather than a single property returning an array of -the I(Q)’s that would then be indexed, users may directly name an intermediate -I(Q) (say, the first I(Q)) via a statement such as PDFGetter.iq_0.

  • -
-
-
-

Fixed

-
    -
  • Restored previous API behavior of PDFGetter.iq returning the I(Q) plot of -the data. Since there are now multiple I(Q) plots (one after each subsequent -background subtraction), this property now returns the final I(Q) data (i.e., -the result of applying all background subtractions).

  • -
  • Fixed formatting of authors list on PDFgetXNS3_manual.pdf cover page.

  • -
-
-
-
-

Version 2.2.0 - 2022-02-10

-
-

Added

-
    -
  • Support for Python 3.10

  • -
  • Support for Python 3.9

  • -
  • Unittests for testing CLI functionality.

  • -
  • Tutorial example for multiple background subtractions (see -diffpy.pdfgetx/doc/examples/Multiple_Background_Subtraction).

  • -
  • New functionality for allowing multiple backgrounds to be subtracted from a -dataset accessed via using the plural name equivalent of any previously -singularly named variable (i.e., bgscale->bgscales, backgroundfile-> -backgroundfiles, etc.) in both static config files (i.e., *.cfg) and -interactive plotting sessions. Each set of parameters corresponding to a -given background subtraction can also be manipulated by a set of sliders -present in the tuneconfig window of an interactive shell session. In total, -the multiple background subtraction functionality should work identically to -the previous single background subtraction functionality except that the -multiple background files and initial scale values cannot be specified -through a pure CLI command (i.e., it must be specified either in a config file -or added/modified during an interactive plotting session).

  • -
  • Added extra test cases for testing the PDFGetter class.

  • -
  • Added extra test cases for testing the PDFConfig class.

  • -
-
-
-

Changed

-
    -
  • Changed python versions specified in requirements.txt files to be in the -range of the respective minor version rather than fixed to the Python X.Y.0 -version

  • -
  • Python version support policy now follows NEP 29

  • -
  • Changed versions used in conda-recipe/build.sh to reflect currently -supported Python versions.

  • -
  • Changed Sphinx dependency m2r to m2r2.

  • -
  • Added Connor J. Bracy and Zach Thatcher to contributors in AUTHORS.txt

  • -
  • Added Connor J. Bracy to internal authors list and PDFgetXNS3_manual.pdf

  • -
-
-
-

Removed

-
    -
  • Support for Python 3.5 and 3.6.

  • -
-
-
-
-

Version 2.1.2 - 2021-12-24

-
-

Fixed

-
    -
  • Fixed the command provided to the users in the installation instructions which -incorrectly instructed them to setup a Python environment in which pdfgetx -could be installed by using the flag --python=3.8 to the correct usage of -this flag as python=3.8.

  • -
-
-
-
-

Version 2.1.1 - 2020-09-01

-
-

Added

-
    -
  • Support for Python 3.8

  • -
-
-
-
-

Version 2.1.0 – 2020-07-15

-
-

Added

-
    -
  • New mode sas for processing Small Angle Scattering data and -for using custom scattering factors.

  • -
  • qmax-pushes-qmin coupling of sliders in the tuneconfig tool.

  • -
  • New program pdfgets3 and IPython magic %pdfgets3.

  • -
-
-
-

Changed

-
    -
  • Software distribution format to a universal Python wheel.

  • -
  • tuneconfig dialog to access full Q-range with all qmin, qmax, and -qmaxinst sliders. Increased range for the rpoly slider.

  • -
-
-
-

Deprecated

-
    -
  • Software distribution in setuptools egg package.

  • -
-
-
-

Removed

-
    -
  • Support for Python 3.4.

  • -
-
-
-

Fixed

-
    -
  • Support backslash in the --find option path argument on Windows. -Both forward and back slashes are allowed on Windows, but other -platforms must use forward slash.

  • -
  • Recipe for platform-dependent Anaconda package.

  • -
  • Bogus test failure when installed in symlinked directory.

  • -
-
-
-
-

Version 2.0.0 – 2018-11-02

-
-

Added

-
    -
  • New mode neutron for processing constant-wavelength -neutron scattering data.

  • -
  • Correction for an offset of diffractometer zero angle.

  • -
  • Configuration parameter twothetazero and command-line option ---twothetazero for position of the actual zero angle -in diffractometer degrees.

  • -
  • New program pdfgetn3 and IPython magic %pdfgetn3.

  • -
  • Separate configuration file pdfgetn3.cfg for the pdfgetn3 program.

  • -
  • New sub-package diffpy.pdfgetx.apps for entry points to all programs.

  • -
  • Table of electron scattering factors from E. J. Kirkland, -Advanced Computing in Electron Microscopy.

  • -
  • The + operator for additive pattern groups when matching input files -with pdfgetx3 --find.

  • -
  • An optional slash-containing entry, e.g., dir/, to set the search path -for pdfgetx3 --find. Each pattern group may have one path entry which -affects the current and subsequent pattern groups. Pattern groups that -have only the path entry reuse the previous file patterns, for example, -dir1/ .dat$ + dir2/ + dir3/.

  • -
  • The dotfiles flag argument to functs.findfiles to also find -dot-starting files without an explicit pattern.

  • -
  • Support for Python 3.7.

  • -
  • Tutorial examples for constant-wavelength neutron diffraction data.

  • -
-
-
-

Changed

-
    -
  • Initialization arguments of PDFConfig to set initial configuration values.

  • -
  • path argument of functs.findfiles to give one search path instead -of a list of paths.

  • -
  • pdfgetx3 --find to search only the current directory and stop searching -in --datapath.

  • -
  • Improved PDF accuracy by removing repeated Q-grid interpolation.

  • -
  • Handling of dot files by pdfgetx3 --find and the functs.findfiles -function. The dotfiles are by default ignored unless explicitly selected -by a "^." pattern.

  • -
  • Return type of functs.findfiles from IPython SList to a simple list.

  • -
  • Rename camel case interactive functions to lowercase, i.e., to loaddata, -processfiles, clearsession.

  • -
  • Use config.datapath lookup in processfiles(filename).

  • -
-
-
-

Deprecated

-
    -
  • Function cromermann.felectronatq for electron scattering -factors calculation using Mott-Bethe approximate formula.

  • -
  • IPython extension module diffpy.pdfgetx.ipy_pdfgetx3. -Use diffpy.pdfgetx.ipy_magics instead.

  • -
  • Camel case functions loadData, processFiles, clearSession.

  • -
-
-
-

Removed

-
    -
  • Support for Python 2.6.

  • -
  • Processing of environment variable PDFGETX3PATH.

  • -
  • Support for IPython 0.x.

  • -
  • Obsolete variable __gitsha__ from the version module.

  • -
  • Processing of command line options in PDFConfig class.

  • -
  • Implicit loading of configuration files in PDFConfig instantiation.

  • -
-
-
-

Fixed

-
    -
  • Import of all objects from matplotlib.pyplot into -an interactive session started by plotdata.

  • -
  • Inaccurate G interpolation when rstep is comparable to pi / qmax.

  • -
  • Lone anchor patterns ^, $ to match everything.

  • -
-
-
-
-

Version 1.2 – 2018-01-12

-
-

Added

-
    -
  • Support for Python 3.4, 3.5, 3.6 in addition to Python 2.6 and 2.7.

  • -
  • Support for IPython 5.0 with preserved -compatibility with IPython 0.10 and later.

  • -
  • Support for matplotlib 2.0.

  • -
  • New option --log=LOG for the plotdata program to set logarithmic -scale for either of x or y axis. The plotdata() function learnt -a new log argument with the same purpose.

  • -
  • New argument ax for the plotdata() function that select a specific -matplotlib axis for plotting.

  • -
  • Support for Unicode filenames and values in the config -interactive variable.

  • -
  • Processing of parentheses and fractional stoichiometries in chemical -formulas as in Pb (Ti Zr)1/2 O3.

  • -
  • Explanatory error message when PDFgetX3 was installed for -unsupported Python.

  • -
-
-
-

Changed

-
    -
  • The egg package file was enhanced to support all Python -versions. The software is now distributed in a single -egg rather than multiple eggs per each Python version.

  • -
  • PDFgetX3 option --force to take a boolean argument -(yes, no, true, etc.) or once. The configuration -parameter force can be likewise set to a bool or to -a string "once". This enables a safer one-time -overwrite of existing output files.

  • -
  • Plot labels to use a proper Unicode “Å” (Ångström) symbols. -The “Å” symbol is also used within units in output files.

  • -
  • The usecols argument of the loadData() function to also -accept scalars, open-end slice objects and string-denoted -slices such as "1:3" or "1:".

  • -
  • The plotdata program and plotdata() function to accept -open-end slices for the y-columns selection.

  • -
  • The IPython magic function %pdfgetx3 to set the _exit_code -variable as do generic shell commands run from IPython.

  • -
  • Inline documentation to use NumPy-style Napoleon format, -which is human readable and can be included in the manual.

  • -
  • Release scripts to build software package bundles and -documentation in binary-reproducible way.

  • -
-
-
-

Deprecated

-
    -
  • Compatibility with Python 2.6.

  • -
  • Support for IPython 0.x.

  • -
  • Variable __gitsha__ in the version module which was renamed -to __git_commit__.

  • -
-
-
-

Removed

-
    -
  • The hold argument of the plotdata() function, -because it was deprecated in matplotlib.

  • -
  • Support for multiple x-columns in plotdata program and -plotdata() function.

  • -
  • Import of all objects from numpy module into the interactive -session. NumPy is available under the np name instead.

  • -
-
-
-

Fixed

-
    -
  • Avoid duplicate “.gr.gr” extension when pdfgetx3 is run -with option --output=f.gr.

  • -
  • Crash on loading custom configuration section from a local -file, when that section is missing in global configuration.

  • -
  • Missing checkbox in the tuneconfig dialog caused by matplotlib bug.

  • -
-
-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/search.html b/static_root/doc/pdfgetx/2.2.1/search.html deleted file mode 100644 index 687e4136..00000000 --- a/static_root/doc/pdfgetx/2.2.1/search.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - Search — diffpy.pdfgetx 2.2.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -

Search

- - - - -

- Searching for multiple words only shows matches that contain - all words. -

- - -
- - - -
- - - -
- -
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/searchindex.js b/static_root/doc/pdfgetx/2.2.1/searchindex.js deleted file mode 100644 index 0425b1eb..00000000 --- a/static_root/doc/pdfgetx/2.2.1/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({docnames:["files","index","install","interact","intro","options","plotdata","quick-start","release","tutorial"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,sphinx:56},filenames:["files.rst","index.rst","install.rst","interact.rst","intro.rst","options.rst","plotdata.rst","quick-start.rst","release.rst","tutorial.rst"],objects:{"":[[5,1,1,"-","backgroundfile"],[5,1,1,"-","bgscale"],[5,1,1,"-","composition"],[3,2,1,"-","config"],[5,1,1,"-","dataformat"],[5,1,1,"-","datapath"],[5,1,1,"-","force"],[5,1,1,"-","formfactorfile"],[3,2,1,"-","fq"],[3,2,1,"-","gr"],[5,1,1,"-","inputfile"],[5,1,1,"-","interact"],[3,2,1,"-","iq"],[3,2,1,"-","iraw"],[5,1,1,"-","mode"],[5,1,1,"-","output"],[5,1,1,"-","outputtypes"],[5,1,1,"-","plot"],[5,1,1,"-","qmax"],[5,1,1,"-","qmaxinst"],[5,1,1,"-","qmin"],[5,1,1,"-","rmax"],[5,1,1,"-","rmin"],[5,1,1,"-","rpoly"],[5,1,1,"-","rstep"],[3,2,1,"-","sq"],[5,1,1,"-","twothetazero"],[5,1,1,"-","verbose"],[5,1,1,"-","wavelength"]],"diffpy.pdfgetx":[[3,0,1,"","findfiles"],[3,0,1,"","loaddata"]],"diffpy.pdfgetx.plotdata":[[3,0,1,"","plotdata"]],_interactive_:[[3,0,1,"interactive_.clearsession","clearsession"],[3,0,1,"interactive_.pdfgetter","pdfgetter"],[3,0,1,"interactive_.processfiles","processfiles"],[3,0,1,"interactive_.tuneconfig","tuneconfig"]],pdfgetx3:[[5,3,1,"cmdoption-pdfgetx3-b","--background"],[5,3,1,"cmdoption-pdfgetx3-bgscale","--bgscale"],[5,3,1,"cmdoption-pdfgetx3-composition","--composition"],[5,3,1,"cmdoption-pdfgetx3-c","--config"],[5,3,1,"cmdoption-pdfgetx3-createconfig","--createconfig"],[5,3,1,"cmdoption-pdfgetx3-d","--datapath"],[5,3,1,"cmdoption-pdfgetx3-f","--find"],[5,3,1,"cmdoption-pdfgetx3-force","--force"],[5,3,1,"cmdoption-pdfgetx3-format","--format"],[5,3,1,"cmdoption-pdfgetx3-ff","--formfactorfile"],[5,3,1,"cmdoption-pdfgetx3-h","--help"],[5,3,1,"cmdoption-pdfgetx3-i","--interact"],[5,3,1,"cmdoption-pdfgetx3-l","--list"],[5,3,1,"cmdoption-pdfgetx3-manual","--manual"],[5,3,1,"cmdoption-pdfgetx3-mode","--mode"],[5,3,1,"cmdoption-pdfgetx3-o","--output"],[5,3,1,"cmdoption-pdfgetx3-t","--outputtypes"],[5,3,1,"cmdoption-pdfgetx3-p","--plot"],[5,3,1,"cmdoption-pdfgetx3-qmax","--qmax"],[5,3,1,"cmdoption-pdfgetx3-qmaxinst","--qmaxinst"],[5,3,1,"cmdoption-pdfgetx3-qmin","--qmin"],[5,3,1,"cmdoption-pdfgetx3-rmax","--rmax"],[5,3,1,"cmdoption-pdfgetx3-rmin","--rmin"],[5,3,1,"cmdoption-pdfgetx3-rpoly","--rpoly"],[5,3,1,"cmdoption-pdfgetx3-rstep","--rstep"],[5,3,1,"cmdoption-pdfgetx3-s","--section"],[5,3,1,"cmdoption-pdfgetx3-twothetazero","--twothetazero"],[5,3,1,"cmdoption-pdfgetx3-verbose","--verbose"],[5,3,1,"cmdoption-pdfgetx3-V","--version"],[5,3,1,"cmdoption-pdfgetx3-w","--wavelength"],[5,3,1,"cmdoption-pdfgetx3-V","-V"],[5,3,1,"cmdoption-pdfgetx3-b","-b"],[5,3,1,"cmdoption-pdfgetx3-c","-c"],[5,3,1,"cmdoption-pdfgetx3-d","-d"],[5,3,1,"cmdoption-pdfgetx3-f","-f"],[5,3,1,"cmdoption-pdfgetx3-ff","-ff"],[5,3,1,"cmdoption-pdfgetx3-h","-h"],[5,3,1,"cmdoption-pdfgetx3-i","-i"],[5,3,1,"cmdoption-pdfgetx3-l","-l"],[5,3,1,"cmdoption-pdfgetx3-o","-o"],[5,3,1,"cmdoption-pdfgetx3-p","-p"],[5,3,1,"cmdoption-pdfgetx3-s","-s"],[5,3,1,"cmdoption-pdfgetx3-t","-t"],[5,3,1,"cmdoption-pdfgetx3-w","-w"]],plotdata:[[6,3,1,"cmdoption-plotdata-f","--find"],[6,3,1,"cmdoption-plotdata-h","--help"],[6,3,1,"cmdoption-plotdata-l","--list"],[6,3,1,"cmdoption-plotdata-L","--log"],[6,3,1,"cmdoption-plotdata-manual","--manual"],[6,3,1,"cmdoption-plotdata-s","--style"],[6,3,1,"cmdoption-plotdata-V","--version"],[6,3,1,"cmdoption-plotdata-L","-L"],[6,3,1,"cmdoption-plotdata-V","-V"],[6,3,1,"cmdoption-plotdata-f","-f"],[6,3,1,"cmdoption-plotdata-h","-h"],[6,3,1,"cmdoption-plotdata-l","-l"],[6,3,1,"cmdoption-plotdata-s","-s"],[6,3,1,"cmdoption-plotdata-x","-x"],[6,3,1,"cmdoption-plotdata-y","-y"]]},objnames:{"0":["py","function","Python function"],"1":["std","confval","configuration value"],"2":["std","interactvar","interactive variable"],"3":["std","cmdoption","program option"]},objtypes:{"0":"py:function","1":"std:confval","2":"std:interactvar","3":"std:cmdoption"},terms:{"0":[1,3,5,6,7,9],"00":7,"00000":9,"0000000e":7,"0001946e":7,"00032":9,"0003892e":7,"00055":[7,9],"0011677e":7,"00903":9,"00903_qmax18":9,"00904":9,"00905":9,"00906":9,"00907":9,"00908":9,"01":[1,7,9],"02":[1,7],"03":1,"05":9,"07":1,"072":9,"075":9,"0865680161":9,"09":1,"095":9,"097":9,"0989":9,"0x3e20f50":9,"1":[0,1,2,3,4,5,6,7,9],"10":[1,2,3],"100":[3,9],"11":[1,9],"12":[1,9],"13":6,"14":9,"142774":[7,9],"1465":7,"15":[1,9],"16":[6,9],"17":9,"18":[3,9],"2":[0,1,2,3,4,5,6,7,9],"20":[3,6,9],"2008":9,"2009":4,"2013":4,"2018":[1,4],"2020":[1,4],"2021":1,"2022":1,"21":3,"22":[1,9],"23":1,"24":1,"240":9,"26":9,"27":[6,9],"28":9,"29":[8,9],"2\u03b8":[0,2,3,5,6,7,9],"3":[2,5,6,8,9],"30":9,"3000":9,"34":3,"36":9,"38":9,"3_copi":9,"4":[3,6,8,9],"4002724e":7,"451":9,"46":4,"5":[5,6,8,9],"5000":9,"51":4,"549":9,"560":4,"566":4,"5o3":5,"5zr0":5,"6":[6,7,8,9],"605":9,"64":6,"6id":9,"7":[2,3,5,8,9],"8":[2,6,8,9],"8003502e":7,"9":[2,5,6,8],"900":9,"903":9,"905":9,"908":9,"910":9,"947":9,"\u00e5":[0,2,3,5,6,7,8,9],"\u00e5ngstr\u00f6m":[0,5,7,8],"\u03b1":9,"boolean":8,"break":9,"case":[5,6,8,9],"class":[3,8],"default":[0,3,5,6,7,8,9],"do":[2,3,5,6,8,9],"final":[2,5,7,8,9],"float":[3,5],"function":[0,3,4,6,7,8,9],"import":[3,5,6,8,9],"int":3,"juh\u00e1":4,"long":[0,7],"new":[3,4,5,8,9],"null":9,"public":4,"return":[3,8],"short":7,"static":8,"true":[3,5,8,9],"try":[6,9],"while":[0,2,7,9],A:[3,4,5,7,9],At:9,By:[0,3,5,6,9],For:[2,3,4,5,6,7,9],If:[0,2,4,9],In:[2,3,4,5,6,7,8,9],It:[2,3,5,6],No:[3,5],On:2,One:[3,5,9],Such:9,That:8,The:[0,1,2,3,4,5,7,8,9],Then:2,There:[2,9],These:[2,3],To:[2,7,9],With:9,__git_commit__:8,__gitsha__:8,_exit_cod:8,_qmax18:9,abbrevi:9,abil:9,about:[5,7,9],abov:[2,3,9],accept:[0,8,9],access:[0,2,8],accomplish:[2,9],accord:[3,9],accur:9,accuraci:8,acknowledg:4,action:[5,9],activ:[0,2,3,7,9],actual:[0,2,8],ad:[3,4],add:[2,5,9],addit:[0,2,3,4,5,8,9],adjust:[4,9],advanc:[8,9],affect:[8,9],after:[0,5,6,8,9],again:[3,9],agre:2,agreement:4,al2o3:9,al:9,all:[0,2,3,5,6,7,8,9],allow:[3,4,5,6,8,9],alon:6,alreadi:[2,5,9],also:[0,2,3,4,5,6,7,8,9],altern:2,although:7,alwai:5,an:[0,2,3,4,5,6,7,8,9],anaconda:[2,8,9],analysi:4,anchor:8,angl:[0,1,4,5,7,8],angular:9,ani:[0,2,3,4,5,7,8,9],anoth:[2,9],anticip:4,anywher:9,apart:7,api:8,app:8,appear:[5,9],append:5,appl:4,appli:[0,3,8,9],applic:7,approxim:[8,9],apt:2,ar:[0,2,3,4,5,6,7,8,9],arbitrari:9,area:9,argument:[0,2,3,5,6,7,8,9],arrai:[3,8],ask:4,assembl:[4,9],assess:9,assign:[3,5,7],assum:[5,6,7],atom:[4,5],attempt:0,attribut:[3,5,9],au:9,au_dna_ff:9,au_dna_npa:9,author:[1,8],auto:6,automat:[4,7,9],avail:[2,5,6,8,9],averag:[0,9],avoid:[8,9],ax:[3,6,8,9],axeslist:[3,9],axi:[3,8,9],b:[5,9],b_qmax18:9,back:8,background:[0,1,5,8],backgroundfil:[0,5,8,9],backslash:8,base:[3,8,9],basenam:5,batch:4,beamlin:9,becaus:[3,6,8,9],been:[5,7,9],begin:[3,5,9],behavior:[5,7,8],being:[5,7,9],below:9,best:7,beth:8,better:9,between:7,bgscale:[5,8,9],billing:4,binari:8,block:3,blue:9,bogu:8,bool:[3,5,8],both:[3,7,8,9],bound:[5,9],boundari:[5,7,9],box:9,brace:7,braci:[4,8],breakpoint:9,brief:[5,6,7],brookhaven:4,browser:[5,6],bug:8,build:8,built:9,bulk:9,bundl:[4,8],button:9,c:[0,2,4,5,7,9],calcul:[0,3,5,7,8,9],calibr:9,call:[3,6,9],callabl:3,camel:8,can:[0,2,3,4,5,6,7,8,9],cannot:[6,8,9],canopi:2,cap:9,capabl:[6,7],capillari:9,carri:9,catio3:5,caus:[8,9],cell:9,cfg:[0,7,8,9],ch2:5,ch3:5,ch:4,chain:9,chang:[0,3,9],charact:[3,5,7,9],check:[0,2,6,7,9],checkbox:8,chemic:[0,5,7,8,9],chi:[5,7,9],chia:4,choos:2,christoph:4,circl:9,cite:4,citi:4,clear:[3,5,9],clearsess:[3,8,9],clf:9,cli:8,click:9,close:9,closer:5,cmi:9,co:6,code:[2,4,9],colloid:9,columbia:[2,4,9],column:[0,2,3,5,6,7,8,9],combin:6,comma:[3,5,6,9],command:[0,1,3,4,5,6,8,9],comment:[0,7],compar:[8,9],compat:[2,8],complain:9,complet:[5,9],compon:5,composit:[0,5,7,9],comprehens:2,comput:[2,8],conda:[2,8,9],conduct:9,config:[0,3,5,7,8,9],config_neutron:9,config_sa:9,config_xrai:9,configfil:9,configsect:9,configur:[1,3,7,8],confirm:9,conjunct:6,connor:[4,8],consid:3,consist:7,constant:[3,4,5,8,9],contact:4,contain:[0,2,3,5,6,7,8,9],content:[0,7,9],continu:9,contributor:8,control:[4,5,6,9],conveni:[2,3,6,7],convent:[6,8],convers:[2,5],convert:[3,4,5,9],copyright:4,correct:[0,4,5,8,9],correctli:[2,7,9],correspond:[0,3,5,7,8,9],could:[6,8],count:5,counterpart:7,coupl:8,cours:2,cover:[5,8,9],crash:8,creat:[0,2,3,5,7,9],createconfig:[0,5,7],critic:[2,7],cromermann:8,crystallogr:4,cube:6,current:[0,3,5,6,8,9],curv:[5,7,9],custom:[2,4,5,8,9],cutoff:[5,7,9],d:[0,4,5,9],dash:[5,7],dat:[5,6,8,9],data:[0,1,2,3,4,5,7,8],datafil:[3,5],dataformat:[0,3,5,7,9],datapath:[0,5,8,9],dataset:[8,9],davi:4,debug:5,decai:5,dedic:9,defin:[0,2,3,5,7,9],definit:5,degre:[0,5,7,8,9],delft:9,demonstr:[7,9],denot:[7,8],depend:[2,3,8],der:9,describ:[7,9],descript:[5,7],design:9,desir:[2,3,9],detail:[5,6,9],detector:[5,9],diagnost:5,dialog:[3,8,9],did:9,differ:[0,2,5,7,9],difficult:9,diffpi:[0,2,3,4,5,6,7,8,9],diffract:[0,3,4,5,7,8,9],diffractomet:[5,8,9],dir1:[5,8],dir2:[5,8],dir3:8,dir:[3,8],directli:8,directoi:9,directori:[0,2,3,5,6,7,8,9],disabl:5,discuss:9,disk:3,displai:[2,3,5,6,7,9],distribut:[2,4,8,9],dna:9,doc:[0,1,2,3,4,5,6,7,8,9],document:[6,7,8,9],doe:[2,3,7,9],don:[2,4],done:[6,9],dot:8,dotfil:[3,8],doubl:[5,6,7],download:2,driven:[2,9],drop:9,duplic:[8,9],dure:8,dynam:9,e:[2,3,4,5,6,7,8,9],each:[0,3,5,8,9],easi:[2,9],easiest:[0,2],easy_instal:2,editor:[0,2,7],edu:4,effect:[3,4,5,9],egg:[2,8],eijck:4,either:[0,3,5,7,8,9],elaps:9,electron:8,element:[3,5,9],email:4,employ:4,empti:[3,5,9],empty_capillari:9,enabl:[7,8],enclos:5,encount:9,encourag:6,end:[3,5,8,9],engin:2,enhanc:[2,8],enough:3,enter:[7,9],enthought:2,entir:3,entri:[3,5,8,9],environ:[2,8,9],equal:[0,3,5,7,9],equival:[6,8,9],error:[5,8,9],essenti:[5,9],etc:[3,8,9],even:9,everi:5,everyth:8,exact:9,exampl:[0,1,2,3,4,5,7,8,9],except:[0,8,9],execut:[2,7,9],exist:[2,5,8,9],exit:[5,6,7,9],expand:[5,9],expans:6,expect:[5,9],experi:5,experiment:9,explanatori:8,explicit:8,explicitli:[3,5,7,8],extens:[2,5,8,9],extra:[2,3,5,8,9],extract:[1,4,9],f007:5,f2avg:5,f77:5,f7:5,f:[0,2,3,5,6,7,8,9],fact:9,faction:9,factor:[0,5,7,8,9],failur:8,fals:[3,5],familiar:7,farrow:4,fashion:[2,7],fast:9,favg2:5,favorit:0,featur:[6,9],felectronatq:8,few:[0,7,9],ff:5,fft:9,fig:9,figur:9,file10:6,file11:6,file12:6,file13:6,file1:6,file20:6,file2:6,file9:6,file:[1,2,3,4,7,8],filenam:[0,2,3,5,6,7,8,9],find:[0,2,3,5,6,8,9],findfil:[0,2,3,5,6,7,8,9],finish:9,first:[0,2,3,5,6,7,8,9],fit2d:7,fit:[0,1,5],fix:5,fl:6,flag:[8,9],fledg:9,flexibl:5,folder:9,follow:[0,2,4,5,6,8,9],folow:7,forc:[3,5,8,9],form:[0,5,7,9],format:[2,3,5,6,7,8],formfactorfil:[5,9],formula:[5,8],forward:[8,9],found:[0,2,9],four:0,fourier:[5,7],fq:[0,3,5,7,9],fraction:[5,8],frequenc:5,fresh:9,from:[0,2,3,4,5,6,7,8],front:5,full:[6,8,9],fulli:9,funct:8,further:5,g:[0,2,3,5,6,7,8,9],gang:[4,9],gca:3,gener:[0,3,6,7,8,9],get:[2,7,9],gettransform:9,give:[5,8],given:[8,9],global:[0,8],go:9,good:9,gr:[0,3,5,7,8,9],grant:4,graph:[6,9],greater:3,green:9,grid:[0,5,8,9],group:[3,4,5,8,9],gui:[2,3,9],guid:1,h:[5,6],ha:[0,3,5,6,7,9],had:9,handl:[8,9],hao:4,happen:9,hash:7,have:[0,2,3,5,7,8,9],header:[0,3,7,9],headlin:6,help:[5,6,7,9],here:[2,5,6,7,9],hidden:3,higher:[3,5],highli:4,hint:9,hoc:4,hold:8,holder:5,home:[0,9],how:9,howev:[5,9],http:[0,1,2,3,4,5,6,7,8,9],human:8,hundr:9,hung:4,i:[0,2,3,5,6,7,8,9],ident:[7,8],identifi:[0,9],ignor:[0,3,5,7,8,9],illustr:9,immedi:9,impli:[7,9],implicit:[6,8],improv:8,inaccur:[8,9],includ:[2,3,4,6,7,8,9],inclus:[3,5],incorrectli:8,increas:8,inde:7,indent:2,index:[1,2,3,6,8,9],indic:[3,6,9],info:[5,6,7,9],inform:[4,5,7],initi:[3,6,8],inlin:8,input1:7,input2:7,input:[1,3,6,7,8],inputfil:[0,3,5,9],inputn:7,instal:[1,7,8,9],instanc:[3,8],instanti:8,instead:[2,6,7,8],instruct:[2,8,9],instrument:9,integ:[3,5,6,9],integr:2,intend:[2,5,6,7,9],intens:[0,3,5,7,9],intensity1:3,intensity2:3,interact:[1,2,4,5,6,7,8],interactiveshellapp:2,intermedi:[3,4,8,9],intern:[8,9],internet:2,interpol:8,interpret:[2,5],intervent:4,introduct:1,invari:9,invers:[0,5,7],invok:6,involv:9,ipy_mag:[2,8],ipy_pdfgetx3:8,ipynb:9,ipython3:2,ipython:[1,3,5,6,7,8,9],ipython_config:2,iq:[0,3,5,8,9],iq_0:8,iq_:8,iraw:[3,9],issu:9,item:[3,5],iter:3,its:[5,6,7,9],itself:0,j:[3,4,8],jank:4,join:7,jupyt:9,just:[0,6,9],k:3,kapton:9,kapton_bgrd_300k_nor_2:9,keep:[3,6],keyword:[3,9],kirkland:8,know:4,known:9,kwarg:3,l:[4,5,6,9],label:[6,8],laboratori:4,lack:9,languag:2,larg:[5,6,9],larger:5,last:[3,5,6,9],later:8,lead:[2,3,4,5,7],learnt:8,least:3,left:5,legend:9,leli:9,let:9,level:[3,5],lf:9,li:4,librari:[2,4],licens:1,like:[2,6,9],likewis:8,limit:5,line2d:[0,2,3,5,6,7,9],line:[0,2,3,4,5,6,7,8,9],linear:[3,6],linux:[2,9],list:[3,5,6,8,9],liu:4,live:9,load:[3,5,6,7,8,9],loaddata:[0,2,3,5,6,7,8,9],loadtxt:3,loc:9,local:8,locat:0,log:[3,6,8],logarithm:[3,6,8],lone:8,look:[3,7,9],lookup:8,louwen:4,low:[3,9],lower:[5,9],lowercas:8,m2r2:8,m2r:8,m:[2,3,5,9],mac:[2,9],made:9,magic:[1,8],mai:[0,2,3,5,6,7,8,9],make:[5,7,9],manag:2,mandatori:0,mani:7,manipul:[8,9],manual:[1,5,6,7,8],march:1,mark:[0,7],marker:6,match:[2,3,5,6,8],materi:9,matplotlib:[2,3,6,8,9],matric:3,matrix:[3,9],max:[0,2,3,5,6,7,9],maximum:[5,9],may:9,mean:9,meaning:[5,7,9],measur:[0,5,7,9],member:4,memori:3,mention:9,messag:[5,8,9],metadata:[0,7],method:[3,9],microscopi:8,might:5,mind:6,minimum:3,minor:8,minrow:3,misc:3,miss:8,mode:[1,2,4,5,7,8,9],modifi:[6,7,8],modul:[3,8],momentum:[0,5,7,9],more:[2,3,4,5,7,9],most:[0,3,6,9],mott:8,move:9,multipl:[0,1,8],multiple_background_subtract:[8,9],must:[0,2,3,4,5,6,7,8],n:[3,4,5,9],nacl:0,name:[0,2,3,5,6,7,8],nanomet:[0,5,7],nanoparticl:[4,9],napoleon:8,nation:4,natur:9,navig:[2,9],nbcmi:9,ndarrai:3,nearli:7,necessari:[2,3,5,9],need:[0,2,5,6,9],neg:3,nep:8,neutron:[1,4,5,7,8],next:[2,9],ni300mesh_300k_nor_1:9,ni:9,nickel:1,nickel_sub_two_half_background:9,nicmd:9,nois:5,noisi:[5,9],non:[3,9],none:[3,5,9],nonzero:9,normal:[0,5,9],notabl:9,note:[1,3,5,6,7,9],notebook:9,noth:9,notic:[1,9],now:[8,9],np:8,nsl:9,number:[3,5,9],numer:[0,6,9],numpi:[2,3,8],nykypanchuk:9,o3:8,o:[4,5,9],object:[3,5,8,9],obsolet:8,obtain:[2,9],obtainin:9,off:5,offset:[5,8,9],often:[5,7],oh:5,older:2,oleg:9,omit:5,onc:[0,2,3,5,8,9],one:[2,3,5,6,8,9],ones:5,onli:[0,3,4,5,6,7,8,9],open:[2,5,6,7,8,9],oper:[1,2,6,7,8],optimum:4,option:[0,1,2,3,6,7,8,9],order:[5,7,9],org:[0,1,2,3,4,5,6,7,8,9],orient:2,origin:9,os:9,oscil:9,other:[0,1,2,3,7,8,9],otherwis:[2,5],out:[5,6,9],outpufil:9,output:[1,3,7,8],outputtyp:[0,5,9],outsid:9,overal:9,overlap:[5,9],overrul:9,overwrit:[5,8,9],own:[5,9],p:[4,5],packag:[1,2,8],page:[1,6,8],pair:[3,4],paper:4,paragraph:2,paramet:[0,1,3,4,7,8],parent:9,parenthes:[5,8],pars:9,part:[2,9],parti:[2,4],pass:[0,3,6,7,9],path:[0,2,3,5,8],pattern:[0,3,5,6,8,9],pavol:4,pb:[5,8],pbti0:5,pdf:[1,2,3,4,7,8],pdfconfig:[3,8],pdfgetn3:[0,1,2,3,4,5,8,9],pdfgets3:[1,2,4,5,8,9],pdfgetter:[3,5,8,9],pdfgetx2:[3,9],pdfgetx3:[0,1,2,3,4,5,6,8,9],pdfgetx3path:8,pdfgetx:[0,2,3,4,5,6,7,8,9],pdfgetx_env:2,pdfgetxn3:[0,1,2,3,4,5,6,7,8,9],pdfgetxns3_manu:8,pearl:9,per:[0,5,6,8,9],perform:[3,9],perman:2,permit:[4,5],permut:9,photon:9,pi:8,pip:[2,9],place:[2,9],plain:5,plan:2,platform:[8,9],platinum:1,pleas:[4,7],plot:[0,2,3,4,5,6,7,8,9],plotdata:[0,1,2,3,5,7,8,9],plotid:3,plotpdfcomparison:9,plural:[8,9],point:[3,8,9],polici:8,polynomi:[0,5,9],pop:9,posit:[5,8],possibl:5,powder:[0,3,4,5,7,9],power:[4,9],pre:[3,6],preced:[3,5,6,7],prefer:7,prefix:2,preload:9,prepend:[2,5],prerequisit:9,present:[5,7,8,9],preserv:[2,8],press:7,previou:[0,3,8],previous:[5,7,8],print:[3,5,7,9],privileg:2,problem:9,procedur:9,process:[0,2,3,4,5,6,7,8],processfil:[3,8,9],produc:[0,3,5,6,9],prof:[4,9],profil:2,profile_default:2,program:[0,1,2,3,4,7,8,9],prohibit:4,prompt:[2,6,9],proper:[5,8],properti:8,protocol:9,provid:[0,2,5,6,8,9],pt:9,pt_bulk:[7,9],pt_bulk_ramp03:9,publish:9,pure:8,purpos:8,push:8,put:9,py:[2,9],pyplot:[3,6,8],python37:2,python3:2,python:[1,2,4,5,6,8,9],pythonxi:2,q:[0,2,3,5,6,7,8,9],qa:[5,9],qmax:[3,5,7,8,9],qmaxinst:[5,7,8,9],qmin:[5,8,9],qnm:5,qualiti:9,quick:1,quot:[5,6,9],r:[0,2,3,4,5,6,7,9],radiat:[5,7],rai:[1,4,5,7],rang:[3,5,6,8,9],rapid:4,rather:8,raw:[3,9],read:[0,3,5],readabl:8,reason:9,recalcul:9,recip:8,recogn:[6,9],recommend:[2,9],red:9,redo:[7,9],reduc:[0,7,9],refer:[1,3,7,9],referenc:7,refin:9,reflect:8,regular:[0,9],rel:9,relat:[3,7,9],releas:[1,2],relev:9,reliabl:9,remark:9,remov:[5,9],renam:8,repeat:[5,8],replac:[2,9],report:5,repositori:2,reproduc:[0,8],requir:[1,5,7,8,9],resampl:9,rescal:9,research:4,reset:[3,5,9],residu:9,resolv:9,respect:[3,4,7,8,9],restor:8,result:[0,3,4,5,7,8,9],reus:[3,5,8,9],right:7,rmax:[5,9],rmin:[5,9],root:2,round:9,row:[3,6,9],rpoli:[5,8,9],rstep:[5,8,9],run:[2,4,7,8,9],s:[0,2,3,4,5,6,7,8,9],sa:[4,5,7,8,9],safe:[2,9],safer:8,safeti:9,sai:8,same:[0,2,3,5,6,7,8,9],sampl:[0,5,7,9],sapphir:9,sapphire755:9,saspdf:[1,4],satisfi:3,save:[3,5,6,7,9],sb2896:4,scalar:8,scale:[3,5,6,8,9],scan:[7,9],scatter:[0,1,3,4,5,7,8],scienc:2,scientif:[2,4],screen:9,script:[2,4,8],search:[0,1,2,3,5,6,7,8],second:[0,3,6,7,9],section:[0,2,5,6,7,8,9],sectionnam:[0,5],see:[2,5,6,8,9],seem:3,select:[0,1,3,5,8,9],selector:3,self:9,separ:[0,3,4,5,6,7,8,9],sequenc:3,sequenti:3,seri:[1,4],serv:3,session:[2,3,5,6,7,8,9],set:[0,2,3,5,6,7,8,9],setup:[5,8,9],setuptool:[2,8],sever:[0,3,5,6,9],sh:8,shall:9,shape:9,share:[0,9],shell:[2,3,5,6,7,8,9],shortcut:9,shorter:5,should:[0,2,3,8,9],show:[3,6,9],side:9,sign:7,signal:5,similar:[2,6,7,9],similarli:9,simon:4,simpl:[0,4,6,7,8,9],simpli:9,simul:9,sin:6,sinc:[8,9],sinco:6,sine:3,singl:[2,3,5,6,7,8,9],singularli:8,six:2,skip:[2,3],slash:[8,9],slice:[3,8],slider:[8,9],slightli:9,slist:8,small:[1,4,5,7,8],smaller:5,smooth:5,so:[2,6,7,9],softwar:[1,4,6,7,8,9],solid:0,solut:9,some:[2,5,9],songsheng:4,sourc:9,space:[0,5],special:[3,5,6,9],specif:[2,6,8,9],specifi:[0,3,5,6,7,8,9],specimen:5,spectra:9,sphinx:8,split:3,sq:[0,3,5,9],squar:6,sr:6,stai:9,stand:[6,7],standard:[2,5,9],start:[0,1,2,3,5,6,8,9],state:9,statement:[5,8,9],step:[2,6,7,9],still:9,stoichiometri:[5,8],stop:[6,8],store:[3,9],str:3,string:[2,3,5,7,8,9],strip:9,structur:[0,7],style:[3,6,8],sub:8,subdirectori:9,subfold:9,subject:4,subplot:[3,9],subsequ:[3,5,8,9],substr:9,subtract:[1,8],successfulli:9,sudden:9,sudo:2,suffici:3,suffix:9,suitabl:9,summari:7,suppli:7,support:[0,2,3,5,6,8],suppress:5,symbol:[3,5,8],symlink:8,synapt:2,syntax:[0,3,5,6,9],system:[2,3,6,9],t4:9,t:[0,2,3,4,5,7,9],tabl:8,tail:5,take:[3,7,8],taken:[5,9],talapin:4,tao:4,technolog:[2,9],tell:7,temperatur:9,templat:[0,5],tend:9,termin:[2,9],terribl:9,test:[0,2,8],test_blank:9,text:[0,2,3,5,6,7,9],than:[0,3,8,9],thank:9,thatcher:8,thei:[0,2,3,5,6,9],them:[0,3,4,5,6,7,8,9],thereaft:9,therefor:[2,5,7,9],theta:7,thi:[0,2,3,4,5,6,7,8,9],third:2,those:[2,3,9],three:[2,4,5],threshold:5,through:[7,8],thu:[0,2,6,7,9],ti:[5,8],tif:7,time:[5,8,9],timothi:4,timur:4,togeth:[6,9],token:[5,9],told:7,too:5,tool:[2,7,8],top:9,total:[0,4,8,9],trail:5,transfer:[0,5,7,9],transform:[3,5,7,9],transformbackground:9,transformfqgrid:9,transformfqtogr:9,transformqgridregular:9,transformsqnormrpoli:9,transformsqtofq:9,transformtwothetatoqa:9,transformxrayasfnormchri:9,translat:3,transpos:3,truste:4,tunabl:9,tune:[1,3,4,5],tuneconfig:[3,8,9],tupl:3,turn:[5,9],tutori:[1,3,5,7,8],two:[0,5,7,9],twotheta1:3,twotheta2:3,twotheta:[5,7,9],twothetazero:[1,5,8],txt:8,type:[0,2,3,5,7,8,9],typic:7,ubuntu:2,uncorrect:9,undefin:5,under:[4,8,9],understood:[0,9],unexpect:5,unicod:8,uniqu:[5,6,9],unit:[0,5,7,8],unittest:8,univers:[4,8,9],unix:[2,5,9],unless:[5,7,8,9],unpack:3,unreli:5,unseemli:9,unsupport:8,up:[0,2,3,9],updat:[3,7,9],upon:9,upper:[5,7],us:[1,2,3,4,5,6,7,8,9],usag:[5,6,8],usecol:[3,8],user:[0,1,2,4,5,6,7,8,9],usual:[0,2,9],util:[4,6],utilis:4,v:[4,5,6],valid:[0,2,5,9],valu:[0,3,4,5,6,7,8,9],van:[4,9],variabl:[2,3,6,8,9],variant:5,varnam:0,ventur:2,verbos:[5,7,9],veri:[2,5,7,9],verifi:[2,5,7,9],version:[1,2,5,6,9],via:[8,9],virtual:[2,7],visual:[4,9],vogt:4,vuong:4,w0:7,w:[5,9],wa:[4,8,9],wai:[0,2,6,7,8,9],want:2,warn:[5,9],wavelength:[4,5,7,8,9],we:[2,4,7,9],web:[5,6],well:[2,7,9],were:[0,2,5,7,9],what:[0,3,5,9],wheel:[2,8],when:[0,2,3,5,6,7,8,9],where:[0,5,6,7,8,9],wherea:7,whether:4,which:[2,3,4,5,6,8,9],whitespac:3,whl:[2,9],who:2,whole:9,wide:3,window:[2,5,6,7,8,9],within:[2,5,6,8],without:[4,5,8,9],word:5,work:[0,2,3,5,6,7,8,9],wors:9,would:[0,2,3,5,6,8,9],wright:4,writabl:2,write:[5,7,9],written:[2,4,5,9],www:[0,1,2,3,4,5,6,7,8,9],x21:9,x:[0,1,3,4,5,7,8],xrai:[5,9],xy:6,y:[0,1,3,8,9],ye:[5,8,9],yet:[4,7,9],yield:7,york:4,you:[0,2,4,9],your:[0,4,9],z:9,zach:8,zero:[3,5,8,9],zip:[0,1,2,3,4,5,6,7,8,9],zoom:9,zr:[5,8]},titles:["Files used in PDF extraction","diffpy.pdfgetx","Installation","Interactive mode","Introduction","Options and parameters","The plotdata program","Quick-start guide","Release notes","Tutorial"],titleterms:{"0":8,"01":8,"02":8,"03":8,"07":8,"09":8,"1":8,"10":8,"11":8,"12":8,"15":8,"2":8,"2018":8,"2020":8,"2021":8,"2022":8,"23":8,"24":8,The:6,ad:8,angl:9,author:4,background:9,chang:8,command:[2,7],configur:[0,5,9],content:1,data:[6,9],deprec:8,diffpi:1,exampl:6,extract:0,file:[0,5,6,9],fit:9,fix:8,from:9,guid:7,indic:1,input:[0,5,9],instal:2,interact:[3,9],introduct:4,ipython:2,licens:4,magic:2,match:9,mode:3,multipl:9,name:9,neutron:9,nickel:9,note:8,notic:4,oper:5,option:5,other:5,output:[0,5,9],paramet:[5,9],path:9,pdf:[0,5,9],pdfgetn3:7,pdfgets3:7,pdfgetx3:7,pdfgetx:1,platinum:9,plotdata:6,predefin:9,process:9,program:[5,6],quick:7,rai:9,refer:4,releas:8,remov:8,requir:2,saspdf:9,scatter:9,scratch:9,search:9,select:6,seri:9,small:9,softwar:2,start:7,subtract:9,tabl:1,tune:9,tutori:9,twothetazero:9,us:0,version:8,x:[6,9],y:6}}) \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.2.1/tutorial.html b/static_root/doc/pdfgetx/2.2.1/tutorial.html deleted file mode 100644 index efb4220c..00000000 --- a/static_root/doc/pdfgetx/2.2.1/tutorial.html +++ /dev/null @@ -1,889 +0,0 @@ - - - - - - - Tutorial — diffpy.pdfgetx 2.2.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
-

Tutorial

-

In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the examples -folder included with the PDFgetX3 distribution. The examples -folder can be found in the parent “doc” directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -https://www.diffpy.org/doc/pdfgetx/2.2.1/pdfgetxn3-examples.zip.

-
-

Nickel X-ray PDF

-
-

predefined configuration file

-

Change to the Ni directory. The file named -ni300mesh_300k_nor_1-5.chi contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the 2Θ scattering -angles and X-ray intensities. The second file -kapton_bgrd_300k_nor_2-3.chi contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the pdfgetx3.cfg contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -pdfgetx3 program -with the powder data file as an argument:

-
$ pdfgetx3 ni300mesh_300k_nor_1-5.chi
-
-
-

For the first run there should be no output on the screen, -however a new file, ni300mesh_300k_nor_1-5.gr should appear -in the work directory. -We can use the plotdata program, -included with this software, to plot the output data:

-
$ plotdata ni300mesh_300k_nor_1-5.gr
-
-
-

This will open a graph window and start an IPython interactive session. -To exit and close the figure, type exit() on the IPython prompt. -Let’s run the program again, but now with a ---verbose=info -option, to show more details about the program actions.

-
$ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi
-
-INFO:applying pdfgetx3 defaults
-INFO:set config.mode = xray
-INFO:searching for default config file /home/user/.pdfgetx3.cfg
-INFO:searching for default config file .pdfgetx3.cfg
-INFO:searching for default config file pdfgetx3.cfg
-INFO:loaded default config file pdfgetx3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi
-INFO:set config.outputtypes = gr
-INFO:set config.wavelength = 0.142774
-INFO:set config.composition = Ni
-INFO:set config.qmaxinst = 26.5
-INFO:set config.qmax = 26.0
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 30.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'xray'
-INFO:calling config_xray
-INFO:started PDF processing.
-INFO:processing 'ni300mesh_300k_nor_1-5.chi'
-INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr'
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-INFO:elapsed time: 0.095
-
-
-

Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the --verbose option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the --force=yes option, upon -which pdfgetx3 would overwrite any existing files.

-

PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the --c option. Another option, --plot=[iq,sq,fq,gr] turns on plotting of the final PDF or of some other result. A -side effect of the --plot option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function F(Q) and the PDF curve G(r). This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:

-
$ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr
-
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-
-Variables related to PDF processing:
-
-pdfgetter    -- PDFGetter used for calculation.
-config       -- configuration data used by PDFGetter.
-                See config.inputfiles for a list of inputs.
-iraw         -- matrix of input raw intensities with 2 rows per file.
-iq sq fq gr  -- intermediate results per each input file stored
-                as matrix rows.
-
-Functions:
-
-tuneconfig   -- dynamically tune configuration variables.
-processfiles -- process specified data files.
-clearsession -- clear all elements from the inputfiles, iraw,
-                iq, sq, fq and gr variables.
-plotdata     -- plot all or selected columns from a text data file.
-loaddata     -- load all or selected columns from a text data file.
-findfiles    -- search for files matching the specified patterns.
-
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-In [1]:
-
-
-

This will open a plot figure similar to

-_images/nickelfqgr.png -

Because of the interactive mode implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -config variable stores all the configuration parameters, -and its content can be displayed with the print() -function as

-
In [1]: print(config)
-
-configfile = ni300mesh_300k_nor_1-5.gr
-configsection = DEFAULT
-dataformat = twotheta
-...
-qmax = 26.0
-...
-
-
-

The processfiles() function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the F(Q) and G(r) -curves calculated at Qmax = 22 Å-1, we can call -processfiles() and pass it a keyword argument for -the new qmax as follows:

-
In [2]: processfiles(qmax=22)
-
-# the qmax parameter was updated to a new value, thus
-In [3]: config.qmax
-Out[3]: 22
-
-
-

There should be now two lines in each plot axis corresponding to -the results at Qmax equal 26 and 22 Å-1. To exit the program, -type exit().

-
-
-

processing from scratch

-

We have already encountered the command-line option -c -for specifying a custom configuration file. A special argument “NONE”, -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-ERROR:Configuration error: wavelength not specified.
-ERROR:See "--help" for more hints.
-
-
-

There is an error, for the wavelength is necessary to convert -the scattering angle 2Θ to momentum transfer Q. The -X-ray wavelength was 0.142774 Å, which can be passed with the --w, --wavelength option:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774
-
-...
-ERROR:Configuration error: Chemical composition not known.
-ERROR:See "--help" for more hints.
-
-
-

There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the --composition option. The example -below uses a “\\” character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-...
-
-
-

There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the -t, --outputtypes option. -The outputtypes option recognizes the following result types: -“iq”, “sq”, “fq”, “gr”. One or more of these type strings, -separated by a comma, can be included with the --t option, which will produce the corresponding -output files. An empty string, such as -t "", or -t NONE -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings.

-

At this point, we will not write any output files, but will use the ---plot option to display the calculated curves. The ---plot accepts the same arguments as outputtypes, so to -display the F(Q) and G(r) curves we shall run

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni --plot=fq,gr
-
-WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161
-WARNING:qmax reset to the data boundary qmaxinst=28.0865680161
-
-
-

which should open the following plot window:

-_images/nickelfqgrnoisy.png -

The graphs look terrible. The PDF is very noisy and the F(Q) curve -shows a sudden break at about 27 Å-1. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -iraw, iq, sq, -fq, gr -variables for the original raw data and intermediate results. We -are going to plot the “iq” variable that has the input intensities -resampled on the Q grid. The matplotlib function -clf() clears the figure, -the iq variable is a two-row matrix with Q and I rows, and the -axis() -function lets us zoom to a given range:

-
In [1]: clf()
-In [2]: plot(iq[0], iq[1])
-Out[2]: [<matplotlib.lines.Line2D at 0x3e20f50>]
-In [3]: axis([20, 29, 0, 3000])
-Out[3]: [20, 29, 0, 3000]
-
-
-

The graph shows a sudden drop in the raw intensities at 27 Å-1. -The qmaxinst variable defines a Q cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 Å-1

-
In [4]: processfiles(qmaxinst=26.5)
-WARNING:qmax reset to the data boundary qmaxinst=26.5
-
-
-

The updated curves looks reasonable without any oscillations and -breakpoints. The tuneconfig() function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type tuneconfig() to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the F(Q) and G(r) curves change. -The rpoly parameter controls the degree of data-correction -polynomial and is an approximate low-r bound of reliable G -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the G(r) -curve and save it to an output file nicmd.gr:

-
In [14]: config.qmax = 26
-In [15]: config.outputtypes = 'gr'
-In [16]: config.output = 'nicmd'
-In [17]: processfiles()
-
-
-
-
-
-

Platinum X-ray series

-

PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(z-shell being a notable exception).

-
-

matching input files

-

The pdfgetx3 program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the -f, --find option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option --l, --list makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files.

-

We will try out this file search on platinum example files. Open a -terminal and navigate to the Pt directory. There should be a -series subdirectory with 6 chi files indexed from 903 to 908. -At first, let’s stay in the Pt directory and run the following -command

-
$ pdfgetx3 --list --find
-
-Pt_bulk-00055-pdfgetx2.gr
-Pt_bulk-00055-pdfgetx3.gr
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-pdfgetx3.cfg
-plotpdfcomparison.py
-
-
-

Without any patterns the file search matches all files in the current -directory. Now let’s try to add name patterns. There are few special -patterns, for example ^ matches at the beginning of the filename, $ at the end and <N-M> matches a range of integer values from -N to M. The patterns containing ^$<> need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works.

-

Filenames containing “y”:

-
$ pdfgetx3 --list --find y
-empty_capillary-00032.chi
-plotpdfcomparison.py
-
-
-

Filenames that containing both “y” and “chi”, here we use the -options --list and --find in an abbreviated -form -l and -f:

-
$ pdfgetx3 -lf y chi
-empty_capillary-00032.chi
-
-
-

Filenames that start with “e”:

-
$ pdfgetx3 --list --find "^e"
-empty_capillary-00032.chi
-
-
-

Filenames that contain character “2”:

-
$ pdfgetx3 --list --find 2
-Pt_bulk-00055-pdfgetx2.gr
-empty_capillary-00032.chi
-
-
-

Filenames that contain numeric value “2”:

-
$ pdfgetx3 -lf "<2>"
-Pt_bulk-00055-pdfgetx2.gr
-
-
-

The special argument + starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both “bulk” and “chi” substrings and then -also those that have “empty” and “chi” in their names, use:

-
$ pdfgetx3 -lf bulk chi + empty chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-

When pattern groups overlap the resulting matches are -made unique and each file is listed only once

-
$ pdfgetx3 -lf bulk chi + chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-
-
-

data search path

-

Each group of PDFgetX3 patterns can have one entry containing -forward slash “/” to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered “903” to “905” and “908” from the -series subdirectory can be therefore matched using

-
$ pdfgetx3 -lf series/ "<903-905>" + 908
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-

The current directory can be selected using ./

-
$ pdfgetx3 -lf series/ 903 + ./ bulk chi
-series/Pt_bulk_ramp03-00903.chi
-Pt_bulk-00055.chi
-
-
-

When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -“.chi”-ending files in the current and series -directories can be thus found using

-
$ pdfgetx3 -lf ".chi$" + series/
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00906.chi
-series/Pt_bulk_ramp03-00907.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-
-
-

output file names

-

By default the output files are saved in the current directory. The -output path, can be changed with the -o, --output option. -The -o recognizes several tokens that are replaced with -parts of the input file name, for example, “@b” expands to an -extension-stripped base name. In similar faction, “@o” is replaced -with the output type extension. Thus to generate PDFs for all files -in the series directory and save them in the -series-gr subfolder do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o
-
-
-

The extension “.@o” is automatic when not included anywhere in the -output file name. Thus to process the Pt series at Qmax = 18 Å-1 -while saving the results in the same folder, but with a “_qmax18” suffix -in their filenames do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18
-
-
-

For input file Pt_bulk_ramp03-00903.chi the -o option -above expands to output path series-gr/Pt_bulk_ramp03-00903_qmax18.gr. -The series-gr directory should now contain 12 “gr” files, -6 of them processed at Qmax = 27 Å-1 as given by configuration -file and 6 others processed at Qmax = 18 Å-1.

-
-

See also

-

-o, --output for a list of output tokens

-
-
-
-
-

Interactive tuning of parameters

-

One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the Ni directory in the shell and process -the nickel PDF while plotting the F(Q) and G(r) curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -tuneconfig() -function from the IPython environment

-
$ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi
-...
-In [1]: tuneconfig()
-
-
-

The -tuneconfig() -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot.

-_images/tunenickelfqgr.png -

The constant data scale check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -PDF parameters section. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the bgscale parameter -if PDF has been processed without any background data.

-

By default the -tuneconfig() -function displays the same curves as -specified by the --plot option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the describe() method of the -pdfgetter() object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object t4 that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the tuneconfig() function

-
$ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi
-...
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-
-In [1]: fig, ax = subplots(2)
-In [2]: pdfgetter.describe()
-0   TransformTwoThetaToQA
-    convert x data from twotheta to Q in 1/A
-1   TransformQGridRegular
-    Remove the data outside the (qmin, qmaxinst) range
-2   TransformBackground
-    subtract background intensity
-3   TransformXrayASFnormChris
-    scale and normalize intensities by x-ray scattering factors
-4   TransformSQnormRPoly
-    Normalize S(Q) by fitting a polynomial
-5   TransformSQToFQ
-    Convert S(Q) to F(Q).
-6   TransformFQgrid
-    Resample F(Q) to a regular grid suitable for FFT
-7   TransformFQToGr
-    Convert F(Q) to G(r).
-In [3]: t4 = pdfgetter.getTransformation(4)
-In [4]: tuneconfig([t4, 'gr'], axeslist=ax)
-In [5]: ax[0].legend(loc=2)
-
-
-

The subplots() function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window:

-_images/tunenickelt4gr.png -

The tuning can be finished by clicking the Done button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the config -object, for example:

-
In [5]: config.bgscale = 1.5
-
-
-

Finally, to save the new results, we shall first confirm -outputtypes have been correctly set and then use the -processfiles() function to redo the calculations, plots and -data output for the updated configuration. Note that the -processfiles() function accepts keyword arguments for -configuration parameters. This is used at line In [8] to -turn on the force flag and is in effect a shortcut -for an extra config.force = True statement.

-
In [6]: config.outputtypes
-Out[6]: ['gr']
-In [7]: processfiles()
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-In [8]: processfiles(force=True)
-
-
-

ni300mesh_300k_nor_1-5.gr was successfully saved at an -updated configuration for there were no warnings after the last call.

-
-
-

Neutron PDF

-

This example illustrates PDF extraction from -neutron powder data using pdfgetn3. -Navigate to the n-Sapphire directory in the shell. -The sapphire755.dat file contains powder diffraction data from -sapphire (α-Al2O3) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The pdfgetn3.cfg configuration file specifies -processing parameters such as wavelength, -twothetazero, composition, and mode.

-

To extract the sapphire neutron PDF run

-
$ pdfgetn3 --verbose=info sapphire755.dat
-
-INFO:applying pdfgetn3 defaults
-INFO:set config.mode = neutron
-INFO:searching for default config file /home/user/.pdfgetn3.cfg
-INFO:searching for default config file .pdfgetn3.cfg
-INFO:searching for default config file pdfgetn3.cfg
-INFO:loaded default config file pdfgetn3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.mode = neutron
-INFO:set config.wavelength = 1.0989
-INFO:set config.twothetazero = -0.38
-INFO:set config.composition = Al2O3
-INFO:set config.qmaxinst = 11.2
-INFO:set config.qmax = 11.2
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 20.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'neutron'
-INFO:calling config_neutron
-INFO:started PDF processing.
-INFO:processing 'sapphire755.dat'
-INFO:resolved output file '' as 'sapphire755.fq'
-INFO:written outpufile sapphire755.fq
-INFO:resolved output file '' as 'sapphire755.gr'
-INFO:written outpufile sapphire755.gr
-INFO:elapsed time: 0.097
-
-
-

This will produce two files sapphire755.fq, sapphire755.gr -for the F(Q) and G(r) functions. -To compare them with expected results use

-
$ plotdata sapphire755-expected.fq sapphire755.fq
-$ plotdata sapphire755-expected.gr sapphire755.gr
-
-
-
-
-

Fit twothetazero

-

For a good quality PDF it is essential to use powder patterns with -accurate values of Q. Some instruments may produce spectra with -a slightly offset scattering angle 2Θ which -causes inaccurate Q and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the twothetazero correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples.

-

This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -diffpy.cmi, -which is not yet available for Windows. -If diffpy.cmi is not yet installed, -we recommend to use Anaconda Python and set up a dedicated -Anaconda environment nbcmi for this tutorial. -This can be accomplished using the following steps:

-
$ conda create -n nbcmi -c diffpy python=2 diffpy.cmi
-$ conda activate nbcmi
-$ pip install path/to/diffpy.pdfgetx-VERSION.whl
-
-
-

When these prerequisites are in place, -change to the n-twothetazero-fit directory -and open the self documented Jupyter notebook as follows

-
$ jupyter notebook fit-twothetazero.ipynb
-
-
-

The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted twothetazero. -After running all cells the notebook should produce similar graphs -as in the figure below.

-
-_images/twothetazerofit.svgz

Refinement of nickel neutron PDF for (a) uncorrected data -and (b) with a refined zero correction. -The extracted PDFs are plotted as blue circles, -simulated PDFs as red lines and -the difference is plotted offset in green below.

-
-

The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual Rw which is lowered from (a) 0.18 to (b) 0.05.

-
-
-

Small-angle-scattering PDF (sasPDF)

-

Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using pdfgets3. -To do this, navigate to the Au_DNA_NPA directory in your terminal. -In this folder, you will find Au_DNA_NPA.chi and -Au_DNA_FF.chi files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008).. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The pdfgets3.cfg -configuration file specifies processing parameters such as formfactorfile (required by sas mode), qmin, qmax, and mode.

-

To extract the PDF of DNA-capped DNA nanoparticle assemblies

-
$ pdfgets3 --verbose=info Au_DNA_NPA.chi
-
-INFO:applying pdfgets3 defaults
-INFO:set config.mode = sas
-INFO:searching for default config file /home/user/.pdfgets3.cfg
-INFO:searching for default config file .pdfgets3.cfg
-INFO:searching for default config file pdfgets3.cfg
-INFO:loaded default config file pdfgets3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = QA
-INFO:set config.backgroundfile =
-INFO:set config.datapath = []
-INFO:set config.formfactorfile = Au_DNA_FF.chi
-INFO:set config.output =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.force = yes
-INFO:set config.mode = sas
-INFO:set config.rpoly = 240.605
-INFO:set config.qmaxinst = 0.075
-INFO:set config.qmin = 0.01
-INFO:set config.qmax = 0.072
-INFO:set config.rmin = 100.0
-INFO:set config.rmax = 5000.0
-INFO:set config.rstep = 1.0
-INFO:set config.plot = iq, fq, gr
-INFO:set config.verbose = info
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'sas'
-INFO:calling config_sas
-INFO:started PDF processing.
-INFO:processing 'Au_DNA_NPA.chi'
-INFO:resolved output file '' as 'Au_DNA_NPA.fq'
-INFO:written outpufile Au_DNA_NPA.fq
-INFO:resolved output file '' as 'Au_DNA_NPA.gr'
-INFO:written outpufile Au_DNA_NPA.gr
-INFO:elapsed time: 0.947
-
-
-

This will save two files Au_DNA_NPA.fq, Au_DNA_NPA.gr in the same directoy for the F(Q) and G(r) functions. This also plots F(Q) and G(r) functions in a pop-up window and the processing parameters such as rpoly or so may be tuned interactively by issuing command tuneconfig() in the IPython session as discussed above.

-
-
-

Multiple Background Subtraction

-
-

Predefined configuration file

-

In this tutorial, we will show how to use the multiple-background subtraction -functionality by obtainining equivalent outputs from different, but equivalent, -subtractions. Change directory to the doc/examples/ -Multiple_Background_Subtraction directory. The file named -ni300mesh_300k_nor_1-5.chi contains powder X-ray data measured from -nickel at the Advanced Photon Source beamline 6ID-D. The file contains two -columns for the 2Θ scattering angles and X-ray intensities. Similarly, -kapton_bgrd_300k_nor_2-3.chi contains the background data (i.e., the -intensities from an empty kapton capillary), and a duplicate file -kapton_bgrd_300k_nor_2-3_copy.chi contains the same dataset (this -duplication of the data is necessary when using the same background multiple -times as the internal system only stores a set of unique background filenames). -The last .chi file, TEST_blank-00000.chi, simply stores a null -dataset and can be used to show the invariance of the PDF under permutation of -the order of background subtractions as well as the fact that more than just -two backgrounds can be subtracted. There are also two config files -nickel.cfg and nickel_sub_two_half_backgrounds.cfg, each of -which contain a set of complete configuration parameters for converting the Ni -powder pattern to a PDF for the case of doing so via a single background -subtraction and a multiple background subtraction, respectively. Finally, there -is a fully processed G(r) file ni300mesh_300k_nor_1-5-expected.gr which -contains the expected output of producing the PDF of the Ni sample after -subtracting the kapton background. Since all processing parameters are already -defined in these configuration files, producing the PDF using multiple -background subtractions is very simple and involves running the pdfgetx3 program and specifying the multiple background subtraction -config file and the powder data file as arguments:

-
$ pdfgetx3 -c nickel_sub_two_half_backgrounds.cfg ni300mesh_300k_nor_1-5.chi
-
-
-

The resulting G(r) file, ni300mesh_300k_nor_1-5.gr, is the result of -producing the PDF according to:

-
"ni300mesh_300k_nor_1-5.chi" - 0.5*"kapton_bgrd_300k_nor_2-3.chi"
-- 0.5*"kapton_bgrd_300k_nor_2-3.chi"
-
-
-

Which should be equivalent to the case where the following single background -subtraction had been performed:

-
"ni300mesh_300k_nor_1-5.chi" - 1.0*"kapton_bgrd_300k_nor_2-3.chi"
-
-
-

The fact that both of these result in the same PDF can be verified by comparing -the produced G(r) with the expected G(r) provided in the example:

-
$ plotdata ni300mesh_300k_nor_1-5-expected.gr ni300mesh_300k_nor_1-5.gr
-
-
-
-
-

Interactive Multiple Background Subtraction

-

The multiple background subtraction functionality can also be carried out -interactively, as per the Interactive tuning of parameters section, using the plural forms -of the relevant variables (i.e., config.bgscales, config.backgroundfiles, -etc.).

-
-
-
- - -
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.4.0/.buildinfo b/static_root/doc/pdfgetx/2.4.0/.buildinfo deleted file mode 100644 index dcd50e2c..00000000 --- a/static_root/doc/pdfgetx/2.4.0/.buildinfo +++ /dev/null @@ -1,4 +0,0 @@ -# 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: b930593756d2c9edfbe41658e2b6f527 -tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/static_root/doc/pdfgetx/2.4.0/_images/nickelfqgr.png b/static_root/doc/pdfgetx/2.4.0/_images/nickelfqgr.png deleted file mode 100644 index 3fbc12de..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_images/nickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_images/nickelfqgrnoisy.png b/static_root/doc/pdfgetx/2.4.0/_images/nickelfqgrnoisy.png deleted file mode 100644 index caab8cf3..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_images/nickelfqgrnoisy.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_images/tunenickelfqgr.png b/static_root/doc/pdfgetx/2.4.0/_images/tunenickelfqgr.png deleted file mode 100644 index 14accde4..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_images/tunenickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_images/tunenickelt4gr.png b/static_root/doc/pdfgetx/2.4.0/_images/tunenickelt4gr.png deleted file mode 100644 index c95278cd..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_images/tunenickelt4gr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_images/twothetazerofit.png b/static_root/doc/pdfgetx/2.4.0/_images/twothetazerofit.png deleted file mode 100644 index 42f3ba78..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_images/twothetazerofit.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_modules/diffpy/pdfgetx/functs.html b/static_root/doc/pdfgetx/2.4.0/_modules/diffpy/pdfgetx/functs.html deleted file mode 100644 index 3c10ea5d..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_modules/diffpy/pdfgetx/functs.html +++ /dev/null @@ -1,775 +0,0 @@ - - - - - - - - diffpy.pdfgetx.functs — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- -

Source code for diffpy.pdfgetx.functs

-#!/usr/bin/env python
-##############################################################################
-#
-# diffpy.pdfgetx    by DANSE Diffraction group
-#                   Simon J. L. Billinge
-#                   (c) 2008 Trustees of the Columbia University
-#                   in the City of New York.  All rights reserved.
-#
-# File coded by:    Timur Dykhne
-#
-# See AUTHORS.rst for a list of people who contributed.
-# See LICENSENOTICE.rst for license information.
-#
-##############################################################################
-
-import os.path
-import re
-import sys
-
-
-def composition_analysis(compstring):
-    """Pulls out elements and their ratios from the config file.
-
-    compstring   -- chemical composition of the sample, e.g.,
-                    "NaCl", "H2SO4", "(LaCa)1/2 Mn O3".  Blank
-                    characters are ignored, unit counts can be omitted.
-                    It is critical to use proper upper-lower case for atom
-                    symbols as this is used to delimit them in the formula.
-
-    Returns a list of atom symbols and a corresponding list of their counts.
-    """
-    # check if parentheses are balanced
-    if compstring.count("(") != compstring.count(")"):
-        emsgbal = 'imbalanced parentheses in "%s"' % compstring
-        raise ValueError(emsgbal)
-    # make sure there is at least one uppercase character in the compstring
-    upcasechars = any(c.isupper() for c in compstring)
-    nonblank = any(not c.isspace() for c in compstring)
-    if not upcasechars and nonblank:
-        emsg = 'invalid chemical composition "%s"' % compstring
-        raise ValueError(emsg)
-    if "(" in compstring:
-        head, body, count, tail = _parse_parentheses(compstring)
-        ca_head = composition_analysis(head)
-        ca_body = composition_analysis(body)
-        ca_tail = composition_analysis(tail)
-        names = ca_head[0] + ca_body[0] + ca_tail[0]
-        fractions = ca_head[1] + [count * x for x in ca_body[1]] + ca_tail[1]
-        return names, fractions
-    # simple composition string here
-    assert ")" not in compstring
-    # split at every upper-case letter, possibly followed by a lower case
-    # one and charge specification
-    namefracs = re.split(_re_atomtype, compstring)[1:]
-    names = namefracs[0::2]
-    # use unit count when empty, convert to float otherwise
-    fractions = [_parse_fraction(w) for w in namefracs[1::2]]
-    return names, fractions
-
-
-_re_atomtype = "([A-Z][a-z]?(?:[1-8]?[+-])?)"
-
-
-def _parse_parentheses(compstring):
-    """Split fragment of chemical formula at the first pair of
-    parentheses.
-
-    compstring   -- chemical formula that contains one or more pairs
-                    of parentheses.
-
-    Return a tuple of (head, body, count, tail) where
-
-    head     -- is the input string up to the opening parenthesis
-    body     -- compstring fragment enclosed by the first parentheses.
-                It may contain more parentheses.
-    count    -- floating point ratio following the closing parenthesis.
-                Defaults to 1 when not present.
-    tail     -- trailing part of the compstring after the count.
-    """
-    psign = {"(": +1, ")": -1}
-    ptotal = 0
-    p1 = compstring.index("(")
-    for p2, c in enumerate(compstring[p1:], p1):
-        ptotal += psign.get(c, 0)
-        if ptotal == 0:
-            break
-    mx = re.search(_re_atomtype + r"|\(", compstring[p2:])
-    p3 = (mx.start() + p2) if mx else len(compstring)
-    head = compstring[:p1]
-    body = compstring[p1 + 1 : p2]
-    scnt = compstring[p2 + 1 : p3]
-    count = _parse_fraction(scnt)
-    tail = compstring[p3:]
-    rv = head, body, count, tail
-    return rv
-
-
-def _parse_fraction(s):
-    """Convert fraction strings in chemical formulas to floats.
-
-    s    -- string convertible to float or a fraction "1/3".
-
-    Return floating point value parsed from s.  Return 1.0 when
-    s is empty or of space characters only.
-    """
-    from fractions import Fraction
-
-    if "/" in s:
-        rv = float(Fraction(s))
-    elif s.strip():
-        rv = float(s)
-    else:
-        rv = 1.0
-    return rv
-
-
-
-[docs] -def findfiles(patterns=(), path=".", dotfiles=False): - """Find files that match all specified patterns. - - Pattern syntax: - - * ``^start`` - match "start" only at the beginning of the string. - * ``end$`` - match "end" only at the end of string. - * ``<7>`` - match number 7 preceded by any number of leading zeros. - * ``<1-34>`` - match an integer range from 1 to 34 inclusive. - * ``<7->`` - match an integer greater or equal 7. - * ``<->`` - match any integer. - * ``+`` - start a new group of patterns to match more files. - * ``dir/`` - set search path effective from the current pattern group. - - All integer ranges ``<N-M>`` above allow one or more leading zeros. - The range syntax does not support matching of negative numbers. - - Parameters - ---------- - patterns : iterable of strings or str, optional - String patterns that must all match in returned filenames. - Can be also a single string with patterns separated by - whitespace characters. When empty match all files in the - current directory or in the `path`. A single ``+`` starts - a new pattern group for additional matches. Each pattern - group may have one entry containing ``/``, for example, - ``dir/`` or ``./``, which sets the search directory for - this and subsequent pattern groups. When pattern group - contains only the path entry it reuses file patterns from - the previous group. - path : str, optional - Directory to be searched for the files. The default is "." - to search the current directory. - dotfiles : bool, optional - When True search also the hidden "." starting files. These - files are by default ignored, but can be explicitly selected - by adding the ``^.`` pattern. - - Returns - ------- - filenames : list - The list of matching filenames. Return all files when - `patterns` are not specified. - """ - import shlex - from itertools import groupby - from pathlib import PurePath - - from diffpy.pdfgetx.multipattern import MultiPattern - - if isinstance(patterns, str): - p1 = shlex.split(patterns) - else: - p1 = list(patterns) - dirfiles = {} - # split patterns into groups separated by the '+' item - pgroups = [list(g) for k, g in groupby(p1, key=lambda x: x != "+") if k] - pgroups = pgroups or [[]] - cpath = asunicodepath(path) - cpatterns = [] - files = [] - - # Support backslash to identify directory entry on Windows - def hasslash(s): - return PurePath(s).name != s - - for pg in pgroups: - gpath = tuple(p for p in pg if hasslash(p)) - if len(gpath) > 1: - emsg = "Too many directories {!r}.".format(gpath) - raise ValueError(emsg) - gpatterns = [p for p in pg if p not in gpath] - # update current path and patterns when provided - if gpath: - (cpath,) = gpath - if gpatterns: - cpatterns = gpatterns - ap = os.path.abspath(cpath) - if ap not in dirfiles: - dirfiles[ap] = os.listdir(ap) - dirfiles[ap].sort(key=sortKeyNumericString) - keepdotfiles = dotfiles or any(p.startswith("^.") for p in cpatterns) - mp = MultiPattern(cpatterns) - - def fileok(f): - path = PurePath(f) - return (not path.name.startswith(".") or keepdotfiles) and mp.match(str(path)) - - files += (os.path.normpath(os.path.join(cpath, f)) for f in dirfiles[ap] if fileok(f)) - # make matching files unique and filter out any directories - rv = [f for f in unique_everseen(files) if os.path.isfile(f)] - return rv
- - - -
-[docs] -def loaddata(filename, minrows=10, usecols=None, **kwargs): - """Find and load data from a text file. - - The data reading starts at the first matrix block of at least minrows rows - and constant number of columns. This seems to work for most of the - datafiles including those generated by PDFGetX2. - - Parameters - ---------- - - filename : str - Name of the file to load the text data from. - minrows : int, optional - Minimum number of rows in the first data block, by default 10. - All rows must have the same number of floating point values. - usecols : int, str, slice, iterable, optional - Indices or names of the columns to be loaded from the data block, - the default is all columns. Data blocks that do not contain - sufficient number of columns are skipped. When usecols contain - string items, they are translated to column indices by looking - up a header line preceding the data block. String items formatted - as ``i:j:k`` are converted to `slice` objects. When usecols type - is string it is split to a list of names at comma and whitespace - characters. - unpack : bool, optional - Return data as a sequence of columns that allows tuple unpacking - such as ``x, y = loaddata(FILENAME, unpack=True)``. Note that - transposing the loaded array as ``loaddata(FILENAME).T`` has - the same effect. The default is False. - kwargs : misc, optional - Extra keyword arguments that are passed to `numpy.loadtxt`. - - Returns - ------- - data : numpy.ndarray - The data block loaded from the text file. - - See also - -------- - numpy.loadtxt - """ - from numpy import array, loadtxt - - # determine the arguments - delimiter = kwargs.get("delimiter") - if delimiter is not None: - delimiter = delimiter.encode("utf-8") - # required at least one column of floating point values - mincv = (1, 1) - # but if usecols is specified, require sufficient number of columns - # where the used columns contain floats - if usecols is not None: - usecols = _resolveUsedColumns(usecols, filename) - ucx = _expandSliceItems(usecols) or [0] - hiidx = max(-min(ucx), max(ucx) + 1) - mincv = (hiidx, len(set(ucx))) - _ucx_cache = {} - - def getucx(n): - return _ucx_cache.setdefault(n, _expandSliceItems(usecols, n)) - - # Check if a line consists of floats only and return their count - # Return zero if some strings cannot be converted. - def countcolumnsvalues(line): - words = line.split(delimiter) - # remove trailing blank columns - while words and not words[-1].strip(): - words.pop(-1) - nc = len(words) - # build a list of selected words `wsel` - wsel = words - if usecols is not None: - try: - wsel = [words[i] for i in getucx(nc)] - except IndexError: - return 0, 0 - # test if all selected words can be converted to float - try: - nv = len([float(w) for w in wsel]) - except ValueError: - nc = nv = 0 - return nc, nv - - # make sure fid gets cleaned up - with open(filename, "rb") as fid: - # search for the start of datablock - start = ncvblock = None - fpos = nrows = 0 - for line in fid: - fpos += len(line) - ncv = countcolumnsvalues(line) - if ncv < mincv: - start = None - continue - # ncv is acceptable here, require the same number of columns - # throughout the datablock - if start is None or ncv != ncvblock: - ncvblock = ncv - nrows = 0 - start = fpos - len(line) - nrows += 1 - # block was found here! - if nrows >= minrows: - break - # Return an empty array when no data found. - # loadtxt would otherwise raise an exception on loading from EOF. - if start is None: - rv = array([], dtype=float) - else: - fid.seek(start) - # always use usecols argument so that loadtxt does not crash - # in case of trailing delimiters. - n = ncvblock[0] - kwargs["usecols"] = list(range(n)) if usecols is None else getucx(n) - rv = loadtxt(fid, **kwargs) - return rv
- - - -def findColumnNames(headlines): - """Obtain a list of unique column names from a list of header - lines.""" - mxtwospace = re.compile(r"(?:\t| )\s*") - colnames = [] - for line in reversed(headlines): - words = line.split() - if sum(isfloat(word) for word in words) >= len(words) // 2: - colnames = [] - continue - if line.lstrip("#").split()[:2] == ["start", "data"]: - continue - if len(words) > 1 and words[0] == "#L": - w1 = words[1:] - s1 = line.replace("#L", "", 1).strip() - w2 = mxtwospace.split(s1) - colnames = w2 if len(w2) > 1 else w1 - break - if words and words[0].startswith("#"): - words[0] = words[0].lstrip("#").strip() - if not words[0]: - words.pop(0) - if words and all([w[:1].isalpha() for w in words]): - colnames = words - break - return colnames - - -def loadColumnNames(filename): - """Obtain unique column names from a text file header section.""" - with open(filename) as fp: - headlines = fp.readlines(32768) - rv = findColumnNames(headlines) - return rv - - -def _resolveUsedColumns(usecols, filename=None): - """Translate any column names to corresponding integer indices. - - usecols -- an iterable of integers and/or strings. Can be also - an integer or a comma or space-separated string. - String names are translated to integers according - to column names find in the filename. - filename -- text data file where column names are looked up. - Do not translate column names when not specified. - - Return a new usecols list containing integers only. - Raise ValueError if a column name cannot be resolved. - """ - - def isstr(s): - return isinstance(s, str) - - # (1) convert usecols to a list - uc1 = [usecols] if isstr(usecols) else list(usecols) if isiterable(usecols) else [usecols] - # (2) split string items at "," - uc2 = sum((c.replace(",", " ").split() if isstr(c) else [c] for c in uc1), []) - # (3) convert integer string items to int - uc3 = [int(c) if isstr(c) and isint(c) else c for c in uc2] - # (4) convert slice-like string items to slices - uc4 = [] - for c in uc3: - if not isstr(c): - uc4.append(c) - continue - if c.count(":") == 0 or c.count(":") > 2: - uc4.append(c) - continue - a0 = [w.strip() for w in c.split(":")] - if not all(w == "" or isint(w) for w in a0): - uc4.append(c) - continue - # pad a0 to have 3 elements for sure - a0 += 3 * [""] - a1 = [int(w) if w else None for w in a0[:3]] - ss = slice(*a1) - uc4.append(ss) - # if there are no string identifiers we are done here - if filename is None or all(not isstr(c) for c in uc4): - return uc4 - # (5) otherwise we need to translate column names to indices - colnames = loadColumnNames(filename) - colnamesnum = [(n, i) for i, n in enumerate(colnames)] - colnamesfixed = _fixColumnNames(colnames) - # use the first matching column in case of repeated names. - cnmtoidx = dict(reversed(colnamesnum)) - # fixed names do not repeat so use them as they are. - cnmtoidx.update((n, i) for i, n in enumerate(colnamesfixed)) - uc5 = [cnmtoidx.get(c, c) if isstr(c) else c for c in uc4] - # any string items left are bad names - badnames = [c for c in uc5 if isstr(c)] - if badnames: - emsg = "invalid column names: %s" % ", ".join(badnames) - raise ValueError(emsg) - # phew, done here. - return uc5 - - -def _fixColumnNames(names): - """Remove any parentheses and non-alphabetic symbols from a list of - names. Ensure the new list of names is still unique. - - Return a new list of names. - """ - rv = [] - nameindices = {} - mxpar = re.compile(r"[(][^)]*[)]") - mxnoword = re.compile(r"\W") - for i, nm in enumerate(names): - while mxpar.search(nm): - nm = mxpar.sub("", nm) - nm = mxnoword.sub("", nm) - rv.append(nm) - nameindices.setdefault(nm, []).append(i) - for nm, indices in nameindices.items(): - for i, idx in enumerate(indices[1:]): - rv[idx] += str(i + 1) - return rv - - -def _expandSliceItems(lst, size=None): - """Replace slice items in a list with corresponding indices. - - When `size` is not specified, extract available *start* and - *stop* values to determine the necessary length of the sliced - array. - - Parameters - ---------- - lst : list - The list which may contain `slice` objects. - size : int, optional - The size of the iterable to be sliced. When specified - expand slice objects to corresponding indices. - - Returns - ------- - lst2 : list - The new list with slice items expanded. All other items - in the input list `lst` are passed unmodified. - """ - rv = [] - indices = list(range(size)) if size is not None else [] - for x in lst: - if not isinstance(x, slice): - rv.append(x) - continue - # x is a slice here - # (1) expand indices when size is specified - if size is not None: - rv += indices[x] - continue - # (2) otherwise extract known slice bounds - if x.start is not None: - rv.append(x.start) - # keep it simple and process only positive x.stop - if x.stop is not None and x.stop > 0: - if x.step is None or x.step > 0: - n = x.stop - 1 - rv.append(n) - return rv - - -def twoThetaToQ(twotheta, wavelength): - """Converts an array from having values in Two-Theta to Q in - angstroms. - - twotheta -- An array of two-theta values in degrees - wavelength -- The wavelength of the x-ray beam that was used in Angstroms. - - Returns an array of Q values in 1/A units. - """ - from numpy import pi, sin - - Q = 4 * pi * sin(twotheta / 2.0 * pi / 180) / wavelength - return Q - - -def pylab_draw_show(): - """Same as calling pyplot draw and show functions.""" - import matplotlib.pyplot as plt - from bg_mpl_stylesheets.styles import all_styles - - plt.style.use(all_styles["bg-style"]) - plt.rcParams["lines.linewidth"] = 1.5 - - plt.draw() - plt.show() - return - - -def unique_everseen(iterable, key=None): - """Return a generator to unique ordered elements in an iterable. - - iterable -- an iterable object - key -- function that returns key for finding unique items. - Use the item value when None. - - unique_everseen('AAAABBBCCDAABBB') --> A B C D - unique_everseen('ABBCcAD', str.lower) --> A B C D - """ - seen = set() - for element in iterable: - k = element if key is None else key(element) - if k not in seen: - seen.add(k) - yield element - pass - - -def isiterable(obj): - """Return True if object supports iteration protocol.""" - try: - iter(obj) - rv = True - except TypeError: - rv = False - return rv - - -def isfloat(x): - """Return True if string is convertible to float.""" - try: - float(x) - rv = True - except ValueError: - rv = False - return rv - - -def isint(x): - """Return True if string is convertible to int.""" - try: - int(x) - rv = True - except ValueError: - rv = False - return rv - - -def getbooleanorpass(value, ignore=None): - """Convert value to a boolean or pass it when ignored. - - Parameters - ---------- - value : str, number, object - The value to be converted to `bool` or passed unchanged. - ignore : container or callable, optional - Specify values that should be passed unchanged. When callable - pass the `value` as is when `ignore(value)` is true; otherwise - check ``value in ignore``. - - Returns - ------- - result : bool or `value` - - Raises - ------ - ValueError - When `value` cannot be converted to `bool` and is not ignored. - """ - # check if the value is ignored - if ignore is not None: - yesignore = ignore(value) if callable(ignore) else (value in ignore) - if yesignore: - return value - # here we need to convert to bool - if isint(value): - return bool(value) - boolean_states = { - "1": True, - "yes": True, - "true": True, - "on": True, - "0": False, - "no": False, - "false": False, - "off": False, - } - v = str(value).lower() - if v not in boolean_states: - emsg = "not a boolean: %s" % value - raise ValueError(emsg) - return boolean_states[v] - - -def sortKeyNumericString(s): - """This function can be used as a key argument for sort to order - string items in numeric, rather than alphabetic order. - - s -- string entry - - Return a key for comparison in sorting. The string s is split at - integer segments that are then converted to integers. Signs, decimal - points and exponents in s are ignored. - """ - if not hasattr(sortKeyNumericString, "rxdigits"): - sortKeyNumericString.rxdigits = re.compile(r"(\d+)") - rv = sortKeyNumericString.rxdigits.split(s) - rv[1::2] = map(int, rv[1::2]) - return rv - - -def asunicodepath(f): - """Convert path to unicode if it has any non-ASCII characters. - - f -- file or directory path. May be already unicode or a bytes - array. - - Return f if it is already a unicode. Otherwise decode it to unicode - using filesystem encoding. - """ - rv = f - if not isinstance(f, str): - rv = f.decode(sys.getfilesystemencoding()) - return rv - - -def multi_delim_split(delims, string): - """Extend Python string splitting to splitting on multiple - delimiters. - - delims -- an iterable of strings to be used as delimiters for splitting the - given string. - string -- the string to be split - - Returns a list of strings identical to if str.split(delim) had been called - if specifying multiple delimiters in the arguments were supported. - """ - return re.split(r"|".join(re.escape(delim) for delim in delims), string) -
- -
-
-
- -
- -
-

© Copyright 2025, 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/static_root/doc/pdfgetx/2.4.0/_modules/diffpy/pdfgetx/plotdata.html b/static_root/doc/pdfgetx/2.4.0/_modules/diffpy/pdfgetx/plotdata.html deleted file mode 100644 index 0ed17621..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_modules/diffpy/pdfgetx/plotdata.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - - - diffpy.pdfgetx.plotdata — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- -

Source code for diffpy.pdfgetx.plotdata

-#!/usr/bin/env python
-##############################################################################
-#
-# diffpy.pdfgetx    by DANSE Diffraction group
-#                   Simon J. L. Billinge
-#                   (c) 2008 Trustees of the Columbia University
-#                   in the City of New York.  All rights reserved.
-#
-# File coded by:    Pavol Juhas
-#
-# See AUTHORS.rst for a list of people who contributed.
-# See LICENSENOTICE.rst for license information.
-#
-##############################################################################
-"""Program for quick plotting of text data files."""
-
-import os
-import sys
-
-from diffpy.pdfgetx.log import plog
-
-# Constants ------------------------------------------------------------------
-
-_PLOTDATA_BANNER = """\
-Use "plotdata" for more plots and "findfiles" to generate file names.
-See "filenames" for the current data files.
-
-"""
-
-# Functions ------------------------------------------------------------------
-
-
-
-[docs] -def plotdata(filenames, style=None, x=None, y=None, log=None, ax=None, **kwargs): - """Plot one or more text data files. - - The files are searched for data blocks which have enough columns - to satisfy both `x` and `y` selectors of the plotted data. This - may result in an empty plot when file has none wide-enough data - block (e.g., when ``y=100``). - - Parameters - ---------- - filenames : str or an iterable of string file names - One or more text data files to be plotted. - style : str - Optional style argument for the matplotlib |plot| function. - x : int, str, or iterable, optional - The column to be used for the x data. This can be a zero-based - index of the desired column or a column name from data header. - A special symbol "." can be used for a sequential data index. - When not specified, use the first column. - y : int, str, iterable, or slice, optional - One or more columns to be used for the y data. This can be - a single zero-based index of the desired column or an iterable - of several indices. The `y` value can be also a string which - is split at commas and converted to integers, column names - or slice objects, e.g. "0,sine,4:7". The `slice` instances - are applied to the entire data block from each loaded file. - Use the second column when not specified. - log : {'x', 'y'}, optional - Set logarithmic scaling for the specified axis and linear scaling - for all others. For example, ``log="y"`` applies linear scaling - to the x-axis and logarithmic to the y-axis. Keep the current - axis scaling when not specified. - ax : matplotlib.axes.Axes, optional - The axes to plot to. The plotting will be performed using the - ``ax.plot`` method. The default is ``pyplot.gca()``. - kwargs : misc, optional - Keyword arguments for the matplotlib |plot| function. - - Returns - ------- - lines : list - The matplotlib |Line2D| objects added to the current axis. - - See also - -------- - diffpy.pdfgetx.loaddata - """ - rv = [] - if isinstance(filenames, str): - filenames = [filenames] - else: - filenames = list(filenames) - if log is not None and log.strip("xy"): - emsg = "log argument may only contain the 'x' or 'y' characters." - raise ValueError(emsg) - if not filenames: - return rv - xydatasets = [_loadplotdata(f, x, y) for f in filenames] - linelabels = [os.path.basename(f) for f in filenames] - # import pyplot which starts backend only when unavoidable - if ax is None: - import matplotlib.pyplot as plt - from bg_mpl_stylesheets.styles import all_styles - - plt.style.use(all_styles["bg-style"]) - plt.rcParams["lines.linewidth"] = 1.5 - - ax = plt.gca() - for pargs, plabel in zip(xydatasets, linelabels): - if style is not None: - pargs += (style,) - rv += ax.plot(*pargs, label=plabel, **kwargs) - if log is not None: - xscale = "log" if "x" in log else "linear" - yscale = "log" if "y" in log else "linear" - ax.set(xscale=xscale, yscale=yscale) - return rv
- - - -def main(args=None): - """The entry point for the "plotdata" application. - - Parameters - ---------- - args : list of strings, optional - Command line arguments for the "plotdata" program. - When not specified, use ``sys.argv[1:]``. - - Returns - ------- - exitcode : int - The shell exit code of the "plotdata" program: - - = ============================================ - 0 successful run - 1 data file does not exist or invalid argument - 2 any other fatal failure - = ============================================ - """ - from diffpy.pdfgetx.functs import asunicodepath, findfiles, pylab_draw_show - from diffpy.pdfgetx.interaction import create_ipython_interface, is_ipython_running, to_slist - - args = sys.argv[1:] if args is None else args - ipyface = None - exitcode = 2 - try: - opts, pargs = _processoptions(args) - if opts.openmanual: - from diffpy.pdfgetx.manual import openHTMLManual - - openHTMLManual("plotdata.html") - return 0 - filenames = [asunicodepath(f) for f in pargs] - if opts.find: - filenames = findfiles(pargs) - if opts.listfiles: - for f in filenames: - print(f) - return 0 - if not filenames: - plog.warning("No input files, nothing to do.") - return 0 - if not is_ipython_running(): - ipyface = create_ipython_interface() - plotdata(filenames, style=opts.style, x=opts.x, y=opts.y, log=opts.log) - pylab_draw_show() - exitcode = 0 - if ipyface: - # inject the pyplot functions - import matplotlib.pyplot as plt - from bg_mpl_stylesheets.styles import all_styles - - plt.style.use(all_styles["bg-style"]) - plt.rcParams["lines.linewidth"] = 1.5 - - plotfunctions = dict((n, getattr(plt, n)) for n in dir(plt) if not n.startswith("_")) - ipyface.push(plotfunctions, interactive=False) - # inject plotdata-related functions and variables - ipyface.push(dict(plotdata=plotdata), interactive=False) - ipyface.push(dict(findfiles=findfiles), interactive=False) - filenames = to_slist(filenames) - ipyface.push(dict(filenames=filenames), interactive=True) - ipyface.mainloop(banner=_PLOTDATA_BANNER) - except (OSError, IOError, ValueError) as e: - sys.stderr.write("%s\n" % e) - exitcode = 1 - except SystemExit as e: - exitcode = e.code - # All done here. - return exitcode - - -# Local Helpers -------------------------------------------------------------- - - -def _loadplotdata(filename, xi, yi): - """Load x and y arrays from filename as per the xi, yi identifiers. - - Return a tuple of (xdata, ydata) that can be used with the plot - function. - """ - import numpy - - from diffpy.pdfgetx.functs import _resolveUsedColumns, loaddata - - xi = _parsecolumnid(xi) - yi = _parsecolumnid(yi) - if yi is None: - if xi is not None: - emsg = "y-column must be specified for explicit x." - raise ValueError(emsg) - # xi and yi are both None here - d = loaddata(filename) - if d.ndim <= 1: - rv = numpy.arange(d.size, dtype=float), d - else: - rv = d[:, 0], d[:, 1] - return rv - # here yi is not None - if xi is None: - xi = [0] - assert isinstance(xi, list) and isinstance(yi, list) - ucx = _resolveUsedColumns(xi) - if len(ucx) > 1: - emsg = "x may not specify more than one column." - raise ValueError(emsg) - if any(isinstance(c, slice) for c in ucx): - emsg = "slice is not allowed for x identifier." - raise ValueError(emsg) - useindex = "." in ucx - uc = yi if useindex else xi + yi - d = loaddata(filename, usecols=uc) - if d.size == 0: - return d, d - # ensure 2-dimensional data array - if d.ndim == 1: - # determine if this is a single row or single column - ucr = _resolveUsedColumns(uc) - onerow = (len(ucr) > 1) or any(isinstance(c, slice) for c in ucr) - d = d.reshape((1, -1)) if onerow else d.reshape((-1, 1)) - assert d.ndim == 2 - nrows = d.shape[0] - if useindex: - rv = numpy.arange(nrows, dtype=float), d - else: - rv = d[:, :1], d[:, 1:] - return rv - - -def _processoptions(args): - """Process the command line options and arguments. - - args -- command line arguments without argzero - - Return a (opts, pargs) tuple of option values and - the remaining positional arguments. - """ - from optparse import OptionParser - - from diffpy.pdfgetx import __version__ - - parser = OptionParser("usage: %prog [options] file1.dat file2.dat ...") - parser.allow_interspersed_args = True - parser.version = "%prog " + __version__ - # fix help string for --help - oh = parser.get_option("--help") - oh.help = "Show this help message and exit." - parser.add_option("-V", "--version", action="version", help="Show program version and exit.") - parser.add_option( - "--manual", action="store_true", dest="openmanual", help=("Open manual in a web browser and exit.") - ) - parser.add_option( - "-f", - "--find", - action="store_true", - help="Use arguments as file name patterns and " "plot the matching files.", - ) - parser.add_option( - "-l", - "--list", - action="store_true", - dest="listfiles", - help=("List all input files without plotting. " "Should be used with the --find option."), - ) - parser.add_option( - "-x", - type="string", - help="Index or name of the x-column to plot. " 'When "." use the data-row index as x.', - ) - parser.add_option( - "-y", - type="string", - help="Index or name of the y-column to plot. " - "May contain a comma separated list of several names or " - 'indices or Python-like ranges, like "1,2", "G", "0:6:2". ' - "Column indices are zero based therefore the second column " - 'is specified as "1".', - ) - parser.add_option( - "-s", - "--style", - type="string", - help="Optional plot style string. See matplotlib " - "documentation for the plot function for a list of " - "available styles.", - ) - parser.add_option( - "-L", - "--log", - type="string", - help="Set logarithmic scaling for the specified x or y axis " - 'and linear for all others, for example, "xy", "y" or "".', - ) - opts, pargs = parser.parse_args(args) - return opts, pargs - - -def _parsecolumnid(sx): - """Helper function that converts a string column identifier to - either None or a list of integer indices, slice objects and string - column names, aka something that is digestable as the loaddata - usecols argument.""" - from diffpy.pdfgetx.functs import isiterable - - if isinstance(sx, str): - rv = sx.replace(",", " ").split() - elif sx is None or sx == "": - rv = None - else: - rv = list(sx) if isiterable(sx) else [sx] - return rv - - -# Kick starter --------------------------------------------------------------- - -if __name__ == "__main__": - sys.exit(main()) -
- -
-
-
- -
- -
-

© Copyright 2025, 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/static_root/doc/pdfgetx/2.4.0/_modules/index.html b/static_root/doc/pdfgetx/2.4.0/_modules/index.html deleted file mode 100644 index 352c7e25..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_modules/index.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - Overview: module code — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
-
    -
  • - -
  • -
  • -
-
-
-
-
- -

All modules for which code is available

- - -
-
-
- -
- -
-

© Copyright 2025, 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/static_root/doc/pdfgetx/2.4.0/_sources/files.rst.txt b/static_root/doc/pdfgetx/2.4.0/_sources/files.rst.txt deleted file mode 100644 index edc63d96..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_sources/files.rst.txt +++ /dev/null @@ -1,102 +0,0 @@ -Files used in PDF extraction -======================================================================== - -.. include:: abbreviations.txt -.. _my-configfile: -.. program:: pdfgetx3 - -Configuration file ------------------------------------------------------------------------- - -Configuration files may define the PDF processing parameters. -By default, the :program:`pdfgetx3` program attempts to read -:file:`.pdfgetx3.cfg` file from the user HOME directory, -then :file:`.pdfgetx3.cfg` and :file:`pdfgetx3.cfg` files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the :option:`-c, --config <-c>` option. -The :program:`pdfgetn3` program works in the same way, -except it checks for configuration files -:file:`~/.pdfgetn3.cfg`, :file:`.pdfgetn3.cfg` and :file:`pdfgetn3.cfg`. - -The easiest way of creating a configuration file is to generate -a template content using the :option:`--createconfig` option as :: - - pdfgetx3 --createconfig=test.cfg - -and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple "varname=value" syntax, -any lines starting with "#" are ignored as comments. - -The configuration file has several sections marked as ``[SECTIONNAME]``. -The ``[DEFAULT]`` section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the :option:`-s, --section <-s>` option on the -command line. Thus :: - - pdfgetx3 --config=test.cfg --section=nacl - -would read the parameters from the ``[nacl]`` section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section. - - -Input files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -|twotheta| in degrees, momentum transfer *Q* in inverse nanometers or *Q* -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the :confval:`dataformat` parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values. - -The input files are usually passed as command-line arguments to -:program:`pdfgetx3` or :program:`pdfgetn3` programs and must be paths -accessible from the current working directory. - -Input files can be also defined by setting the :confval:`inputfile` -value in the configuration file. The :option:`-d, --datapath <-d>` -option can be then used to provide additional data directories to -search for these inputs and for the :confval:`backgroundfile`. -This is to support configuration files located in a different -directory than the data. - -When the :option:`--find <-f>` option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory. - - -Output files ------------------------------------------------------------------------- - -PDFgetX3 and PDFgetN3 can produce up to four different output data files: - -* .iq -- |IQ|, the background-corrected - intensities sampled on a regular *Q*-space grid in inverse ångströms, - -* .sq -- |SQ|, the total scattering structure function, - with intensities normalized by average scattering factors and - corrected by a polynomial fit, - -* .fq -- |FQ|, the reduced structure function equal to *Q*\ (|SQ| - 1), - -* .gr -- |Gr|, the resultant PDF, where the first column is the - separation *r* in ångströms and the second is the function *G* in - Å\ :sup:`-2`. - -You can specify what output files should be produced by setting the -:confval:`outputtypes` parameter in the configuration file or by -passing the :option:`-t, --outputtypes <-t>` on the command line. - -The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the :option:`--config <-c>` option, -the PDFgetX3 will reproduce the previous calculation. diff --git a/static_root/doc/pdfgetx/2.4.0/_sources/index.rst.txt b/static_root/doc/pdfgetx/2.4.0/_sources/index.rst.txt deleted file mode 100644 index c7bf373e..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_sources/index.rst.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. PDFgetX3 documentation master file, created by - sphinx-quickstart on Tue Sep 21 18:35:11 2010. - You can adapt this file completely to your liking, - but it should at least contain the root `toctree` directive. - -######################################################################## -diffpy.pdfgetx -######################################################################## - -User manual for PDFgetX3, PDFgetN3, PDFgetS3 and Python package diffpy.pdfgetx. - -| Release |release| -| |today| - -======================================================================== -Table of contents -======================================================================== - - -.. toctree:: - :maxdepth: 2 - - intro - install - quick-start - tutorial - files - interact - options - plotdata - release - -======================================================================== -Indices -======================================================================== - -* :ref:`genindex` -* :ref:`search` diff --git a/static_root/doc/pdfgetx/2.4.0/_sources/install.rst.txt b/static_root/doc/pdfgetx/2.4.0/_sources/install.rst.txt deleted file mode 100644 index 8cda3ccc..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_sources/install.rst.txt +++ /dev/null @@ -1,145 +0,0 @@ -Installation -======================================================================== - -.. include:: abbreviations.txt - -Software requirements ------------------------------------------------------------------------- - -This software is written in Python programming language, therefore -you must have Python 3.13, 3.12, or 3.11 installed. In addition, -the following third-party Python libraries are also required: - -* pip - Python package installer -* setuptools - tools for installing Python packages -* NumPy - library for scientific computing with Python -* matplotlib - Python plotting library -* IPython - enhanced interactive Python shell - -Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -`Python Package Index `__ -or using any Internet search engine. - -Another more convenient option is to obtain one of the science-oriented -Python distributions such as -`Anaconda Python`_, -`Enthought Canopy `_ or -`PythonXY `_, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step. - -On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command :: - - sudo apt-get install \ - python3-pip python3-setuptools \ - python3-numpy python3-matplotlib ipython3 - -This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above. - -On Windows operating system, it may be necessary to add the -``C:\Python37`` directory and the scripts directory -``C:\Python37\Scripts`` to the system :envvar:`!PATH`. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the :program:`Command Prompt`, type -there ``python`` and see if this starts the Python interpreter. - -Alternately, if you want to run the diffpy.pdfgetx software with a specific version of Python, -we recommend using a virtual environment, such as ``conda``. For example, if you have Anaconda Python installed, -you can create a conda virtual environment to install the software as follow :: - - conda create --name pdfgetx_env python=3.13 numpy matplotlib ipython - -You can choose the name of the environment and python version as you desire. You can choose any of the -supported Python versions. Then, activate this environment and follow the instructions in the -next section to install the software :: - - conda activate pdfgetx_env - -Installation ------------------------------------------------------------------------- - -The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -`Columbia Technology Ventures -`__. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:: - - pip install ./diffpy.pdfgetx-VERSION.whl - -Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending ``sudo`` to the command line above. If root access is not available, use the ``pip install`` options :option:`!--user` or :option:`!--prefix` to install the software to a user-writable directory. - -The package provides three programs for PDF conversion, :program:`pdfgetx3`, :program:`pdfgetn3` and :program:`pdfgets3`. To check if they are correctly installed run :: - - pdfgetx3 --version - pdfgetn3 --version - pdfgets3 --version - -This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a :program:`plotdata` -command for an easy plotting of text data files. To verify -if plotdata works, run the ``plotdata --version`` command. -Finally, a comprehensive test of the installed software can -be executed using :: - - python -m diffpy.pdfgetx.tests.run - -.. note:: - - Older versions of diffpy.pdfgetx use Python egg format - instead of Python wheel. - To install these use the easy_install command as follows:: - - python -m easy_install ./diffpy.pdfgetx-VERSION.egg - -.. index:: %pdfgetx3 IPython magic -.. index:: %pdfgetn3 IPython magic -.. index:: %pdfgets3 IPython magic - -IPython magic command ------------------------------------------------------------------------- - -These instructions are intended for `IPython`_ users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don't plan to customize IPython in such way you can safely skip -this paragraph. - -When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session. - -The ``%pdfgetx3``, ``%pdfgetn3`` and ``%pdfgets3`` magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up - -#. find the ``profile_default/ipython_config.py`` file and open it - in a text editor. If that file does not exists, - create it first by executing :: - - ipython profile create - -#. navigate to the paragraph that contains the - :py:data:`!c.InteractiveShellApp.extensions` and add there - the following line :: - - c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics'] - - There must be no leading indent, i.e., the text must start at the - very first column. diff --git a/static_root/doc/pdfgetx/2.4.0/_sources/interact.rst.txt b/static_root/doc/pdfgetx/2.4.0/_sources/interact.rst.txt deleted file mode 100644 index 0d4fb746..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_sources/interact.rst.txt +++ /dev/null @@ -1,154 +0,0 @@ -Interactive mode -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. py:currentmodule:: _interactive_ - -The interactive mode is activated by using either the -:option:`-i, --interact <-i>` option or a non-empty -:option:`--plot <-p>` option. In the interactive mode -the program starts an `IPython`_ interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands ``%pdfgetx3`` and ``%pdfgetn3``, which can be used with -the same syntax as the :program:`pdfgetx3` and :program:`pdfgetn3` in -system shell. -The interactive session is also initialized with all functions from the -:py:mod:`matplotlib.pyplot` module for convenient plotting. -The functions and variables related to PDF processing are: - -.. py:function:: pdfgetter(x=None, y=None, filename='', **kwargs) - - Instance of the :py:class:`!PDFGetter` class which serves as a - low-level function that calculates the PDF. This is a callable - object, which takes as an argument a pair of input arrays for - (*Q*, intensity) or (|twotheta|, intensity) depending on - :confval:`dataformat`. It can be also called with a keyword - argument ``filename=FILE``, which would read the input arrays - from the specified file. When called with no arguments, - it calculates PDF from the last input data. - - :parameters: - * **x** (*numpy.ndarray, optional*) -- - The *Q* or |twotheta| values in powder diffraction pattern. - - * **y** (*numpy.ndarray, optional*) -- - The scattered intensities in powder diffraction pattern - - * **filename** (*str, optional*) -- - The text data file for loading the `x`, `y` values when - they are not specified. - - * **kwargs** (*misc, optional*) -- - Extra keyword arguments that are applied to - the :data:`!config` object, for example ``qmax=20``. - - :return: - A pair of output arrays *(r, G)*. - -.. interactvar:: config - - Instance of the :py:class:`!PDFConfig` class that stores the - :ref:`parameters and input files ` for the program. - Use ``print(config)`` to display the current configuration values. - This is the same object as :data:`!pdfgetter.config`. Configuration - may be changed by setting a respective attribute of the - :interactvar:`!config` object, for example:: - - In [1]: config.qmax = 21 - - The :py:data:`!config` values may be also changed by calling the - :py:func:`pdfgetter` or :py:func:`processfiles` function with a - corresponding keyword argument, for example - ``processfiles(qmax=20, force="once")``. - -.. interactvar:: iraw - iq - sq - fq - gr - - These variables are assigned the input raw intensities and the - intermediate results, stored as matrix rows. The matrix rows - correspond to twotheta1, intensity1, twotheta2, intensity2, etc. - Because matrices are iterated row first, the raw intensities - from all input files can be plotted with the matplotlib plot - function as ``plot(*iraw)``. - - These variables should be considered read-only and are reset - with subsequent PDF calculations. - -.. py:function:: tuneconfig(plotids=None, pdfgetter=None, axeslist=None) - - Show a GUI dialog for interactive tuning of configuration variables. - - :arg plotids: - The string or iterable that specify what interactive plots should be - tuned. By default the same as ``config.plot``. It can be also an - integer index or name of a transformation in :py:func:`pdfgetter` or - a reference to a :py:class:`!Transformation` object. - - :arg pdfgetter: - The optional :py:class:`!PDFGetter` object to be tuned. - This is by default the interactive :py:func:`!pdfgetter` object. - - :arg axeslist: - An optional list of matplotlib Axes for showing interactive plots. - When None, use ``subplot(N, 1, i)`` to create any necessary axes. - - .. note:: - - Changes from :py:func:`!tuneconfig` apply only to the configuration - and results in memory. Use the :py:func:`processfiles` function - to save them to disk. - - .. seealso:: :ref:`my-tuneconfig` tutorial - -.. py:function:: processfiles(filename=None, **kwargs) - - Process all input files again with the current configuration values. - This is a higher-level function than :py:func:`pdfgetter`, as - it also saves output files and produces plots as specified by the - :interactvar:`config` object. - - :arg filename: - One or more input files to be converted to PDFs and saved or - plotted according to the :py:data:`!config` settings. Use the - previous list of input files when not specified. - - :arg kwargs: - An optional keyword arguments to set for the :py:data:`!config` - object, for example ``(force="once", qmax=18)``. - - This function updates the :interactvar:`config.inputfiles ` - list and the :interactvar:`iraw`, :interactvar:`iq`, - :interactvar:`sq`, :interactvar:`fq` and :interactvar:`gr` - interactive variables. - -.. py:function:: clearsession() - - Clear all elements from the :interactvar:`config.inputfiles ` - and also the - :interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, - :interactvar:`fq` and :interactvar:`gr` variables. - - :return: - No return value. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: loaddata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. - -.. py:currentmodule:: diffpy.pdfgetx.plotdata -.. autofunction:: plotdata - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx.plotdata` module. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: findfiles - - This function can be imported from the - :py:mod:`!diffpy.pdfgetx` module. diff --git a/static_root/doc/pdfgetx/2.4.0/_sources/intro.rst.txt b/static_root/doc/pdfgetx/2.4.0/_sources/intro.rst.txt deleted file mode 100644 index 738ccc8f..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_sources/intro.rst.txt +++ /dev/null @@ -1,71 +0,0 @@ -Introduction -======================================================================== - -diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts. - - -.. index:: license - -License notice ------------------------------------------------------------------------- - -.. include:: ../../LICENSENOTICE.rst - - -.. index:: authors - -Authors ------------------------------------------------------------------------- - -This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Connor J. Bracy, -Hung Vuong, -Songsheng Tao, -Simon Billinge. - - -.. index:: citations, references - -References ------------------------------------------------------------------------- - -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: - - P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge - `PDFgetX3: A rapid and highly automatable program for processing - powder diffraction data into total scattering pair distribution - functions `__, - *J. Appl. Crystallogr.* **46**, 560-566 (2013) - -For research publications that use this software to process neutron -diffraction data we ask you to also cite: - - P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, - S. J. L. Billinge - `PDFgetN3: atomic pair distribution functions from neutron - powder diffraction data using ad hoc corrections - `__, - *J. Appl. Crystallogr.* **51** (2018) - -For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication: - - CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge - `sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data `__. diff --git a/static_root/doc/pdfgetx/2.4.0/_sources/options.rst.txt b/static_root/doc/pdfgetx/2.4.0/_sources/options.rst.txt deleted file mode 100644 index b6334200..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_sources/options.rst.txt +++ /dev/null @@ -1,412 +0,0 @@ -Options and parameters -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program. - - -.. Note :: - - The command line options start with a leading "-" and can - be only used as command line arguments when starting the - :program:`pdfgetx3` program. Within configuration file the parameter - names are plain words without any leading dashes. Finally, - parameters can be also set in the interactive mode as attributes of - the :interactvar:`config` object, but the assignments must be valid - Python statements. Here are examples of setting composition of - a processed specimen using each of these forms: - - #. assigned in configuration file:: - - ... - composition = CaTiO3 - ... - - #. set as a command-line option when starting :program:`pdfgetx3` or - :program:`pdfgetn3`:: - - pdfgetx3 --composition=CaTiO3 - - #. set in the IPython interactive mode:: - - pdfgetx3 -i - ... - In [1]: config.composition = "CaTiO3" - - -Program operation ------------------------------------------------------------------------- - -.. option:: -h, --help - - Display a brief usage information with a list of command line options - and exit. - -.. option:: -V, --version - - Display the program version and exit. - -.. option:: --manual - - Open this manual in a Web browser and exit. - -.. option:: -f, --find -.. _my-findpatterns: - - Select input files that match all patterns. The command - line arguments are by default taken as input files. However, - with the :option:`!--find` option they are processed as - file patterns and the matching files are then used as inputs. - The input files are by default searched in the current directory - unless there is a path entry (e.g., :file:`data/`) that - selects a different search path. The search patterns are - interpreted as fixed strings, all of which must be present - in the file name. A single argument ``+`` starts - a new group of patterns to match more files that are not - covered by one set of patterns. Additional pattern - groups reuse the current search path unless they provide - their own path value. Pattern groups containing only - a path entry reuse file patterns from the last group. - When pattern groups overlap the repeated matches are ignored - to make the resulting list of files unique. Files starting - with ``.`` are ignored unless there is ``^.`` pattern - that explicitly matches them. The search - syntax provides the following special patterns: - - .. tabularcolumns:: |l|p{0.75\textwidth}| - - +---------+------------------------------------------------------------+ - | ^ | match at the beginning of the string, i.e., ``^start`` | - | | matches only filenames that start with "start". | - +---------+------------------------------------------------------------+ - | $ | match at the end of string, for example, ``.chi$`` selects | - | | file names ending with ".chi". A ``$`` on its own | - | | matches every string and can be used to select all files. | - +---------+------------------------------------------------------------+ - | | match number *N* preceded by any number of leading zeros, | - | | e.g., ``<7>`` would match in "f7.chi", "f007.chi", but not | - | | in "f77.chi". | - +---------+------------------------------------------------------------+ - | | match an integer range from *N* to *M* inclusive. | - | | The matched number may have one or more leading zeros. | - +---------+------------------------------------------------------------+ - | <7-> | match number 7 or larger. | - +---------+------------------------------------------------------------+ - | <-7> | match number 7 or smaller. | - +---------+------------------------------------------------------------+ - | <-> | match any integer number. | - +---------+------------------------------------------------------------+ - | \+ | start a new pattern group, for example, ``.chi$ + .dat$`` | - +---------+------------------------------------------------------------+ - | / | set search path. An argument containing the ``/`` symbol | - | | is taken as the search path, for example, ``data/`` or | - | | ``./``. Each pattern group may provide its own search | - | | path effective for that and any subsequent pattern group. | - +---------+------------------------------------------------------------+ - - The ``^$<>`` characters are often special to Unix or Windows - command shells, therefore they need to be enclosed in double - quotes (\\") when used on command line. - - .. seealso:: tutorial on :ref:`my-findexamples` - -.. option:: -l, --list - - List all input files and exit. This is useful with the - :option:`!--find` option to verify if input files - are matched as intended. - - -Configuration file options ------------------------------------------------------------------------- - -.. option:: -c CONFIG, --config=CONFIG - - Read custom configuration file after loading the default ones. - Do not load any configuration file when "NONE". - -.. option:: -s NAME, --section=NAME - - Load the custom configuration file section ``[SectionName]`` after - loading the ``[DEFAULT]`` section. This is useful for creating - several configuration variants in a single configuration file. - -.. option:: --createconfig=FILE - - Write template configuration to a new FILE and exit. Write - to the standard output when FILE is "-". - -See also the :ref:`configuration file ` section -for further details. - -.. _my-ioparameters: - -Input and output options ------------------------------------------------------------------------- - -.. confval:: inputfile - - This parameter allows to specify one or more input files in the - configuration file, one file per line. The :confval:`!inputfile` - is only used if no input files were provided on the - :program:`pdfgetx3` or :program:`pdfgetn3` command line. - -.. confval:: dataformat -.. option:: --format=FORMAT - - Format of input files. Available formats are: ``twotheta``, ``QA``, - ``Qnm`` corresponding to a two-column text data where the first - column is either the scattering angle |twotheta| in degrees, *Q* in - inverse ångströms or *Q* in inverse nanometers. - -.. confval:: backgroundfile -.. option:: -b FILE, --background=FILE - - Optional datafile with background intensities from an empty sample - holder. It must be in the same dataformat as other input files. - -.. Note :: - - The following input is only used in ``sas`` mode. - -.. confval:: formfactorfile -.. option:: -ff FILE, --formfactorfile=FILE - - Form factor intensities of the scatterers. This is required for ``sas`` mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1. - -.. _my-datapath: -.. confval:: datapath -.. option:: -d DATAPATH, --datapath=DATAPATH - - One or more extra directories to be searched for input or - background data files. The :option:`!-d` option can be specified - several times to add more directories, these are prepended in front - of any default value. Within configuration file the datapath - directories have to be listed each on a separate line. - - A special value "NONE" (or "none") clears any previously defined - paths and only the further paths, if any, would be searched for - inputs. - -.. confval:: output -.. option:: -o OUTPUT, --output=OUTPUT - - Output file name, write to the standard output when "-". The - :option:`-t, --outputtypes <-t>` option controls what results are - being saved. Normally the OUTPUT is used as a custom basename for - the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o - tokens, which are expanded as follows: - - ===== ================== ======================================= - token example definition - ===== ================== ======================================= - @h dir1/dir2 the input file directory or "." - @r dir1/dir2/filename the input path with extension removed - @e dat the input file extension without "." - @t filename.dat the tail component of the input file - @b filename the tail component with extension removed - @o gr the output extension iq, sq, fq or gr - ===== ================== ======================================= - - An empty value works the same as "@b.@o" and saves the data - in the current directory with a proper extension for the - saved results. When "@o" is not present in the OUTPUT, it is - appended as a default filename extension. - -.. confval:: outputtypes -.. option:: -t TYPES, --outputtypes=TYPES - - Result types to be saved, one or more comma separated values. - Supported values are "iq", "sq", "fq", "gr", corresponding to the - |IQ|, |SQ|, |FQ| and |Gr| curves; these are also used as output - file extensions. - - Result files are not written when empty, "none" or "NONE". - -.. confval:: force -.. option:: --force=FORCE - - Overwrite existing output files. By default the output - files are not written if they already exist. Possible values - in a configuration file are "true", "yes", "on", "1" or - "false", "no", "off", "0" or "once". The special value "once" - permits one overwrite and then resets ``config.force`` to - ``False``. Note that in interactive mode the values assigned - to ``config.force`` are converted to Python :py:class:`bool` - unless equal to "once". - - -.. _my-pdfparameters: - -PDF parameters ------------------------------------------------------------------------- - - -.. confval:: mode -.. option:: --mode=STRING - - The PDF conversion mode, i.e., the name of the - :py:func:`.pdfgetter` setup. The available modes correspond - to the radiation type used in powder diffraction experiment and can - be "xray" or "neutron". - -.. confval:: wavelength -.. option:: -w FLOAT, --wavelength=FLOAT - - X-ray wavelength in ångströms. This value is required - for the "twotheta" dataformat in order to convert the scattering - angles |twotheta| to a momentum transfer *Q*. For other data formats - the wavelength is not necessary and may be left undefined. - -.. confval:: twothetazero -.. option:: --twothetazero=FLOAT - - Position of the zero scattering angle in diffractometer degrees. - This parameter corrects for a constant offset in the - measured |twotheta| values. When loading configuration file - it is assumed 0 unless specified otherwise. This parameter - is only effective for the "twotheta" dataformat. - -.. confval:: composition -.. option:: --composition=STRING - - Chemical composition of the sample. Supported formats are - "PbTi0.5Zr0.5O3", "Pb 1 Ti 1/2 Zr 1/2 O 3" or "CH3 (CH2)3 OH". - Space characters are ignored, unit counts can be omitted, but it is - important to use a proper upper and lower case in atom symbols. - Elements can appear several times in the formula, e.g., "CH3 CH3", - and the formula may contain parentheses or fractional - stoichiometries. - -.. confval:: bgscale -.. option:: --bgscale=FLOAT - - Scaling of the background intensities loaded from the - :confval:`backgroundfile`, by default 1. - -.. confval:: rpoly -.. option:: --rpoly=FLOAT - - *r*-limit for the maximum frequency in the |FQ| correction polynomial. - The PDF is unreliable at shorter *r*, however a - very small :confval:`!rpoly` would disable polynomial correction and - give noisy PDF. - Larger values produce closer fits with a higher degree polynomial, - but when too large, they might smooth-out a useful signal in the - data. The default is 0.9. - -.. confval:: qmaxinst -.. option:: --qmaxinst - - The *Q* cutoff for the meaningful input intensities in inverse - ångströms. Some data files may contain trailing zeros - or unreliable intensities at the upper bound of the detector range. - The :confval:`!qmaxinst` defines a threshold for unreliable data. - The parameter is also used as an upper boundary for the polynomial - fit correction of the |SQ| data. - -.. confval:: qmin -.. option:: --qmin - - The lower *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. - -.. confval:: qmax -.. option:: --qmax - - The upper *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. This is essentially a limit, where sample - signal decays to the level of data noise. - -.. confval:: terminationfunctions -.. option:: --terminationfunctions=LIST - - Optional list of termination functions to apply to the |FQ| data - before the Fourier transformation to the |Gr| curve. - - Termination functions help reduce termination ripples caused by the - finite *Q*-range. Each function tapers or truncates the F(Q) signal - between :confval:`qmin` and :confval:`qmax`. - - This parameter may be specified as: - - * a single function name from the supported list - * a list of comma-separated or space-separated function names, to be applied in order - * the alias ``terminationfunction`` is also accepted - - Supported function names: - - ``step`` - Hard cutoff window. Sets F(Q) = 0 for - Q < qmin or Q > qmax. - - ``lorch`` - Lorch window:: - - W(Q) = sin(pi * (Q - qmin) / (qmax - qmin)) - / (pi * (Q - qmin) / (qmax - qmin)) - - Applied only within the q-range; zero outside. - - Examples:: - - CLI usage:: - - --terminationfunctions=lorch - --terminationfunctions="lorch, step" - - Configuration file usage:: - - terminationfunctions = lorch - terminationfunctions = "lorch, step" - -.. confval:: rmin -.. option:: --rmin=FLOAT - - Lower bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rmax -.. option:: --rmax=FLOAT - - Upper bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rstep -.. option:: --rstep=FLOAT - - Spacing of the *r*-grid for the calculated PDF in ångströms. - - -Other parameters ------------------------------------------------------------------------- - -.. confval:: plot -.. option:: -p TYPES, --plot=TYPES - - Plot the specified results. A comma separated list with one or - more items from "iq", "sq", "fq", "gr". No plot is produced when - empty, "none" or "NONE". Setting this option turns on the - interactive mode. - -.. confval:: interact -.. option:: -i, --interact - - Start an IPython interactive session after processing all files. - Useful for tuning the configuration parameters or interactive - plotting. This is always on when plot option has been set. - See also :doc:`interact` for further details. - -.. confval:: verbose -.. option:: --verbose=VALUE - - Level of detail for the program to report about its actions. - Possible values are "error", "warning", "info", "debug", "all" or an - integer number from 0 to 5. Messages are completely suppressed when - 0, all messages are printed when verbose is 5 ("all") or higher. - This option is useful for diagnostics of any unexpected behavior - in the program. diff --git a/static_root/doc/pdfgetx/2.4.0/_sources/plotdata.rst.txt b/static_root/doc/pdfgetx/2.4.0/_sources/plotdata.rst.txt deleted file mode 100644 index d1c02156..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_sources/plotdata.rst.txt +++ /dev/null @@ -1,161 +0,0 @@ -.. index:: plotdata (program) -.. _cmd-plotdata: - -The plotdata program -======================================================================== - -.. include:: abbreviations.txt -.. program:: plotdata - -The PDFgetX3 software includes a simple stand-alone utility -:program:`plotdata` for plotting text data files. In most cases -this program can be invoked from a command-shell as :: - - plotdata file1.dat file2.dat - -which plots the numerical data from the text files :file:`file1.dat`, -:file:`file2.dat` together in a single graph. By default the first -column is used as an *x* variable and the second column is used for the -*y* values. After displaying the plot the program starts an `IPython`_ -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the :data:`!filenames` variable -containing a list of plotted files. It also pre-loads the -|plotdata| and |findfiles| functions just as in PDFgetX3 -interactive session. The :py:func:`!plotdata` -function works in a similar way as the :program:`plotdata` program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -:py:func:`!plotdata` function would be:: - - In [1]: plotdata(['file1.dat', 'file2.dat']) - - -Selecting files ------------------------------------------------------------------------- - -The :program:`plotdata` program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as ``*.dat``. The file search feature is controlled by the -following options: - -.. option:: -f, --find - - Use command line arguments as filename patterns and plot all matching - files. This option works in the same way as for - :program:`pdfgetx3`, for full details see the - :option:`pdfgetx3 --find ` documentation. Note that - within command line the special patterns ``^$<>`` need to be quoted - in double quotes (\\") so they are not processed by command shell. - -.. option:: -l, --list - - List the input files and exit. This is useful in conjunction - with the :option:`!-f, --find` option to check if data files - are selected as intended. - -Assuming the current directory contains 20 files named -:file:`file1.dat`, :file:`file2.dat`, ..., :file:`file20.dat`, -the plotting of files 9 to 13 could be done (with a check listing) -as follows :: - - $ plotdata -fl "<9-13>.dat" - file9.dat - file10.dat - file11.dat - file12.dat - file13.dat - $ plotdata -f "<9-13>.dat" - -Within an interactive IPython session the equivalent plot could be -produced by combining the |plotdata| and |findfiles| functions as :: - - In [1]: plotdata(findfiles("<9-13>.dat")) - - -Selecting x and y data ------------------------------------------------------------------------- - -The :program:`plotdata` program provides several ways of selecting -columns for *x* or *y* data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is "0" -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function): - - -.. option:: -x X - - index or name of the *x*-column to plot. See the :option:`-y` option - for the supported syntax, but note that ``X`` may select only one - column. When set to "." use the data-row index for *x*. - -.. option:: -y Y - - index or name of the *y*-column or columns to plot. The ``Y`` column - specification can be a comma separated list of indices, column names - or Python-like ranges, for example "1,2", "G", "1:4" (START:STOP, - same as "1,2,3"), "1:4:2" (START:STOP:STEP, same as "1,3"), or - "-2:" (same as "-2,-1", i.e, the last 2 columns). Because column - indexing starts at "0" the second column must be specified as "1". - - The column names work if the data section in the file is preceded by - a headline of unique column names, for example:: - - x square cube - 1 1 1 - 2 4 8 - 3 9 27 - 4 16 64 - - For such data file the plotdata program will recognize column names - "x", "square" and "cube" and an implicit "." for row index. - -.. option:: -s STYLE, --style=STYLE - - optional plot format specification. See the - :func:`matplotlib.pyplot.plot` function - for a list of available formats. - -.. option:: -L LOG, --log=LOG - - axes to be plotted with logarithmic scaling, for example, "x", "y" or - "xy". Axes not listed in ``LOG`` will use linear scaling. - -.. option:: -h, --help - - display a brief usage info and exit. - -.. option:: -V, --version - - show program version and exit. - -.. option:: --manual - - Open this manual page in a Web browser and exit. - - -Examples ------------------------------------------------------------------------- - -The examples directory :file:`plotdata` contains a :file:`sincos.dat` -file that has 3-columns of values labeled as "x", "sin" and "cos". -Here are several examples of the :program:`plotdata` capabilities -when used from command line - the user is encouraged to try them out:: - - plotdata sincos.dat - plotdata -y 1,2 sincos.dat - plotdata -x . -y 0:3 sincos.dat - plotdata -y cos sincos.dat - plotdata -x sin -y cos -sr-- sincos.dat - -An equivalent usage from a general IPython session would be:: - - ipython --matplotlib=auto - In [1]: from diffpy.pdfgetx.plotdata import plotdata - In [2]: plotdata('sincos.dat') - In [3]: plotdata('sincos.dat', y=[1,2]) - In [4]: plotdata('sincos.dat', x='.', y=':3') - In [5]: plotdata('sincos.dat', y='cos') - In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--') diff --git a/static_root/doc/pdfgetx/2.4.0/_sources/quick-start.rst.txt b/static_root/doc/pdfgetx/2.4.0/_sources/quick-start.rst.txt deleted file mode 100644 index b0b01faa..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_sources/quick-start.rst.txt +++ /dev/null @@ -1,163 +0,0 @@ -Quick-start guide -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing :program:`pdfgetx3`, :program:`pdfgetn3`, or -:program:`pdfgets3` in a shell window. Please, refer to the :doc:`installation ` section if this is not working yet. - -.. index:: pdfgetx3 (program) -.. _cmd-pdfgetx3: - -pdfgetx3 command ------------------------------------------------------------------------- - -The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as :: - - pdfgetx3 [options] input1 input2 ... inputN - -The :file:`inputN` stands for an input powder diffraction data. The -:file:`inputN` file is a simple two-column text file, where the first -column corresponds to either the |twotheta| diffraction angle, or a -momentum transfer, *Q*, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -`FIT2D program `_ using -its "chi" output format, thus we will also refer to them as "chi-files". -A typical content of a "chi" file looks as follows: - -.. code-block:: none - - Pt_bulk-00055.tif: 2-theta Scan - 2-Theta Angle (Degrees) - - 1465 - 2.0003892E-02 0.0000000E+00 - 6.0011677E-02 0.0000000E+00 - 1.0001946E-01 0.0000000E+00 - 1.4002724E-01 0.0000000E+00 - 1.8003502E-01 0.0000000E+00 - ... - -The command-line options are arguments that start with a dash "-" and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash ``--``. Options may require values. For short options, -the value may be joined to the option string, for example -:option:`!-w0.142774`, while for the long options it has to be separated -with an equal sign, e.g., :option:`!--wavelength=0.142774`. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the :doc:`options` section of -this manual. A brief summary of options can be also displayed by -executing :: - - pdfgetx3 --help - -The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the :doc:`tutorial`. -In general, the first step is to create a commented configuration file ``pdfgetx3.cfg`` using:: - - pdfgetx3 --createconfig=pdfgetx3.cfg - -The configuration file can have any name, but it is preferable -to use either :file:`pdfgetx3.cfg` or :file:`.pdfgetx3.cfg`, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the :option:`-c, --config <-c>` option. - -Open the pdfgetx3.cfg file in a **text** editor. The lines that -start with a hash mark ``#`` are comments and are not used. The lines -starting with a right brace ``[`` denote sections in the configuration -file. The active lines are all formatted as -"NAME=VALUE". Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation: - -* :confval:`dataformat` -- specifies the input data format - -* :confval:`wavelength` -- radiation wavelength in Å required for the - "twotheta" format. - -* :confval:`composition` -- chemical composition of the sample - -* :confval:`qmaxinst` -- upper *Q* boundary for a meaningful measurement - intensities. - -* :confval:`qmax` -- *Q*-cutoff for the Fourier transformation that - yields the PDF. - -Save the updated configuration file and run pdfgetx3 on the input data -:file:`FILENAME.chi` as :: - - pdfgetx3 --verbose=info -t gr FILENAME.chi - -Here the :option:`--verbose=info <--verbose>` option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The :option:`-t gr <-t>` option -tells the program to save the final |Gr| curve as a -:file:`FILENAME.gr` file in the working directory. - -The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation :: - - pdfgetx3 -c FILENAME.gr --plot=fq,gr - -Note this command does not include any .chi file and this will as -a result process the previously used input :file:`FILENAME.chi`. -The :option:`--plot=fq,gr <-p>` option tells PDFgetX3 to -display 2 plots for the reduced structure function |FQ| and the -final PDF |Gr|. The :option:`!--plot` option also implies an -:doc:`interactive mode ` -therefore the program does not exit, but starts an -interactive `IPython`_ session. To exit the interactive mode, -type ``exit()`` and press Enter. - -.. index:: pdfgetn3 (program) -.. _cmd-pdfgetn3: - -pdfgetn3 command ------------------------------------------------------------------------- - -The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the -:option:`--mode` option. Running ``pdfgetn3`` is nearly identical -to executing ``pdfgetx3 --mode=neutron``. The only difference between -these commands is that pdfgetx3 checks for configuration files -:file:`pdfgetx3.cfg` and :file:`.pdfgetx3.cfg`, whereas -pdfgetn3 looks for :file:`pdfgetn3.cfg` and :file:`.pdfgetn3.cfg`. - -.. index:: pdfgets3 (program) -.. _cmd-pdfgets3: - -pdfgets3 command ------------------------------------------------------------------------- - -The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying ``mode = sas`` in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named :file:`pdfgets3.cfg` and -:file:`.pdfgets3.cfg` in order, when no configuration file is specified. - -Please refer to the :doc:`tutorial section ` for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3. diff --git a/static_root/doc/pdfgetx/2.4.0/_sources/release.rst.txt b/static_root/doc/pdfgetx/2.4.0/_sources/release.rst.txt deleted file mode 100644 index 37192085..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_sources/release.rst.txt +++ /dev/null @@ -1,3 +0,0 @@ -.. index:: release notes - -.. include:: ../../CHANGELOG.rst diff --git a/static_root/doc/pdfgetx/2.4.0/_sources/tutorial.rst.txt b/static_root/doc/pdfgetx/2.4.0/_sources/tutorial.rst.txt deleted file mode 100644 index b4462494..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_sources/tutorial.rst.txt +++ /dev/null @@ -1,819 +0,0 @@ -Tutorial -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. index:: example files -.. py:currentmodule:: diffpy.pdfgetx - -In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. The examples can be obtained by -doing the following:: - - $ pdfgetx3 --list-examples - - Ni - plotdata - Au_DNA_NPA - Multiple_Background_Subtraction - Pt - CeO2 - n-Sapphire - n-twothetazero-fit - Si90Ni10 - Menthol - BaTiO3 - - $ pdfgetx3 --example Ni - - Example copied to: .../Ni - - -.. index:: examples - -Nickel X-ray PDF ------------------------------------------------------------------------- - -predefined configuration file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -Change to the :file:`Ni` directory. The file named -:file:`ni300mesh_300k_nor_1-5.chi` contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the |twotheta| scattering -angles and X-ray intensities. The second file -:file:`kapton_bgrd_300k_nor_2-3.chi` contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the :file:`pdfgetx3.cfg` contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -:ref:`pdfgetx3 ` program -with the powder data file as an argument:: - - $ pdfgetx3 ni300mesh_300k_nor_1-5.chi - -For the first run there should be no output on the screen, -however a new file, :file:`ni300mesh_300k_nor_1-5.gr` should appear -in the work directory. -We can use the :ref:`plotdata ` program, -included with this software, to plot the output data:: - - $ plotdata ni300mesh_300k_nor_1-5.gr - -This will open a graph window and start an `IPython`_ interactive session. -To exit and close the figure, type ``exit()`` on the IPython prompt. -Let's run the program again, but now with a -:option:`--verbose=info <--verbose>` -option, to show more details about the program actions. :: - - $ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi - - INFO:applying pdfgetx3 defaults - INFO:set config.mode = xray - INFO:searching for default config file /home/user/.pdfgetx3.cfg - INFO:searching for default config file .pdfgetx3.cfg - INFO:searching for default config file pdfgetx3.cfg - INFO:loaded default config file pdfgetx3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi - INFO:set config.outputtypes = gr - INFO:set config.wavelength = 0.142774 - INFO:set config.composition = Ni - INFO:set config.qmaxinst = 26.5 - INFO:set config.qmax = 26.0 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 30.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'xray' - INFO:calling config_xray - INFO:started PDF processing. - INFO:processing 'ni300mesh_300k_nor_1-5.chi' - INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr' - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - INFO:elapsed time: 0.095 - -Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the :option:`!--verbose` option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the :option:`--force=yes <--force>` option, upon -which pdfgetx3 would overwrite any existing files. - -PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the -:option:`-c` option. Another option, :option:`--plot=[iq,sq,fq,gr] -<-p>` turns on plotting of the final PDF or of some other result. A -side effect of the :option:`!--plot` option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function |FQ| and the PDF curve |Gr|. This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:: - - $ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr - - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - - Variables related to PDF processing: - - pdfgetter -- PDFGetter used for calculation. - config -- configuration data used by PDFGetter. - See config.inputfiles for a list of inputs. - iraw -- matrix of input raw intensities with 2 rows per file. - iq sq fq gr -- intermediate results per each input file stored - as matrix rows. - - Functions: - - tuneconfig -- dynamically tune configuration variables. - processfiles -- process specified data files. - clearsession -- clear all elements from the inputfiles, iraw, - iq, sq, fq and gr variables. - plotdata -- plot all or selected columns from a text data file. - loaddata -- load all or selected columns from a text data file. - findfiles -- search for files matching the specified patterns. - - Use "%pdfgetx3" for a fresh run without exiting IPython. - In [1]: - -This will open a plot figure similar to - -.. image:: images/nickelfqgr.png - -Because of the :doc:`interactive mode ` implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -:interactvar:`config` variable stores all the configuration parameters, -and its content can be displayed with the :py:func:`print` -function as :: - - In [1]: print(config) - - configfile = ni300mesh_300k_nor_1-5.gr - configsection = DEFAULT - dataformat = twotheta - ... - qmax = 26.0 - ... - -The :py:func:`.processfiles` function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the |FQ| and |Gr| -curves calculated at |Qmax| = 22 |Ainv|, we can call -:py:func:`!processfiles` and pass it a keyword argument for -the new qmax as follows:: - - In [2]: processfiles(qmax=22) - - # the qmax parameter was updated to a new value, thus - In [3]: config.qmax - Out[3]: 22 - -There should be now two lines in each plot axis corresponding to -the results at |Qmax| equal 26 and 22 |Ainv|. To exit the program, -type ``exit()``. - - -processing from scratch -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -We have already encountered the command-line :option:`option -c <-c>` -for specifying a custom configuration file. A special argument "NONE", -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi - - WARNING:Nothing to do, use "-t" or "--plot" options. - ERROR:Configuration error: wavelength not specified. - ERROR:See "--help" for more hints. - -There is an error, for the wavelength is necessary to convert -the scattering angle |twotheta| to momentum transfer *Q*. The -X-ray wavelength was 0.142774 Å, which can be passed with the -:option:`-w, --wavelength <-w>` option:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 - - ... - ERROR:Configuration error: Chemical composition not known. - ERROR:See "--help" for more hints. - -There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the :option:`--composition` option. The example -below uses a "\\\\" character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni - - WARNING:Nothing to do, use "-t" or "--plot" options. - ... - -There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the :option:`-t, --outputtypes <-t>` option. -The outputtypes option recognizes the following result types: -"iq", "sq", "fq", "gr". One or more of these type strings, -separated by a comma, can be included with the -:option:`!-t` option, which will produce the corresponding -output files. An empty string, such as ``-t ""``, or ``-t NONE`` -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings. - -At this point, we will not write any output files, but will use the -:option:`--plot <-p>` option to display the calculated curves. The -:option:`!--plot` accepts the same arguments as outputtypes, so to -display the |FQ| and |Gr| curves we shall run :: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni --plot=fq,gr - - WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161 - WARNING:qmax reset to the data boundary qmaxinst=28.0865680161 - -which should open the following plot window: - -.. image:: images/nickelfqgrnoisy.png - -The graphs look terrible. The PDF is very noisy and the |FQ| curve -shows a sudden break at about 27 |Ainv|. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -:interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, -:interactvar:`fq`, :interactvar:`gr` -variables for the original raw data and intermediate results. We -are going to plot the "iq" variable that has the input intensities -resampled on the *Q* grid. The matplotlib function -:py:func:`~matplotlib.pyplot.clf` clears the figure, -the iq variable is a two-row matrix with *Q* and *I* rows, and the -:py:func:`~matplotlib.pyplot.axis` -function lets us zoom to a given range:: - - In [1]: clf() - In [2]: plot(iq[0], iq[1]) - Out[2]: [] - In [3]: axis([20, 29, 0, 3000]) - Out[3]: [20, 29, 0, 3000] - -The graph shows a sudden drop in the raw intensities at 27 |Ainv|. -The :confval:`qmaxinst` variable defines a *Q* cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 |Ainv| :: - - In [4]: processfiles(qmaxinst=26.5) - WARNING:qmax reset to the data boundary qmaxinst=26.5 - -The updated curves looks reasonable without any oscillations and -breakpoints. The :py:func:`.tuneconfig` function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type ``tuneconfig()`` to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the |FQ| and |Gr| curves change. -The :confval:`rpoly` parameter controls the degree of data-correction -polynomial and is an approximate low-*r* bound of reliable *G* -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the |Gr| -curve and save it to an output file :file:`nicmd.gr`:: - - In [14]: config.qmax = 26 - In [15]: config.outputtypes = 'gr' - In [16]: config.output = 'nicmd' - In [17]: processfiles() - - -Platinum X-ray series ------------------------------------------------------------------------- - -PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(`z-shell `_ being a notable exception). - -.. _my-findexamples: - -matching input files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The :program:`pdfgetx3` program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the :option:`-f, --find <-f>` option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option -:option:`-l, --list <-l>` makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files. - -We will try out this file search on platinum example files. Open a -terminal and navigate to the :file:`Pt` directory. There should be a -:file:`series` subdirectory with 6 chi files indexed from 903 to 908. -At first, let's stay in the :file:`Pt` directory and run the following -command :: - - $ pdfgetx3 --list --find - - Pt_bulk-00055-pdfgetx2.gr - Pt_bulk-00055-pdfgetx3.gr - Pt_bulk-00055.chi - empty_capillary-00032.chi - pdfgetx3.cfg - plotpdfcomparison.py - -Without any patterns the file search matches all files in the current -directory. Now let's try to add name patterns. There are few special -patterns, for example ``^`` matches at the beginning of the filename, ``$`` at the end and ```` matches a range of integer values from -*N* to *M*. The patterns containing ``^$<>`` need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works. - -Filenames containing "y":: - - $ pdfgetx3 --list --find y - empty_capillary-00032.chi - plotpdfcomparison.py - -Filenames that containing both "y" and "chi", here we use the -options :option:`!--list` and :option:`!--find` in an abbreviated -form :option:`!-l` and :option:`!-f`:: - - $ pdfgetx3 -lf y chi - empty_capillary-00032.chi - -Filenames that start with "e":: - - $ pdfgetx3 --list --find "^e" - empty_capillary-00032.chi - -Filenames that contain *character* "2":: - - $ pdfgetx3 --list --find 2 - Pt_bulk-00055-pdfgetx2.gr - empty_capillary-00032.chi - -Filenames that contain *numeric value* "2":: - - $ pdfgetx3 -lf "<2>" - Pt_bulk-00055-pdfgetx2.gr - -The special argument ``+`` starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both "bulk" and "chi" substrings and then -also those that have "empty" and "chi" in their names, use:: - - $ pdfgetx3 -lf bulk chi + empty chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - -When pattern groups overlap the resulting matches are -made unique and each file is listed only once :: - - $ pdfgetx3 -lf bulk chi + chi - Pt_bulk-00055.chi - empty_capillary-00032.chi - - -data search path -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Each group of PDFgetX3 patterns can have one entry containing -forward slash "/" to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered "903" to "905" and "908" from the -:file:`series` subdirectory can be therefore matched using :: - - $ pdfgetx3 -lf series/ "<903-905>" + 908 - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00908.chi - -The current directory can be selected using `./` :: - - $ pdfgetx3 -lf series/ 903 + ./ bulk chi - series/Pt_bulk_ramp03-00903.chi - Pt_bulk-00055.chi - -When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -".chi"-ending files in the current and :file:`series` -directories can be thus found using :: - - $ pdfgetx3 -lf ".chi$" + series/ - Pt_bulk-00055.chi - empty_capillary-00032.chi - series/Pt_bulk_ramp03-00903.chi - series/Pt_bulk_ramp03-00904.chi - series/Pt_bulk_ramp03-00905.chi - series/Pt_bulk_ramp03-00906.chi - series/Pt_bulk_ramp03-00907.chi - series/Pt_bulk_ramp03-00908.chi - - -output file names -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -By default the output files are saved in the current directory. The -output path, can be changed with the :option:`-o, --output <-o>` option. -The :option:`!-o` recognizes several tokens that are replaced with -parts of the input file name, for example, "@b" expands to an -extension-stripped base name. In similar faction, "@o" is replaced -with the output type extension. Thus to generate PDFs for all files -in the :file:`series` directory and save them in the -:file:`series-gr` subfolder do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o - -The extension ".@o" is automatic when not included anywhere in the -output file name. Thus to process the Pt series at |Qmax| = 18 |Ainv| -while saving the results in the same folder, but with a "_qmax18" suffix -in their filenames do :: - - $ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18 - -For input file :file:`Pt_bulk_ramp03-00903.chi` the :option:`!-o` option -above expands to output path :file:`series-gr/Pt_bulk_ramp03-00903_qmax18.gr`. -The :file:`series-gr` directory should now contain 12 "gr" files, -6 of them processed at |Qmax| = 27 |Ainv| as given by configuration -file and 6 others processed at |Qmax| = 18 |Ainv|. - -.. seealso:: :option:`-o, --output <-o>` for a list of output tokens - -.. index:: tuneconfig (example) -.. _my-tuneconfig: - -Interactive tuning of parameters ------------------------------------------------------------------------- - -One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the :file:`Ni` directory in the shell and process -the nickel PDF while plotting the |FQ| and |Gr| curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -:py:func:`.tuneconfig` -function from the IPython environment :: - - $ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi - ... - In [1]: tuneconfig() - -The -:py:func:`!tuneconfig` -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot. - -.. image:: images/tunenickelfqgr.png - -The *constant data scale* check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -:ref:`PDF parameters section `. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the :confval:`bgscale` parameter -if PDF has been processed without any background data. - -By default the -:py:func:`!tuneconfig` -function displays the same curves as -specified by the :option:`--plot <-p>` option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the :py:meth:`!describe` method of the -:py:func:`.pdfgetter` object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object *t4* that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the :py:func:`!tuneconfig` function :: - - $ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi - ... - Use "%pdfgetx3" for a fresh run without exiting IPython. - - In [1]: fig, ax = subplots(2) - In [2]: pdfgetter.describe() - 0 TransformTwoThetaToQA - convert x data from twotheta to Q in 1/A - 1 TransformQGridRegular - Remove the data outside the (qmin, qmaxinst) range - 2 TransformBackground - subtract background intensity - 3 TransformXrayASFnormChris - scale and normalize intensities by x-ray scattering factors - 4 TransformSQnormRPoly - Normalize S(Q) by fitting a polynomial - 5 TransformSQToFQ - Convert S(Q) to F(Q). - 6 TransformFQgrid - Resample F(Q) to a regular grid suitable for FFT - 7 TransformFQToGr - Convert F(Q) to G(r). - In [3]: t4 = pdfgetter.getTransformation(4) - In [4]: tuneconfig([t4, 'gr'], axeslist=ax) - In [5]: ax[0].legend(loc=2) - -The :py:func:`~matplotlib.pyplot.subplots` function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window: - -.. image:: images/tunenickelt4gr.png - -The tuning can be finished by clicking the ``Done`` button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the :interactvar:`config` -object, for example:: - - In [5]: config.bgscale = 1.5 - -Finally, to save the new results, we shall first confirm -:confval:`outputtypes` have been correctly set and then use the -:py:func:`.processfiles` function to redo the calculations, plots and -data output for the updated configuration. Note that the -:py:func:`!processfiles` function accepts keyword arguments for -configuration parameters. This is used at line ``In [8]`` to -turn on the :confval:`force` flag and is in effect a shortcut -for an extra ``config.force = True`` statement. :: - - In [6]: config.outputtypes - Out[6]: ['gr'] - In [7]: processfiles() - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - In [8]: processfiles(force=True) - -:file:`ni300mesh_300k_nor_1-5.gr` was successfully saved at an -updated configuration for there were no warnings after the last call. - - -Neutron PDF ------------------------------------------------------------------------- - -This example illustrates PDF extraction from -neutron powder data using :ref:`pdfgetn3 `. -Navigate to the :file:`n-Sapphire` directory in the shell. -The :file:`sapphire755.dat` file contains powder diffraction data from -sapphire (α-Al\ :sub:`2`\ O\ :sub:`3`) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The :file:`pdfgetn3.cfg` configuration file specifies -processing parameters such as :confval:`wavelength`, -:confval:`twothetazero`, :confval:`composition`, and :confval:`mode`. - -To extract the sapphire neutron PDF run :: - - $ pdfgetn3 --verbose=info sapphire755.dat - - INFO:applying pdfgetn3 defaults - INFO:set config.mode = neutron - INFO:searching for default config file /home/user/.pdfgetn3.cfg - INFO:searching for default config file .pdfgetn3.cfg - INFO:searching for default config file pdfgetn3.cfg - INFO:loaded default config file pdfgetn3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = - INFO:set config.outputtypes = fq, gr - INFO:set config.mode = neutron - INFO:set config.wavelength = 1.0989 - INFO:set config.twothetazero = -0.38 - INFO:set config.composition = Al2O3 - INFO:set config.qmaxinst = 11.2 - INFO:set config.qmax = 11.2 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 20.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'neutron' - INFO:calling config_neutron - INFO:started PDF processing. - INFO:processing 'sapphire755.dat' - INFO:resolved output file '' as 'sapphire755.fq' - INFO:written outpufile sapphire755.fq - INFO:resolved output file '' as 'sapphire755.gr' - INFO:written outpufile sapphire755.gr - INFO:elapsed time: 0.097 - -This will produce two files :file:`sapphire755.fq`, :file:`sapphire755.gr` -for the |FQ| and |Gr| functions. -To compare them with expected results use :: - - $ plotdata sapphire755-expected.fq sapphire755.fq - $ plotdata sapphire755-expected.gr sapphire755.gr - - -Fit twothetazero ------------------------------------------------------------------------- - -For a good quality PDF it is essential to use powder patterns with -accurate values of *Q*. Some instruments may produce spectra with -a slightly offset scattering angle |twotheta| which -causes inaccurate *Q* and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the :confval:`twothetazero` correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples. - -This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -`DiffPy-CMI `__, -which is not yet available for Windows. -If DiffPy-CMI is not yet installed, -we recommend to use `Anaconda Python`_ and set up a dedicated -Anaconda environment *nbcmi* for this tutorial. -This can be accomplished using the following steps:: - - $ conda create -n nbcmi -c diffpy python=3.13 diffpy-cmi - $ conda activate nbcmi - $ pip install path/to/diffpy.pdfgetx-VERSION.whl - -When these prerequisites are in place, -change to the :file:`n-twothetazero-fit` directory -and open the self documented Jupyter notebook as follows :: - - $ jupyter notebook fit-twothetazero.ipynb - -.. |tthzero| replace:: :confval:`!twothetazero` - -The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted |tthzero|. -After running all cells the notebook should produce similar graphs -as in the figure below. - -.. figure:: images/twothetazerofit.png - - Refinement of nickel neutron PDF for **(a)** uncorrected data - and **(b)** with a refined zero correction. - The extracted PDFs are plotted as blue circles, - simulated PDFs as red lines and - the difference is plotted offset in green below. - -The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual R\ :sub:`w` which is lowered from (a) 0.18 to (b) 0.05. - - -Small-angle-scattering PDF (sasPDF) ------------------------------------------------------------------------- - -Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using :ref:`pdfgets3 `. -To do this, navigate to the :file:`Au_DNA_NPA` directory in your terminal. -In this folder, you will find :file:`Au_DNA_NPA.chi` and -:file:`Au_DNA_FF.chi` files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in `D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008). -`_. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The :file:`pdfgets3.cfg` -configuration file specifies processing parameters such as :confval:`formfactorfile` (required by ``sas`` mode), :confval:`qmin`, :confval:`qmax`, and :confval:`mode`. - -To extract the PDF of DNA-capped DNA nanoparticle assemblies :: - - $ pdfgets3 --verbose=info Au_DNA_NPA.chi - - INFO:applying pdfgets3 defaults - INFO:set config.mode = sas - INFO:searching for default config file /home/user/.pdfgets3.cfg - INFO:searching for default config file .pdfgets3.cfg - INFO:searching for default config file pdfgets3.cfg - INFO:loaded default config file pdfgets3.cfg - INFO:reset config.twothetazero = 0.0 - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = QA - INFO:set config.backgroundfile = - INFO:set config.datapath = [] - INFO:set config.formfactorfile = Au_DNA_FF.chi - INFO:set config.output = - INFO:set config.outputtypes = fq, gr - INFO:set config.force = yes - INFO:set config.mode = sas - INFO:set config.rpoly = 240.605 - INFO:set config.qmaxinst = 0.075 - INFO:set config.qmin = 0.01 - INFO:set config.qmax = 0.072 - INFO:set config.rmin = 100.0 - INFO:set config.rmax = 5000.0 - INFO:set config.rstep = 1.0 - INFO:set config.plot = iq, fq, gr - INFO:set config.verbose = info - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'sas' - INFO:calling config_sas - INFO:started PDF processing. - INFO:processing 'Au_DNA_NPA.chi' - INFO:resolved output file '' as 'Au_DNA_NPA.fq' - INFO:written outpufile Au_DNA_NPA.fq - INFO:resolved output file '' as 'Au_DNA_NPA.gr' - INFO:written outpufile Au_DNA_NPA.gr - INFO:elapsed time: 0.947 - - -This will save two files :file:`Au_DNA_NPA.fq`, :file:`Au_DNA_NPA.gr` in the same directory for the |FQ| and |Gr| functions. This also plots |FQ| and |Gr| functions in a pop-up window and the processing parameters such as :confval:`rpoly` or so may be tuned interactively by issuing command :py:func:`!tuneconfig` in the `IPython`_ session as discussed above. - - -Multiple Background Subtraction ------------------------------------------------------------------------- - -Predefined configuration file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -In this tutorial, we will show how to use the multiple-background subtraction -functionality by obtaining equivalent outputs from different, but equivalent, -subtractions. Change directory to the :file:`Multiple_Background_Subtraction` -directory. The file named -:file:`ni300mesh_300k_nor_1-5.chi` contains powder X-ray data measured from -nickel at the Advanced Photon Source beamline 6ID-D. The file contains two -columns for the |twotheta| scattering angles and X-ray intensities. Similarly, -:file:`kapton_bgrd_300k_nor_2-3.chi` contains the background data (i.e., the -intensities from an empty kapton capillary), and a duplicate file -:file:`kapton_bgrd_300k_nor_2-3_copy.chi` contains the same dataset (this -duplication of the data is necessary when using the same background multiple -times as the internal system only stores a set of unique background filenames). -The last :file:`.chi` file, :file:`TEST_blank-00000.chi`, simply stores a null -dataset and can be used to show the invariance of the PDF under permutation of -the order of background subtractions as well as the fact that more than just -two backgrounds can be subtracted. There are also two config files -:file:`nickel.cfg` and :file:`nickel_sub_two_half_backgrounds.cfg`, each of -which contain a set of complete configuration parameters for converting the Ni -powder pattern to a PDF for the case of doing so via a single background -subtraction and a multiple background subtraction, respectively. Finally, there -is a fully processed G(r) file :file:`ni300mesh_300k_nor_1-5-expected.gr` which -contains the expected output of producing the PDF of the Ni sample after -subtracting the kapton background. Since all processing parameters are already -defined in these configuration files, producing the PDF using multiple -background subtractions is very simple and involves running the :ref:`pdfgetx3 -` program and specifying the multiple background subtraction -config file and the powder data file as arguments:: - - $ pdfgetx3 -c nickel_sub_two_half_backgrounds.cfg ni300mesh_300k_nor_1-5.chi - -The resulting G(r) file, :file:`ni300mesh_300k_nor_1-5.gr`, is the result of -producing the PDF according to:: - - "ni300mesh_300k_nor_1-5.chi" - 0.5*"kapton_bgrd_300k_nor_2-3.chi" - - 0.5*"kapton_bgrd_300k_nor_2-3.chi" - -Which should be equivalent to the case where the following single background -subtraction had been performed:: - - "ni300mesh_300k_nor_1-5.chi" - 1.0*"kapton_bgrd_300k_nor_2-3.chi" - -The fact that both of these result in the same PDF can be verified by comparing -the produced G(r) with the expected G(r) provided in the example:: - - $ plotdata ni300mesh_300k_nor_1-5-expected.gr ni300mesh_300k_nor_1-5.gr - - -Interactive Multiple Background Subtraction -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The multiple background subtraction functionality can also be carried out -interactively, as per the :ref:`my-tuneconfig` section, using the plural forms -of the relevant variables (i.e., `config.bgscales`, `config.backgroundfiles`, -etc.). diff --git a/static_root/doc/pdfgetx/2.4.0/_static/_sphinx_javascript_frameworks_compat.js b/static_root/doc/pdfgetx/2.4.0/_static/_sphinx_javascript_frameworks_compat.js deleted file mode 100644 index 81415803..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/_sphinx_javascript_frameworks_compat.js +++ /dev/null @@ -1,123 +0,0 @@ -/* 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_root/doc/pdfgetx/2.4.0/_static/basic.css b/static_root/doc/pdfgetx/2.4.0/_static/basic.css deleted file mode 100644 index 4738b2ed..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/basic.css +++ /dev/null @@ -1,906 +0,0 @@ -/* - * 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_root/doc/pdfgetx/2.4.0/_static/check-solid.svg b/static_root/doc/pdfgetx/2.4.0/_static/check-solid.svg deleted file mode 100644 index 92fad4b5..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/check-solid.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static_root/doc/pdfgetx/2.4.0/_static/clipboard.min.js b/static_root/doc/pdfgetx/2.4.0/_static/clipboard.min.js deleted file mode 100644 index 54b3c463..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/clipboard.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * 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_root/doc/pdfgetx/2.4.0/_static/copybutton.css b/static_root/doc/pdfgetx/2.4.0/_static/copybutton.css deleted file mode 100644 index f1916ec7..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/copybutton.css +++ /dev/null @@ -1,94 +0,0 @@ -/* 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_root/doc/pdfgetx/2.4.0/_static/copybutton.js b/static_root/doc/pdfgetx/2.4.0/_static/copybutton.js deleted file mode 100644 index caa31c1e..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/copybutton.js +++ /dev/null @@ -1,248 +0,0 @@ -// 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_root/doc/pdfgetx/2.4.0/_static/copybutton_funcs.js b/static_root/doc/pdfgetx/2.4.0/_static/copybutton_funcs.js deleted file mode 100644 index dbe1aaad..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/copybutton_funcs.js +++ /dev/null @@ -1,73 +0,0 @@ -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_root/doc/pdfgetx/2.4.0/_static/css/badge_only.css b/static_root/doc/pdfgetx/2.4.0/_static/css/badge_only.css deleted file mode 100644 index 88ba55b9..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/css/badge_only.css +++ /dev/null @@ -1 +0,0 @@ -.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_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Bold.woff b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Bold.woff deleted file mode 100644 index 6cb60000..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Bold.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Bold.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Bold.woff2 deleted file mode 100644 index 7059e231..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Bold.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Regular.woff b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Regular.woff deleted file mode 100644 index f815f63f..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Regular.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Regular.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Regular.woff2 deleted file mode 100644 index f2c76e5b..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/Roboto-Slab-Regular.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.eot b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.eot deleted file mode 100644 index e9f60ca9..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.svg b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.svg deleted file mode 100644 index 855c845e..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,2671 +0,0 @@ - - - - -Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 - By ,,, -Copyright Dave Gandy 2016. All rights reserved. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.ttf b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.ttf deleted file mode 100644 index 35acda2f..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.woff b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.woff deleted file mode 100644 index 400014a4..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.woff2 deleted file mode 100644 index 4d13fc60..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/fontawesome-webfont.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold-italic.woff b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold-italic.woff deleted file mode 100644 index 88ad05b9..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold-italic.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold-italic.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold-italic.woff2 deleted file mode 100644 index c4e3d804..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold-italic.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold.woff b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold.woff deleted file mode 100644 index c6dff51f..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold.woff2 deleted file mode 100644 index bb195043..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-bold.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal-italic.woff b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal-italic.woff deleted file mode 100644 index 76114bc0..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal-italic.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal-italic.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal-italic.woff2 deleted file mode 100644 index 3404f37e..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal-italic.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal.woff b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal.woff deleted file mode 100644 index ae1307ff..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal.woff2 deleted file mode 100644 index 3bf98433..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/css/fonts/lato-normal.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/css/theme.css b/static_root/doc/pdfgetx/2.4.0/_static/css/theme.css deleted file mode 100644 index 0f14f106..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/css/theme.css +++ /dev/null @@ -1,4 +0,0 @@ -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%}}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_root/doc/pdfgetx/2.4.0/_static/doctools.js b/static_root/doc/pdfgetx/2.4.0/_static/doctools.js deleted file mode 100644 index 0398ebb9..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/doctools.js +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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_root/doc/pdfgetx/2.4.0/_static/documentation_options.js b/static_root/doc/pdfgetx/2.4.0/_static/documentation_options.js deleted file mode 100644 index 46ba1371..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/documentation_options.js +++ /dev/null @@ -1,13 +0,0 @@ -const DOCUMENTATION_OPTIONS = { - VERSION: 'No version found. The correct version will appear in the released version.', - 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_root/doc/pdfgetx/2.4.0/_static/file.png b/static_root/doc/pdfgetx/2.4.0/_static/file.png deleted file mode 100644 index a858a410..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/file.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.eot b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.eot deleted file mode 100644 index 3361183a..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.eot and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.ttf b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.ttf deleted file mode 100644 index 29f691d5..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.ttf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.woff b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.woff deleted file mode 100644 index c6dff51f..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.woff2 deleted file mode 100644 index bb195043..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bold.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.eot b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.eot deleted file mode 100644 index 3d415493..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.eot and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.ttf b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.ttf deleted file mode 100644 index f402040b..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.ttf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.woff b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.woff deleted file mode 100644 index 88ad05b9..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.woff2 deleted file mode 100644 index c4e3d804..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-bolditalic.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.eot b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.eot deleted file mode 100644 index 3f826421..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.eot and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.ttf b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.ttf deleted file mode 100644 index b4bfc9b2..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.ttf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.woff b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.woff deleted file mode 100644 index 76114bc0..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.woff2 deleted file mode 100644 index 3404f37e..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-italic.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.eot b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.eot deleted file mode 100644 index 11e3f2a5..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.eot and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.ttf b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.ttf deleted file mode 100644 index 74decd9e..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.ttf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.woff b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.woff deleted file mode 100644 index ae1307ff..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.woff2 deleted file mode 100644 index 3bf98433..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/Lato/lato-regular.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot b/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot deleted file mode 100644 index 79dc8efe..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf b/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf deleted file mode 100644 index df5d1df2..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff b/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff deleted file mode 100644 index 6cb60000..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 deleted file mode 100644 index 7059e231..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot b/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot deleted file mode 100644 index 2f7ca78a..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf b/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf deleted file mode 100644 index eb52a790..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff b/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff deleted file mode 100644 index f815f63f..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 b/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 deleted file mode 100644 index f2c76e5b..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/jquery.js b/static_root/doc/pdfgetx/2.4.0/_static/jquery.js deleted file mode 100644 index c4c6022f..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/jquery.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! 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_root/doc/pdfgetx/2.4.0/_static/language_data.js b/static_root/doc/pdfgetx/2.4.0/_static/language_data.js deleted file mode 100644 index c7fe6c6f..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/language_data.js +++ /dev/null @@ -1,192 +0,0 @@ -/* - * This script contains the language-specific data used by searchtools.js, - * namely the list of stopwords, stemmer, scorer and splitter. - */ - -var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; - - -/* Non-minified version is copied as a separate JS file, if available */ - -/** - * Porter Stemmer - */ -var Stemmer = function() { - - var step2list = { - ational: 'ate', - tional: 'tion', - enci: 'ence', - anci: 'ance', - izer: 'ize', - bli: 'ble', - alli: 'al', - entli: 'ent', - eli: 'e', - ousli: 'ous', - ization: 'ize', - ation: 'ate', - ator: 'ate', - alism: 'al', - iveness: 'ive', - fulness: 'ful', - ousness: 'ous', - aliti: 'al', - iviti: 'ive', - biliti: 'ble', - logi: 'log' - }; - - var step3list = { - icate: 'ic', - ative: '', - alize: 'al', - iciti: 'ic', - ical: 'ic', - ful: '', - ness: '' - }; - - var c = "[^aeiou]"; // consonant - var v = "[aeiouy]"; // vowel - var C = c + "[^aeiouy]*"; // consonant sequence - var V = v + "[aeiou]*"; // vowel sequence - - var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 - var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 - var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 - var s_v = "^(" + C + ")?" + v; // vowel in stem - - this.stemWord = function (w) { - var stem; - var suffix; - var firstch; - var origword = w; - - if (w.length < 3) - return w; - - var re; - var re2; - var re3; - var re4; - - firstch = w.substr(0,1); - if (firstch == "y") - w = firstch.toUpperCase() + w.substr(1); - - // Step 1a - re = /^(.+?)(ss|i)es$/; - re2 = /^(.+?)([^s])s$/; - - if (re.test(w)) - w = w.replace(re,"$1$2"); - else if (re2.test(w)) - w = w.replace(re2,"$1$2"); - - // Step 1b - re = /^(.+?)eed$/; - re2 = /^(.+?)(ed|ing)$/; - if (re.test(w)) { - var fp = re.exec(w); - re = new RegExp(mgr0); - if (re.test(fp[1])) { - re = /.$/; - w = w.replace(re,""); - } - } - else if (re2.test(w)) { - var fp = re2.exec(w); - stem = fp[1]; - re2 = new RegExp(s_v); - if (re2.test(stem)) { - w = stem; - re2 = /(at|bl|iz)$/; - re3 = new RegExp("([^aeiouylsz])\\1$"); - re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); - if (re2.test(w)) - w = w + "e"; - else if (re3.test(w)) { - re = /.$/; - w = w.replace(re,""); - } - else if (re4.test(w)) - w = w + "e"; - } - } - - // Step 1c - re = /^(.+?)y$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = new RegExp(s_v); - if (re.test(stem)) - w = stem + "i"; - } - - // Step 2 - re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - suffix = fp[2]; - re = new RegExp(mgr0); - if (re.test(stem)) - w = stem + step2list[suffix]; - } - - // Step 3 - re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - suffix = fp[2]; - re = new RegExp(mgr0); - if (re.test(stem)) - w = stem + step3list[suffix]; - } - - // Step 4 - re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; - re2 = /^(.+?)(s|t)(ion)$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = new RegExp(mgr1); - if (re.test(stem)) - w = stem; - } - else if (re2.test(w)) { - var fp = re2.exec(w); - stem = fp[1] + fp[2]; - re2 = new RegExp(mgr1); - if (re2.test(stem)) - w = stem; - } - - // Step 5 - re = /^(.+?)e$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = new RegExp(mgr1); - re2 = new RegExp(meq1); - re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); - if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) - w = stem; - } - re = /ll$/; - re2 = new RegExp(mgr1); - if (re.test(w) && re2.test(w)) { - re = /.$/; - w = w.replace(re,""); - } - - // and turn initial Y back to y - if (firstch == "y") - w = firstch.toLowerCase() + w.substr(1); - return w; - } -} - diff --git a/static_root/doc/pdfgetx/2.4.0/_static/minus.png b/static_root/doc/pdfgetx/2.4.0/_static/minus.png deleted file mode 100644 index d96755fd..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/minus.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/plus.png b/static_root/doc/pdfgetx/2.4.0/_static/plus.png deleted file mode 100644 index 7107cec9..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/_static/plus.png and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/_static/pygments.css b/static_root/doc/pdfgetx/2.4.0/_static/pygments.css deleted file mode 100644 index 5f2b0a25..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/pygments.css +++ /dev/null @@ -1,75 +0,0 @@ -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_root/doc/pdfgetx/2.4.0/_static/searchtools.js b/static_root/doc/pdfgetx/2.4.0/_static/searchtools.js deleted file mode 100644 index 91f4be57..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/searchtools.js +++ /dev/null @@ -1,635 +0,0 @@ -/* - * 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. -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 _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 = title; - if (descr) { - listItem.appendChild(document.createElement("span")).innerHTML = - " (" + descr + ")"; - // highlight search terms in the description - if (SPHINX_HIGHLIGHT_ENABLED) // 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) // 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 array is from language_data.js - if ( - stopwords.indexOf(queryTermLower) !== -1 || - 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) { // 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_root/doc/pdfgetx/2.4.0/_static/sphinx_highlight.js b/static_root/doc/pdfgetx/2.4.0/_static/sphinx_highlight.js deleted file mode 100644 index 8a96c69a..00000000 --- a/static_root/doc/pdfgetx/2.4.0/_static/sphinx_highlight.js +++ /dev/null @@ -1,154 +0,0 @@ -/* 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") - 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/static_root/doc/pdfgetx/2.4.0/files.html b/static_root/doc/pdfgetx/2.4.0/files.html deleted file mode 100644 index c4b85ffd..00000000 --- a/static_root/doc/pdfgetx/2.4.0/files.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - Files used in PDF extraction — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- -
-

Files used in PDF extraction

-
-

Configuration file

-

Configuration files may define the PDF processing parameters. -By default, the pdfgetx3 program attempts to read -.pdfgetx3.cfg file from the user HOME directory, -then .pdfgetx3.cfg and pdfgetx3.cfg files -from the current working directory. -If configuration file has a different name, it needs to be specified -with the -c, --config option. -The pdfgetn3 program works in the same way, -except it checks for configuration files -~/.pdfgetn3.cfg, .pdfgetn3.cfg and pdfgetn3.cfg.

-

The easiest way of creating a configuration file is to generate -a template content using the --createconfig option as

-
pdfgetx3 --createconfig=test.cfg
-
-
-

and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple “varname=value” syntax, -any lines starting with “#” are ignored as comments.

-

The configuration file has several sections marked as [SECTIONNAME]. -The [DEFAULT] section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the -s, --section option on the -command line. Thus

-
pdfgetx3 --config=test.cfg --section=nacl
-
-
-

would read the parameters from the [nacl] section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section.

-
-
-

Input files

-

PDFgetX3 and PDFgetN3 accept input powder diffraction data -in the form of two-column text file, -where the first column x is either the scattering angle -2Θ in degrees, momentum transfer Q in inverse nanometers or Q -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the dataformat parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values.

-

The input files are usually passed as command-line arguments to -pdfgetx3 or pdfgetn3 programs and must be paths -accessible from the current working directory.

-

Input files can be also defined by setting the inputfile -value in the configuration file. The -d, --datapath -option can be then used to provide additional data directories to -search for these inputs and for the backgroundfile. -This is to support configuration files located in a different -directory than the data.

-

When the --find option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are found -in the current or specified directory.

-
-
-

Output files

-

PDFgetX3 and PDFgetN3 can produce up to four different output data files:

-
    -
  • .iq – I(Q), the background-corrected -intensities sampled on a regular Q-space grid in inverse ångströms,

  • -
  • .sq – S(Q), the total scattering structure function, -with intensities normalized by average scattering factors and -corrected by a polynomial fit,

  • -
  • .fq – F(Q), the reduced structure function equal to Q(S(Q) - 1),

  • -
  • .gr – G(r), the resultant PDF, where the first column is the -separation r in ångströms and the second is the function G in -Å-2.

  • -
-

You can specify what output files should be produced by setting the -outputtypes parameter in the configuration file or by -passing the -t, --outputtypes on the command line.

-

The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the --config option, -the PDFgetX3 will reproduce the previous calculation.

-
-
- - -
-
- -
-
-
-
- - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.4.0/genindex.html b/static_root/doc/pdfgetx/2.4.0/genindex.html deleted file mode 100644 index b495c1f3..00000000 --- a/static_root/doc/pdfgetx/2.4.0/genindex.html +++ /dev/null @@ -1,879 +0,0 @@ - - - - - - - - Index — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- - -

Index

- -
- Symbols - | A - | B - | C - | D - | E - | F - | G - | I - | L - | M - | O - | P - | Q - | R - | S - | T - | V - | W - -
-

Symbols

- - - -
- -

A

- - -
- -

B

- - - -
- -

C

- - - -
- -

D

- - - -
- -

E

- - - -
- -

F

- - - -
- -

G

- - -
- -

I

- - - -
- -

L

- - - -
- -

M

- - -
- -

O

- - - -
- -

P

- - - -
- -

Q

- - - -
- -

R

- - - -
- -

S

- - -
- -

T

- - - -
- -

V

- - -
- -

W

- - -
- - - -
-
-
- -
- -
-

© Copyright 2025, 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/static_root/doc/pdfgetx/2.4.0/index.html b/static_root/doc/pdfgetx/2.4.0/index.html deleted file mode 100644 index bad2cd67..00000000 --- a/static_root/doc/pdfgetx/2.4.0/index.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - diffpy.pdfgetx — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
- -
- -
- -
-

© Copyright 2025, 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/static_root/doc/pdfgetx/2.4.0/install.html b/static_root/doc/pdfgetx/2.4.0/install.html deleted file mode 100644 index 4055c1bb..00000000 --- a/static_root/doc/pdfgetx/2.4.0/install.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - - - Installation — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- -
-

Installation

-
-

Software requirements

-

This software is written in Python programming language, therefore -you must have Python 3.13, 3.12, or 3.11 installed. In addition, -the following third-party Python libraries are also required:

-
    -
  • pip - Python package installer

  • -
  • setuptools - tools for installing Python packages

  • -
  • NumPy - library for scientific computing with Python

  • -
  • matplotlib - Python plotting library

  • -
  • IPython - enhanced interactive Python shell

  • -
-

Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -Python Package Index -or using any Internet search engine.

-

Another more convenient option is to obtain one of the science-oriented -Python distributions such as -Anaconda Python, -Enthought Canopy or -PythonXY, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step.

-

On Linux operating systems the third-party libraries are usually -included in a system software repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command

-
sudo apt-get install \
-  python3-pip python3-setuptools \
-  python3-numpy python3-matplotlib ipython3
-
-
-

This may be, of course, as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above.

-

On Windows operating system, it may be necessary to add the -C:\Python37 directory and the scripts directory -C:\Python37\Scripts to the system PATH. Some Python -distributions already do so as a part of their installation process. The -easiest way to check is to start the Command Prompt, type -there python and see if this starts the Python interpreter.

-

Alternately, if you want to run the diffpy.pdfgetx software with a specific version of Python, -we recommend using a virtual environment, such as conda. For example, if you have Anaconda Python installed, -you can create a conda virtual environment to install the software as follow

-
conda create --name pdfgetx_env python=3.13 numpy matplotlib ipython
-
-
-

You can choose the name of the environment and python version as you desire. You can choose any of the -supported Python versions. Then, activate this environment and follow the instructions in the -next section to install the software

-
conda activate pdfgetx_env
-
-
-
-
-

Installation

-

The diffpy.pdfgetx software is distributed as a Python wheel file, -which can be obtained from the -Columbia Technology Ventures. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the wheel file and -execute the following command:

-
pip install ./diffpy.pdfgetx-VERSION.whl
-
-
-

Here VERSION needs to be replaced to match the actual filename. It is -critical that pip installer is from a supported Python version otherwise -the program would not work. On Linux and Mac operating systems the installation may need to run with root user privileges, for example, by prepending sudo to the command line above. If root access is not available, use the pip install options --user or --prefix to install the software to a user-writable directory.

-

The package provides three programs for PDF conversion, pdfgetx3, pdfgetn3 and pdfgets3. To check if they are correctly installed run

-
pdfgetx3 --version
-pdfgetn3 --version
-pdfgets3 --version
-
-
-

This should display the software version, which should agree -with the VERSION string in the wheel package name. -The installation also includes a plotdata -command for an easy plotting of text data files. To verify -if plotdata works, run the plotdata --version command. -Finally, a comprehensive test of the installed software can -be executed using

-
python -m diffpy.pdfgetx.tests.run
-
-
-
-

Note

-

Older versions of diffpy.pdfgetx use Python egg format -instead of Python wheel. -To install these use the easy_install command as follows:

-
python -m easy_install ./diffpy.pdfgetx-VERSION.egg
-
-
-
-
-
-

IPython magic command

-

These instructions are intended for IPython users who would like to -integrate PDFgetX3, PDFgetN3 and PDFgetS3 into their IPython environment. If -you don’t plan to customize IPython in such way you can safely skip -this paragraph.

-

When pdfgetx3 or pdfgetn3 or pdfgets3 is run in interactive mode, it start -IPython interactive shell and define an extra %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands within the IPython session. The IPython -magic commands are not valid Python code, but work in a similar -fashion as standard shell commands. The %pdfgetx3, %pdfgetn3 and %pdfgets3 magics can be thus used with the same options and arguments as if run from the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -in an IPython session.

-

The %pdfgetx3, %pdfgetn3 and %pdfgets3 magic commands can be defined -permanently so they are available in all IPython sessions. To set -this up

-
    -
  1. find the profile_default/ipython_config.py file and open it -in a text editor. If that file does not exists, -create it first by executing

    -
    ipython profile create
    -
    -
    -
  2. -
  3. navigate to the paragraph that contains the -c.InteractiveShellApp.extensions and add there -the following line

    -
    c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_magics']
    -
    -
    -

    There must be no leading indent, i.e., the text must start at the -very first column.

    -
  4. -
-
-
- - -
-
- -
-
-
-
- - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.4.0/interact.html b/static_root/doc/pdfgetx/2.4.0/interact.html deleted file mode 100644 index 9cb548f4..00000000 --- a/static_root/doc/pdfgetx/2.4.0/interact.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - - Interactive mode — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- -
-

Interactive mode

-

The interactive mode is activated by using either the --i, --interact option or a non-empty ---plot option. In the interactive mode -the program starts an IPython interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -IPython commands %pdfgetx3 and %pdfgetn3, which can be used with -the same syntax as the pdfgetx3 and pdfgetn3 in -system shell. -The interactive session is also initialized with all functions from the -matplotlib.pyplot module for convenient plotting. -The functions and variables related to PDF processing are:

-
-
-_interactive_.pdfgetter(x=None, y=None, filename='', **kwargs)
-

Instance of the PDFGetter class which serves as a -low-level function that calculates the PDF. This is a callable -object, which takes as an argument a pair of input arrays for -(Q, intensity) or (2Θ, intensity) depending on -dataformat. It can be also called with a keyword -argument filename=FILE, which would read the input arrays -from the specified file. When called with no arguments, -it calculates PDF from the last input data.

-
-
Parameters:
-
    -
  • x (numpy.ndarray, optional) – -The Q or 2Θ values in powder diffraction pattern.

  • -
  • y (numpy.ndarray, optional) – -The scattered intensities in powder diffraction pattern

  • -
  • filename (str, optional) – -The text data file for loading the x, y values when -they are not specified.

  • -
  • kwargs (misc, optional) – -Extra keyword arguments that are applied to -the config object, for example qmax=20.

  • -
-
-
Returns:
-

A pair of output arrays (r, G).

-
-
-
- -
-
-config
-

Instance of the PDFConfig class that stores the -parameters and input files for the program. -Use print(config) to display the current configuration values. -This is the same object as pdfgetter.config. Configuration -may be changed by setting a respective attribute of the -config object, for example:

-
In [1]: config.qmax = 21
-
-
-

The config values may be also changed by calling the -pdfgetter() or processfiles() function with a -corresponding keyword argument, for example -processfiles(qmax=20, force="once").

-
- -
-
-iraw
-
-iq
-
-sq
-
-fq
-
-gr
-

These variables are assigned the input raw intensities and the -intermediate results, stored as matrix rows. The matrix rows -correspond to twotheta1, intensity1, twotheta2, intensity2, etc. -Because matrices are iterated row first, the raw intensities -from all input files can be plotted with the matplotlib plot -function as plot(*iraw).

-

These variables should be considered read-only and are reset -with subsequent PDF calculations.

-
- -
-
-_interactive_.tuneconfig(plotids=None, pdfgetter=None, axeslist=None)
-

Show a GUI dialog for interactive tuning of configuration variables.

-
-
Parameters:
-
    -
  • plotids – The string or iterable that specify what interactive plots should be -tuned. By default the same as config.plot. It can be also an -integer index or name of a transformation in pdfgetter() or -a reference to a Transformation object.

  • -
  • pdfgetter – The optional PDFGetter object to be tuned. -This is by default the interactive pdfgetter() object.

  • -
  • axeslist – An optional list of matplotlib Axes for showing interactive plots. -When None, use subplot(N, 1, i) to create any necessary axes.

  • -
-
-
-
-

Note

-

Changes from tuneconfig() apply only to the configuration -and results in memory. Use the processfiles() function -to save them to disk.

-
-
-

See also

-

Interactive tuning of parameters tutorial

-
-
- -
-
-_interactive_.processfiles(filename=None, **kwargs)
-

Process all input files again with the current configuration values. -This is a higher-level function than pdfgetter(), as -it also saves output files and produces plots as specified by the -config object.

-
-
Parameters:
-
    -
  • filename – One or more input files to be converted to PDFs and saved or -plotted according to the config settings. Use the -previous list of input files when not specified.

  • -
  • kwargs – An optional keyword arguments to set for the config -object, for example (force="once", qmax=18).

  • -
-
-
-

This function updates the config.inputfiles -list and the iraw, iq, -sq, fq and gr -interactive variables.

-
- -
-
-_interactive_.clearsession()
-

Clear all elements from the config.inputfiles -and also the -iraw, iq, sq, -fq and gr variables.

-
-
Returns:
-

No return value.

-
-
-
- -
-
-diffpy.pdfgetx.loaddata(filename, minrows=10, usecols=None, **kwargs)[source]
-

Find and load data from a text file.

-

The data reading starts at the first matrix block of at least minrows rows -and constant number of columns. This seems to work for most of the -datafiles including those generated by PDFGetX2.

-
-
Parameters:
-
    -
  • filename (str) – Name of the file to load the text data from.

  • -
  • minrows (int, optional) – Minimum number of rows in the first data block, by default 10. -All rows must have the same number of floating point values.

  • -
  • usecols (int, str, slice, iterable, optional) – Indices or names of the columns to be loaded from the data block, -the default is all columns. Data blocks that do not contain -sufficient number of columns are skipped. When usecols contain -string items, they are translated to column indices by looking -up a header line preceding the data block. String items formatted -as i:j:k are converted to slice objects. When usecols type -is string it is split to a list of names at comma and whitespace -characters.

  • -
  • unpack (bool, optional) – Return data as a sequence of columns that allows tuple unpacking -such as x, y = loaddata(FILENAME, unpack=True). Note that -transposing the loaded array as loaddata(FILENAME).T has -the same effect. The default is False.

  • -
  • kwargs (misc, optional) – Extra keyword arguments that are passed to numpy.loadtxt.

  • -
-
-
Returns:
-

data – The data block loaded from the text file.

-
-
Return type:
-

numpy.ndarray

-
-
-
-

See also

-

numpy.loadtxt

-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
-
-diffpy.pdfgetx.plotdata.plotdata(filenames, style=None, x=None, y=None, log=None, ax=None, **kwargs)[source]
-

Plot one or more text data files.

-

The files are searched for data blocks which have enough columns -to satisfy both x and y selectors of the plotted data. This -may result in an empty plot when file has none wide-enough data -block (e.g., when y=100).

-
-
Parameters:
-
    -
  • filenames (str or an iterable of string file names) – One or more text data files to be plotted.

  • -
  • style (str) – Optional style argument for the matplotlib plot() function.

  • -
  • x (int, str, or iterable, optional) – The column to be used for the x data. This can be a zero-based -index of the desired column or a column name from data header. -A special symbol “.” can be used for a sequential data index. -When not specified, use the first column.

  • -
  • y (int, str, iterable, or slice, optional) – One or more columns to be used for the y data. This can be -a single zero-based index of the desired column or an iterable -of several indices. The y value can be also a string which -is split at commas and converted to integers, column names -or slice objects, e.g. “0,sine,4:7”. The slice instances -are applied to the entire data block from each loaded file. -Use the second column when not specified.

  • -
  • log ({'x', 'y'}, optional) – Set logarithmic scaling for the specified axis and linear scaling -for all others. For example, log="y" applies linear scaling -to the x-axis and logarithmic to the y-axis. Keep the current -axis scaling when not specified.

  • -
  • ax (matplotlib.axes.Axes, optional) – The axes to plot to. The plotting will be performed using the -ax.plot method. The default is pyplot.gca().

  • -
  • kwargs (misc, optional) – Keyword arguments for the matplotlib plot() function.

  • -
-
-
Returns:
-

lines – The matplotlib Line2D objects added to the current axis.

-
-
Return type:
-

list

-
-
- -

This function can be imported from the -diffpy.pdfgetx.plotdata module.

-
- -
-
-diffpy.pdfgetx.findfiles(patterns=(), path='.', dotfiles=False)[source]
-

Find files that match all specified patterns.

-

Pattern syntax:

-
    -
  • ^start - match “start” only at the beginning of the string.

  • -
  • end$ - match “end” only at the end of string.

  • -
  • <7> - match number 7 preceded by any number of leading zeros.

  • -
  • <1-34> - match an integer range from 1 to 34 inclusive.

  • -
  • <7-> - match an integer greater or equal 7.

  • -
  • <-> - match any integer.

  • -
  • + - start a new group of patterns to match more files.

  • -
  • dir/ - set search path effective from the current pattern group.

  • -
-

All integer ranges <N-M> above allow one or more leading zeros. -The range syntax does not support matching of negative numbers.

-
-
Parameters:
-
    -
  • patterns (iterable of strings or str, optional) – String patterns that must all match in returned filenames. -Can be also a single string with patterns separated by -whitespace characters. When empty match all files in the -current directory or in the path. A single + starts -a new pattern group for additional matches. Each pattern -group may have one entry containing /, for example, -dir/ or ./, which sets the search directory for -this and subsequent pattern groups. When pattern group -contains only the path entry it reuses file patterns from -the previous group.

  • -
  • path (str, optional) – Directory to be searched for the files. The default is “.” -to search the current directory.

  • -
  • dotfiles (bool, optional) – When True search also the hidden “.” starting files. These -files are by default ignored, but can be explicitly selected -by adding the ^. pattern.

  • -
-
-
Returns:
-

filenames – The list of matching filenames. Return all files when -patterns are not specified.

-
-
Return type:
-

list

-
-
-

This function can be imported from the -diffpy.pdfgetx module.

-
- -
- - -
-
- -
-
-
-
- - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.4.0/intro.html b/static_root/doc/pdfgetx/2.4.0/intro.html deleted file mode 100644 index c01b9e31..00000000 --- a/static_root/doc/pdfgetx/2.4.0/intro.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - Introduction — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- -
-

Introduction

-

diffpy.pdfgetx is a simple yet powerful software for converting X-ray or -neutron powder diffraction data to atomic Pair Distribution Functions -(PDFs). In addition, it also allows the extraction of PDFs from small-angle -scattering (SAS) data. The software includes three command line programs -PDFgetX3, PDFgetN3 and PDFgetS3 for processing X-ray, -constant-wavelength neutron and small-angle diffraction data -respectively. PDFgetX3, PDFgetN3 and PDFgetS3 can be used in a batch -mode to convert a series of data files without user intervention. The -programs can be also run in an interactive mode that allows to control -process parameters and plot the PDFs and any intermediate results. Users -can interactively tune the PDF processing parameters, visualize their effect on the results and adjust them to their optimum values. The programs are bundled with Python library diffpy.pdfgetx for PDF processing functions, which can be used in custom Python scripts.

-
-

License notice

-

Use of this software is subject to and permitted only under a separate, -written Use License granted by Columbia University. If you or your employer -is not a party to such an agreement, then your use of this software is -prohibited. If you don’t know whether or not your anticipated use is under -a license, you must contact Prof. Simon Billinge at sb2896@columbia.edu. -Use of this software without a license is prohibited.

-

Copyright 2009-2025, Trustees of Columbia University in the City of New York.

-

For more information please email Prof. Simon Billinge at sb2896@columbia.edu

-
-
-

Authors

-

This code was written by members of the Billinge Group at -Columbia University and Brookhaven National Laboratory including -Pavol Juhás, -Timur Davis, -Chia-Hao (Timothy) Liu, -Christopher Wright, -Christopher Farrow, -Connor J. Bracy, -Hung Vuong, -Songsheng Tao, -Simon Billinge.

-
-
-

References

-

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:

-
-

P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge -PDFgetX3: A rapid and highly automatable program for processing -powder diffraction data into total scattering pair distribution -functions, -J. Appl. Crystallogr. 46, 560-566 (2013)

-
-

For research publications that use this software to process neutron -diffraction data we ask you to also cite:

-
-

P. Juhás, J. N. Louwen, L. van Eijck, E. T. C. Vogt, -S. J. L. Billinge -PDFgetN3: atomic pair distribution functions from neutron -powder diffraction data using ad hoc corrections, -J. Appl. Crystallogr. 51 (2018)

-
-

For research publications utilising the sasPDF utility, PDFGetS3, we ask you to acknowledge the use of the program by citing following paper in your publication:

-
-

CH Liu, E. Janke, R. Li, P. Juhás, O. Gang, D. V. Talapin, S. J. L. Billinge -sasPDF: pair distribution function analysis of nanoparticle assemblies from small-angle-scattering data.

-
-
-
- - -
-
- -
-
-
-
- - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.4.0/objects.inv b/static_root/doc/pdfgetx/2.4.0/objects.inv deleted file mode 100644 index 59592dd5..00000000 Binary files a/static_root/doc/pdfgetx/2.4.0/objects.inv and /dev/null differ diff --git a/static_root/doc/pdfgetx/2.4.0/options.html b/static_root/doc/pdfgetx/2.4.0/options.html deleted file mode 100644 index 1610e2a6..00000000 --- a/static_root/doc/pdfgetx/2.4.0/options.html +++ /dev/null @@ -1,710 +0,0 @@ - - - - - - - - - Options and parameters — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- -
-

Options and parameters

-

PDFgetX3, PDFgetN3 and PDFgetS3 are very flexible in allowing users to customize -the actions of the program. They have a number of parameters that can -be specified either in configuration file or as command line options. -Here is a complete description of the parameters and options used by -either program.

-
-

Note

-

The command line options start with a leading “-” and can -be only used as command line arguments when starting the -pdfgetx3 program. Within configuration file the parameter -names are plain words without any leading dashes. Finally, -parameters can be also set in the interactive mode as attributes of -the config object, but the assignments must be valid -Python statements. Here are examples of setting composition of -a processed specimen using each of these forms:

-
    -
  1. assigned in configuration file:

    -
    ...
    -composition = CaTiO3
    -...
    -
    -
    -
  2. -
  3. set as a command-line option when starting pdfgetx3 or -pdfgetn3:

    -
    pdfgetx3 --composition=CaTiO3
    -
    -
    -
  4. -
  5. set in the IPython interactive mode:

    -
    pdfgetx3 -i
    -...
    -In [1]: config.composition = "CaTiO3"
    -
    -
    -
  6. -
-
-
-

Program operation

-
-
--h, --help
-

Display a brief usage information with a list of command line options -and exit.

-
- -
-
--V, --version
-

Display the program version and exit.

-
- -
-
---manual
-

Open this manual in a Web browser and exit.

-
- -
-
--f, --find
-
- -
-

Select input files that match all patterns. The command -line arguments are by default taken as input files. However, -with the --find option they are processed as -file patterns and the matching files are then used as inputs. -The input files are by default searched in the current directory -unless there is a path entry (e.g., data/) that -selects a different search path. The search patterns are -interpreted as fixed strings, all of which must be present -in the file name. A single argument + starts -a new group of patterns to match more files that are not -covered by one set of patterns. Additional pattern -groups reuse the current search path unless they provide -their own path value. Pattern groups containing only -a path entry reuse file patterns from the last group. -When pattern groups overlap the repeated matches are ignored -to make the resulting list of files unique. Files starting -with . are ignored unless there is ^. pattern -that explicitly matches them. The search -syntax provides the following special patterns:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

^

match at the beginning of the string, i.e., ^start -matches only filenames that start with “start”.

$

match at the end of string, for example, .chi$ selects -file names ending with “.chi”. A $ on its own -matches every string and can be used to select all files.

<N>

match number N preceded by any number of leading zeros, -e.g., <7> would match in “f7.chi”, “f007.chi”, but not -in “f77.chi”.

<N-M>

match an integer range from N to M inclusive. -The matched number may have one or more leading zeros.

<7->

match number 7 or larger.

<-7>

match number 7 or smaller.

<->

match any integer number.

+

start a new pattern group, for example, .chi$ + .dat$

/

set search path. An argument containing the / symbol -is taken as the search path, for example, data/ or -./. Each pattern group may provide its own search -path effective for that and any subsequent pattern group.

-

The ^$<> characters are often special to Unix or Windows -command shells, therefore they need to be enclosed in double -quotes (\”) when used on command line.

-
-

See also

-

tutorial on matching input files

-
-
-
-
--l, --list
-

List all input files and exit. This is useful with the ---find option to verify if input files -are matched as intended.

-
- -
-
-

Configuration file options

-
-
--c CONFIG, --config=CONFIG
-

Read custom configuration file after loading the default ones. -Do not load any configuration file when “NONE”.

-
- -
-
--s NAME, --section=NAME
-

Load the custom configuration file section [SectionName] after -loading the [DEFAULT] section. This is useful for creating -several configuration variants in a single configuration file.

-
- -
-
---createconfig=FILE
-

Write template configuration to a new FILE and exit. Write -to the standard output when FILE is “-“.

-
- -

See also the configuration file section -for further details.

-
-
-

Input and output options

-
-
-inputfile
-

This parameter allows to specify one or more input files in the -configuration file, one file per line. The inputfile -is only used if no input files were provided on the -pdfgetx3 or pdfgetn3 command line.

-
- -
-
-dataformat
-
- -
-
---format=FORMAT
-

Format of input files. Available formats are: twotheta, QA, -Qnm corresponding to a two-column text data where the first -column is either the scattering angle 2Θ in degrees, Q in -inverse ångströms or Q in inverse nanometers.

-
- -
-
-backgroundfile
-
- -
-
--b FILE, --background=FILE
-

Optional datafile with background intensities from an empty sample -holder. It must be in the same dataformat as other input files.

-
- -
-

Note

-

The following input is only used in sas mode.

-
-
-
-formfactorfile
-
- -
-
--ff FILE, --formfactorfile=FILE
-

Form factor intensities of the scatterers. This is required for sas mode. The form factor file is expected to be in two-column format with (Q, f2avg) data or three-column format with (Q, f2avg, favg2) data. The unit of Q is required to be A^-1.

-
- -
-
-datapath
-
- -
-
--d DATAPATH, --datapath=DATAPATH
-

One or more extra directories to be searched for input or -background data files. The -d option can be specified -several times to add more directories, these are prepended in front -of any default value. Within configuration file the datapath -directories have to be listed each on a separate line.

-

A special value “NONE” (or “none”) clears any previously defined -paths and only the further paths, if any, would be searched for -inputs.

-
- -
-
-output
-
- -
-
--o OUTPUT, --output=OUTPUT
-

Output file name, write to the standard output when “-”. The --t, --outputtypes option controls what results are -being saved. Normally the OUTPUT is used as a custom basename for -the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o -tokens, which are expanded as follows:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

token

example

definition

@h

dir1/dir2

the input file directory or “.”

@r

dir1/dir2/filename

the input path with extension removed

@e

dat

the input file extension without “.”

@t

filename.dat

the tail component of the input file

@b

filename

the tail component with extension removed

@o

gr

the output extension iq, sq, fq or gr

-

An empty value works the same as “@b.@o” and saves the data -in the current directory with a proper extension for the -saved results. When “@o” is not present in the OUTPUT, it is -appended as a default filename extension.

-
- -
-
-outputtypes
-
- -
-
--t TYPES, --outputtypes=TYPES
-

Result types to be saved, one or more comma separated values. -Supported values are “iq”, “sq”, “fq”, “gr”, corresponding to the -I(Q), S(Q), F(Q) and G(r) curves; these are also used as output -file extensions.

-

Result files are not written when empty, “none” or “NONE”.

-
- -
-
-force
-
- -
-
---force=FORCE
-

Overwrite existing output files. By default the output -files are not written if they already exist. Possible values -in a configuration file are “true”, “yes”, “on”, “1” or -“false”, “no”, “off”, “0” or “once”. The special value “once” -permits one overwrite and then resets config.force to -False. Note that in interactive mode the values assigned -to config.force are converted to Python bool -unless equal to “once”.

-
- -
-
-

PDF parameters

-
-
-mode
-
- -
-
---mode=STRING
-

The PDF conversion mode, i.e., the name of the -pdfgetter() setup. The available modes correspond -to the radiation type used in powder diffraction experiment and can -be “xray” or “neutron”.

-
- -
-
-wavelength
-
- -
-
--w FLOAT, --wavelength=FLOAT
-

X-ray wavelength in ångströms. This value is required -for the “twotheta” dataformat in order to convert the scattering -angles 2Θ to a momentum transfer Q. For other data formats -the wavelength is not necessary and may be left undefined.

-
- -
-
-twothetazero
-
- -
-
---twothetazero=FLOAT
-

Position of the zero scattering angle in diffractometer degrees. -This parameter corrects for a constant offset in the -measured 2Θ values. When loading configuration file -it is assumed 0 unless specified otherwise. This parameter -is only effective for the “twotheta” dataformat.

-
- -
-
-composition
-
- -
-
---composition=STRING
-

Chemical composition of the sample. Supported formats are -“PbTi0.5Zr0.5O3”, “Pb 1 Ti 1/2 Zr 1/2 O 3” or “CH3 (CH2)3 OH”. -Space characters are ignored, unit counts can be omitted, but it is -important to use a proper upper and lower case in atom symbols. -Elements can appear several times in the formula, e.g., “CH3 CH3”, -and the formula may contain parentheses or fractional -stoichiometries.

-
- -
-
-bgscale
-
- -
-
---bgscale=FLOAT
-

Scaling of the background intensities loaded from the -backgroundfile, by default 1.

-
- -
-
-rpoly
-
- -
-
---rpoly=FLOAT
-

r-limit for the maximum frequency in the F(Q) correction polynomial. -The PDF is unreliable at shorter r, however a -very small rpoly would disable polynomial correction and -give noisy PDF. -Larger values produce closer fits with a higher degree polynomial, -but when too large, they might smooth-out a useful signal in the -data. The default is 0.9.

-
- -
-
-qmaxinst
-
- -
-
---qmaxinst
-

The Q cutoff for the meaningful input intensities in inverse -ångströms. Some data files may contain trailing zeros -or unreliable intensities at the upper bound of the detector range. -The qmaxinst defines a threshold for unreliable data. -The parameter is also used as an upper boundary for the polynomial -fit correction of the S(Q) data.

-
- -
-
-qmin
-
- -
-
---qmin
-

The lower Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms.

-
- -
-
-qmax
-
- -
-
---qmax
-

The upper Q-limit for the Fourier transformation of the F(Q) curve -in inverse ångströms. This is essentially a limit, where sample -signal decays to the level of data noise.

-
- -
-
-terminationfunctions
-
- -
-
---terminationfunctions=LIST
-

Optional list of termination functions to apply to the F(Q) data -before the Fourier transformation to the G(r) curve.

-

Termination functions help reduce termination ripples caused by the -finite Q-range. Each function tapers or truncates the F(Q) signal -between qmin and qmax.

-

This parameter may be specified as:

-
    -
  • a single function name from the supported list

  • -
  • a list of comma-separated or space-separated function names, to be applied in order

  • -
  • the alias terminationfunction is also accepted

  • -
-

Supported function names:

-
-
step

Hard cutoff window. Sets F(Q) = 0 for -Q < qmin or Q > qmax.

-
-
lorch

Lorch window:

-
W(Q) = sin(pi * (Q - qmin) / (qmax - qmin))
-       / (pi * (Q - qmin) / (qmax - qmin))
-
-
-

Applied only within the q-range; zero outside.

-
-
-

Examples:

-
CLI usage::
-
---terminationfunctions=lorch
---terminationfunctions="lorch, step"
-
-Configuration file usage::
-
-terminationfunctions = lorch
-terminationfunctions = "lorch, step"
-
-
-
- -
-
-rmin
-
- -
-
---rmin=FLOAT
-

Lower bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rmax
-
- -
-
---rmax=FLOAT
-

Upper bound of the r-grid for the calculated PDF in ångströms.

-
- -
-
-rstep
-
- -
-
---rstep=FLOAT
-

Spacing of the r-grid for the calculated PDF in ångströms.

-
- -
-
-

Other parameters

-
-
-plot
-
- -
-
--p TYPES, --plot=TYPES
-

Plot the specified results. A comma separated list with one or -more items from “iq”, “sq”, “fq”, “gr”. No plot is produced when -empty, “none” or “NONE”. Setting this option turns on the -interactive mode.

-
- -
-
-interact
-
- -
-
--i, --interact
-

Start an IPython interactive session after processing all files. -Useful for tuning the configuration parameters or interactive -plotting. This is always on when plot option has been set. -See also Interactive mode for further details.

-
- -
-
-verbose
-
- -
-
---verbose=VALUE
-

Level of detail for the program to report about its actions. -Possible values are “error”, “warning”, “info”, “debug”, “all” or an -integer number from 0 to 5. Messages are completely suppressed when -0, all messages are printed when verbose is 5 (“all”) or higher. -This option is useful for diagnostics of any unexpected behavior -in the program.

-
- -
-
- - -
-
- -
-
-
-
- - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.4.0/plotdata.html b/static_root/doc/pdfgetx/2.4.0/plotdata.html deleted file mode 100644 index 8ef9e772..00000000 --- a/static_root/doc/pdfgetx/2.4.0/plotdata.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - The plotdata program — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- -
-

The plotdata program

-

The PDFgetX3 software includes a simple stand-alone utility -plotdata for plotting text data files. In most cases -this program can be invoked from a command-shell as

-
plotdata file1.dat file2.dat
-
-
-

which plots the numerical data from the text files file1.dat, -file2.dat together in a single graph. By default the first -column is used as an x variable and the second column is used for the -y values. After displaying the plot the program starts an IPython -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the filenames variable -containing a list of plotted files. It also pre-loads the -plotdata() and findfiles() functions just as in PDFgetX3 -interactive session. The plotdata() -function works in a similar way as the plotdata program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -plotdata() function would be:

-
In [1]: plotdata(['file1.dat', 'file2.dat'])
-
-
-
-

Selecting files

-

The plotdata program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as *.dat. The file search feature is controlled by the -following options:

-
-
--f, --find
-

Use command line arguments as filename patterns and plot all matching -files. This option works in the same way as for -pdfgetx3, for full details see the -pdfgetx3 --find documentation. Note that -within command line the special patterns ^$<> need to be quoted -in double quotes (\”) so they are not processed by command shell.

-
- -
-
--l, --list
-

List the input files and exit. This is useful in conjunction -with the -f, --find option to check if data files -are selected as intended.

-
- -

Assuming the current directory contains 20 files named -file1.dat, file2.dat, …, file20.dat, -the plotting of files 9 to 13 could be done (with a check listing) -as follows

-
$ plotdata -fl "<9-13>.dat"
-file9.dat
-file10.dat
-file11.dat
-file12.dat
-file13.dat
-$ plotdata -f "<9-13>.dat"
-
-
-

Within an interactive IPython session the equivalent plot could be -produced by combining the plotdata() and findfiles() functions as

-
In [1]: plotdata(findfiles("<9-13>.dat"))
-
-
-
-
-

Selecting x and y data

-

The plotdata program provides several ways of selecting -columns for x or y data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is “0” -as per Python indexing conventions. Here is a list of options -supported by the plotdata program (and function):

-
-
--x X
-

index or name of the x-column to plot. See the -y option -for the supported syntax, but note that X may select only one -column. When set to “.” use the data-row index for x.

-
- -
-
--y Y
-

index or name of the y-column or columns to plot. The Y column -specification can be a comma separated list of indices, column names -or Python-like ranges, for example “1,2”, “G”, “1:4” (START:STOP, -same as “1,2,3”), “1:4:2” (START:STOP:STEP, same as “1,3”), or -“-2:” (same as “-2,-1”, i.e, the last 2 columns). Because column -indexing starts at “0” the second column must be specified as “1”.

-

The column names work if the data section in the file is preceded by -a headline of unique column names, for example:

-
x     square      cube
-1     1           1
-2     4           8
-3     9           27
-4     16          64
-
-
-

For such data file the plotdata program will recognize column names -“x”, “square” and “cube” and an implicit “.” for row index.

-
- -
-
--s STYLE, --style=STYLE
-

optional plot format specification. See the -matplotlib.pyplot.plot() function -for a list of available formats.

-
- -
-
--L LOG, --log=LOG
-

axes to be plotted with logarithmic scaling, for example, “x”, “y” or -“xy”. Axes not listed in LOG will use linear scaling.

-
- -
-
--h, --help
-

display a brief usage info and exit.

-
- -
-
--V, --version
-

show program version and exit.

-
- -
-
---manual
-

Open this manual page in a Web browser and exit.

-
- -
-
-

Examples

-

The examples directory plotdata contains a sincos.dat -file that has 3-columns of values labeled as “x”, “sin” and “cos”. -Here are several examples of the plotdata capabilities -when used from command line - the user is encouraged to try them out:

-
plotdata sincos.dat
-plotdata -y 1,2 sincos.dat
-plotdata -x . -y 0:3 sincos.dat
-plotdata -y cos sincos.dat
-plotdata -x sin -y cos -sr-- sincos.dat
-
-
-

An equivalent usage from a general IPython session would be:

-
ipython --matplotlib=auto
-In [1]: from diffpy.pdfgetx.plotdata import plotdata
-In [2]: plotdata('sincos.dat')
-In [3]: plotdata('sincos.dat', y=[1,2])
-In [4]: plotdata('sincos.dat', x='.', y=':3')
-In [5]: plotdata('sincos.dat', y='cos')
-In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--')
-
-
-
-
- - -
-
- -
-
-
-
- - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.4.0/quick-start.html b/static_root/doc/pdfgetx/2.4.0/quick-start.html deleted file mode 100644 index 82bae689..00000000 --- a/static_root/doc/pdfgetx/2.4.0/quick-start.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - - Quick-start guide — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- -
-

Quick-start guide

-

This guide assumes that the software has been correctly installed and -its command line programs PDFgetX3, PDFgetN3 and PDFgetS3 can be -executed by typing pdfgetx3, pdfgetn3, or -pdfgets3 in a shell window. Please, refer to the installation section if this is not working yet.

-
-

pdfgetx3 command

-

The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as

-
pdfgetx3 [options] input1 input2 ... inputN
-
-
-

The inputN stands for an input powder diffraction data. The -inputN file is a simple two-column text file, where the first -column corresponds to either the 2Θ diffraction angle, or a -momentum transfer, Q, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -FIT2D program using -its “chi” output format, thus we will also refer to them as “chi-files”. -A typical content of a “chi” file looks as follows:

-
Pt_bulk-00055.tif: 2-theta Scan
-2-Theta Angle (Degrees)
-
-       1465
- 2.0003892E-02  0.0000000E+00
- 6.0011677E-02  0.0000000E+00
- 1.0001946E-01  0.0000000E+00
- 1.4002724E-01  0.0000000E+00
- 1.8003502E-01  0.0000000E+00
- ...
-
-
-

The command-line options are arguments that start with a dash “-” and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash --. Options may require values. For short options, -the value may be joined to the option string, for example --w0.142774, while for the long options it has to be separated -with an equal sign, e.g., --wavelength=0.142774. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the Options and parameters section of -this manual. A brief summary of options can be also displayed by -executing

-
pdfgetx3 --help
-
-
-

The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the Tutorial. -In general, the first step is to create a commented configuration file pdfgetx3.cfg using:

-
pdfgetx3 --createconfig=pdfgetx3.cfg
-
-
-

The configuration file can have any name, but it is preferable -to use either pdfgetx3.cfg or .pdfgetx3.cfg, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the -c, --config option.

-

Open the pdfgetx3.cfg file in a text editor. The lines that -start with a hash mark # are comments and are not used. The lines -starting with a right brace [ denote sections in the configuration -file. The active lines are all formatted as -“NAME=VALUE”. Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation:

-
    -
  • dataformat – specifies the input data format

  • -
  • wavelength – radiation wavelength in Å required for the -“twotheta” format.

  • -
  • composition – chemical composition of the sample

  • -
  • qmaxinst – upper Q boundary for a meaningful measurement -intensities.

  • -
  • qmaxQ-cutoff for the Fourier transformation that -yields the PDF.

  • -
-

Save the updated configuration file and run pdfgetx3 on the input data -FILENAME.chi as

-
pdfgetx3 --verbose=info -t gr FILENAME.chi
-
-
-

Here the --verbose=info option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The -t gr option -tells the program to save the final G(r) curve as a -FILENAME.gr file in the working directory.

-

The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation

-
pdfgetx3 -c FILENAME.gr --plot=fq,gr
-
-
-

Note this command does not include any .chi file and this will as -a result process the previously used input FILENAME.chi. -The --plot=fq,gr option tells PDFgetX3 to -display 2 plots for the reduced structure function F(Q) and the -final PDF G(r). The --plot option also implies an -interactive mode -therefore the program does not exit, but starts an -interactive IPython session. To exit the interactive mode, -type exit() and press Enter.

-
-
-

pdfgetn3 command

-

The pdfgetx3 and pdfgetn3 programs operate in a very similar fashion -apart from being set to assume X-ray and neutron data respectively. -The type of the scattering data can be also specified using the ---mode option. Running pdfgetn3 is nearly identical -to executing pdfgetx3 --mode=neutron. The only difference between -these commands is that pdfgetx3 checks for configuration files -pdfgetx3.cfg and .pdfgetx3.cfg, whereas -pdfgetn3 looks for pdfgetn3.cfg and .pdfgetn3.cfg.

-
-
-

pdfgets3 command

-

The pdfgets3 program is virtually the same as its counterparts for x-ray -(pdfgetx3) and neutron (pdfgetn3) diffraction data. The only difference -is that instead of referencing the well documented x-ray or neutron -scattering form factor data, a user-defined form factor data is used -for getting the PDF from a small-angle scattering (SAS) data. This -behavior is enabled by specifying mode = sas in the configuration -file or in the command line tool. The pdfgets3 program by default -searches for a configuration named pdfgets3.cfg and -.pdfgets3.cfg in order, when no configuration file is specified.

-

Please refer to the tutorial section for a step-by-step processing of the example data files and for demonstration of the capabilities in PDFgetX3, PDFgetN3 and PDFgetS3.

-
-
- - -
-
- -
-
-
-
- - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.4.0/release.html b/static_root/doc/pdfgetx/2.4.0/release.html deleted file mode 100644 index b41b8aad..00000000 --- a/static_root/doc/pdfgetx/2.4.0/release.html +++ /dev/null @@ -1,415 +0,0 @@ - - - - - - - - - Release notes — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- -
-

Release notes

-
-

2.4.0

-

Added:

-
    -
  • Description of terminationfunctions to docs

  • -
  • New transformterminationfunctions transformation

  • -
  • CLI/CFG terminationfunctions options (step, lorch)

  • -
-

Fixed:

-
    -
  • Build docs using the correct scikit-package script name

  • -
  • Reapply the Sphinx dependency m2r to m2r2 fix that seems to have inadvertently been lost

  • -
-
-
-

2.3.0

-

Added:

-
    -
  • Added Cython build support.

  • -
  • Added .gitattribute for github release export.

  • -
  • Support for Python 3.11, 3.12, 3.13.

  • -
  • Use bg-mpl-stylesheets as a style for matplotlib plots.

  • -
  • test for the Q-array issue

  • -
  • Added instructions in wheels bundle.

  • -
  • Added pdfgetx3 –list-examples and pdfgetx3 –example commands to list available examples and copy example dir into pwd.

  • -
-

Changed:

-
    -
  • Changed build process. Now build *.c sdist and c binary wheels for each platform and python version.

  • -
  • Updated tuneconfig.py to use the latest api from matplotlib.

  • -
  • Renamed get_atol() to get_atol_from_rtol() in test_pdfgetter.py

  • -
  • Standardized checking if a variable is an iterable.

  • -
  • Removed docs/source directory and makefiles in installation.

  • -
  • Changed twothetazerofit.ipy to output .png files instead of .pdf`and `.svgz files.

  • -
-

Fixed:

-
    -
  • Refactored code for prefer_nodisplay_backend and suppress warnings.

  • -
  • Support scikit-package Level 5 standard (https://scikit-package.github.io/scikit-package/).

  • -
  • Replaced setup.py with pyproject.toml for releases.

  • -
  • Patched issue in kirkland.py that Q-array was being erroneously updated globally by the felectronatq function.

  • -
  • Fixed example import errors diffpy.structure because of Structure deprecation.

  • -
  • Fixed tutorial missing image file.

  • -
-

Removed:

-
    -
  • Removed deprecated support for loadData, pdfgetxApplication.processFiles, pdfgetxApplication.clearSession, pdfgetxApplication.loadData.

  • -
  • Removed unused .coveragerc, .gitarchive.cfg, .gitattributes.

  • -
  • Support for Python 2.7, and Python <= 3.10

  • -
  • six, and other Py2 legacy code

  • -
  • Removed pre-commit run in merge-to-main workflow

  • -
-
-
-

Release notes

-
-
-

2.2.2

-

Fixed:

-
    -
  • Changed self.guifigure.canvas.set_window_title to -self.guifigure.canvas.manager.set_window_title in -tuneconfig() to satisfy deprecated usage in matplotlib > 3.4

  • -
-
-
-

2.2.1

-

Added:

-
    -
  • Added new API for accessing intermediate I(Q) plots as properties on -PDFGetter instances via properties following a naming convention of -PDFGetter.iq_<i>, where i is a zero‐based index of the intermediate -I(Q) to be returned. That is, rather than a single property returning an -array of the I(Q)’s that would then be indexed, users may directly name -an intermediate I(Q) (say, the first I(Q)) via a statement such as -PDFGetter.iq_0.

  • -
-

Fixed:

-
    -
  • Restored previous API behavior of PDFGetter.iq returning the I(Q) plot -of the data. Since there are now multiple I(Q) plots (one after each -subsequent background subtraction), this property now returns the final -I(Q) data (i.e., the result of applying all background subtractions).

  • -
  • Fixed formatting of authors list on PDFgetXNS3_manual.pdf cover page.

  • -
-
-
-

2.2.0

-

Added:

-
    -
  • Support for Python 3.10

  • -
  • Support for Python 3.9

  • -
  • Unittests for testing CLI functionality.

  • -
  • Tutorial example for multiple background subtractions (see -diffpy.pdfgetx/docs/examples/Multiple_Background_Subtraction).

  • -
  • New functionality for allowing multiple backgrounds to be subtracted from a -dataset accessed via using the plural name equivalent of any previously -singularly named variable (i.e., bgscalebgscales, -backgroundfilebackgroundfiles, etc.) in both static config files -(i.e., *.cfg) and interactive plotting sessions. Each set of parameters -corresponding to a given background subtraction can also be manipulated by -a set of sliders present in the tuneconfig window of an interactive shell -session. In total, the multiple background subtraction functionality should -work identically to the previous single background subtraction functionality -except that the multiple background files and initial scale values cannot -be specified through a pure CLI command (i.e., it must be specified either in -a config file or added/modified during an interactive plotting session).

  • -
  • Added extra test cases for testing the PDFGetter class.

  • -
  • Added extra test cases for testing the PDFConfig class.

  • -
-

Changed:

-
    -
  • Changed python versions specified in requirements.txt files to be in the range -of the respective minor version rather than fixed to the Python X.Y.0 version.

  • -
  • Python version support policy now follows NEP 29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>.

  • -
  • Changed versions used in conda-recipe/build.sh to reflect currently supported -Python versions.

  • -
  • Changed Sphinx dependency m2r to m2r2.

  • -
  • Added Connor J. Bracy and Zach Thatcher to contributors in AUTHORS.rst.

  • -
  • Added Connor J. Bracy to internal authors list and PDFgetXNS3_manual.pdf.

  • -
-

Removed:

-
    -
  • Removed support for Python 3.5 and 3.6.

  • -
-
-
-

2.1.2

-

Fixed:

-
    -
  • Fixed the command provided to the users in the installation instructions which -incorrectly instructed them to setup a Python environment in which pdfgetx -could be installed by using the flag –python=3.8 to the correct usage of -this flag as python=3.8.

  • -
-
-
-

2.1.1

-

Added:

-
    -
  • Support for Python 3.8

  • -
-
-
-

2.1.0

-

Added:

-
    -
  • New mode sas for processing Small Angle Scattering data and for using custom -scattering factors.

  • -
  • qmax-pushes-qmin coupling of sliders in the tuneconfig tool.

  • -
  • New program pdfgets3 and IPython magic %pdfgets3.

  • -
-

Changed:

-
    -
  • Software distribution format to a universal Python wheel.

  • -
  • tuneconfig dialog to access full Q-range with all qmin, qmax, and qmaxinst -sliders. Increased range for the rpoly slider.

  • -
-

Deprecated:

-
    -
  • Software distribution in setuptools egg package.

  • -
-

Removed:

-
    -
  • Removed support for Python 3.4.

  • -
-

Fixed:

-
    -
  • Support backslash in the –find option path argument on Windows. -Both forward and back slashes are allowed on Windows, but other -platforms must use forward slash.

  • -
  • Recipe for platform-dependent Anaconda package.

  • -
  • Bogus test failure when installed in symlinked directory.

  • -
-
-
-

2.0.0

-

Added:

-
    -
  • New mode neutron for processing constant-wavelength neutron scattering data.

  • -
  • Correction for an offset of diffractometer zero angle.

  • -
  • Configuration parameter twothetazero and command-line option –twothetazero -for position of the actual zero angle in diffractometer degrees.

  • -
  • New program pdfgetn3 and IPython magic %pdfgetn3.

  • -
  • Separate configuration file pdfgetn3.cfg for the pdfgetn3 program.

  • -
  • New sub-package diffpy.pdfgetx.apps for entry points to all programs.

  • -
  • Table of electron scattering factors from E. J. Kirkland, Advanced Computing in -Electron Microscopy.

  • -
  • The + operator for additive pattern groups when matching input files with -pdfgetx3 –find.

  • -
  • An optional slash-containing entry, e.g., dir/, to set the search path for -pdfgetx3 –find. Each pattern group may have one path entry which affects -the current and subsequent pattern groups. Pattern groups that have only the -path entry reuse the previous file patterns, for example, dir1/ .dat$ + dir2/ + dir3/.

  • -
  • The dotfiles flag argument to functs.findfiles to also find dot-starting files -without an explicit pattern.

  • -
  • Support for Python 3.7.

  • -
  • Tutorial examples for constant-wavelength neutron diffraction data.

  • -
-

Changed:

-
    -
  • Initialization arguments of PDFConfig to set initial configuration values.

  • -
  • path argument of functs.findfiles to give one search path instead of a list of paths.

  • -
  • pdfgetx3 –find to search only the current directory and stop searching in –datapath.

  • -
  • Improved PDF accuracy by removing repeated Q-grid interpolation.

  • -
  • Handling of dot files by pdfgetx3 –find and the functs.findfiles function. The -dotfiles are by default ignored unless explicitly selected by a “^.” pattern.

  • -
  • Return type of functs.findfiles from IPython SList to a simple list.

  • -
  • Rename camel-case interactive functions to lowercase, i.e., loaddata, processfiles, clearsession.

  • -
  • Use config.datapath lookup in processfiles(filename).

  • -
-

Deprecated:

-
    -
  • Function cromermann.felectronatq for electron scattering factors calculation using -Mott-Bethe approximate formula.

  • -
  • IPython extension module diffpy.pdfgetx.ipy_pdfgetx3. Use diffpy.pdfgetx.ipy_magics instead.

  • -
  • Camel-case functions loadData, processFiles, clearSession.

  • -
-

Removed:

-
    -
  • Support for Python 2.6.

  • -
  • Processing of environment variable PDFGETX3PATH.

  • -
  • Support for IPython 0.x.

  • -
  • Obsolete variable __gitsha__ from the version module.

  • -
  • Processing of command-line options in PDFConfig class.

  • -
  • Implicit loading of configuration files in PDFConfig instantiation.

  • -
-

Fixed:

-
    -
  • Import of all objects from matplotlib.pyplot into an interactive session started by plotdata.

  • -
  • Inaccurate G interpolation when rstep is comparable to pi / qmax.

  • -
  • Lone anchor patterns ^, $ to match everything.

  • -
-
-
-

1.2

-

Added:

-
    -
  • Support for Python 3.4, 3.5, 3.6 in addition to Python 2.6 and 2.7.

  • -
  • Support for IPython 5.0 <https://ipython.org> with preserved compatibility with -IPython 0.10 and later.

  • -
  • Support for matplotlib 2.0 <https://matplotlib.org>.

  • -
  • New option –log=LOG for the plotdata program to set logarithmic scale for either -of x or y axis. The plotdata() function learnt a new log argument with the same purpose.

  • -
  • New argument ax for the plotdata() function that select a specific matplotlib axis for plotting.

  • -
  • Support for Unicode filenames and values in the config interactive variable.

  • -
  • Processing of parentheses and fractional stoichiometries in chemical formulas as in -Pb (Ti Zr)1/2 O3.

  • -
  • Explanatory error message when PDFgetX3 was installed for unsupported Python.

  • -
-

Changed:

-
    -
  • The egg package file was enhanced to support all Python versions. The software is now -distributed in a single egg rather than multiple eggs per each Python version.

  • -
  • PDFgetX3 option –force to take a boolean argument (yes, no, true, etc.) or -once. The configuration parameter force can be likewise set to a bool or to a string -“once”. This enables a safer one-time overwrite of existing output files.

  • -
  • Plot labels to use a proper Unicode “Å” (Ångström) symbols. The “Å” symbol is also used within -units in output files.

  • -
  • The usecols argument of the loadData() function to also accept scalars, open-end slice -objects and string-denoted slices such as “1:3” or “1:”.

  • -
  • The plotdata program and plotdata() function to accept open-end slices for the y-columns selection.

  • -
  • The IPython magic function %pdfgetx3 to set the _exit_code variable as do generic shell commands run from IPython.

  • -
  • Inline documentation to use NumPy-style Napoleon format, which is human readable and can be included in the manual.

  • -
  • Release scripts to build software package bundles and documentation in binary-reproducible way.

  • -
-

Deprecated:

-
    -
  • Compatibility with Python 2.6.

  • -
  • Support for IPython 0.x.

  • -
  • Variable __gitsha__ in the version module which was renamed to __git_commit__.

  • -
-

Removed:

-
    -
  • The hold argument of the plotdata() function, because it was deprecated in matplotlib.

  • -
  • Support for multiple x-columns in plotdata program and plotdata() function.

  • -
  • Import of all objects from numpy module into the interactive session. NumPy is available under the np name instead.

  • -
-

Fixed:

-
    -
  • Avoid duplicate “.gr.gr” extension when pdfgetx3 is run with option –output=f.gr.

  • -
  • Crash on loading custom configuration section from a local file, when that section is missing in global configuration.

  • -
  • Missing checkbox in the tuneconfig dialog caused by matplotlib bug.

  • -
-
-
- - -
-
-
- -
- -
-

© Copyright 2025, 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/static_root/doc/pdfgetx/2.4.0/search.html b/static_root/doc/pdfgetx/2.4.0/search.html deleted file mode 100644 index d25a9602..00000000 --- a/static_root/doc/pdfgetx/2.4.0/search.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - Search — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
-
    -
  • - -
  • -
  • -
-
-
-
-
- - - - -
- -
- -
-
-
- -
- -
-

© Copyright 2025, 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/static_root/doc/pdfgetx/2.4.0/searchindex.js b/static_root/doc/pdfgetx/2.4.0/searchindex.js deleted file mode 100644 index be753a57..00000000 --- a/static_root/doc/pdfgetx/2.4.0/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({"alltitles":{"1.2":[[8,"id11"]],"2.0.0":[[8,"id10"]],"2.1.0":[[8,"id9"]],"2.1.1":[[8,"id8"]],"2.1.2":[[8,"id7"]],"2.2.0":[[8,"id6"]],"2.2.1":[[8,"id5"]],"2.2.2":[[8,"id4"]],"2.3.0":[[8,"id2"]],"2.4.0":[[8,"id1"]],"Authors":[[4,"authors"]],"Configuration file":[[0,"configuration-file"]],"Configuration file options":[[5,"configuration-file-options"]],"Examples":[[6,"examples"]],"Files used in PDF extraction":[[0,null]],"Fit twothetazero":[[9,"fit-twothetazero"]],"IPython magic command":[[2,"ipython-magic-command"]],"Indices":[[1,"indices"]],"Input and output options":[[5,"input-and-output-options"]],"Input files":[[0,"input-files"]],"Installation":[[2,null],[2,"id1"]],"Interactive Multiple Background Subtraction":[[9,"interactive-multiple-background-subtraction"]],"Interactive mode":[[3,null]],"Interactive tuning of parameters":[[9,"interactive-tuning-of-parameters"]],"Introduction":[[4,null]],"License notice":[[4,"license-notice"]],"Multiple Background Subtraction":[[9,"multiple-background-subtraction"]],"Neutron PDF":[[9,"neutron-pdf"]],"Nickel X-ray PDF":[[9,"nickel-x-ray-pdf"]],"Options and parameters":[[5,null]],"Other parameters":[[5,"other-parameters"]],"Output files":[[0,"output-files"]],"PDF parameters":[[5,"pdf-parameters"]],"Platinum X-ray series":[[9,"platinum-x-ray-series"]],"Predefined configuration file":[[9,"id1"]],"Program operation":[[5,"program-operation"]],"Quick-start guide":[[7,null]],"References":[[4,"references"]],"Release notes":[[8,null],[8,"id3"]],"Selecting files":[[6,"selecting-files"]],"Selecting x and y data":[[6,"selecting-x-and-y-data"]],"Small-angle-scattering PDF (sasPDF)":[[9,"small-angle-scattering-pdf-saspdf"]],"Software requirements":[[2,"software-requirements"]],"Table of contents":[[1,"table-of-contents"]],"The plotdata program":[[6,null]],"Tutorial":[[9,null]],"data search path":[[9,"data-search-path"]],"diffpy.pdfgetx":[[1,null]],"matching input files":[[9,"matching-input-files"]],"output file names":[[9,"output-file-names"]],"pdfgetn3 command":[[7,"pdfgetn3-command"]],"pdfgets3 command":[[7,"pdfgets3-command"]],"pdfgetx3 command":[[7,"pdfgetx3-command"]],"predefined configuration file":[[9,"predefined-configuration-file"]],"processing from scratch":[[9,"processing-from-scratch"]]},"docnames":["files","index","install","interact","intro","options","plotdata","quick-start","release","tutorial"],"envversion":{"sphinx":65,"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":["files.rst","index.rst","install.rst","interact.rst","intro.rst","options.rst","plotdata.rst","quick-start.rst","release.rst","tutorial.rst"],"indexentries":{"%pdfgetn3 ipython magic":[[2,"index-1",false]],"%pdfgets3 ipython magic":[[2,"index-2",false]],"%pdfgetx3 ipython magic":[[2,"index-0",false]],"--background":[[5,"cmdoption-pdfgetx3-b",false]],"--bgscale":[[5,"cmdoption-pdfgetx3-bgscale",false]],"--composition":[[5,"cmdoption-pdfgetx3-composition",false]],"--config":[[5,"cmdoption-pdfgetx3-c",false]],"--createconfig":[[5,"cmdoption-pdfgetx3-createconfig",false]],"--datapath":[[5,"cmdoption-pdfgetx3-d",false]],"--find":[[5,"cmdoption-pdfgetx3-f",false],[6,"cmdoption-plotdata-f",false]],"--force":[[5,"cmdoption-pdfgetx3-force",false]],"--format":[[5,"cmdoption-pdfgetx3-format",false]],"--formfactorfile":[[5,"cmdoption-pdfgetx3-ff",false]],"--help":[[5,"cmdoption-pdfgetx3-h",false],[6,"cmdoption-plotdata-h",false]],"--interact":[[5,"cmdoption-pdfgetx3-i",false]],"--list":[[5,"cmdoption-pdfgetx3-l",false],[6,"cmdoption-plotdata-l",false]],"--log":[[6,"cmdoption-plotdata-L",false]],"--manual":[[5,"cmdoption-pdfgetx3-manual",false],[6,"cmdoption-plotdata-manual",false]],"--mode":[[5,"cmdoption-pdfgetx3-mode",false]],"--output":[[5,"cmdoption-pdfgetx3-o",false]],"--outputtypes":[[5,"cmdoption-pdfgetx3-t",false]],"--plot":[[5,"cmdoption-pdfgetx3-p",false]],"--qmax":[[5,"cmdoption-pdfgetx3-qmax",false]],"--qmaxinst":[[5,"cmdoption-pdfgetx3-qmaxinst",false]],"--qmin":[[5,"cmdoption-pdfgetx3-qmin",false]],"--rmax":[[5,"cmdoption-pdfgetx3-rmax",false]],"--rmin":[[5,"cmdoption-pdfgetx3-rmin",false]],"--rpoly":[[5,"cmdoption-pdfgetx3-rpoly",false]],"--rstep":[[5,"cmdoption-pdfgetx3-rstep",false]],"--section":[[5,"cmdoption-pdfgetx3-s",false]],"--style":[[6,"cmdoption-plotdata-s",false]],"--terminationfunctions":[[5,"cmdoption-pdfgetx3-terminationfunctions",false]],"--twothetazero":[[5,"cmdoption-pdfgetx3-twothetazero",false]],"--verbose":[[5,"cmdoption-pdfgetx3-verbose",false]],"--version":[[5,"cmdoption-pdfgetx3-V",false],[6,"cmdoption-plotdata-V",false]],"--wavelength":[[5,"cmdoption-pdfgetx3-w",false]],"-b":[[5,"cmdoption-pdfgetx3-b",false]],"-c":[[5,"cmdoption-pdfgetx3-c",false]],"-d":[[5,"cmdoption-pdfgetx3-d",false]],"-f":[[5,"cmdoption-pdfgetx3-f",false],[6,"cmdoption-plotdata-f",false]],"-ff":[[5,"cmdoption-pdfgetx3-ff",false]],"-h":[[5,"cmdoption-pdfgetx3-h",false],[6,"cmdoption-plotdata-h",false]],"-i":[[5,"cmdoption-pdfgetx3-i",false]],"-l":[[5,"cmdoption-pdfgetx3-l",false],[6,"cmdoption-plotdata-L",false],[6,"cmdoption-plotdata-l",false]],"-o":[[5,"cmdoption-pdfgetx3-o",false]],"-p":[[5,"cmdoption-pdfgetx3-p",false]],"-s":[[5,"cmdoption-pdfgetx3-s",false],[6,"cmdoption-plotdata-s",false]],"-t":[[5,"cmdoption-pdfgetx3-t",false]],"-v":[[5,"cmdoption-pdfgetx3-V",false],[6,"cmdoption-plotdata-V",false]],"-w":[[5,"cmdoption-pdfgetx3-w",false]],"-x":[[6,"cmdoption-plotdata-x",false]],"-y":[[6,"cmdoption-plotdata-y",false]],"authors":[[4,"index-1",false]],"backgroundfile (configuration value)":[[5,"confval-backgroundfile",false]],"bgscale (configuration value)":[[5,"confval-bgscale",false]],"citations":[[4,"index-2",false]],"clearsession() (in module _interactive_)":[[3,"interactive_.clearsession",false]],"composition (configuration value)":[[5,"confval-composition",false]],"config (interactive variable)":[[3,"interactvar-config",false]],"dataformat (configuration value)":[[5,"confval-dataformat",false]],"datapath (configuration value)":[[5,"confval-datapath",false]],"example files":[[9,"index-0",false]],"examples":[[9,"index-1",false]],"findfiles() (in module diffpy.pdfgetx)":[[3,"diffpy.pdfgetx.findfiles",false]],"force (configuration value)":[[5,"confval-force",false]],"formfactorfile (configuration value)":[[5,"confval-formfactorfile",false]],"fq (interactive variable)":[[3,"interactvar-fq",false]],"gr (interactive variable)":[[3,"interactvar-gr",false]],"inputfile (configuration value)":[[5,"confval-inputfile",false]],"interact (configuration value)":[[5,"confval-interact",false]],"iq (interactive variable)":[[3,"interactvar-iq",false]],"iraw (interactive variable)":[[3,"interactvar-iraw",false]],"license":[[4,"index-0",false]],"loaddata() (in module diffpy.pdfgetx)":[[3,"diffpy.pdfgetx.loaddata",false]],"mode (configuration value)":[[5,"confval-mode",false]],"output (configuration value)":[[5,"confval-output",false]],"outputtypes (configuration value)":[[5,"confval-outputtypes",false]],"pdfgetn3 (program)":[[7,"index-1",false]],"pdfgets3 (program)":[[7,"index-2",false]],"pdfgetter() (in module _interactive_)":[[3,"interactive_.pdfgetter",false]],"pdfgetx3 (program)":[[7,"index-0",false]],"pdfgetx3 command line option":[[5,"cmdoption-pdfgetx3-V",false],[5,"cmdoption-pdfgetx3-b",false],[5,"cmdoption-pdfgetx3-bgscale",false],[5,"cmdoption-pdfgetx3-c",false],[5,"cmdoption-pdfgetx3-composition",false],[5,"cmdoption-pdfgetx3-createconfig",false],[5,"cmdoption-pdfgetx3-d",false],[5,"cmdoption-pdfgetx3-f",false],[5,"cmdoption-pdfgetx3-ff",false],[5,"cmdoption-pdfgetx3-force",false],[5,"cmdoption-pdfgetx3-format",false],[5,"cmdoption-pdfgetx3-h",false],[5,"cmdoption-pdfgetx3-i",false],[5,"cmdoption-pdfgetx3-l",false],[5,"cmdoption-pdfgetx3-manual",false],[5,"cmdoption-pdfgetx3-mode",false],[5,"cmdoption-pdfgetx3-o",false],[5,"cmdoption-pdfgetx3-p",false],[5,"cmdoption-pdfgetx3-qmax",false],[5,"cmdoption-pdfgetx3-qmaxinst",false],[5,"cmdoption-pdfgetx3-qmin",false],[5,"cmdoption-pdfgetx3-rmax",false],[5,"cmdoption-pdfgetx3-rmin",false],[5,"cmdoption-pdfgetx3-rpoly",false],[5,"cmdoption-pdfgetx3-rstep",false],[5,"cmdoption-pdfgetx3-s",false],[5,"cmdoption-pdfgetx3-t",false],[5,"cmdoption-pdfgetx3-terminationfunctions",false],[5,"cmdoption-pdfgetx3-twothetazero",false],[5,"cmdoption-pdfgetx3-verbose",false],[5,"cmdoption-pdfgetx3-w",false]],"plot (configuration value)":[[5,"confval-plot",false]],"plotdata (program)":[[6,"index-0",false]],"plotdata command line option":[[6,"cmdoption-plotdata-L",false],[6,"cmdoption-plotdata-V",false],[6,"cmdoption-plotdata-f",false],[6,"cmdoption-plotdata-h",false],[6,"cmdoption-plotdata-l",false],[6,"cmdoption-plotdata-manual",false],[6,"cmdoption-plotdata-s",false],[6,"cmdoption-plotdata-x",false],[6,"cmdoption-plotdata-y",false]],"plotdata() (in module diffpy.pdfgetx.plotdata)":[[3,"diffpy.pdfgetx.plotdata.plotdata",false]],"processfiles() (in module _interactive_)":[[3,"interactive_.processfiles",false]],"qmax (configuration value)":[[5,"confval-qmax",false]],"qmaxinst (configuration value)":[[5,"confval-qmaxinst",false]],"qmin (configuration value)":[[5,"confval-qmin",false]],"references":[[4,"index-2",false]],"release notes":[[8,"index-0",false]],"rmax (configuration value)":[[5,"confval-rmax",false]],"rmin (configuration value)":[[5,"confval-rmin",false]],"rpoly (configuration value)":[[5,"confval-rpoly",false]],"rstep (configuration value)":[[5,"confval-rstep",false]],"sq (interactive variable)":[[3,"interactvar-sq",false]],"terminationfunctions (configuration value)":[[5,"confval-terminationfunctions",false]],"tuneconfig (example)":[[9,"index-2",false]],"tuneconfig() (in module _interactive_)":[[3,"interactive_.tuneconfig",false]],"twothetazero (configuration value)":[[5,"confval-twothetazero",false]],"verbose (configuration value)":[[5,"confval-verbose",false]],"wavelength (configuration value)":[[5,"confval-wavelength",false]]},"objects":{"":[[5,1,1,"-","backgroundfile"],[5,1,1,"-","bgscale"],[5,1,1,"-","composition"],[3,2,1,"-","config"],[5,1,1,"-","dataformat"],[5,1,1,"-","datapath"],[5,1,1,"-","force"],[5,1,1,"-","formfactorfile"],[3,2,1,"-","fq"],[3,2,1,"-","gr"],[5,1,1,"-","inputfile"],[5,1,1,"-","interact"],[3,2,1,"-","iq"],[3,2,1,"-","iraw"],[5,1,1,"-","mode"],[5,1,1,"-","output"],[5,1,1,"-","outputtypes"],[5,1,1,"-","plot"],[5,1,1,"-","qmax"],[5,1,1,"-","qmaxinst"],[5,1,1,"-","qmin"],[5,1,1,"-","rmax"],[5,1,1,"-","rmin"],[5,1,1,"-","rpoly"],[5,1,1,"-","rstep"],[3,2,1,"-","sq"],[5,1,1,"-","terminationfunctions"],[5,1,1,"-","twothetazero"],[5,1,1,"-","verbose"],[5,1,1,"-","wavelength"]],"_interactive_":[[3,0,1,"interactive_.clearsession","clearsession"],[3,0,1,"interactive_.pdfgetter","pdfgetter"],[3,0,1,"interactive_.processfiles","processfiles"],[3,0,1,"interactive_.tuneconfig","tuneconfig"]],"diffpy.pdfgetx":[[3,0,1,"","findfiles"],[3,0,1,"","loaddata"]],"diffpy.pdfgetx.plotdata":[[3,0,1,"","plotdata"]],"pdfgetx3":[[5,3,1,"cmdoption-pdfgetx3-b","--background"],[5,3,1,"cmdoption-pdfgetx3-bgscale","--bgscale"],[5,3,1,"cmdoption-pdfgetx3-composition","--composition"],[5,3,1,"cmdoption-pdfgetx3-c","--config"],[5,3,1,"cmdoption-pdfgetx3-createconfig","--createconfig"],[5,3,1,"cmdoption-pdfgetx3-d","--datapath"],[5,3,1,"cmdoption-pdfgetx3-f","--find"],[5,3,1,"cmdoption-pdfgetx3-force","--force"],[5,3,1,"cmdoption-pdfgetx3-format","--format"],[5,3,1,"cmdoption-pdfgetx3-ff","--formfactorfile"],[5,3,1,"cmdoption-pdfgetx3-h","--help"],[5,3,1,"cmdoption-pdfgetx3-i","--interact"],[5,3,1,"cmdoption-pdfgetx3-l","--list"],[5,3,1,"cmdoption-pdfgetx3-manual","--manual"],[5,3,1,"cmdoption-pdfgetx3-mode","--mode"],[5,3,1,"cmdoption-pdfgetx3-o","--output"],[5,3,1,"cmdoption-pdfgetx3-t","--outputtypes"],[5,3,1,"cmdoption-pdfgetx3-p","--plot"],[5,3,1,"cmdoption-pdfgetx3-qmax","--qmax"],[5,3,1,"cmdoption-pdfgetx3-qmaxinst","--qmaxinst"],[5,3,1,"cmdoption-pdfgetx3-qmin","--qmin"],[5,3,1,"cmdoption-pdfgetx3-rmax","--rmax"],[5,3,1,"cmdoption-pdfgetx3-rmin","--rmin"],[5,3,1,"cmdoption-pdfgetx3-rpoly","--rpoly"],[5,3,1,"cmdoption-pdfgetx3-rstep","--rstep"],[5,3,1,"cmdoption-pdfgetx3-s","--section"],[5,3,1,"cmdoption-pdfgetx3-terminationfunctions","--terminationfunctions"],[5,3,1,"cmdoption-pdfgetx3-twothetazero","--twothetazero"],[5,3,1,"cmdoption-pdfgetx3-verbose","--verbose"],[5,3,1,"cmdoption-pdfgetx3-V","--version"],[5,3,1,"cmdoption-pdfgetx3-w","--wavelength"],[5,3,1,"cmdoption-pdfgetx3-V","-V"],[5,3,1,"cmdoption-pdfgetx3-b","-b"],[5,3,1,"cmdoption-pdfgetx3-c","-c"],[5,3,1,"cmdoption-pdfgetx3-d","-d"],[5,3,1,"cmdoption-pdfgetx3-f","-f"],[5,3,1,"cmdoption-pdfgetx3-ff","-ff"],[5,3,1,"cmdoption-pdfgetx3-h","-h"],[5,3,1,"cmdoption-pdfgetx3-i","-i"],[5,3,1,"cmdoption-pdfgetx3-l","-l"],[5,3,1,"cmdoption-pdfgetx3-o","-o"],[5,3,1,"cmdoption-pdfgetx3-p","-p"],[5,3,1,"cmdoption-pdfgetx3-s","-s"],[5,3,1,"cmdoption-pdfgetx3-t","-t"],[5,3,1,"cmdoption-pdfgetx3-w","-w"]],"plotdata":[[6,3,1,"cmdoption-plotdata-f","--find"],[6,3,1,"cmdoption-plotdata-h","--help"],[6,3,1,"cmdoption-plotdata-l","--list"],[6,3,1,"cmdoption-plotdata-L","--log"],[6,3,1,"cmdoption-plotdata-manual","--manual"],[6,3,1,"cmdoption-plotdata-s","--style"],[6,3,1,"cmdoption-plotdata-V","--version"],[6,3,1,"cmdoption-plotdata-L","-L"],[6,3,1,"cmdoption-plotdata-V","-V"],[6,3,1,"cmdoption-plotdata-f","-f"],[6,3,1,"cmdoption-plotdata-h","-h"],[6,3,1,"cmdoption-plotdata-l","-l"],[6,3,1,"cmdoption-plotdata-s","-s"],[6,3,1,"cmdoption-plotdata-x","-x"],[6,3,1,"cmdoption-plotdata-y","-y"]]},"objnames":{"0":["py","function","Python function"],"1":["std","confval","configuration value"],"2":["std","interactvar","interactive variable"],"3":["std","cmdoption","program option"]},"objtypes":{"0":"py:function","1":"std:confval","2":"std:interactvar","3":"std:cmdoption"},"terms":{"":[0,2,3,4,5,6,7,8,9],"0":[1,3,5,6,7,9],"00":7,"00000":9,"0000000e":7,"0001946e":7,"00032":9,"0003892e":7,"00055":[7,9],"0011677e":7,"0029":8,"00903":9,"00903_qmax18":9,"00904":9,"00905":9,"00906":9,"00907":9,"00908":9,"01":[7,9],"02":7,"05":9,"072":9,"075":9,"0865680161":9,"095":9,"097":9,"0989":9,"0x3e20f50":9,"1":[0,1,2,3,5,6,7,9],"10":[3,8],"100":[3,9],"11":[2,8,9],"12":[2,8,9],"13":[2,6,8,9],"14":9,"142774":[7,9],"1465":7,"15":[1,9],"16":[6,9],"17":9,"18":[3,9],"2":[0,1,5,6,7,9],"20":[3,6,9],"2008":9,"2009":4,"2013":4,"2018":4,"2025":[1,4],"21":3,"22":9,"240":9,"26":9,"27":[6,9],"28":9,"29":[8,9],"2\u03b8":[0,2,3,5,6,7,9],"3":[1,2,5,6,9],"30":9,"3000":9,"34":3,"36":9,"38":9,"3_copi":9,"4":[1,3,6,9],"4002724e":7,"451":9,"46":4,"5":[5,6,8,9],"5000":9,"51":4,"549":9,"560":4,"566":4,"5o3":5,"5zr0":5,"6":[6,7,8,9],"605":9,"64":6,"6id":9,"7":[3,5,8,9],"8":[6,8,9],"8003502e":7,"9":[5,6,8],"900":9,"903":9,"905":9,"908":9,"910":9,"947":9,"A":[3,4,5,7,9],"At":9,"By":[0,3,5,6,9],"For":[2,3,4,5,6,7,9],"If":[0,2,4,9],"In":[2,3,4,5,6,7,8,9],"It":[2,3,5,6],"No":[1,3,5],"On":2,"One":[3,5,9],"Such":9,"That":8,"The":[0,1,2,3,4,5,7,8,9],"Then":2,"There":[2,9],"These":[2,3],"To":[2,7,9],"With":9,"__git_commit__":8,"__gitsha__":8,"_exit_cod":8,"_interactive_":3,"_qmax18":9,"abbrevi":9,"abil":9,"about":[5,7,9],"abov":[2,3,9],"accept":[0,5,8,9],"access":[0,2,8],"accomplish":[2,9],"accord":[3,9],"accur":9,"accuraci":8,"acknowledg":4,"action":[5,9],"activ":[0,2,3,7,9],"actual":[0,2,8],"ad":[3,4,8],"add":[2,5,9],"addit":[0,2,3,4,5,8,9],"adjust":[4,9],"advanc":[8,9],"affect":[8,9],"after":[0,5,6,8,9],"again":[3,9],"agre":2,"agreement":4,"al":9,"al2o3":9,"alia":5,"all":[0,2,3,5,6,7,8,9],"allow":[3,4,5,6,8,9],"alon":6,"alreadi":[2,5,9],"also":[0,2,3,4,5,6,7,8,9],"altern":2,"although":7,"alwai":5,"an":[0,2,3,4,5,6,7,8,9],"anaconda":[2,8,9],"analysi":4,"anchor":8,"angl":[0,1,4,5,7,8],"angular":9,"ani":[0,2,3,4,5,7,8,9],"anoth":[2,9],"anticip":4,"anywher":9,"apart":7,"api":8,"app":8,"appear":[1,5,9],"append":5,"appl":4,"appli":[0,3,5,8,9],"applic":7,"approxim":[8,9],"apt":2,"ar":[0,2,3,4,5,6,7,8,9],"arbitrari":9,"area":9,"argument":[0,2,3,5,6,7,8,9],"arrai":[3,8],"ask":4,"assembli":[4,9],"assess":9,"assign":[3,5,7],"assum":[5,6,7],"atom":[4,5],"attempt":0,"attribut":[3,5,9],"au":9,"au_dna_ff":9,"au_dna_npa":9,"author":[1,8],"auto":6,"automat":[4,7,9],"avail":[2,5,6,8,9],"averag":[0,9],"avoid":[8,9],"ax":[3,6,8,9],"axeslist":[3,9],"axi":[3,8,9],"b":[5,9],"b_qmax18":9,"back":8,"background":[0,1,5,8],"backgroundfil":[0,5,8,9],"backslash":8,"base":[3,8,9],"basenam":5,"batch":4,"batio3":9,"beamlin":9,"becaus":[3,6,8,9],"been":[5,7,8,9],"befor":5,"begin":[3,5,9],"behavior":[5,7,8],"being":[5,7,8,9],"below":9,"best":7,"beth":8,"better":9,"between":[5,7],"bg":8,"bgscale":[5,8,9],"billing":4,"binari":8,"block":3,"blue":9,"bogu":8,"bool":[3,5,8],"boolean":8,"both":[3,7,8,9],"bound":[5,9],"boundari":[5,7,9],"box":9,"brace":7,"braci":[4,8],"break":9,"breakpoint":9,"brief":[5,6,7],"brookhaven":4,"browser":[5,6],"bug":8,"build":8,"built":9,"bulk":9,"bundl":[4,8],"button":9,"c":[0,2,4,5,7,8,9],"calcul":[0,3,5,7,8,9],"calibr":9,"call":[3,6,9],"callabl":3,"camel":8,"can":[0,2,3,4,5,6,7,8,9],"cannot":[6,8,9],"canopi":2,"canva":8,"cap":9,"capabl":[6,7],"capillari":9,"carri":9,"case":[5,6,8,9],"catio3":5,"caus":[5,8,9],"cell":9,"ceo2":9,"cfg":[0,7,8,9],"ch":4,"ch2":5,"ch3":5,"chain":9,"chang":[0,3,8,9],"charact":[3,5,7,9],"check":[0,2,6,7,8,9],"checkbox":8,"chemic":[0,5,7,8,9],"chi":[5,7,9],"chia":4,"choos":2,"christoph":4,"circl":9,"cite":4,"citi":4,"class":[3,8],"clear":[3,5,9],"clearsess":[1,3,8,9],"clf":9,"cli":[5,8],"click":9,"close":9,"closer":5,"cmi":9,"co":6,"code":[2,4,8,9],"colloid":9,"columbia":[2,4,9],"column":[0,2,3,5,6,7,8,9],"combin":6,"comma":[3,5,6,9],"command":[0,1,3,4,5,6,8,9],"comment":[0,7],"commit":8,"compar":[8,9],"compat":8,"complain":9,"complet":[5,9],"compon":5,"composit":[0,5,7,9],"comprehens":2,"comput":[2,8],"conda":[2,8,9],"conduct":9,"config":[0,3,5,7,8,9],"config_neutron":9,"config_sa":9,"config_xrai":9,"configfil":9,"configsect":9,"configur":[1,3,7,8],"confirm":9,"conjunct":6,"connor":[4,8],"consid":3,"consist":7,"constant":[3,4,5,8,9],"contact":4,"contain":[0,2,3,5,6,7,8,9],"content":[0,7,9],"continu":9,"contributor":8,"control":[4,5,6,9],"conveni":[2,3,6,7],"convent":[6,8],"convers":[2,5],"convert":[3,4,5,9],"copi":[8,9],"copyright":4,"correct":[0,1,4,5,8,9],"correctli":[2,7,9],"correspond":[0,3,5,7,8,9],"could":[6,8],"count":5,"counterpart":7,"coupl":8,"cours":2,"cover":[5,8,9],"coveragerc":8,"crash":8,"creat":[0,2,3,5,7,9],"createconfig":[0,5,7],"critic":[2,7],"cromermann":8,"crystallogr":4,"cube":6,"current":[0,3,5,6,8,9],"curv":[5,7,9],"custom":[2,4,5,8,9],"cutoff":[5,7,9],"cython":8,"d":[0,4,5,9],"dash":[5,7],"dat":[5,6,8,9],"data":[0,1,2,3,4,5,7,8],"datafil":[3,5],"dataformat":[0,3,5,7,9],"datapath":[0,5,8,9],"dataset":[8,9],"davi":4,"debug":5,"decai":5,"decemb":1,"dedic":9,"default":[0,3,5,6,7,8,9],"defin":[0,2,3,5,7,9],"definit":5,"degre":[0,5,7,8,9],"delft":9,"demonstr":[7,9],"denot":[7,8],"depend":[2,3,8],"deprec":8,"deprecation_polici":8,"der":9,"describ":[7,9],"descript":[5,7,8],"design":9,"desir":[2,3,9],"detail":[5,6,9],"detector":[5,9],"diagnost":5,"dialog":[3,8,9],"did":9,"differ":[0,2,5,7,9],"difficult":9,"diffpi":[2,3,4,6,8,9],"diffract":[0,3,4,5,7,8,9],"diffractomet":[5,8,9],"dir":[3,8],"dir1":[5,8],"dir2":[5,8],"dir3":8,"directli":8,"directori":[0,2,3,5,6,7,8,9],"disabl":5,"discuss":9,"disk":3,"displai":[2,3,5,6,7,9],"distribut":[2,4,8],"dna":9,"do":[2,3,5,6,8,9],"doc":8,"document":[6,7,8,9],"doe":[2,3,7,9],"don":[2,4],"done":[6,9],"dot":8,"dotfil":[3,8],"doubl":[5,6,7],"download":2,"driven":[2,9],"drop":9,"duplic":[8,9],"dure":8,"dynam":9,"e":[2,3,4,5,6,7,8,9],"each":[0,3,5,8,9],"easi":[2,9],"easiest":[0,2],"easy_instal":2,"editor":[0,2,7],"edu":4,"effect":[3,4,5,9],"egg":[2,8],"eijck":4,"either":[0,3,5,7,8,9],"elaps":9,"electron":8,"element":[3,5,9],"email":4,"employ":4,"empti":[3,5,9],"empty_capillari":9,"enabl":[7,8],"enclos":5,"encount":9,"encourag":6,"end":[3,5,8,9],"engin":2,"enhanc":[2,8],"enough":3,"enter":[7,9],"enthought":2,"entir":3,"entri":[3,5,8,9],"environ":[2,8,9],"equal":[0,3,5,7,9],"equival":[6,8,9],"erron":8,"error":[5,8,9],"essenti":[5,9],"etc":[3,8,9],"even":9,"everi":5,"everyth":8,"exact":9,"exampl":[0,1,2,3,5,7,8,9],"except":[0,8,9],"execut":[2,7,9],"exist":[2,5,8,9],"exit":[5,6,7,9],"expand":[5,9],"expans":6,"expect":[5,9],"experi":5,"experiment":9,"explanatori":8,"explicit":8,"explicitli":[3,5,7,8],"export":8,"extens":[2,5,8,9],"extra":[2,3,5,8,9],"extract":[1,4,9],"f":[0,2,3,5,6,7,8,9],"f007":5,"f2avg":5,"f7":5,"f77":5,"fact":9,"faction":9,"factor":[0,5,7,8,9],"failur":8,"fals":[3,5],"familiar":7,"farrow":4,"fashion":[2,7],"fast":9,"favg2":5,"favorit":0,"featur":[6,9],"felectronatq":8,"few":[0,7,9],"ff":5,"fft":9,"fig":9,"figur":9,"file":[1,2,3,4,7,8],"file1":6,"file10":6,"file11":6,"file12":6,"file13":6,"file2":6,"file20":6,"file9":6,"filenam":[0,2,3,5,6,7,8,9],"final":[2,5,7,8,9],"find":[0,2,3,5,6,8,9],"findfil":[0,1,2,3,5,6,7,8,9],"finish":9,"finit":5,"first":[0,2,3,5,6,7,8,9],"fit":[0,1,5],"fit2d":7,"fix":[5,8],"fl":6,"flag":[8,9],"fledg":9,"flexibl":5,"float":[3,5],"folder":9,"follow":[0,2,4,5,6,7,8,9],"forc":[3,5,8,9],"form":[0,5,7,9],"format":[2,3,5,6,7,8],"formfactorfil":[5,9],"formula":[5,8],"forward":[8,9],"found":[0,1,2,9],"four":0,"fourier":[5,7],"fq":[0,3,5,7,9],"fraction":[5,8],"frequenc":5,"fresh":9,"from":[0,2,3,4,5,6,7,8],"front":5,"full":[6,8,9],"fulli":9,"funct":8,"function":[0,3,4,5,6,7,8,9],"further":5,"g":[0,2,3,5,6,7,8,9],"gang":[4,9],"gca":3,"gener":[0,3,6,7,8,9],"get":[2,7,9],"get_atol":8,"get_atol_from_rtol":8,"gettransform":9,"gitarch":8,"gitattribut":8,"github":8,"give":[5,8],"given":[8,9],"global":[0,8],"go":9,"good":9,"gr":[0,3,5,7,8,9],"grant":4,"graph":[6,9],"greater":3,"green":9,"grid":[0,5,8,9],"group":[3,4,5,8,9],"gui":[2,3,9],"guid":1,"guifigur":8,"h":[5,6],"ha":[0,3,5,6,7,9],"had":9,"handl":[8,9],"hao":4,"happen":9,"hard":5,"hash":7,"have":[0,2,3,5,7,8,9],"header":[0,3,7,9],"headlin":6,"help":[5,6,7,9],"here":[2,5,6,7,9],"hidden":3,"higher":[3,5],"highli":4,"hint":9,"hoc":4,"hold":8,"holder":5,"home":[0,9],"how":9,"howev":[5,9],"html":8,"http":[2,8],"human":8,"hundr":9,"hung":4,"i":[0,2,3,4,5,6,7,8,9],"ident":[7,8],"identifi":[0,9],"ignor":[0,3,5,7,8,9],"illustr":9,"imag":8,"immedi":9,"impli":[7,9],"implicit":[6,8],"import":[3,5,6,8,9],"improv":8,"inaccur":[8,9],"inadvert":8,"includ":[2,3,4,6,7,8,9],"inclus":[3,5],"incorrectli":8,"increas":8,"inde":7,"indent":2,"index":[1,2,3,6,8,9],"indic":[3,6,9],"info":[5,6,7,9],"inform":[4,5,7],"initi":[3,6,8],"inlin":8,"input":[1,3,6,7,8],"input1":7,"input2":7,"inputfil":[0,3,5,9],"inputn":7,"instal":[1,7,8,9],"instanc":[3,8],"instanti":8,"instead":[2,6,7,8],"instruct":[2,8,9],"instrument":9,"int":3,"integ":[3,5,6,9],"integr":2,"intend":[2,5,6,7,9],"intens":[0,3,5,7,9],"intensity1":3,"intensity2":3,"interact":[1,2,4,5,6,7,8],"interactiveshellapp":2,"intermedi":[3,4,8,9],"intern":[8,9],"internet":2,"interpol":8,"interpret":[2,5],"intervent":4,"introduct":1,"invari":9,"invers":[0,5,7],"invok":6,"involv":9,"io":8,"ipi":8,"ipy_mag":[2,8],"ipy_pdfgetx3":8,"ipynb":9,"ipython":[1,3,5,6,7,8,9],"ipython3":2,"ipython_config":2,"iq":[0,3,5,8,9],"iq_":8,"iq_0":8,"iraw":[3,9],"issu":[8,9],"item":[3,5],"iter":[3,8],"its":[5,6,7,9],"itself":0,"j":[3,4,8],"jank":4,"join":7,"juh\u00e1":4,"jupyt":9,"just":[0,6,9],"k":3,"kapton":9,"kapton_bgrd_300k_nor_2":9,"keep":[3,6],"keyword":[3,9],"kirkland":8,"know":4,"known":9,"kwarg":3,"l":[4,5,6,9],"label":[6,8],"laboratori":4,"lack":9,"languag":2,"larg":[5,6,9],"larger":5,"last":[3,5,6,9],"later":8,"latest":8,"lead":[2,3,4,5,7],"learnt":8,"least":3,"left":5,"legaci":8,"legend":9,"leli":9,"let":9,"level":[3,5,8],"lf":9,"li":4,"librari":[2,4],"licens":1,"like":[2,6,9],"likewis":8,"limit":5,"line":[0,2,3,4,5,6,7,8,9],"line2d":[0,2,3,5,6,7,9],"linear":[3,6],"linux":[2,9],"list":[3,5,6,8,9],"liu":4,"live":9,"load":[3,5,6,7,8,9],"loaddata":[0,1,2,3,5,6,7,8,9],"loadtxt":3,"loc":9,"local":8,"locat":0,"log":[3,6,8],"logarithm":[3,6,8],"lone":8,"long":[0,7],"look":[3,7,9],"lookup":8,"lorch":[5,8],"lost":8,"louwen":4,"low":[3,9],"lower":[5,9],"lowercas":8,"m":[2,3,5,9],"m2r":8,"m2r2":8,"mac":[2,9],"made":9,"magic":[1,8],"mai":[0,2,3,5,6,7,8,9],"main":8,"make":[5,7,9],"makefil":8,"manag":[2,8],"mandatori":0,"mani":7,"manipul":[8,9],"manual":[1,5,6,7,8],"mark":[0,7],"marker":6,"match":[2,3,5,6,8],"materi":9,"matplotlib":[2,3,6,8,9],"matric":3,"matrix":[3,9],"max":[0,2,3,5,6,7,9],"maximum":[5,9],"may":9,"mean":9,"meaning":[5,7,9],"measur":[0,5,7,9],"member":4,"memori":3,"menthol":9,"merg":8,"messag":[5,8,9],"metadata":[0,7],"method":[3,9],"microscopi":8,"might":5,"mind":6,"minimum":3,"minor":8,"minrow":3,"misc":3,"miss":8,"mode":[1,2,4,5,7,8,9],"modifi":[6,7,8],"modul":[3,8],"momentum":[0,5,7,9],"more":[2,3,4,5,7,9],"most":[0,3,6,9],"mott":8,"move":9,"mpl":8,"multipl":[0,1,8],"multiple_background_subtract":[8,9],"must":[0,2,3,4,5,6,7,8],"n":[3,4,5,9],"nacl":0,"name":[0,2,3,5,6,7,8],"nanomet":[0,5,7],"nanoparticl":[4,9],"napoleon":8,"nation":4,"natur":9,"navig":[2,9],"nbcmi":9,"ndarrai":3,"nearli":7,"necessari":[2,3,5,9],"need":[0,2,5,6,9],"neg":3,"nep":8,"neutron":[1,4,5,7,8],"new":[3,4,5,8,9],"next":[2,9],"ni":9,"ni300mesh_300k_nor_1":9,"nickel":1,"nickel_sub_two_half_background":9,"nicmd":9,"nois":5,"noisi":[5,9],"non":[3,9],"none":[3,5,9],"nonzero":9,"normal":[0,5,9],"notabl":9,"note":[1,3,5,6,7,9],"notebook":9,"noth":9,"notic":[1,9],"now":[8,9],"np":8,"nsl":9,"null":9,"number":[3,5,9],"numer":[0,6,9],"numpi":[2,3,8],"nykypanchuk":9,"o":[4,5,9],"o3":8,"object":[3,5,8,9],"obsolet":8,"obtain":[2,9],"off":5,"offset":[5,8,9],"often":[5,7],"oh":5,"older":2,"oleg":9,"omit":5,"onc":[0,2,3,5,8,9],"one":[2,3,5,6,8,9],"ones":5,"onli":[0,3,4,5,6,7,8,9],"open":[2,5,6,7,8,9],"oper":[1,2,6,7,8],"optimum":4,"option":[0,1,2,3,6,7,8,9],"order":[5,7,9],"org":[2,8],"orient":2,"origin":9,"oscil":9,"other":[0,1,2,3,7,8,9],"otherwis":[2,5],"out":[5,6,9],"outpufil":9,"output":[1,3,7,8],"outputtyp":[0,5,9],"outsid":[5,9],"overal":9,"overlap":[5,9],"overrul":9,"overwrit":[5,8,9],"own":[5,9],"p":[4,5],"packag":[1,2,8],"page":[1,6,8],"pair":[3,4],"paper":4,"paragraph":2,"paramet":[0,1,3,4,7,8],"parenthes":[5,8],"pars":9,"part":[2,9],"parti":[2,4],"pass":[0,3,6,7,9],"patch":8,"path":[0,2,3,5,8],"pattern":[0,3,5,6,8,9],"pavol":4,"pb":[5,8],"pbti0":5,"pdf":[1,2,3,4,7,8],"pdfconfig":[3,8],"pdfgetn3":[0,1,2,3,4,5,8,9],"pdfgets3":[1,2,4,5,8,9],"pdfgetter":[1,3,5,8,9],"pdfgetx":[2,3,4,6,8,9],"pdfgetx2":[3,9],"pdfgetx3":[0,1,2,3,4,5,6,8,9],"pdfgetx3path":8,"pdfgetx_env":2,"pdfgetxappl":8,"pdfgetxns3_manu":8,"pearl":9,"per":[0,5,6,8,9],"perform":[3,9],"perman":2,"permit":[4,5],"permut":9,"photon":9,"pi":[5,8],"pip":[2,9],"place":[2,9],"plain":5,"plan":2,"platform":[8,9],"platinum":1,"pleas":[4,7],"plot":[0,2,3,4,5,6,7,8,9],"plotdata":[0,1,2,3,5,7,8,9],"plotid":3,"plotpdfcomparison":9,"plural":[8,9],"png":8,"point":[3,8,9],"polici":8,"polynomi":[0,5,9],"pop":9,"posit":[5,8],"possibl":5,"powder":[0,3,4,5,7,9],"power":[4,9],"pre":[3,6,8],"preced":[3,5,6,7],"prefer":7,"prefer_nodisplay_backend":8,"prefix":2,"preload":9,"prepend":[2,5],"prerequisit":9,"present":[5,7,8,9],"preserv":[2,8],"press":7,"previou":[0,3,8],"previous":[5,7,8],"print":[3,5,7,9],"privileg":2,"problem":9,"procedur":9,"process":[0,2,3,4,5,6,7,8],"processfil":[1,3,8,9],"produc":[0,3,5,6,9],"prof":[4,9],"profil":2,"profile_default":2,"program":[0,1,2,3,4,7,8,9],"prohibit":4,"prompt":[2,6,9],"proper":[5,8],"properti":8,"protocol":9,"provid":[0,2,5,6,8,9],"pt":9,"pt_bulk":[7,9],"pt_bulk_ramp03":9,"public":4,"publish":9,"pure":8,"purpos":8,"push":8,"put":9,"pwd":8,"py":[2,8,9],"py2":8,"pyplot":[3,6,8],"pyproject":8,"python":[1,2,4,5,6,8,9],"python3":2,"python37":2,"pythonxi":2,"q":[0,2,3,5,6,7,8,9],"qa":[5,9],"qmax":[3,5,7,8,9],"qmaxinst":[5,7,8,9],"qmin":[5,8,9],"qnm":5,"qualiti":9,"quick":1,"quot":[5,6,9],"r":[0,2,3,4,5,6,7,9],"radiat":[5,7],"rai":[1,4,5,7],"rang":[3,5,6,8,9],"rapid":4,"rather":8,"raw":[3,9],"read":[0,3,5],"readabl":8,"reappli":8,"reason":9,"recalcul":9,"recip":8,"recogn":[6,9],"recommend":[2,9],"red":9,"redo":[7,9],"reduc":[0,5,7,9],"refactor":8,"refer":[1,3,7,9],"referenc":7,"refin":9,"reflect":8,"regular":[0,9],"relat":[3,7,9],"releas":[1,2],"relev":9,"reliabl":9,"remark":9,"remov":[5,8,9],"renam":8,"repeat":[5,8],"replac":[2,8,9],"report":5,"repositori":2,"reproduc":[0,8],"requir":[1,5,7,8,9],"resampl":9,"rescal":9,"research":4,"reset":[3,5,9],"residu":9,"resolv":9,"respect":[3,4,7,8,9],"restor":8,"result":[0,3,4,5,7,8,9],"return":[3,8],"reus":[3,5,8,9],"right":7,"rippl":5,"rmax":[5,9],"rmin":[5,9],"root":2,"round":9,"row":[3,6,9],"rpoli":[5,8,9],"rst":8,"rstep":[5,8,9],"run":[2,4,7,8,9],"sa":[4,5,7,8,9],"safe":[2,9],"safer":8,"safeti":9,"sai":8,"same":[0,2,3,5,6,7,8,9],"sampl":[0,5,7,9],"sapphir":9,"sapphire755":9,"saspdf":[1,4],"satisfi":[3,8],"save":[3,5,6,7,9],"sb2896":4,"scalar":8,"scale":[3,5,6,8,9],"scan":[7,9],"scatter":[0,1,3,4,5,7,8],"scienc":2,"scientif":[2,4],"scikit":8,"screen":9,"script":[2,4,8],"sdist":8,"search":[0,1,2,3,5,6,7,8],"second":[0,3,6,7,9],"section":[0,2,5,6,7,8,9],"sectionnam":[0,5],"see":[2,5,6,8,9],"seem":[3,8],"select":[0,1,3,5,8,9],"selector":3,"self":[8,9],"separ":[0,3,4,5,6,7,8,9],"sequenc":3,"sequenti":3,"seri":[1,4],"serv":3,"session":[2,3,5,6,7,8,9],"set":[0,2,3,5,6,7,8,9],"set_window_titl":8,"setup":[5,8,9],"setuptool":[2,8],"sever":[0,3,5,6,9],"sh":8,"shall":9,"shape":9,"share":[0,9],"shell":[2,3,5,6,7,8,9],"short":7,"shortcut":9,"shorter":5,"should":[0,2,3,8,9],"show":[3,6,9],"si90ni10":9,"side":9,"sign":7,"signal":5,"similar":[2,6,7,9],"similarli":9,"simon":4,"simpl":[0,4,6,7,8,9],"simpli":9,"simul":9,"sin":[5,6],"sinc":[8,9],"sinco":6,"sine":3,"singl":[2,3,5,6,7,8,9],"singularli":8,"six":8,"skip":[2,3],"slash":[8,9],"slice":[3,8],"slider":[8,9],"slightli":9,"slist":8,"small":[1,4,5,7,8],"smaller":5,"smooth":5,"so":[2,6,7,9],"softwar":[1,4,6,7,8,9],"solid":0,"solut":9,"some":[2,5,9],"songsheng":4,"sourc":[3,8,9],"space":[0,5],"special":[3,5,6,9],"specif":[2,6,8,9],"specifi":[0,3,5,6,7,8,9],"specimen":5,"spectra":9,"sphinx":8,"split":3,"sq":[0,3,5,9],"squar":6,"sr":6,"stai":9,"stand":[6,7],"standard":[2,5,8,9],"start":[0,1,2,3,5,6,8,9],"state":9,"statement":[5,8,9],"static":8,"step":[2,5,6,7,8,9],"still":9,"stoichiometri":[5,8],"stop":[6,8],"store":[3,9],"str":3,"string":[2,3,5,7,8,9],"strip":9,"structur":[0,7,8],"style":[3,6,8],"stylesheet":8,"sub":8,"subdirectori":9,"subfold":9,"subject":4,"subplot":[3,9],"subsequ":[3,5,8,9],"substr":9,"subtract":[1,8],"successfulli":9,"sudden":9,"sudo":2,"suffici":3,"suffix":9,"suitabl":9,"summari":7,"suppli":7,"support":[0,2,3,5,6,8],"suppress":[5,8],"svgz":8,"symbol":[3,5,8],"symlink":8,"synapt":2,"syntax":[0,3,5,6,9],"system":[2,3,6,9],"t":[0,2,3,4,5,7,9],"t4":9,"tabl":8,"tail":5,"take":[3,7,8],"taken":[5,9],"talapin":4,"tao":4,"taper":5,"technologi":[2,9],"tell":7,"temperatur":9,"templat":[0,5],"tend":9,"termin":[2,5,9],"terminationfunct":[5,8],"terribl":9,"test":[0,2,8],"test_blank":9,"test_pdfgett":8,"text":[0,2,3,5,6,7,9],"than":[0,3,8,9],"thank":9,"thatcher":8,"thei":[0,2,3,5,6,9],"them":[0,3,4,5,6,7,8,9],"thereaft":9,"therefor":[2,5,7,9],"theta":7,"thi":[0,2,3,4,5,6,7,8,9],"third":2,"those":[2,3,9],"three":[2,4,5],"threshold":5,"through":[7,8],"thu":[0,2,6,7,9],"ti":[5,8],"tif":7,"time":[5,8,9],"timothi":4,"timur":4,"togeth":[6,9],"token":[5,9],"told":7,"toml":8,"too":5,"tool":[2,7,8],"top":9,"total":[0,4,8,9],"trail":5,"transfer":[0,5,7,9],"transform":[3,5,7,8,9],"transformbackground":9,"transformfqgrid":9,"transformfqtogr":9,"transformqgridregular":9,"transformsqnormrpoli":9,"transformsqtofq":9,"transformterminationfunct":8,"transformtwothetatoqa":9,"transformxrayasfnormchri":9,"translat":3,"transpos":3,"true":[3,5,8,9],"truncat":5,"truste":4,"try":[6,9],"tunabl":9,"tune":[1,3,4,5],"tuneconfig":[1,3,8,9],"tupl":3,"turn":[5,9],"tutori":[1,3,5,7,8],"two":[0,5,7,9],"twotheta":[5,7,9],"twotheta1":3,"twotheta2":3,"twothetazero":[1,5,8],"twothetazerofit":8,"txt":8,"type":[0,2,3,5,7,8,9],"typic":7,"u":9,"ubuntu":2,"uncorrect":9,"undefin":5,"under":[4,8,9],"understood":[0,9],"unexpect":5,"unicod":8,"uniqu":[5,6,9],"unit":[0,5,7,8],"unittest":8,"univers":[4,8,9],"unix":[2,5,9],"unless":[5,7,8,9],"unpack":3,"unreli":5,"unseemli":9,"unsupport":8,"unus":8,"up":[0,2,3,9],"updat":[3,7,8,9],"upon":9,"upper":[5,7],"us":[1,2,3,4,5,6,7,8,9],"usag":[5,6,8],"usecol":[3,8],"user":[0,1,2,4,5,6,7,8,9],"usual":[0,2,9],"util":[4,6],"utilis":4,"v":[4,5,6],"valid":[0,2,5,9],"valu":[0,3,4,5,6,7,8,9],"van":[4,9],"variabl":[2,3,6,8,9],"variant":5,"varnam":0,"ventur":2,"verbos":[5,7,9],"veri":[2,5,7,9],"verifi":[2,5,7,9],"version":[1,2,5,6,8,9],"via":[8,9],"virtual":[2,7],"visual":[4,9],"vogt":4,"vuong":4,"w":[5,9],"w0":7,"wa":[4,8,9],"wai":[0,2,6,7,8,9],"want":2,"warn":[5,8,9],"wavelength":[4,5,7,8,9],"we":[2,4,7,9],"web":[5,6],"well":[2,7,9],"were":[0,2,5,7,9],"what":[0,3,5,9],"wheel":[2,8],"when":[0,2,3,5,6,7,8,9],"where":[0,5,6,7,8,9],"wherea":7,"whether":4,"which":[2,3,4,5,6,8,9],"while":[0,2,7,9],"whitespac":3,"whl":[2,9],"who":2,"whole":9,"wide":3,"window":[2,5,6,7,8,9],"within":[2,5,6,8],"without":[4,5,8,9],"word":5,"work":[0,2,3,5,6,7,8,9],"workflow":8,"wors":9,"would":[0,2,3,5,6,8,9],"wright":4,"writabl":2,"write":[5,7,9],"written":[2,4,5,9],"www":2,"x":[0,1,3,4,5,7,8],"x21":9,"xrai":[5,9],"xy":6,"y":[0,1,3,8,9],"ye":[5,8,9],"yet":[4,7,9],"yield":7,"york":4,"you":[0,2,4,9],"your":[0,4,9],"z":9,"zach":8,"zero":[3,5,8,9],"zoom":9,"zr":[5,8],"\u00e5":[0,2,3,5,6,7,8,9],"\u00e5ngstr\u00f6m":[0,5,7,8],"\u03b1":9},"titles":["Files used in PDF extraction","diffpy.pdfgetx","Installation","Interactive mode","Introduction","Options and parameters","The plotdata program","Quick-start guide","Release notes","Tutorial"],"titleterms":{"0":8,"1":8,"2":8,"3":8,"4":8,"The":6,"angl":9,"author":4,"background":9,"command":[2,7],"configur":[0,5,9],"content":1,"data":[6,9],"diffpi":1,"exampl":6,"extract":0,"file":[0,5,6,9],"fit":9,"from":9,"guid":7,"indic":1,"input":[0,5,9],"instal":2,"interact":[3,9],"introduct":4,"ipython":2,"licens":4,"magic":2,"match":9,"mode":3,"multipl":9,"name":9,"neutron":9,"nickel":9,"note":8,"notic":4,"oper":5,"option":5,"other":5,"output":[0,5,9],"paramet":[5,9],"path":9,"pdf":[0,5,9],"pdfgetn3":7,"pdfgets3":7,"pdfgetx":1,"pdfgetx3":7,"platinum":9,"plotdata":6,"predefin":9,"process":9,"program":[5,6],"quick":7,"rai":9,"refer":4,"releas":8,"requir":2,"saspdf":9,"scatter":9,"scratch":9,"search":9,"select":6,"seri":9,"small":9,"softwar":2,"start":7,"subtract":9,"tabl":1,"tune":9,"tutori":9,"twothetazero":9,"us":0,"x":[6,9],"y":6}}) \ No newline at end of file diff --git a/static_root/doc/pdfgetx/2.4.0/tutorial.html b/static_root/doc/pdfgetx/2.4.0/tutorial.html deleted file mode 100644 index b7e3b63d..00000000 --- a/static_root/doc/pdfgetx/2.4.0/tutorial.html +++ /dev/null @@ -1,908 +0,0 @@ - - - - - - - - - Tutorial — diffpy.pdfgetx No version found. The correct version will appear in the released version. documentation - - - - - - - - - - - - - - - - - - - - -
- - -
- -
-
-
- -
-
-
-
- -
-

Tutorial

-

In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. The examples can be obtained by -doing the following:

-
$ pdfgetx3 --list-examples
-
-Ni
-plotdata
-Au_DNA_NPA
-Multiple_Background_Subtraction
-Pt
-CeO2
-n-Sapphire
-n-twothetazero-fit
-Si90Ni10
-Menthol
-BaTiO3
-
-$ pdfgetx3 --example Ni
-
-Example copied to: .../Ni
-
-
-
-

Nickel X-ray PDF

-
-

predefined configuration file

-

Change to the Ni directory. The file named -ni300mesh_300k_nor_1-5.chi contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the 2Θ scattering -angles and X-ray intensities. The second file -kapton_bgrd_300k_nor_2-3.chi contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the pdfgetx3.cfg contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -pdfgetx3 program -with the powder data file as an argument:

-
$ pdfgetx3 ni300mesh_300k_nor_1-5.chi
-
-
-

For the first run there should be no output on the screen, -however a new file, ni300mesh_300k_nor_1-5.gr should appear -in the work directory. -We can use the plotdata program, -included with this software, to plot the output data:

-
$ plotdata ni300mesh_300k_nor_1-5.gr
-
-
-

This will open a graph window and start an IPython interactive session. -To exit and close the figure, type exit() on the IPython prompt. -Let’s run the program again, but now with a ---verbose=info -option, to show more details about the program actions.

-
$ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi
-
-INFO:applying pdfgetx3 defaults
-INFO:set config.mode = xray
-INFO:searching for default config file /home/user/.pdfgetx3.cfg
-INFO:searching for default config file .pdfgetx3.cfg
-INFO:searching for default config file pdfgetx3.cfg
-INFO:loaded default config file pdfgetx3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi
-INFO:set config.outputtypes = gr
-INFO:set config.wavelength = 0.142774
-INFO:set config.composition = Ni
-INFO:set config.qmaxinst = 26.5
-INFO:set config.qmax = 26.0
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 30.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'xray'
-INFO:calling config_xray
-INFO:started PDF processing.
-INFO:processing 'ni300mesh_300k_nor_1-5.chi'
-INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr'
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-INFO:elapsed time: 0.095
-
-
-

Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the --verbose option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the --force=yes option, upon -which pdfgetx3 would overwrite any existing files.

-

PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the --c option. Another option, --plot=[iq,sq,fq,gr] turns on plotting of the final PDF or of some other result. A -side effect of the --plot option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function F(Q) and the PDF curve G(r). This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:

-
$ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr
-
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-
-Variables related to PDF processing:
-
-pdfgetter    -- PDFGetter used for calculation.
-config       -- configuration data used by PDFGetter.
-                See config.inputfiles for a list of inputs.
-iraw         -- matrix of input raw intensities with 2 rows per file.
-iq sq fq gr  -- intermediate results per each input file stored
-                as matrix rows.
-
-Functions:
-
-tuneconfig   -- dynamically tune configuration variables.
-processfiles -- process specified data files.
-clearsession -- clear all elements from the inputfiles, iraw,
-                iq, sq, fq and gr variables.
-plotdata     -- plot all or selected columns from a text data file.
-loaddata     -- load all or selected columns from a text data file.
-findfiles    -- search for files matching the specified patterns.
-
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-In [1]:
-
-
-

This will open a plot figure similar to

-_images/nickelfqgr.png -

Because of the interactive mode implied by plotting, -the program enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -config variable stores all the configuration parameters, -and its content can be displayed with the print() -function as

-
In [1]: print(config)
-
-configfile = ni300mesh_300k_nor_1-5.gr
-configsection = DEFAULT
-dataformat = twotheta
-...
-qmax = 26.0
-...
-
-
-

The processfiles() function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the F(Q) and G(r) -curves calculated at Qmax = 22 Å-1, we can call -processfiles() and pass it a keyword argument for -the new qmax as follows:

-
In [2]: processfiles(qmax=22)
-
-# the qmax parameter was updated to a new value, thus
-In [3]: config.qmax
-Out[3]: 22
-
-
-

There should be now two lines in each plot axis corresponding to -the results at Qmax equal 26 and 22 Å-1. To exit the program, -type exit().

-
-
-

processing from scratch

-

We have already encountered the command-line option -c -for specifying a custom configuration file. A special argument “NONE”, -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-ERROR:Configuration error: wavelength not specified.
-ERROR:See "--help" for more hints.
-
-
-

There is an error, for the wavelength is necessary to convert -the scattering angle 2Θ to momentum transfer Q. The -X-ray wavelength was 0.142774 Å, which can be passed with the --w, --wavelength option:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774
-
-...
-ERROR:Configuration error: Chemical composition not known.
-ERROR:See "--help" for more hints.
-
-
-

There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the --composition option. The example -below uses a “\\” character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni
-
-WARNING:Nothing to do, use "-t" or "--plot" options.
-...
-
-
-

There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the -t, --outputtypes option. -The outputtypes option recognizes the following result types: -“iq”, “sq”, “fq”, “gr”. One or more of these type strings, -separated by a comma, can be included with the --t option, which will produce the corresponding -output files. An empty string, such as -t "", or -t NONE -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings.

-

At this point, we will not write any output files, but will use the ---plot option to display the calculated curves. The ---plot accepts the same arguments as outputtypes, so to -display the F(Q) and G(r) curves we shall run

-
$ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \
-           --composition=Ni --plot=fq,gr
-
-WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161
-WARNING:qmax reset to the data boundary qmaxinst=28.0865680161
-
-
-

which should open the following plot window:

-_images/nickelfqgrnoisy.png -

The graphs look terrible. The PDF is very noisy and the F(Q) curve -shows a sudden break at about 27 Å-1. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -iraw, iq, sq, -fq, gr -variables for the original raw data and intermediate results. We -are going to plot the “iq” variable that has the input intensities -resampled on the Q grid. The matplotlib function -clf() clears the figure, -the iq variable is a two-row matrix with Q and I rows, and the -axis() -function lets us zoom to a given range:

-
In [1]: clf()
-In [2]: plot(iq[0], iq[1])
-Out[2]: [<matplotlib.lines.Line2D at 0x3e20f50>]
-In [3]: axis([20, 29, 0, 3000])
-Out[3]: [20, 29, 0, 3000]
-
-
-

The graph shows a sudden drop in the raw intensities at 27 Å-1. -The qmaxinst variable defines a Q cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 Å-1

-
In [4]: processfiles(qmaxinst=26.5)
-WARNING:qmax reset to the data boundary qmaxinst=26.5
-
-
-

The updated curves looks reasonable without any oscillations and -breakpoints. The tuneconfig() function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type tuneconfig() to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the F(Q) and G(r) curves change. -The rpoly parameter controls the degree of data-correction -polynomial and is an approximate low-r bound of reliable G -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the G(r) -curve and save it to an output file nicmd.gr:

-
In [14]: config.qmax = 26
-In [15]: config.outputtypes = 'gr'
-In [16]: config.output = 'nicmd'
-In [17]: processfiles()
-
-
-
-
-
-

Platinum X-ray series

-

PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(z-shell being a notable exception).

-
-

matching input files

-

The pdfgetx3 program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the -f, --find option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option --l, --list makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files.

-

We will try out this file search on platinum example files. Open a -terminal and navigate to the Pt directory. There should be a -series subdirectory with 6 chi files indexed from 903 to 908. -At first, let’s stay in the Pt directory and run the following -command

-
$ pdfgetx3 --list --find
-
-Pt_bulk-00055-pdfgetx2.gr
-Pt_bulk-00055-pdfgetx3.gr
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-pdfgetx3.cfg
-plotpdfcomparison.py
-
-
-

Without any patterns the file search matches all files in the current -directory. Now let’s try to add name patterns. There are few special -patterns, for example ^ matches at the beginning of the filename, $ at the end and <N-M> matches a range of integer values from -N to M. The patterns containing ^$<> need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works.

-

Filenames containing “y”:

-
$ pdfgetx3 --list --find y
-empty_capillary-00032.chi
-plotpdfcomparison.py
-
-
-

Filenames that containing both “y” and “chi”, here we use the -options --list and --find in an abbreviated -form -l and -f:

-
$ pdfgetx3 -lf y chi
-empty_capillary-00032.chi
-
-
-

Filenames that start with “e”:

-
$ pdfgetx3 --list --find "^e"
-empty_capillary-00032.chi
-
-
-

Filenames that contain character “2”:

-
$ pdfgetx3 --list --find 2
-Pt_bulk-00055-pdfgetx2.gr
-empty_capillary-00032.chi
-
-
-

Filenames that contain numeric value “2”:

-
$ pdfgetx3 -lf "<2>"
-Pt_bulk-00055-pdfgetx2.gr
-
-
-

The special argument + starts a new group of patterns to -generate extra files when they cannot be all covered by -a single set of patterns. For example, to match files that -contain contain both “bulk” and “chi” substrings and then -also those that have “empty” and “chi” in their names, use:

-
$ pdfgetx3 -lf bulk chi + empty chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-

When pattern groups overlap the resulting matches are -made unique and each file is listed only once

-
$ pdfgetx3 -lf bulk chi + chi
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-
-
-
-
-

data search path

-

Each group of PDFgetX3 patterns can have one entry containing -forward slash “/” to specify a non-current path that is searched -for input files. The path specification affects the current and -the following pattern groups unless they provide their own path. -The chi files numbered “903” to “905” and “908” from the -series subdirectory can be therefore matched using

-
$ pdfgetx3 -lf series/ "<903-905>" + 908
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-

The current directory can be selected using ./

-
$ pdfgetx3 -lf series/ 903 + ./ bulk chi
-series/Pt_bulk_ramp03-00903.chi
-Pt_bulk-00055.chi
-
-
-

When additional pattern groups contain only the path -argument, they reuse the existing set of patterns. The -“.chi”-ending files in the current and series -directories can be thus found using

-
$ pdfgetx3 -lf ".chi$" + series/
-Pt_bulk-00055.chi
-empty_capillary-00032.chi
-series/Pt_bulk_ramp03-00903.chi
-series/Pt_bulk_ramp03-00904.chi
-series/Pt_bulk_ramp03-00905.chi
-series/Pt_bulk_ramp03-00906.chi
-series/Pt_bulk_ramp03-00907.chi
-series/Pt_bulk_ramp03-00908.chi
-
-
-
-
-

output file names

-

By default the output files are saved in the current directory. The -output path, can be changed with the -o, --output option. -The -o recognizes several tokens that are replaced with -parts of the input file name, for example, “@b” expands to an -extension-stripped base name. In similar faction, “@o” is replaced -with the output type extension. Thus to generate PDFs for all files -in the series directory and save them in the -series-gr subfolder do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --output=series-gr/@b.@o
-
-
-

The extension “.@o” is automatic when not included anywhere in the -output file name. Thus to process the Pt series at Qmax = 18 Å-1 -while saving the results in the same folder, but with a “_qmax18” suffix -in their filenames do

-
$ pdfgetx3 --find series/ "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18
-
-
-

For input file Pt_bulk_ramp03-00903.chi the -o option -above expands to output path series-gr/Pt_bulk_ramp03-00903_qmax18.gr. -The series-gr directory should now contain 12 “gr” files, -6 of them processed at Qmax = 27 Å-1 as given by configuration -file and 6 others processed at Qmax = 18 Å-1.

-
-

See also

-

-o, --output for a list of output tokens

-
-
-
-
-

Interactive tuning of parameters

-

One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the Ni directory in the shell and process -the nickel PDF while plotting the F(Q) and G(r) curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -tuneconfig() -function from the IPython environment

-
$ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi
-...
-In [1]: tuneconfig()
-
-
-

The -tuneconfig() -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot.

-_images/tunenickelfqgr.png -

The constant data scale check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -PDF parameters section. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the bgscale parameter -if PDF has been processed without any background data.

-

By default the -tuneconfig() -function displays the same curves as -specified by the --plot option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the describe() method of the -pdfgetter() object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object t4 that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the tuneconfig() function

-
$ pdfgetx3 -i ni300mesh_300k_nor_1-5.chi
-...
-Use "%pdfgetx3" for a fresh run without exiting IPython.
-
-In [1]: fig, ax = subplots(2)
-In [2]: pdfgetter.describe()
-0   TransformTwoThetaToQA
-    convert x data from twotheta to Q in 1/A
-1   TransformQGridRegular
-    Remove the data outside the (qmin, qmaxinst) range
-2   TransformBackground
-    subtract background intensity
-3   TransformXrayASFnormChris
-    scale and normalize intensities by x-ray scattering factors
-4   TransformSQnormRPoly
-    Normalize S(Q) by fitting a polynomial
-5   TransformSQToFQ
-    Convert S(Q) to F(Q).
-6   TransformFQgrid
-    Resample F(Q) to a regular grid suitable for FFT
-7   TransformFQToGr
-    Convert F(Q) to G(r).
-In [3]: t4 = pdfgetter.getTransformation(4)
-In [4]: tuneconfig([t4, 'gr'], axeslist=ax)
-In [5]: ax[0].legend(loc=2)
-
-
-

The subplots() function above -is to create a new figure with 2 axes on top of each other. -Overall, the code above should display the following plot -and a GUI window:

-_images/tunenickelt4gr.png -

The tuning can be finished by clicking the Done button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the config -object, for example:

-
In [5]: config.bgscale = 1.5
-
-
-

Finally, to save the new results, we shall first confirm -outputtypes have been correctly set and then use the -processfiles() function to redo the calculations, plots and -data output for the updated configuration. Note that the -processfiles() function accepts keyword arguments for -configuration parameters. This is used at line In [8] to -turn on the force flag and is in effect a shortcut -for an extra config.force = True statement.

-
In [6]: config.outputtypes
-Out[6]: ['gr']
-In [7]: processfiles()
-WARNING:ni300mesh_300k_nor_1-5.gr already exists.
-WARNING:Use "--force=yes" or "--force=once" to overwrite.
-In [8]: processfiles(force=True)
-
-
-

ni300mesh_300k_nor_1-5.gr was successfully saved at an -updated configuration for there were no warnings after the last call.

-
-
-

Neutron PDF

-

This example illustrates PDF extraction from -neutron powder data using pdfgetn3. -Navigate to the n-Sapphire directory in the shell. -The sapphire755.dat file contains powder diffraction data from -sapphire (α-Al2O3) -measured at the constant-wavelength PEARL instrument -at the Delft University of Technology. -The pdfgetn3.cfg configuration file specifies -processing parameters such as wavelength, -twothetazero, composition, and mode.

-

To extract the sapphire neutron PDF run

-
$ pdfgetn3 --verbose=info sapphire755.dat
-
-INFO:applying pdfgetn3 defaults
-INFO:set config.mode = neutron
-INFO:searching for default config file /home/user/.pdfgetn3.cfg
-INFO:searching for default config file .pdfgetn3.cfg
-INFO:searching for default config file pdfgetn3.cfg
-INFO:loaded default config file pdfgetn3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = twotheta
-INFO:set config.backgroundfile =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.mode = neutron
-INFO:set config.wavelength = 1.0989
-INFO:set config.twothetazero = -0.38
-INFO:set config.composition = Al2O3
-INFO:set config.qmaxinst = 11.2
-INFO:set config.qmax = 11.2
-INFO:set config.rmin = 0.0
-INFO:set config.rmax = 20.0
-INFO:set config.rstep = 0.01
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'neutron'
-INFO:calling config_neutron
-INFO:started PDF processing.
-INFO:processing 'sapphire755.dat'
-INFO:resolved output file '' as 'sapphire755.fq'
-INFO:written outpufile sapphire755.fq
-INFO:resolved output file '' as 'sapphire755.gr'
-INFO:written outpufile sapphire755.gr
-INFO:elapsed time: 0.097
-
-
-

This will produce two files sapphire755.fq, sapphire755.gr -for the F(Q) and G(r) functions. -To compare them with expected results use

-
$ plotdata sapphire755-expected.fq sapphire755.fq
-$ plotdata sapphire755-expected.gr sapphire755.gr
-
-
-
-
-

Fit twothetazero

-

For a good quality PDF it is essential to use powder patterns with -accurate values of Q. Some instruments may produce spectra with -a slightly offset scattering angle 2Θ which -causes inaccurate Q and a noticeably worse PDF. -In this example we fit a constant-wavelength neutron PDF from nickel -together with the twothetazero correction parameter for -diffractometer offset. -The procedure can be used to calibrate the zero correction from -a standard sample and then use it for subsequent PDF extractions. -The protocol can be also applied to fit zero correction in -a full-fledged PDF refinement in case -the zero offset may change for different samples.

-

This tutorial requires either Linux or Mac OS X platforms, -because the PDF fitting is conducted with -DiffPy-CMI, -which is not yet available for Windows. -If DiffPy-CMI is not yet installed, -we recommend to use Anaconda Python and set up a dedicated -Anaconda environment nbcmi for this tutorial. -This can be accomplished using the following steps:

-
$ conda create -n nbcmi -c diffpy python=3.13 diffpy-cmi
-$ conda activate nbcmi
-$ pip install path/to/diffpy.pdfgetx-VERSION.whl
-
-
-

When these prerequisites are in place, -change to the n-twothetazero-fit directory -and open the self documented Jupyter notebook as follows

-
$ jupyter notebook fit-twothetazero.ipynb
-
-
-

The notebook sets up and executes several PDF refinements and -compares the results from fits on uncorrected data and with -a fitted twothetazero. -After running all cells the notebook should produce similar graphs -as in the figure below.

-
-_images/twothetazerofit.png -
-

Refinement of nickel neutron PDF for (a) uncorrected data -and (b) with a refined zero correction. -The extracted PDFs are plotted as blue circles, -simulated PDFs as red lines and -the difference is plotted offset in green below.

-
-
-

The final refined zero offset in the notebook should be approximately -0.36°. -The correction produces experimental PDF with a remarkably better fit -residual Rw which is lowered from (a) 0.18 to (b) 0.05.

-
-
-

Small-angle-scattering PDF (sasPDF)

-

Here we illustrate how to extract a PDF from small-angle-scattering (sas) data using pdfgets3. -To do this, navigate to the Au_DNA_NPA directory in your terminal. -In this folder, you will find Au_DNA_NPA.chi and -Au_DNA_FF.chi files which correspond to diffraction data from -DNA-capped Au nanoparticle assemblies and from a DNA-capped Au -nanoparticle colloidal solution respectively. Those two files were -measured at X21 beamline, NSLS and published in D. Nykypanchuk, M. M. -Maye, D. van der Lelie, and O. Gang, Nature 451, 549 (2008).. We thank Prof. Oleg Gang (Columbia University) for sharing this data. The pdfgets3.cfg -configuration file specifies processing parameters such as formfactorfile (required by sas mode), qmin, qmax, and mode.

-

To extract the PDF of DNA-capped DNA nanoparticle assemblies

-
$ pdfgets3 --verbose=info Au_DNA_NPA.chi
-
-INFO:applying pdfgets3 defaults
-INFO:set config.mode = sas
-INFO:searching for default config file /home/user/.pdfgets3.cfg
-INFO:searching for default config file .pdfgets3.cfg
-INFO:searching for default config file pdfgets3.cfg
-INFO:loaded default config file pdfgets3.cfg
-INFO:reset config.twothetazero = 0.0
-INFO:parsing config file section [DEFAULT]
-INFO:set config.dataformat = QA
-INFO:set config.backgroundfile =
-INFO:set config.datapath = []
-INFO:set config.formfactorfile = Au_DNA_FF.chi
-INFO:set config.output =
-INFO:set config.outputtypes = fq, gr
-INFO:set config.force = yes
-INFO:set config.mode = sas
-INFO:set config.rpoly = 240.605
-INFO:set config.qmaxinst = 0.075
-INFO:set config.qmin = 0.01
-INFO:set config.qmax = 0.072
-INFO:set config.rmin = 100.0
-INFO:set config.rmax = 5000.0
-INFO:set config.rstep = 1.0
-INFO:set config.plot = iq, fq, gr
-INFO:set config.verbose = info
-INFO:finished parsing config file
-INFO:processing command line options
-INFO:set config.verbose = info
-INFO:finished with command line options
-INFO:using 1 input files from the command line.
-INFO:configuring PDFGetter mode 'sas'
-INFO:calling config_sas
-INFO:started PDF processing.
-INFO:processing 'Au_DNA_NPA.chi'
-INFO:resolved output file '' as 'Au_DNA_NPA.fq'
-INFO:written outpufile Au_DNA_NPA.fq
-INFO:resolved output file '' as 'Au_DNA_NPA.gr'
-INFO:written outpufile Au_DNA_NPA.gr
-INFO:elapsed time: 0.947
-
-
-

This will save two files Au_DNA_NPA.fq, Au_DNA_NPA.gr in the same directory for the F(Q) and G(r) functions. This also plots F(Q) and G(r) functions in a pop-up window and the processing parameters such as rpoly or so may be tuned interactively by issuing command tuneconfig() in the IPython session as discussed above.

-
-
-

Multiple Background Subtraction

-
-

Predefined configuration file

-

In this tutorial, we will show how to use the multiple-background subtraction -functionality by obtaining equivalent outputs from different, but equivalent, -subtractions. Change directory to the Multiple_Background_Subtraction -directory. The file named -ni300mesh_300k_nor_1-5.chi contains powder X-ray data measured from -nickel at the Advanced Photon Source beamline 6ID-D. The file contains two -columns for the 2Θ scattering angles and X-ray intensities. Similarly, -kapton_bgrd_300k_nor_2-3.chi contains the background data (i.e., the -intensities from an empty kapton capillary), and a duplicate file -kapton_bgrd_300k_nor_2-3_copy.chi contains the same dataset (this -duplication of the data is necessary when using the same background multiple -times as the internal system only stores a set of unique background filenames). -The last .chi file, TEST_blank-00000.chi, simply stores a null -dataset and can be used to show the invariance of the PDF under permutation of -the order of background subtractions as well as the fact that more than just -two backgrounds can be subtracted. There are also two config files -nickel.cfg and nickel_sub_two_half_backgrounds.cfg, each of -which contain a set of complete configuration parameters for converting the Ni -powder pattern to a PDF for the case of doing so via a single background -subtraction and a multiple background subtraction, respectively. Finally, there -is a fully processed G(r) file ni300mesh_300k_nor_1-5-expected.gr which -contains the expected output of producing the PDF of the Ni sample after -subtracting the kapton background. Since all processing parameters are already -defined in these configuration files, producing the PDF using multiple -background subtractions is very simple and involves running the pdfgetx3 program and specifying the multiple background subtraction -config file and the powder data file as arguments:

-
$ pdfgetx3 -c nickel_sub_two_half_backgrounds.cfg ni300mesh_300k_nor_1-5.chi
-
-
-

The resulting G(r) file, ni300mesh_300k_nor_1-5.gr, is the result of -producing the PDF according to:

-
"ni300mesh_300k_nor_1-5.chi" - 0.5*"kapton_bgrd_300k_nor_2-3.chi"
-- 0.5*"kapton_bgrd_300k_nor_2-3.chi"
-
-
-

Which should be equivalent to the case where the following single background -subtraction had been performed:

-
"ni300mesh_300k_nor_1-5.chi" - 1.0*"kapton_bgrd_300k_nor_2-3.chi"
-
-
-

The fact that both of these result in the same PDF can be verified by comparing -the produced G(r) with the expected G(r) provided in the example:

-
$ plotdata ni300mesh_300k_nor_1-5-expected.gr ni300mesh_300k_nor_1-5.gr
-
-
-
-
-

Interactive Multiple Background Subtraction

-

The multiple background subtraction functionality can also be carried out -interactively, as per the Interactive tuning of parameters section, using the plural forms -of the relevant variables (i.e., config.bgscales, config.backgroundfiles, -etc.).

-
-
-
- - -
-
- -
-
-
-
- - - - \ No newline at end of file diff --git a/static_root/doc/pdfgetx/Juhas-jac-2013.pdf b/static_root/doc/pdfgetx/Juhas-jac-2013.pdf deleted file mode 100644 index 744fe8da..00000000 Binary files a/static_root/doc/pdfgetx/Juhas-jac-2013.pdf and /dev/null differ diff --git a/static_root/doc/pdfgetx/Juhas-jac-2018.pdf b/static_root/doc/pdfgetx/Juhas-jac-2018.pdf deleted file mode 100644 index 76430408..00000000 Binary files a/static_root/doc/pdfgetx/Juhas-jac-2018.pdf and /dev/null differ diff --git a/static_root/doc/pdfgetx/Liu-jac-2020.pdf b/static_root/doc/pdfgetx/Liu-jac-2020.pdf deleted file mode 100644 index f66273a9..00000000 Binary files a/static_root/doc/pdfgetx/Liu-jac-2020.pdf and /dev/null differ diff --git a/static_root/doc/pdfgetx3/.buildinfo b/static_root/doc/pdfgetx3/.buildinfo deleted file mode 100644 index 077cefad..00000000 --- a/static_root/doc/pdfgetx3/.buildinfo +++ /dev/null @@ -1,4 +0,0 @@ -# Sphinx build info version 1 -# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: a5da753cccb4693a8d6ab1dcd3ee87bc -tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/static_root/doc/pdfgetx3/PDFgetX3_manual.pdf b/static_root/doc/pdfgetx3/PDFgetX3_manual.pdf deleted file mode 100644 index 239693bb..00000000 Binary files a/static_root/doc/pdfgetx3/PDFgetX3_manual.pdf and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_images/nickelfqgr.png b/static_root/doc/pdfgetx3/_images/nickelfqgr.png deleted file mode 100644 index 3fbc12de..00000000 Binary files a/static_root/doc/pdfgetx3/_images/nickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_images/nickelfqgrnoisy.png b/static_root/doc/pdfgetx3/_images/nickelfqgrnoisy.png deleted file mode 100644 index caab8cf3..00000000 Binary files a/static_root/doc/pdfgetx3/_images/nickelfqgrnoisy.png and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_images/tunenickelfqgr.png b/static_root/doc/pdfgetx3/_images/tunenickelfqgr.png deleted file mode 100644 index 14accde4..00000000 Binary files a/static_root/doc/pdfgetx3/_images/tunenickelfqgr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_images/tunenickelt4gr.png b/static_root/doc/pdfgetx3/_images/tunenickelt4gr.png deleted file mode 100644 index f70bf75e..00000000 Binary files a/static_root/doc/pdfgetx3/_images/tunenickelt4gr.png and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_sources/files.rst.txt b/static_root/doc/pdfgetx3/_sources/files.rst.txt deleted file mode 100644 index 92e006c5..00000000 --- a/static_root/doc/pdfgetx3/_sources/files.rst.txt +++ /dev/null @@ -1,104 +0,0 @@ -Files used by PDFgetX3 -======================================================================== - -.. include:: abbreviations.txt -.. _my-configfile: -.. program:: pdfgetx3 - -Configuration file ------------------------------------------------------------------------- - -Configuration files may define the PDF processing parameters. By -default, the :program:`pdfgetx3` program attempts to read -".pdfgetx3.cfg" file from the user HOME directory, then ".pdfgetx3.cfg" -and "pdfgetx3.cfg" files from the current working directory. -If configuration file has a different name, it needs to be specified -with the :option:`-c, --config <-c>` option. - -The easiest way of creating a configuration file is to generate -a template content using the :option:`--createconfig` option as :: - - pdfgetx3 --createconfig=test.cfg - -and then change the generated test.cfg file in your favorite text -editor. The configuration file follows a simple "varname=value" syntax, -any lines starting with "#" are ignored as comments. - -The configuration file has several sections marked as ``[SECTIONNAME]``. -The ``[DEFAULT]`` section is mandatory and it contains the default -global settings. Any other sections are optional and they are applied -only when selected with the :option:`-s, --section <-s>` option on the -command line. Thus :: - - pdfgetx3 --config=test.cfg --section=nacl - -would read the parameters from the ``[nacl]`` section after reading the -defaults. Having several sections in the configuration -file is useful when there are multiple measurements that share most of -the parameters, but differ in a few of them, for example in the chemical -composition. The configuration file can then contain sections per each -sample that define only the composition, while all other parameters are -specified just once in the global DEFAULT section. - - -Input files ------------------------------------------------------------------------- - -PDFgetX3 accepts input powder diffraction data in the form of two-column -text file, where the first column x is either the scattering angle -|twotheta| in degrees, momentum transfer *Q* in inverse nanometers or *Q* -in inverse ångströms. The second column y contains the corresponding -scattered intensities normalized per unit solid angle. The actual type -of the x-values is identified by the :confval:`dataformat` parameter. -The input files may contain header with comments or metadata, and the -actual data are read from the first long section of numerical values. - -The input files are usually passed as command-line arguments to the -:program:`pdfgetx3` program and must be paths accessible from the -current working directory. The environment variable - -.. index:: ! PDFGETX3PATH -.. envvar:: PDFGETX3PATH - - specifies additional directories that are searched for input and - background data files. The :envvar:`!PDFGETX3PATH` is a list of - absolute or relative paths separated by ``":"`` on Linux and Mac or - by ``";"`` on Windows, that are searched for input files, when - these cannot be found in the current working directory. - -The :option:`-d, --datapath <-d>` option may be used to define -additional data directories besides those in the -:envvar:`!PDFGETX3PATH`. - -When the :option:`--find <-f>` option is active, the pdfgetx3 arguments -are understood as filename patterns and the input files are searched -in the current and datapath directories. - - -Output files ------------------------------------------------------------------------- - -PDFgetX3 can produce up to four different output data files: - -* .iq, |IQ| -- These are the background-corrected - intensities sampled on a regular *Q*-space grid in inverse ångströms. - -* .sq, |SQ| -- This file contains the total scattering structure - function, with the intensities normalized by average scattering - factors and corrected by a polynomial fit. - -* .fq, |FQ| -- This file contains the reduced structure function equal - to *Q*\ (|SQ| - 1). - -* .gr, |Gr| -- this is the resultant PDF, where the first column is the - separation *r* in ångströms and the second is the function *G* in - Å\ :sup:`-2`. - -You can specify what output files should be produced by setting the -:confval:`outputtypes` parameter in the configuration file or by -passing the :option:`-t, --outputtypes <-t>` on the command line. - -The header of all output files contains the parameter values that were -used in the calculation and thus it is by itself a valid configuration -file. When passed as an argument to the :option:`--config <-c>` option, -the PDFgetX3 will reproduce the previous calculation. diff --git a/static_root/doc/pdfgetx3/_sources/index.rst.txt b/static_root/doc/pdfgetx3/_sources/index.rst.txt deleted file mode 100644 index 16fdb9d9..00000000 --- a/static_root/doc/pdfgetx3/_sources/index.rst.txt +++ /dev/null @@ -1,36 +0,0 @@ -.. PDFgetX3 documentation master file, created by - sphinx-quickstart on Tue Sep 21 18:35:11 2010. - You can adapt this file completely to your liking, - but it should at least contain the root `toctree` directive. - -######################################################################## -PDFgetX3 User Manual -######################################################################## - -| Release |release| -| |today| - -======================================================================== -Table of contents -======================================================================== - - -.. toctree:: - :maxdepth: 2 - - intro - install - quick-start - tutorial - files - interact - options - plotdata - release - -======================================================================== -Indices -======================================================================== - -* :ref:`genindex` -* :ref:`search` diff --git a/static_root/doc/pdfgetx3/_sources/install.rst.txt b/static_root/doc/pdfgetx3/_sources/install.rst.txt deleted file mode 100644 index 37ad3c93..00000000 --- a/static_root/doc/pdfgetx3/_sources/install.rst.txt +++ /dev/null @@ -1,135 +0,0 @@ -Installation -======================================================================== - - -Software requirements ------------------------------------------------------------------------- - -PDFgetX3 has been written in Python programming language, therefore -to use the software, you must have Python 3.6, 3.5, 3.4, 2.7 or 2.6 -installed. In addition, the following third-party Python libraries -are also required: - -* setuptools - tools for installing Python packages -* six - Python 2 and 3 compatibility library -* NumPy - library for scientific computing with Python -* matplotlib - Python plotting library -* IPython - enhanced interactive Python shell - -Standard Python releases can be obtained from -https://www.python.org/downloads. -The third-party libraries can be found at the -`Python Package Index `_ -or using any Internet search engine. - -Another more convenient option is to obtain one of the science-oriented -Python distributions such as -`Anaconda Python `_, -`Enthought Canopy `_ or -`PythonXY `_, -These distributions already include all the necessary libraries, so the -required Python software can be all installed in one step. - -On Linux operating systems the third-party libraries are usually -included in a system software package repository. For example on an -Ubuntu Linux computer the software dependencies can be all installed -with a single shell command :: - - sudo apt-get install \ - python3-six python3-setuptools python3-numpy python3-matplotlib ipython3 - -This may be, of course, just as well accomplished using the GUI -driven Synaptic package manager. Other Linux -distributions may use different software management tools, -but the names of the necessary packages should be very similar -to those above. - -On Windows operating system, it may be necessary to add the -``C:\Python35`` directory and the scripts directory -``C:\Python35\Scripts`` to the system :envvar:`!PATH`. -Some Python distributions may already do that as a part of their -installation process. The easiest way to check is to start the -:program:`Command Prompt`, type there ``python`` and see if this -starts the Python interpreter. - - -PDFgetX3 installation ------------------------------------------------------------------------- - -PDFgetX3 is distributed as a Python egg package, which can be obtained -from the `Columbia Technology Ventures -`__. -Once all the required software is in -place, start the command prompt on Windows or a Unix terminal on Linux -or Mac, navigate to the directory that contains the egg file and -execute the following command:: - - python -m easy_install ./diffpy.pdfgetx-VERSION.egg - -Here VERSION needs to be replaced to match the actual filename. -It is critical to use one of the supported Python versions otherwise -the program would not work. On Linux and Mac operating systems the -installation may need to run with root user privileges, for example, -by prepending ``sudo`` to the command line above. -If root access is not available, use the -easy_install options :option:`!--user`, :option:`!--prefix` or -:option:`!--install-dir` to install PDFgetX3 to a user-writable -directory. - -To verify if pdfgetx3 has been correctly installed, -type the following command:: - - pdfgetx3 --version - -This should display the software version, which should be -the same as the VERSION string in the egg file name. -The installation also includes a :command:`plotdata` -command for an easy plotting of text data files. To verify -if plotdata works, run the ``plotdata --version`` command. - - -.. index:: %pdfgetx3 IPython magic -.. _my-pdfgetx3-magic: - -IPython magic command ------------------------------------------------------------------------- - -These instructions are intended for IPython users who would like to -integrate PDFgetX3 into their IPython environment. If you don't plan -to use IPython in such way, you can safely skip this section. - -When pdfgetx3 is run in an interactive mode, it starts IPython -interactive shell and defines an extra ``%pdfgetx3`` -magic command within the IPython session. The IPython magic -commands are not valid Python code, but work in a similar -fashion as standard shell commands. The ``%pdfgetx3`` magic can -be thus used with the same options and arguments as if run from -the shell. This is useful for processing more files, while -preserving all plots or variables that were already created -within the IPython session. - -The ``%pdfgetx3`` magic command can be defined permanently so it is -available in all IPython sessions. To make the ``%pdfgetx3`` -command permanent - -#. find the ``profile_default/ipython_config.py`` file and open it - in a text editor. If that file does not exists, - create it first by executing :: - - ipython profile create - -#. navigate to the paragraph that contains the - :py:data:`!c.InteractiveShellApp.extensions` and add there - the following line:: - - c.InteractiveShellApp.extensions = ['diffpy.pdfgetx.ipy_pdfgetx3'] - - There must be no leading indent, i.e., the text must start at the - very first column. - -.. note:: - - This setup works for the latest IPython 5.0 and for the older - versions going back to 0.13. For IPython 0.11 or 0.12 use - ``ipy012_pdfgetx3`` in the extension module name - instead of ``ipy_pdfgetx3``. diff --git a/static_root/doc/pdfgetx3/_sources/interact.rst.txt b/static_root/doc/pdfgetx3/_sources/interact.rst.txt deleted file mode 100644 index f1a04ded..00000000 --- a/static_root/doc/pdfgetx3/_sources/interact.rst.txt +++ /dev/null @@ -1,133 +0,0 @@ -Interactive mode -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. py:currentmodule:: _interactive_ - -The interactive mode is activated by using either the -:option:`-i, --interact <-i>` option or a non-empty -:option:`--plot <-p>` option. In the interactive mode -the program starts an IPython interactive shell and pre-loads several -functions and variables related to the PDF calculation. It also defines -a ``%pdfgetx3`` macro, which can be used with the same command-line syntax -as the :program:`pdfgetx3` program from a system shell. The interactive -session is also initialized with all functions from the matplotlib -:py:mod:`!pylab` module for convenient plotting. The functions and -variables related to PDF processing are: - -.. py:function:: pdfgetter - - Instance of the :py:class:`!PDFGetter` class which serves as a - low-level function that calculates the PDF. This is a callable - object, which takes as an argument a pair of input arrays for - (two-theta, intensity). It can be also called with a keyword - argument ``filename=FILE``, which would read the input arrays - from the specified file. When called with no arguments, - it calculates PDF from the last input data. - - :return: - A pair of output arrays *(r, G)*. - -.. interactvar:: config - - Instance of the :py:class:`!PDFConfig` class that stores the - :ref:`parameters and input files ` for the program. - Use ``print(config)`` to display the current configuration values. - This is the same object as :data:`!pdfgetter.config`. Configuration - may be changed by setting a respective attribute of the - :interactvar:`!config` object, for example:: - - In [1]: config.qmax = 21 - - The :py:data:`!config` values may be also changed by calling the - :py:func:`pdfgetter` or :py:func:`processFiles` function with a - corresponding keyword argument, for example - ``processFiles(qmax=20, force="once")``. - -.. interactvar:: iraw - iq - sq - fq - gr - - These variables are assigned the input raw intensities and the - intermediate results, stored as matrix rows. The matrix rows - correspond to twotheta1, intensity1, twotheta2, intensity2, etc. - Because matrices are iterated row first, the raw intensities - from all input files can be plotted with the matplotlib plot - function as ``plot(*iraw)``. - - These variables should be considered read-only and are reset - with subsequent PDF calculations. - -.. py:function:: tuneconfig(plotids=None, pdfgetter=None, axeslist=None) - - Show a GUI dialog for interactive tuning of configuration variables. - - :arg plotids: - string or iterable that specify what interactive plots should be - tuned. By default the same as config.plot. Can be also an - integer index or name of a transformation in pdfgetter or a - reference to a :py:class:`!Transformation` object. - - :arg pdfgetter: - optional PDFGetter object to be tuned. This is by default - the interactive :py:func:`pdfgetter` object. - - :arg axeslist: - optional list of matplotlib Axes for displaying the interactive - plots. When None, use subplot(N, 1, i) to create the parent axes. - - .. note:: - - Changes from :py:func:`!tuneconfig` apply only to the configuration - and results in memory. Use the :py:func:`processFiles` function - to save them to disk. - - .. seealso:: :ref:`my-tuneconfig` tutorial - -.. py:function:: processFiles(filename=None, **kwargs) - - Process all input files again with the current configuration values. - This is a higher-level function than :py:func:`pdfgetter`, as - it also saves output files and produces plots as specified by the - :interactvar:`config` object. - - :arg filename: - One or more input files to be converted to PDFs and saved or - plotted according to the :py:data:`!config` settings. Use the - previous list of input files when not specified. - - :arg kwargs: - optional keyword arguments that are applied to the :py:data:`!config` - object, for example ``(force="once", qmax=18)``. - - This function updates the :interactvar:`config.inputfiles ` - list and the :interactvar:`iraw`, :interactvar:`iq`, - :interactvar:`sq`, :interactvar:`fq` and :interactvar:`gr` - interactive variables. - -.. py:function:: clearSession() - - Clear all elements from the :interactvar:`config.inputfiles ` - and also the - :interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, - :interactvar:`fq` and :interactvar:`gr` variables. - - :return: - No return value. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: loadData - -.. py:currentmodule:: diffpy.pdfgetx.plotdata -.. autofunction:: plotdata - - This function is defined in the - :py:mod:`!diffpy.pdfgetx.plotdata` module. - -.. py:currentmodule:: diffpy.pdfgetx -.. autofunction:: findfiles - - .. seealso:: :ref:`Table of special patterns ` diff --git a/static_root/doc/pdfgetx3/_sources/intro.rst.txt b/static_root/doc/pdfgetx3/_sources/intro.rst.txt deleted file mode 100644 index 49a47fae..00000000 --- a/static_root/doc/pdfgetx3/_sources/intro.rst.txt +++ /dev/null @@ -1,51 +0,0 @@ -Introduction -======================================================================== - -PDFgetX3 is a simple yet powerful program for converting X-ray powder -diffraction data to atomic Pair Distribution Functions (PDFs). -PDFgetX3 can be used in a batch mode to convert a series of data files -without user intervention. PDFgetX3 can be also run in an interactive -mode that allows to control process parameters and plot the PDFs -and any intermediate results. Users can interactively tune the -PDF processing parameters, visualize their effect on the results and -adjust them to their optimum values. The PDFgetX3 software comes with a -Python library of PDF processing functions, which can be easily used in -custom Python scripts. - - -.. index:: license - -License notice ------------------------------------------------------------------------- - -.. include:: ../../LICENSENOTICE.txt - - -.. index:: authors - -Authors ------------------------------------------------------------------------- - -This code was written by members of the Billinge Group at -Columbia University including: - -Pavol Juhás, -Timur Davis, -Christopher Farrow, -Simon Billinge. - - -.. index:: citation, reference - -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: - - P. Juhás and T. Davis, C. L. Farrow, S. J. L. Billinge - `PDFgetX3: A rapid and highly automatable program for processing - powder diffraction data into total scattering pair distribution - functions `_, - *J. Appl. Cryst.* **46**, 560-566 (2013) diff --git a/static_root/doc/pdfgetx3/_sources/options.rst.txt b/static_root/doc/pdfgetx3/_sources/options.rst.txt deleted file mode 100644 index 191638a1..00000000 --- a/static_root/doc/pdfgetx3/_sources/options.rst.txt +++ /dev/null @@ -1,337 +0,0 @@ -Options and parameters -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -PDFgetX3 is very flexible in allowing users to customize the actions -of the program. It has a number of parameters that can be -specified either in configuration file or as a command line options. -Here is a complete description of the parameters and options used by -the program. - - -.. Note :: - - The command line options start with a leading "-" and can - be only used as command line arguments when starting the - :program:`pdfgetx3` program. Within configuration file the parameter - names are plain words without any leading dashes. Finally, - parameters can be also set in the interactive mode as attributes of - the :interactvar:`config` object, but the assignments must be valid - Python statements. Here are examples of setting composition of - a processed specimen using each of these forms: - - #. assigned in the configuration file ``pdfgetx3.cfg``:: - - ... - composition = CaTiO3 - ... - - #. set as a command-line option when starting :program:`pdfgetx3`:: - - pdfgetx3 --composition=CaTiO3 - - #. set in the IPython interactive mode:: - - pdfgetx3 -i - ... - In [1]: config.composition = "CaTiO3" - - -Program operation ------------------------------------------------------------------------- - -.. option:: -h, --help - - Display a brief usage information with a list of command line options - and exit. - -.. option:: -V, --version - - Display the program version and exit. - -.. option:: --manual - - Open this manual in a Web browser and exit. - -.. option:: -f, --find -.. _my-findpatterns: - - Select input files that match all filename patterns. The command - line arguments are normally taken as input files. However, - with the :option:`!--find` option the arguments are understood as - filename patterns and the matching files are all used as inputs. - The input files are searched in the current and :confval:`!datapath` - directories. The file search stops at the first directory that - contains any matching files. The search patterns are interpreted - as fixed strings, all of which must be present in the matching file - name. The syntax supports several special patterns: - - .. tabularcolumns:: |l|p{0.75\textwidth}| - - +---------+------------------------------------------------------------+ - | ^ | match at the beginning of the string, i.e., ``^start`` | - | | matches only filenames that start with "start". | - +---------+------------------------------------------------------------+ - | $ | match the end of string, for example, ``.chi$`` matches | - | | file names that end with ".chi". | - +---------+------------------------------------------------------------+ - | | match number *N* preceded by any number of leading zeros, | - | | e.g., ``<7>`` would match in "f7.chi", "f007.chi", but not | - | | in "f77.chi". | - +---------+------------------------------------------------------------+ - | | match an integer range from *N* to *M* inclusive. | - | | The matched number may have one or more leading zeros. | - +---------+------------------------------------------------------------+ - | <7-> | match number 7 or larger. | - +---------+------------------------------------------------------------+ - | <-7> | match number 7 or smaller. | - +---------+------------------------------------------------------------+ - | <-> | match any integer number. | - +---------+------------------------------------------------------------+ - - The ``^$<>`` characters are often special to the Unix or Windows - command shells, therefore they need to be enclosed in double - quotes (\\") when used on the command line. - - See also :confval:`datapath`, :envvar:`PDFGETX3PATH` and - :ref:`tutorial examples `. - -.. option:: -l, --list - - List all input files and exit. This is useful with the - :option:`!--find` option to verify if the input files - are matched as intended. - - -Configuration file options ------------------------------------------------------------------------- - -.. option:: -c CONFIG, --config=CONFIG - - Read custom configuration file after loading the default ones. - Do not load any configuration file when "NONE". - -.. option:: -s NAME, --section=NAME - - Load the custom configuration file section ``[SectionName]`` after - loading the ``[DEFAULT]`` section. This is useful for creating - several configuration variants in a single configuration file. - -.. option:: --createconfig=FILE - - Write template configuration to a new FILE and exit. Write - to the standard output when FILE is "-". - -See also the :ref:`configuration file ` section -for further details. - -.. _my-ioparameters: - -Input and output options ------------------------------------------------------------------------- - -.. confval:: inputfile - - This parameter allows to specify one or more input files in the - configuration file, one file per line. The :confval:`!inputfile` - is only used if no input files were provided on the - :program:`pdfgetx3` command line. - -.. confval:: dataformat -.. option:: --format=FORMAT - - Format of input files. Available formats are: ``twotheta``, ``QA``, - ``Qnm`` corresponding to a two-column text data where the first - column is either the scattering angle |twotheta| in degrees, *Q* in - inverse ångströms or *Q* in inverse nanometers. - -.. confval:: backgroundfile -.. option:: -b FILE, --background=FILE - - Optional datafile with background intensities from an empty sample - holder. It must be in the same dataformat as other input files. - -.. _my-datapath: -.. confval:: datapath -.. option:: -d DATAPATH, --datapath=DATAPATH - - One or more extra directories to be searched for input or - background data files. The default path is given by the - :envvar:`PDFGETX3PATH` environment variable. The :option:`!-d` - option can be specified several times to add more directories, these - are prepended in front of any default value. Within configuration - file the datapath directories have to be listed each on a separate - line. - - A special value "NONE" (or "none") clears any previously defined - paths and only the further paths, if any, would be searched for - inputs. - -.. confval:: output -.. option:: -o OUTPUT, --output=OUTPUT - - Output file name, write to the standard output when "-". The - :option:`-t, --outputtypes <-t>` option controls what results are - being saved. Normally the OUTPUT is used as a custom basename for - the output files. The OUTPUT may contain @f, @h, @r, @e, @t, @b, @o - tokens, which are expanded as follows: - - ===== ================== ======================================= - token example definition - ===== ================== ======================================= - @h dir1/dir2 the input file head directory or '.' - @r dir1/dir2/filename the input path with extension removed - @e dat the input file extension without '.' - @t filename.dat the tail component of the input file - @b filename the tail component with extension removed - @o gr the output extension iq, sq, fq or gr - ===== ================== ======================================= - - An empty value works the same as "@b.@o" and saves the data - in the current directory with a proper extension for the - saved results. When "@o" is not present in the OUTPUT, it is - appended as a default filename extension. - -.. confval:: outputtypes -.. option:: -t TYPES, --outputtypes=TYPES - - Result types to be saved, one or more comma separated values. - Supported values are "iq", "sq", "fq", "gr", corresponding to the - |IQ|, |SQ|, |FQ| and |Gr| curves; these are also used as output - file extensions. - - Result files are not written when empty, "none" or "NONE". - -.. confval:: force -.. option:: --force=FORCE - - Overwrite existing output files. By default the output - files are not written if they already exist. Possible values - in a configuration file are "true", "yes", "on", "1" or - "false", "no", "off", "0" or "once". The special value "once" - permits one overwrite and then resets ``config.force`` to - ``False``. Note that in interactive mode the values assigned - to ``config.force`` are converted to Python :py:class:`bool` - unless equal to "once". - - -.. _my-pdfparameters: - -PDF parameters ------------------------------------------------------------------------- - -.. - .. confval:: mode - .. option:: --mode=STRING - - The PDF calculator configuration mode, i.e., name of the calculator - setup. The available modes correspond to the radiation type used - in the powder experiment and these are: 'xray', 'electron', 'neutron' - - The 'electron' and 'neutron' modes are under development and should - not be considered reliable. - -.. confval:: wavelength -.. option:: -w FLOAT, --wavelength=FLOAT - - X-ray wavelength in ångströms. This value is required - for the "twotheta" dataformat in order to convert the scattering - angles |twotheta| to a momentum transfer *Q*. For other data formats - the wavelength is not necessary and may be left undefined. - -.. confval:: composition -.. option:: --composition=STRING - - Chemical composition of the sample. Supported formats are - "PbTi0.5Zr0.5O3", "Pb 1 Ti 1/2 Zr 1/2 O 3" or "CH3 (CH2)3 OH". - Space characters are ignored, unit counts can be omitted, but it is - important to use a proper upper and lower case in atom symbols. - Elements can appear several times in the formula, e.g., "CH3 CH3", - and the formula may contain parentheses or fractional - stoichiometries. - -.. confval:: bgscale -.. option:: --bgscale=FLOAT - - Scaling of the background intensities loaded from the - :confval:`backgroundfile`, by default 1. - -.. confval:: rpoly -.. option:: --rpoly=FLOAT - - *r*\ -limit for the maximum frequency in the |FQ| correction - polynomial. The PDF is unreliable at shorter *r*, however a very - small rpoly would disable polynomial correction and give noisy PDF. - Larger values produce closer fits with a higher degree polynomial, - but when too large, they might smooth-out a useful signal in the - data. The default is 0.9. - -.. confval:: qmaxinst -.. option:: --qmaxinst - - The *Q* cutoff for the meaningful input intensities in inverse - ångströms. Some data files may contain trailing zeros - or unreliable intensities at the upper bound of the detector range. - The :confval:`!qmaxinst` defines a threshold for unreliable data. - The parameter is also used as an upper boundary for the polynomial - fit correction of the |SQ| data. - -.. confval:: qmin -.. option:: --qmin - - The lower *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. - -.. confval:: qmax -.. option:: --qmax - - The upper *Q*-limit for the Fourier transformation of the |FQ| curve - in inverse ångströms. This is essentially a limit, where sample - signal decays to the level of data noise. - -.. confval:: rmin -.. option:: --rmin=FLOAT - - Lower bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rmax -.. option:: --rmax=FLOAT - - Upper bound of the *r*-grid for the calculated PDF in ångströms. - -.. confval:: rstep -.. option:: --rstep=FLOAT - - Spacing of the *r*-grid for the calculated PDF in ångströms. - - -Other parameters ------------------------------------------------------------------------- - -.. confval:: plot -.. option:: -p TYPES, --plot=TYPES - - Plot the specified results. A comma separated list with one or - more items from "iq", "sq", "fq", "gr". No plot is produced when - empty, "none" or "NONE". Setting this option turns on the - interactive mode. - -.. confval:: interact -.. option:: -i, --interact - - Start an IPython interactive session after processing all files. - Useful for tuning the configuration parameters or interactive - plotting. This is always on when plot option has been set. - See also :doc:`interact` for further details. - -.. confval:: verbose -.. option:: --verbose=VALUE - - Level of detail for the program to report about its actions. - Possible values are "error", "warning", "info", "debug", "all" or an - integer number from 0 to 5. Messages are completely suppressed when - 0, all messages are printed when verbose is 5 ("all") or higher. - This option is useful for diagnostics of any unexpected behavior - in the program. diff --git a/static_root/doc/pdfgetx3/_sources/plotdata.rst.txt b/static_root/doc/pdfgetx3/_sources/plotdata.rst.txt deleted file mode 100644 index a2b5fd95..00000000 --- a/static_root/doc/pdfgetx3/_sources/plotdata.rst.txt +++ /dev/null @@ -1,165 +0,0 @@ -.. index:: plotdata (program) -.. _cmd-plotdata: - -The plotdata program -======================================================================== - -.. include:: abbreviations.txt -.. program:: plotdata - -The PDFgetX3 software includes a simple stand-alone utility -:program:`plotdata` for plotting text data files. In most cases -this program can be invoked from a command-shell as :: - - plotdata file1.dat file2.dat - -which plots the numerical data from the text files :file:`file1.dat`, -:file:`file2.dat` together in a single graph. By default the first -column is used as an *x* variable and the second column is used for the -*y* values. After displaying the plot the program starts an IPython -interactive session allowing the user to modify or save plots. The -IPython session is initialized with the :data:`!filenames` variable -containing a list of plotted files. It also pre-loads the -|plotdata| and |findfiles| functions just as in the -:program:`pdfgetx3` interactive session. The :py:func:`!plotdata` -function works in a similar way as the :program:`plotdata` program, -just its arguments need to be passed as Python function arguments -instead of command-line options. Thus an equivalent call of the -:py:func:`!plotdata` function would be:: - - In [1]: plotdata(['file1.dat', 'file2.dat']) - - -selecting files ------------------------------------------------------------------------- - -The :program:`plotdata` program includes a file searching feature -that is useful for selecting a set of files in large -directories. It is also convenient for Windows operating systems, -where the command prompt cannot do filename expansion for patterns -such as ``*.dat``. The file search feature is controlled by the -following options: - -.. option:: -f, --find - - Use the command line arguments as filename patterns and plot the - files matching all patterns. This works almost the same as the - :option:`pdfgetx3 --find ` option, however - :program:`plotdata` does not recognize :confval:`datapath` and - searches for files only in the current directory. The filename - patterns are described in the - :option:`pdfgetx3 --find ` section. - If patterns contain any special characters ``^$<>`` they need to be - enclosed in double quotes (\\") on the command line so they don't get - interpreted by the command shell. - -.. option:: -l, --list - - List the input files and exit. This is useful in conjunction - with the :option:`!-f, --find` option to check if data files - are selected as intended. - -Assuming the current directory contains 20 files named -:file:`file1.dat`, :file:`file2.dat`, ..., :file:`file20.dat`, -the plotting of files 9 to 13 could be done (with a check listing) -as follows :: - - $ plotdata -fl "<9-13>.dat" - file9.dat - file10.dat - file11.dat - file12.dat - file13.dat - $ plotdata -f "<9-13>.dat" - -Within an interactive IPython session the equivalent plot could be -produced by combining the |plotdata| and |findfiles| functions as :: - - In [1]: plotdata(findfiles("<9-13>.dat")) - - -selecting x and y data ------------------------------------------------------------------------- - -The :program:`plotdata` program provides several ways of selecting -columns for x or y data and for specifying plot markers or line -formats. The columns can be specified using their integer index, -but one needs to keep in mind the index of the first column is "0" -as per Python indexing conventions. Here is a list of options -supported by the *plotdata* program (and function): - - -.. option:: -x X - - index or name of the x-column to plot. See the :option:`-y` option - for the supported syntax, but note that *X* may select only one - column. When set to "." use the data-row index for x. - -.. option:: -y Y - - index or name of the y-column or columns to plot. The *Y* column - specification can be a comma separated list of indices, column names - or Python-like ranges, for example "1,2", "G", "1:4" (START:STOP, - same as "1,2,3"), "1:4:2" (START:STOP:STEP, same as "1,3"), or - "-2:" (same as "-2,-1", i.e, the last 2 columns). The column - indexing starts at "0" therefore the second column needs to be - specified as "1". - - The column names work if the data section in the file is preceded by - a headline of unique column names, for example:: - - x square cube - 1 1 1 - 2 4 8 - 3 9 27 - 4 16 64 - - For this file the plotdata program will recognize column names - "x", "square" and "cube" and an implicit "." for row index. - -.. option:: -s STYLE, --style=STYLE - - optional plot format specification. See the - :func:`matplotlib.pyplot.plot` function - for a list of available formats. - -.. option:: -L LOG, --log=LOG - - axes to be plotted with logarithmic scaling, for example, "x", "y" or - "xy". Axes not listed in *LOG* will use linear scaling. - -.. option:: -h, --help - - display a brief usage info and exit. - -.. option:: -V, --version - - show program version and exit. - -.. option:: --manual - - Open this manual page in a Web browser and exit. - - -plotdata examples ------------------------------------------------------------------------- - -The :file:`examples/plotdata` directory contains a :file:`sincos.dat` -file that has 3-columns of data labeled as "x", "sin" and "cos". -Here are several examples of the :program:`plotdata` capabilities -when used from command line - the user is encouraged to try them out:: - - plotdata sincos.dat - plotdata -y 1,2 sincos.dat - plotdata -x . -y 0:3 sincos.dat - plotdata -y cos sincos.dat - plotdata -x sin -y cos -sr-- sincos.dat - -An equivalent usage from a general IPython session would be:: - - In [1]: from diffpy.pdfgetx.plotdata import plotdata - In [2]: plotdata('sincos.dat') - In [3]: plotdata('sincos.dat', y=[1,2]) - In [4]: plotdata('sincos.dat', x='.', y=':3') - In [5]: plotdata('sincos.dat', y='cos') - In [6]: plotdata('sincos.dat', x='sin', y='cos', style='r--') diff --git a/static_root/doc/pdfgetx3/_sources/quick-start.rst.txt b/static_root/doc/pdfgetx3/_sources/quick-start.rst.txt deleted file mode 100644 index 0d9cdef2..00000000 --- a/static_root/doc/pdfgetx3/_sources/quick-start.rst.txt +++ /dev/null @@ -1,118 +0,0 @@ -.. index:: pdfgetx3 (program) -.. _cmd-pdfgetx3: - -Quick-start guide -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 - -This guide assumes that the PDFgetX3 program has been correctly -installed and can be executed by typing :program:`pdfgetx3` in a shell -window. Please, refer to the :doc:`installation ` section if -this is not working yet. - -The pdfgetx3 program is a command-line application, therefore all -the input files and run-parameters are supplied either as command-line -arguments or through a configuration file. In general, the pdfgetx3 is -executed from a command shell as :: - - pdfgetx3 [options] input1 input2 ... inputN - -The :file:`inputN` stands for an input powder diffraction data. The -:file:`inputN` file is a simple two-column text file, where the first -column corresponds to either the |twotheta| diffraction angle, or a -momentum transfer, *Q*, in inverse nanometer or inverse ångström units. -The second column contains the corresponding X-ray intensities. The -input file may start with a header containing comments or metadata -related to the measurement. PDFgetX3 will ignore any text leading to a -long two-column section. The example input files in this manual were -created with the -`FIT2D program `_ using -its "chi" output format, thus we will also refer to them as "chi-files". - -The command-line options are arguments that start with a dash "-" and -are used to specify run-parameters or modify the program behavior. The -options can be specified in a short form that consists of a dash and -a single character, or in a long, more descriptive format starting with -a doubled dash ``--``. Options may require values. For short options, -the value may be joined to the option string, for example -:option:`!-w0.142774`, while for the long options it has to be separated -with an equal sign, e.g., :option:`!--wavelength=0.142774`. Although -all the PDF calculation parameters can be passed as command line -options, it is often more convenient to set them in a configuration -file. When run parameter is present both in a configuration file and -as command-line option, the command-line value takes precedence. The -command-line options are all described in the :doc:`options` section of -this manual. A brief summary of options can be also displayed by -executing :: - - pdfgetx3 --help - -The best way of getting familiar with PDFgetX3 is to process -the example diffraction data described in the :doc:`tutorial`. -In general, the first step is to create a commented configuration file -``pdfgetx3.cfg`` using:: - - pdfgetx3 --createconfig=pdfgetx3.cfg - -The configuration file can have any name, but it is preferable -to use either :file:`pdfgetx3.cfg` or :file:`.pdfgetx3.cfg`, -for these files are automatically loaded by PDFgetX3. All -other configuration files must be passed explicitly to the program -using the :option:`-c, --config <-c>` option. - -Open the pdfgetx3.cfg file in a **text** editor. The lines that -start with a hash mark ``#`` are comments and are not used. The lines -starting with a right brace ``[`` denote sections in the configuration -file. The active lines are all formatted as -"NAME=VALUE". Although PDFgetX3 has many options, in general only a few -of them are critical for the PDF calculation: - -* :confval:`dataformat` -- specifies the input data format - -* :confval:`wavelength` -- radiation wavelength in Å required for the - "twotheta" format. - -* :confval:`composition` -- chemical composition of the sample - -* :confval:`qmaxinst` -- upper *Q* boundary for a meaningful measurement - intensities. - -* :confval:`qmax` -- *Q*-cutoff for the Fourier transformation that - yields the PDF. - -Save the updated configuration file and run pdfgetx3 on the input data -:file:`FILENAME.chi` as :: - - pdfgetx3 --verbose=info -t gr FILENAME.chi - -Here the :option:`--verbose=info <--verbose>` option makes pdfgetx3 -print -more information about its operation. This helps to verify -if the configuration file is indeed loaded and if the parameter -values are assigned as intended. The PDFgetX3 will not write -any output files unless told so. The :option:`-t gr <-t>` option -tells the program to save the final |Gr| curve as a -:file:`FILENAME.gr` file in the working directory. - -The saved .gr file contains a header with all the calculation -parameters and the input file name. The .gr file can be therefore -also used as a configuration file in order to redo the same -calculation :: - - pdfgetx3 -c FILENAME.gr --plot=fq,gr - -Note this command does not include any .chi file and this will as -a result process the previously used input :file:`FILENAME.chi`. -The :option:`--plot=fq,gr <-p>` option tells PDFgetX3 to -display 2 plots for the reduced structure function |FQ| and the -final PDF |Gr|. The :option:`!--plot` option also implies an -:doc:`interactive mode ` -therefore the program does not exit, but starts an -interactive IPython session. To exit the interactive mode, -type ``exit()`` and press Enter. - -Please refer to the :doc:`tutorial section ` for -a step-by step processing of the example files and for -demonstration of the PDFgetX3 functions. diff --git a/static_root/doc/pdfgetx3/_sources/release.rst.txt b/static_root/doc/pdfgetx3/_sources/release.rst.txt deleted file mode 100644 index 209958f9..00000000 --- a/static_root/doc/pdfgetx3/_sources/release.rst.txt +++ /dev/null @@ -1,86 +0,0 @@ -.. index:: release notes - -Release Notes -======================================================================== - -.. include:: abbreviations.txt - -PDFgetX3 version 1.2 ------------------------------------------------------------------------- - -Sources were updated to support Python 3.4, 3.5, 3.6 in addition -to Python 2.6 and 2.7. - -The egg software package was enhanced to support all Python -versions. PDFgetX3 is now distributed in a single egg file -rather than in multiple eggs per each Python version. - -Added support for `IPython 5.0 `__ with -continued compatibility for IPython 0.10 and later. - -Added support for `matplotlib 2.0 `__. - -Changed :ref:`pdfgetx3 ` option -:option:`--force ` to take -a boolean value ("yes", "no", "true", etc.) or "once". -The configuration parameter :confval:`force` can be -set to a bool or to a string ``'once'``. This enables -safe one-time overwrite of existing output files. - -The :ref:`plotdata ` program learned a new option -:option:`--log=LOG ` to set logarithmic scale -for *x* or *y* axis. The |plotdata| function added a new -*log* argument for the same purpose. - -Added *ax* argument for the |plotdata| function to select -a specific matplotlib axis for plotting. - -Removed *hold* argument from the |plotdata| function, -because it was deprecated in matplotlib. - -Added support for Unicode filenames and values in -the :interactvar:`config` interactive variable. - -Updated plotting code to use the Unicode "Å" (Ångström) symbol in -axes labels. The "Å" symbol is also used to denote units in output -files. - -The parser of chemical formulas learned to read parentheses -and fractional stoichiometry as in ``'Pb (Ti Zr)1/2 O3'``. - -The |loadData| argument *usecols* was updated to accept scalars, -open-end :py:class:`slice` objects and string-specified -slices, such as ``'1:3'`` or ``'1:'``. - -The :ref:`plotdata ` program and |plotdata| -function learned to take open-end slices for the y-columns -selection. The plotdata utilities dropped support for -multiple x-columns. - -The :ref:`pdfgetx3 ` program learned to -avoid duplicate extension ".gr.gr" when run with -:option:`--output=f.gr `. - -Fixed crash on loading custom configuration section, -which is missing in global configuration file, but -is present in the local one. - -Removed import of all :py:mod:`numpy` names into the -interactive session. NumPy is available under the -``np`` name instead. - -Corrected missing checkbox in the :any:`tuneconfig` -dialog, which was caused by a bug in matplotlib. - -Added explanatory message for PDFgetX3 installed for -an incompatible Python version. - -The IPython magic function :ref:`%pdfgetx3 ` -was changed to set ``_exit_code`` as do the shell commands -run from IPython. - -Inline documentation adopted NumPy-style Napoleon format, -which is human readable and can be included in the manual. - -The software package files and documentation were updated -to build in a binary reproducible way. diff --git a/static_root/doc/pdfgetx3/_sources/tutorial.rst.txt b/static_root/doc/pdfgetx3/_sources/tutorial.rst.txt deleted file mode 100644 index 6d1ae870..00000000 --- a/static_root/doc/pdfgetx3/_sources/tutorial.rst.txt +++ /dev/null @@ -1,531 +0,0 @@ -Tutorial -======================================================================== - -.. include:: abbreviations.txt -.. program:: pdfgetx3 -.. index:: example files -.. py:currentmodule:: diffpy.pdfgetx - -In this tutorial we will convert several X-ray powder diffraction -patterns to corresponding PDFs. Open a terminal on a Unix-based system -or a Command Prompt on Windows and navigate to the :file:`examples` -folder included with the PDFgetX3 distribution. The :file:`examples` -folder can be found in the parent "doc" directory relative to this -document or another option is to just search your file system for -one of the input files mentioned below. -The example files are also available at -http://www.diffpy.org/doc/pdfgetx3/pdfgetx3-examples.zip. - - -.. index:: examples - -Nickel X-ray PDF ------------------------------------------------------------------------- - -predefined configuration file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -Change to the :file:`Ni` directory. The file named -:file:`ni300mesh_300k_nor_1-5.chi` contains powder X-ray data -measured from nickel at the Advanced Photon Source beamline -6ID-D. The file contains two columns for the |twotheta| scattering -angles and X-ray intensities. The second file -:file:`kapton_bgrd_300k_nor_2-3.chi` contains the background -measurement, i.e., the intensities from an empty capillary. -Finally, the :file:`pdfgetx3.cfg` contains a complete configuration -parameters for converting the powder pattern to a PDF. Since all -processing parameters are already defined in the configuration file, -the first PDF calculation is very simple and involves running the -:command:`pdfgetx3` program with the powder data file as an argument:: - - $ pdfgetx3 ni300mesh_300k_nor_1-5.chi - -For the first run there should be no output on the screen, -however a new file, :file:`ni300mesh_300k_nor_1-5.gr` should appear -in the work directory. We can use the :command:`plotdata` program, -installed with PDFgetX3, to plot the output data:: - - $ plotdata ni300mesh_300k_nor_1-5.gr - -This will open a graph window and start an IPython interactive session. -To exit and close the figure, type ``exit()`` on the IPython prompt. -Let's run the program again, but now with a -:option:`--verbose=info <--verbose>` -option, to show more details about the program actions. :: - - $ pdfgetx3 --verbose=info ni300mesh_300k_nor_1-5.chi - - INFO:checking for environment variable PDFGETX3PATH - INFO:searching for default config file /home/user/.pdfgetx3.cfg - INFO:searching for default config file .pdfgetx3.cfg - INFO:searching for default config file pdfgetx3.cfg - INFO:loaded default config file pdfgetx3.cfg - INFO:parsing config file section [DEFAULT] - INFO:set config.dataformat = twotheta - INFO:set config.backgroundfile = kapton_bgrd_300k_nor_2-3.chi - INFO:set config.outputtypes = gr - INFO:set config.wavelength = 0.142774 - INFO:set config.composition = Ni - INFO:set config.qmaxinst = 26.5 - INFO:set config.qmax = 26.0 - INFO:set config.rmin = 0.0 - INFO:set config.rmax = 30.0 - INFO:set config.rstep = 0.01 - INFO:finished parsing config file - INFO:processing command line options - INFO:set config.verbose = info - INFO:finished with command line options - INFO:using 1 input files from the command line. - INFO:configuring PDFGetter mode 'xray' - INFO:calling config_xray - INFO:started PDF processing. - INFO:processing 'ni300mesh_300k_nor_1-5.chi' - INFO:resolved output file '' as 'ni300mesh_300k_nor_1-5.gr' - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - INFO:elapsed time: 0.08 - -Here we can see what configuration files are searched, which of them -get loaded and what are the effective values of the processing -parameters. Unless the :option:`!--verbose` option is in effect, the -program will show only messages that have either WARNING or ERROR -importance. The warning line above indicates no output has been -written, because that file already exists. This safety check can be -overruled with the :option:`--force=yes <--force>` option, upon -which pdfgetx3 would overwrite any existing files. - -PDFgetX3 output files start with a header that lists all the processing -parameters and can be used as a valid configuration file with the -:option:`-c` option. Another option, :option:`--plot=[iq,sq,fq,gr] -<-p>` turns on plotting of the final PDF or of some other result. A -side effect of the :option:`!--plot` option is that pdfgetx3 starts in -an interactive mode, so the user can manipulate or save the plots. To -put it all together, we are now going to redo the original PDF and plot -its reduced total scattering function |FQ| and the PDF curve |Gr|. This -time the chi file is not necessary, because the input file is already -listed in the gr file that is now used as a custom configuration:: - - $ pdfgetx3 -c ni300mesh_300k_nor_1-5.gr --plot=fq,gr - - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - - Variables related to PDF processing: - - pdfgetter -- PDFGetter used for calculation. - config -- configuration data used by PDFGetter. - See config.inputfiles for a list of inputs. - iraw -- matrix of input raw intensities with 2 rows per file. - iq sq fq gr -- intermediate results per each input file stored - as matrix rows. - - Functions: - - tuneconfig -- dynamically tune configuration variables. - processFiles -- process specified data files. - clearSession -- clear all elements from the inputfiles, iraw, - iq, sq, fq and gr variables. - plotdata -- plot all or selected columns from a text data file. - loadData -- load all or selected columns from a text data file. - findfiles -- search for files matching the specified patterns. - - Use "%pdfgetx3" for a fresh run without exiting IPython. - In [1]: - -This will open a plot figure similar to - -.. image:: images/nickelfqgr.png - -Because of the :doc:`interactive mode ` implied by plotting, -the program -enters an IPython session. -The IPython environment is preloaded with several extra functions -and variables related to the PDF processing. For example, the -:interactvar:`config` variable stores all the configuration parameters, -and its content can be displayed with the :py:func:`print` -function as :: - - In [1]: print(config) - - args = ['-c', 'ni300mesh_300k_nor_1-5.gr', '--plot=fq,gr'] - configfile = ni300mesh_300k_nor_1-5.gr - ... - qmax = 26.0 - ... - -The :py:func:`.processFiles` function allows to redo the -whole calculation and plotting process for additional input files or -for new parameter values. To plot the |FQ| and |Gr| -curves calculated at |Qmax| = 22 |Ainv|, we can call -:py:func:`!processFiles` and pass it a keyword argument for -the new qmax as follows:: - - In [2]: processFiles(qmax=22) - - # the qmax parameter was updated to a new value, thus - In [3]: config.qmax - Out[3]: 22 - -There should be now two lines in each plot axis corresponding to -the results at |Qmax| equal 26 and 22 |Ainv|. To exit the program, -type ``exit()``. - - -processing from scratch -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -We have already encountered the command-line :option:`option -c <-c>` -for specifying a custom configuration file. A special argument "NONE", -will make pdfgetx3 ignore any configuration files and start up in a -default state. We can use this feature to process the nickel PDF as if -we did not have any configuration file:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi - - WARNING:Nothing to do, use "-t" or "--plot" options. - ERROR:Configuration error: wavelength not specified. - ERROR:See "--help" for more hints. - -There is an error, for the wavelength is necessary to convert -the scattering angle |twotheta| to momentum transfer *Q*. The -X-ray wavelength was 0.142774 Å, which can be passed with the -:option:`-w, --wavelength <-w>` option:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 - - ... - ERROR:Configuration error: Chemical composition not known. - ERROR:See "--help" for more hints. - -There is still an error. The PDF calculation needs an average -X-ray scattering factor of the material, which is obtained from -sample chemical composition. The composition can be specified -with the :option:`--composition` option. The example -below uses a "\\\\" character to indicate the command continues -on the next line. Such syntax works in Unix terminals, but -on Windows the command has to be typed all on a single line:: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni - - WARNING:Nothing to do, use "-t" or "--plot" options. - ... - -There was no error message this time, but the program complains -about a lack of action. The pdfgetx3 program does not write any results -unless instructed by the :option:`-t, --outputtypes <-t>` option. -The outputtypes option recognizes the following result types: -"iq", "sq", "fq", "gr". One or more of these type strings, -separated by a comma, can be included with the -:option:`!-t` option, which will produce the corresponding -output files. An empty string, such as ``-t ""``, or ``-t NONE`` -may be used to clear any outputtypes defined in the configuration file, -and avoid the unseemly file-exists warnings. - -At this point, we will not write any output files, but will use the -:option:`--plot <-p>` option to display the calculated curves. The -:option:`!--plot` accepts the same arguments as outputtypes, so to -display the |FQ| and |Gr| curves we shall run :: - - $ pdfgetx3 -c NONE ni300mesh_300k_nor_1-5.chi -w 0.142774 \ - --composition=Ni --plot=fq,gr - - WARNING:qmaxinst reset to last nonzero point qmaxinst=28.0865680161 - WARNING:qmax reset to the data boundary qmaxinst=28.0865680161 - -which should open the following plot window: - -.. image:: images/nickelfqgrnoisy.png - -The graphs look terrible. The PDF is very noisy and the |FQ| curve -shows a sudden break at about 27 |Ainv|. What happened? The powder -intensities are inaccurate at a very top of the detector angular range. -The interactive session is setup with -:interactvar:`iraw`, :interactvar:`iq`, :interactvar:`sq`, -:interactvar:`fq`, :interactvar:`gr` -variables for the original raw data and intermediate results. We -are going to plot the "iq" variable that has the input intensities -resampled on the *Q* grid. The matplotlib function -:py:func:`~matplotlib.pyplot.clf` clears the figure, -the iq variable is a two-row matrix with *Q* and *I* rows, and the -:py:func:`~matplotlib.pyplot.axis` -function lets us zoom to a given range:: - - In [1]: clf() - In [2]: plot(iq[0], iq[1]) - Out[2]: [] - In [3]: axis([20, 29, 0, 3000]) - Out[3]: [20, 29, 0, 3000] - -The graph shows a sudden drop in the raw intensities at 27 |Ainv|. -The :confval:`qmaxinst` variable defines a *Q* cutoff for a meaningful -instrument intensities and, to be on a safe side, we are going to set -it to 26.5 |Ainv| :: - - In [4]: processFiles(qmaxinst=26.5) - WARNING:qmax reset to the data boundary qmaxinst=26.5 - -The updated curves looks reasonable without any oscillations and -breakpoints. The :py:func:`.tuneconfig` function provides a -GUI-driven way for visualizing the processing parameters and their -effect on the results. Type ``tuneconfig()`` to execute the function, -which should open a new window with several sliders. Try to move -different sliders and see how do the |FQ| and |Gr| curves change. -The :confval:`rpoly` parameter controls the degree of data-correction -polynomial and is an approximate low-*r* bound of reliable *G* -values. Once the parameters are tuned, they may be set to -exact values. We will also turn on the writing of the |Gr| -curve and save it to an output file :file:`nicmd.gr`:: - - In [14]: config.qmax = 26 - In [15]: config.outputtypes = 'gr' - In [16]: config.output = 'nicmd' - In [17]: processFiles() - - -Platinum data series ------------------------------------------------------------------------- - -PDFgetX3 has been designed to handle large series of data files. -With the fast area-detectors it is easy to measure hundreds of X-ray -patterns in a time or temperature series. Normally, these input -files need to be entered as command line arguments to the pdfgetx3 -program. This is usually no problem with Unix-like shells, which -expand filename patterns to a list of matching files. -However, such file generation is in general not available on Windows. -The input file names tend to include scan numbers which are useful -for selecting desired data, yet even with Unix shells it is -difficult to match a range of scan numbers -(`z-shell `_ being a notable exception). - -.. _my-findexamples: - -matching input files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The :program:`pdfgetx3` program includes a built-in function for finding -a set of input files. The command line arguments are normally taken as -input file names. However, if the :option:`-f, --find <-f>` option is -present, the arguments are understood as patterns and the program looks -for files that match ALL of them. Another option -:option:`-l, --list <-l>` makes pdfgetx3 print out the matching files -without any other action, which can be used to verify if the patterns -match intended files. - -We will try out this file search on platinum example files. Open a -terminal and navigate to the :file:`Pt` directory. There should be a -:file:`series` subdirectory with 6 chi files indexed from 903 to 908. -At first, let's stay in the :file:`Pt` directory and run the following -command :: - - $ pdfgetx3 --list --find - - Pt_bulk-00055-pdfgetx2.gr - Pt_bulk-00055-pdfgetx3.gr - Pt_bulk-00055.chi - Pt_bulk-00055.gr - empty_capillary-00032.chi - pdfgetx3.cfg - plotpdfcomparison.py - -Without any patterns the file search matches all files in the current -directory. Now let's try to add name patterns. There are few special -patterns, for example ``^`` matches at the beginning of the filename, -``$`` at the end and ```` matches a range of integer values from -*N* to *M*. The patterns containing ``^$<>`` need to be quoted as -these characters have special meaning in the shell. Here are some -examples how it works. - -Filenames containing "y":: - - $ pdfgetx3 --list --find y - empty_capillary-00032.chi - plotpdfcomparison.py - -Filenames that containing both "y" and "chi", here we use the -options :option:`!--list` and :option:`!--find` in an abbreviated -form :option:`!-l` and :option:`!-f`:: - - $ pdfgetx3 -lf y chi - empty_capillary-00032.chi - -Filenames that start with "e":: - - $ pdfgetx3 --list --find "^e" - empty_capillary-00032.chi - -Filenames that contain *character* "2":: - - $ pdfgetx3 --list --find 2 - Pt_bulk-00055-pdfgetx2.gr - empty_capillary-00032.chi - -Filenames that contain *numeric value* "2":: - - $ pdfgetx3 -lf "<2>" - Pt_bulk-00055-pdfgetx2.gr - - -data search path -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -PDFgetX3 can be run with the :option:`-d, --datapath <-d>` option, which -tells it to search additional directories for input data files. The -:option:`!-d` option can be used several times to search more -directories. The data directories can be also defined with the -:envvar:`PDFGETX3PATH` environment variable. Here we will use -the :option:`!-d` option to match files in the :file:`series` -subdirectory. The search stops at the first directory that contains -any match, therefore :: - - $ pdfgetx3 --datapath=series --list --find Pt chi - Pt_bulk-00055.chi - -matches just one file in the current working directory, but :: - - $ pdfgetx3 --datapath=series --list --find Pt "<906->.chi" - series/Pt_bulk_ramp03-00906.chi - series/Pt_bulk_ramp03-00907.chi - series/Pt_bulk_ramp03-00908.chi - -finds 3 files, because only the :file:`series` folder contains -file names with "Pt" and a number "906" or higher followed -by ".chi". - - -output file names -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -By default the output files are saved in the current directory. The -output path, can be changed with the :option:`-o, --output <-o>` option. -The :option:`!-o` recognizes several aliases that are replaced with -parts of the input file name, for example, "@b" expands to an -extension-stripped base name. In similar faction, "@o" is replaced -with the output type extension. Thus to generate PDFs for all files -in the :file:`series` directory and save them in the -:file:`series-gr` subfolder do :: - - $ pdfgetx3 -d series --find "<900-910>.chi" --output=series-gr/@b.@o - -The extension ".@o" is automatic when not included anywhere in the -output file name. Thus to process the Pt series at |Qmax| = 18 |Ainv| -while saving the results in the same folder, but with "qmax18" in their -filename can be done with:: - - $ pdfgetx3 -d series --find "<900-910>.chi" --qmax=18 -o series-gr/@b_qmax18 - -The :file:`series-gr` directory should now contain 12 gr files, -6 of them processed at the |Qmax| = 27 |Ainv| from the configuration -file and 6 other at |Qmax| = 18 |Ainv|. - - -.. index:: tuneconfig (example) -.. _my-tuneconfig: - -Interactive tuning of parameters ------------------------------------------------------------------------- - -One of the most powerful features of PDFgetX3 is the ability to tune -PDF processing parameters in an interactive mode and immediately -visualize their effect on the results. To demonstrate this feature, -navigate to the :file:`examples/Ni` directory in the shell and process -the nickel PDF while plotting the |FQ| and |Gr| curves. -Because of plotting the program will open an interactive IPython -session. The tuning mode can be then entered by calling the -:py:func:`.tuneconfig` -function from the IPython environment :: - - $ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi - ... - In [1]: tuneconfig() - -The -:py:func:`!tuneconfig` -function will by default add a second set of live lines -for the plotted curves and open a GUI dialog with sliders for the -tunable process parameters. Changing any slider would immediately -recalculate the PDF and update live lines in the plot. - -.. image:: images/tunenickelfqgr.png - -The *constant data scale* check-box rescales the result curves to a -constant maximum value. This is useful for assessing if a parameter -change produces different curve shape or if it just rescales the -results. The tunable parameters are described in the -:ref:`PDF parameters section `. -Only the active parameters are displayed in the tuneconfig GUI, -thus there would be no slider for the :confval:`bgscale` parameter -if PDF has been processed without any background data. - -By default the -:py:func:`!tuneconfig` -function displays the same curves as -specified by the :option:`--plot <-p>` option, however it can be -configured to show arbitrary intermediate results or even visualize -selected steps in the PDF processing. We shall demonstrate this by -showing a live-plot of the polynomial correction together with the final -PDF. At first, we shall use the :py:meth:`!describe` method of the -:py:func:`.pdfgetter` object to print out the chain of -transformations involved in the PDF processing and obtain a reference to -the transformation object *t4* that applies the polynomial correction. -The transformation object can be then included in a list of plot -identifiers that are passed to the :py:func:`!tuneconfig` function :: - - $ pdfgetx3 --plot=fq,gr ni300mesh_300k_nor_1-5.chi - ... - Use "%pdfgetx3" for a fresh run without exiting IPython. - - In [1]: clf() - In [2]: pdfgetter.describe() - 0 TransformTwoThetaToQA - convert x data from twotheta to Q in 1/A - 1 TransformQGridRegular - Remove the data outside the (qmin, qmaxinst) range - 2 TransformBackground - subtract background intensity - 3 TransformXrayASFnormChris - scale and normalize intensities by x-ray scattering factors - 4 TransformSQnormRPoly - Normalize S(Q) by fitting a polynomial - 5 TransformSQToFQ - Convert S(Q) to F(Q). - 6 TransformFQgrid - Resample F(Q) to a regular grid suitable for FFT - 7 TransformFQToGr - Convert F(Q) to G(r). - In [3]: t4 = pdfgetter.getTransformation(4) - In [4]: tuneconfig([t4, 'gr']) - -The :py:func:`!clf` function used above -clears the figure to remove the initial -|FQ| line from the first panel. Overall, this should display the -following plot: - -.. image:: images/tunenickelt4gr.png - -The tuning can be finished by clicking the ``Done`` button or closing the -tuneconfig GUI window. The parameter values can be thereafter adjusted -to a rounded values by setting an attribute of the :interactvar:`config` -object, for example:: - - In [5]: config.bgscale = 1.5 - -Finally, to save the new results, we shall first confirm -:confval:`outputtypes` have been correctly set and then use the -:py:func:`.processFiles` function to redo the calculations, plots and -data output for the updated configuration. Note that the -:py:func:`!processFiles` function accepts keyword arguments for -configuration parameters. This is used at line ``In [8]`` to -turn on the :confval:`force` flag and is in effect a shortcut -for an extra ``config.force = True`` statement. :: - - In [6]: config.outputtypes - Out[6]: ['gr'] - In [7]: processFiles() - WARNING:ni300mesh_300k_nor_1-5.gr already exists. - WARNING:Use "--force=yes" or "--force=once" to overwrite. - In [8]: processFiles(force=True) - -:file:`ni300mesh_300k_nor_1-5.gr` was successfully saved at an -updated configuration for there were no warnings after the last call. diff --git a/static_root/doc/pdfgetx3/_static/ajax-loader.gif b/static_root/doc/pdfgetx3/_static/ajax-loader.gif deleted file mode 100644 index 61faf8ca..00000000 Binary files a/static_root/doc/pdfgetx3/_static/ajax-loader.gif and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_static/basic.css b/static_root/doc/pdfgetx3/_static/basic.css deleted file mode 100644 index 3c7223b1..00000000 --- a/static_root/doc/pdfgetx3/_static/basic.css +++ /dev/null @@ -1,643 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- 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 input[type="text"] { - width: 170px; -} - -img { - border: 0; - max-width: 100%; -} - -/* -- search page ----------------------------------------------------------- */ - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.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 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; -} - -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, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 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; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - border: 0; - border-collapse: collapse; -} - -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; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -/* -- figures --------------------------------------------------------------- */ - -div.figure { - margin: 0.5em; - padding: 0.5em; -} - -div.figure p.caption { - padding: 0.3em; -} - -div.figure p.caption span.caption-number { - font-style: italic; -} - -div.figure p.caption 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; -} - -/* -- 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; -} - -dl { - margin-bottom: 15px; -} - -dd p { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, span.highlighted { - background-color: #fbe54e; -} - -rect.highlighted { - fill: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.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; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -span.pre { - -moz-hyphens: none; - -ms-hyphens: none; - -webkit-hyphens: none; - hyphens: none; -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -div.code-block-caption { - padding: 2px 5px; - font-size: small; -} - -div.code-block-caption code { - background-color: transparent; -} - -div.code-block-caption + div > div.highlight > pre { - margin-top: 0; -} - -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 { - padding: 1em 1em 0; -} - -div.literal-block-wrapper div.highlight { - margin: 0; -} - -code.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -code.descclassname { - background-color: transparent; -} - -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: relative; - left: 0px; - 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_root/doc/pdfgetx3/_static/classic.css b/static_root/doc/pdfgetx3/_static/classic.css deleted file mode 100644 index 35562847..00000000 --- a/static_root/doc/pdfgetx3/_static/classic.css +++ /dev/null @@ -1,266 +0,0 @@ -/* - * classic.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- classic theme. - * - * :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: sans-serif; - font-size: 100%; - background-color: #11303d; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: #1c4e63; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: #ffffff; - color: #000000; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #ffffff; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #ffffff; - text-decoration: underline; -} - -div.related { - background-color: #133f52; - line-height: 30px; - color: #ffffff; -} - -div.related a { - color: #ffffff; -} - -div.sphinxsidebar { -} - -div.sphinxsidebar h3 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #ffffff; -} - -div.sphinxsidebar h4 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #ffffff; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #ffffff; -} - -div.sphinxsidebar a { - color: #98dbcc; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - - -/* for collapsible sidebar */ -div#sidebarbutton { - background-color: #3c6e83; -} - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #355f7c; - text-decoration: none; -} - -a:visited { - color: #355f7c; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Trebuchet MS', sans-serif; - background-color: #f2f2f2; - font-weight: normal; - color: #20435c; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #c60f0f; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #c60f0f; - color: white; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: #eeffcc; - color: #333333; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -code { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th { - background-color: #ede; -} - -.warning code { - background: #efc2c2; -} - -.note code { - background: #d6d6d6; -} - -.viewcode-back { - font-family: sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -div.code-block-caption { - color: #efefef; - background-color: #1c4e63; -} \ No newline at end of file diff --git a/static_root/doc/pdfgetx3/_static/comment-bright.png b/static_root/doc/pdfgetx3/_static/comment-bright.png deleted file mode 100644 index 15e27edb..00000000 Binary files a/static_root/doc/pdfgetx3/_static/comment-bright.png and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_static/comment-close.png b/static_root/doc/pdfgetx3/_static/comment-close.png deleted file mode 100644 index 4d91bcf5..00000000 Binary files a/static_root/doc/pdfgetx3/_static/comment-close.png and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_static/comment.png b/static_root/doc/pdfgetx3/_static/comment.png deleted file mode 100644 index dfbc0cbd..00000000 Binary files a/static_root/doc/pdfgetx3/_static/comment.png and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_static/doctools.js b/static_root/doc/pdfgetx3/_static/doctools.js deleted file mode 100644 index 24992e64..00000000 --- a/static_root/doc/pdfgetx3/_static/doctools.js +++ /dev/null @@ -1,311 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(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)) { - 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 bbox = span.getBBox(); - var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); - 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); - var parentOfText = node.parentNode.parentNode; - 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; -} - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return 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 : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keyup(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box or textarea - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - } - } - }); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); \ No newline at end of file diff --git a/static_root/doc/pdfgetx3/_static/down-pressed.png b/static_root/doc/pdfgetx3/_static/down-pressed.png deleted file mode 100644 index 5756c8ca..00000000 Binary files a/static_root/doc/pdfgetx3/_static/down-pressed.png and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_static/down.png b/static_root/doc/pdfgetx3/_static/down.png deleted file mode 100644 index 1b3bdad2..00000000 Binary files a/static_root/doc/pdfgetx3/_static/down.png and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_static/file.png b/static_root/doc/pdfgetx3/_static/file.png deleted file mode 100644 index a858a410..00000000 Binary files a/static_root/doc/pdfgetx3/_static/file.png and /dev/null differ diff --git a/static_root/doc/pdfgetx3/_static/jquery-3.1.0.js b/static_root/doc/pdfgetx3/_static/jquery-3.1.0.js deleted file mode 100644 index f2fc2747..00000000 --- a/static_root/doc/pdfgetx3/_static/jquery-3.1.0.js +++ /dev/null @@ -1,10074 +0,0 @@ -/*eslint-disable no-unused-vars*/ -/*! - * jQuery JavaScript Library v3.1.0 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2016-07-07T21:44Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var document = window.document; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - - - - function DOMEval( code, doc ) { - doc = doc || document; - - var script = doc.createElement( "script" ); - - script.text = code; - doc.head.appendChild( script ).parentNode.removeChild( script ); - } -/* global Symbol */ -// Defining this global in .eslintrc would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.1.0", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android <=4.0 only - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = jQuery.isArray( copy ) ) ) ) { - - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray( src ) ? src : []; - - } else { - clone = src && jQuery.isPlainObject( src ) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type( obj ) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - - // As of jQuery 3.0, isNumeric is limited to - // strings and numbers (primitives or objects) - // that can be coerced to finite numbers (gh-2662) - var type = jQuery.type( obj ); - return ( type === "number" || type === "string" ) && - - // parseFloat NaNs numeric-cast false positives ("") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - !isNaN( obj - parseFloat( obj ) ); - }, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - - /* eslint-disable no-unused-vars */ - // See https://github.com/eslint/eslint/issues/6125 - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - DOMEval( code ); - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE <=9 - 11, Edge 12 - 13 - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android <=4.0 only - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.0 - * https://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2016-01-04 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - disabledAncestor = addCombinator( - function( elem ) { - return elem.disabled === true; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !compilerCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - - if ( nodeType !== 1 ) { - newContext = context; - newSelector = selector; - - // qSA looks outside Element context, which is not what we want - // Thanks to Andrew Dupont for this workaround technique - // Support: IE <=8 - // Exclude object elements - } else if ( context.nodeName.toLowerCase() !== "object" ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[i] = "#" + nid + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement("fieldset"); - - try { - return !!fn( el ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - // Known :disabled false positives: - // IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset) - // not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Check form elements and option elements for explicit disabling - return "label" in elem && elem.disabled === disabled || - "form" in elem && elem.disabled === disabled || - - // Check non-disabled form elements for fieldset[disabled] ancestors - "form" in elem && elem.disabled === false && ( - // Support: IE6-11+ - // Ancestry is covered for us - elem.isDisabled === disabled || - - // Otherwise, assume any non-
'); - } - // Prettify the comment rating. - comment.pretty_rating = comment.rating + ' point' + - (comment.rating == 1 ? '' : 's'); - // Make a class (for displaying not yet moderated comments differently) - comment.css_class = comment.displayed ? '' : ' moderate'; - // Create a div for this comment. - var context = $.extend({}, opts, comment); - var div = $(renderTemplate(commentTemplate, context)); - - // If the user has voted on this comment, highlight the correct arrow. - if (comment.vote) { - var direction = (comment.vote == 1) ? 'u' : 'd'; - div.find('#' + direction + 'v' + comment.id).hide(); - div.find('#' + direction + 'u' + comment.id).show(); - } - - if (opts.moderator || comment.text != '[deleted]') { - div.find('a.reply').show(); - if (comment.proposal_diff) - div.find('#sp' + comment.id).show(); - if (opts.moderator && !comment.displayed) - div.find('#cm' + comment.id).show(); - if (opts.moderator || (opts.username == comment.username)) - div.find('#dc' + comment.id).show(); - } - return div; - } - - /** - * A simple template renderer. Placeholders such as <%id%> are replaced - * by context['id'] with items being escaped. Placeholders such as <#id#> - * are not escaped. - */ - function renderTemplate(template, context) { - var esc = $(document.createElement('div')); - - function handle(ph, escape) { - var cur = context; - $.each(ph.split('.'), function() { - cur = cur[this]; - }); - return escape ? esc.text(cur || "").html() : cur; - } - - return template.replace(/<([%#])([\w\.]*)\1>/g, function() { - return handle(arguments[2], arguments[1] == '%' ? true : false); - }); - } - - /** Flash an error message briefly. */ - function showError(message) { - $(document.createElement('div')).attr({'class': 'popup-error'}) - .append($(document.createElement('div')) - .attr({'class': 'error-message'}).text(message)) - .appendTo('body') - .fadeIn("slow") - .delay(2000) - .fadeOut("slow"); - } - - /** Add a link the user uses to open the comments popup. */ - $.fn.comment = function() { - return this.each(function() { - var id = $(this).attr('id').substring(1); - var count = COMMENT_METADATA[id]; - var title = count + ' comment' + (count == 1 ? '' : 's'); - var image = count > 0 ? opts.commentBrightImage : opts.commentImage; - var addcls = count == 0 ? ' nocomment' : ''; - $(this) - .append( - $(document.createElement('a')).attr({ - href: '#', - 'class': 'sphinx-comment-open' + addcls, - id: 'ao' + id - }) - .append($(document.createElement('img')).attr({ - src: image, - alt: 'comment', - title: title - })) - .click(function(event) { - event.preventDefault(); - show($(this).attr('id').substring(2)); - }) - ) - .append( - $(document.createElement('a')).attr({ - href: '#', - 'class': 'sphinx-comment-close hidden', - id: 'ah' + id - }) - .append($(document.createElement('img')).attr({ - src: opts.closeCommentImage, - alt: 'close', - title: 'close' - })) - .click(function(event) { - event.preventDefault(); - hide($(this).attr('id').substring(2)); - }) - ); - }); - }; - - var opts = { - processVoteURL: '/_process_vote', - addCommentURL: '/_add_comment', - getCommentsURL: '/_get_comments', - acceptCommentURL: '/_accept_comment', - deleteCommentURL: '/_delete_comment', - commentImage: '/static/_static/comment.png', - closeCommentImage: '/static/_static/comment-close.png', - loadingImage: '/static/_static/ajax-loader.gif', - commentBrightImage: '/static/_static/comment-bright.png', - upArrow: '/static/_static/up.png', - downArrow: '/static/_static/down.png', - upArrowPressed: '/static/_static/up-pressed.png', - downArrowPressed: '/static/_static/down-pressed.png', - voting: false, - moderator: false - }; - - if (typeof COMMENT_OPTIONS != "undefined") { - opts = jQuery.extend(opts, COMMENT_OPTIONS); - } - - var popupTemplate = '\ -
\ -

\ - Sort by:\ - best rated\ - newest\ - oldest\ -

\ -
Comments
\ -
\ - loading comments...
\ -
    \ -
    \ -

    Add a comment\ - (markup):

    \ -
    \ - reStructured text markup: *emph*, **strong**, \ - ``code``, \ - code blocks: :: and an indented block after blank line
    \ -
    \ - \ -

    \ - \ - Propose a change ▹\ - \ - \ - Propose a change ▿\ - \ -

    \ - \ - \ - \ - \ -
    \ -
    \ -
    '; - - var commentTemplate = '\ -
    \ -
    \ -
    \ - \ - \ - \ - \ - \ - \ -
    \ -
    \ - \ - \ - \ - \ - \ - \ -
    \ -
    \ -
    \ -

    \ - <%username%>\ - <%pretty_rating%>\ - <%time.delta%>\ -

    \ -
    <#text#>
    \ -

    \ - \ - reply ▿\ - proposal ▹\ - proposal ▿\ - \ - \ -

    \ -
    \
    -<#proposal_diff#>\
    -        
    \ -
      \ -
      \ -
      \ -
      \ - '; - - var replyTemplate = '\ -
    • \ -
      \ -
      \ - \ - \ - \ - \ - \ -
      \ -
      \ -
    • '; - - $(document).ready(function() { - init(); - }); -})(jQuery); - -$(document).ready(function() { - // add comment anchors for all paragraphs that are commentable - $('.sphinx-has-comment').comment(); - - // highlight search words in search results - $("div.context").each(function() { - var params = $.getQueryParameters(); - var terms = (params.q) ? params.q[0].split(/\s+/) : []; - var result = $(this); - $.each(terms, function() { - result.highlightText(this.toLowerCase(), 'highlighted'); - }); - }); - - // directly open comment window if requested - var anchor = document.location.hash; - if (anchor.substring(0, 9) == '#comment-') { - $('#ao' + anchor.substring(9)).click(); - document.location.hash = '#s' + anchor.substring(9); - } -}); diff --git a/static_root/doc/srrietveld/api/api-objects.txt b/static_root/doc/srrietveld/api/api-objects.txt deleted file mode 100644 index 2abeed19..00000000 --- a/static_root/doc/srrietveld/api/api-objects.txt +++ /dev/null @@ -1,441 +0,0 @@ -diffpy.srrietveld diffpy.srrietveld-module.html -diffpy.srrietveld.__package__ diffpy.srrietveld-module.html#__package__ -diffpy.srrietveld.addon diffpy.srrietveld.addon-module.html -diffpy.srrietveld.addon.__package__ diffpy.srrietveld.addon-module.html#__package__ -diffpy.srrietveld.addon.datafile diffpy.srrietveld.addon.datafile-module.html -diffpy.srrietveld.addon.datafile.readFileList diffpy.srrietveld.addon.datafile-module.html#readFileList -diffpy.srrietveld.addon.datafile.createDataDict diffpy.srrietveld.addon.datafile-module.html#createDataDict -diffpy.srrietveld.addon.datafile.__package__ diffpy.srrietveld.addon.datafile-module.html#__package__ -diffpy.srrietveld.addon.datafile.__id__ diffpy.srrietveld.addon.datafile-module.html#__id__ -diffpy.srrietveld.addon.debyefitting diffpy.srrietveld.addon.debyefitting-module.html -diffpy.srrietveld.addon.debyefitting.__package__ diffpy.srrietveld.addon.debyefitting-module.html#__package__ -diffpy.srrietveld.addon.debyefitting.__id__ diffpy.srrietveld.addon.debyefitting-module.html#__id__ -diffpy.srrietveld.addon.debyefitting.debye diffpy.srrietveld.addon.debyefitting-module.html#debye -diffpy.srrietveld.addon.debyefitting.adps diffpy.srrietveld.addon.debyefitting-module.html#adps -diffpy.srrietveld.addon.mcsampling diffpy.srrietveld.addon.mcsampling-module.html -diffpy.srrietveld.addon.mcsampling.importFromGSASstd diffpy.srrietveld.addon.mcsampling-module.html#importFromGSASstd -diffpy.srrietveld.addon.mcsampling.__package__ diffpy.srrietveld.addon.mcsampling-module.html#__package__ -diffpy.srrietveld.addon.mcsampling.importFromGSAStimemap diffpy.srrietveld.addon.mcsampling-module.html#importFromGSAStimemap -diffpy.srrietveld.addon.structurefile diffpy.srrietveld.addon.structurefile-module.html -diffpy.srrietveld.addon.structurefile.__package__ diffpy.srrietveld.addon.structurefile-module.html#__package__ -diffpy.srrietveld.addon.structurefile.__id__ diffpy.srrietveld.addon.structurefile-module.html#__id__ -diffpy.srrietveld.applications diffpy.srrietveld.applications-module.html -diffpy.srrietveld.applications.__id__ diffpy.srrietveld.applications-module.html#__id__ -diffpy.srrietveld.applications.__package__ diffpy.srrietveld.applications-module.html#__package__ -diffpy.srrietveld.applications.srhelp diffpy.srrietveld.applications.srhelp-module.html -diffpy.srrietveld.applications.srhelp.helpstring diffpy.srrietveld.applications.srhelp-module.html#helpstring -diffpy.srrietveld.applications.srhelp.getHelp diffpy.srrietveld.applications.srhelp-module.html#getHelp -diffpy.srrietveld.applications.srhelp.__id__ diffpy.srrietveld.applications.srhelp-module.html#__id__ -diffpy.srrietveld.applications.srhelp.__package__ diffpy.srrietveld.applications.srhelp-module.html#__package__ -diffpy.srrietveld.atom diffpy.srrietveld.atom-module.html -diffpy.srrietveld.atom.__package__ diffpy.srrietveld.atom-module.html#__package__ -diffpy.srrietveld.atom.PARAMNAMES diffpy.srrietveld.atom-module.html#PARAMNAMES -diffpy.srrietveld.atom.__id__ diffpy.srrietveld.atom-module.html#__id__ -diffpy.srrietveld.bugreport diffpy.srrietveld.bugreport-module.html -diffpy.srrietveld.bugreport.FORM_REALM diffpy.srrietveld.bugreport-module.html#FORM_REALM -diffpy.srrietveld.bugreport.FORM_USER diffpy.srrietveld.bugreport-module.html#FORM_USER -diffpy.srrietveld.bugreport.ROOT_URL diffpy.srrietveld.bugreport-module.html#ROOT_URL -diffpy.srrietveld.bugreport.submitBugReport diffpy.srrietveld.bugreport-module.html#submitBugReport -diffpy.srrietveld.bugreport.FORM_ENCPW diffpy.srrietveld.bugreport-module.html#FORM_ENCPW -diffpy.srrietveld.bugreport.__package__ diffpy.srrietveld.bugreport-module.html#__package__ -diffpy.srrietveld.bugreport.__id__ diffpy.srrietveld.bugreport-module.html#__id__ -diffpy.srrietveld.bugreport.FORM_URL diffpy.srrietveld.bugreport-module.html#FORM_URL -diffpy.srrietveld.bugreport.getFormData diffpy.srrietveld.bugreport-module.html#getFormData -diffpy.srrietveld.buildfit diffpy.srrietveld.buildfit-module.html -diffpy.srrietveld.buildfit.__package__ diffpy.srrietveld.buildfit-module.html#__package__ -diffpy.srrietveld.buildfit.__id__ diffpy.srrietveld.buildfit-module.html#__id__ -diffpy.srrietveld.convert diffpy.srrietveld.convert-module.html -diffpy.srrietveld.convert.__package__ diffpy.srrietveld.convert-module.html#__package__ -diffpy.srrietveld.convert.datafile diffpy.srrietveld.convert.datafile-module.html -diffpy.srrietveld.convert.datafile.__package__ diffpy.srrietveld.convert.datafile-module.html#__package__ -diffpy.srrietveld.convert.datafile.__id__ diffpy.srrietveld.convert.datafile-module.html#__id__ -diffpy.srrietveld.convert.gsasinstparser diffpy.srrietveld.convert.gsasinstparser-module.html -diffpy.srrietveld.convert.gsasinstparser.__id__ diffpy.srrietveld.convert.gsasinstparser-module.html#__id__ -diffpy.srrietveld.convert.gsasinstparser.__package__ diffpy.srrietveld.convert.gsasinstparser-module.html#__package__ -diffpy.srrietveld.convert.listfilereader diffpy.srrietveld.convert.listfilereader-module.html -diffpy.srrietveld.convert.listfilereader.readListFile diffpy.srrietveld.convert.listfilereader-module.html#readListFile -diffpy.srrietveld.convert.listfilereader.resolveColumnLabel diffpy.srrietveld.convert.listfilereader-module.html#resolveColumnLabel -diffpy.srrietveld.convert.listfilereader.__package__ diffpy.srrietveld.convert.listfilereader-module.html#__package__ -diffpy.srrietveld.convert.listfilereader.__id__ diffpy.srrietveld.convert.listfilereader-module.html#__id__ -diffpy.srrietveld.convert.listfilereader._LABELALIASES diffpy.srrietveld.convert.listfilereader-module.html#_LABELALIASES -diffpy.srrietveld.convert.strategyfile diffpy.srrietveld.convert.strategyfile-module.html -diffpy.srrietveld.convert.strategyfile.__package__ diffpy.srrietveld.convert.strategyfile-module.html#__package__ -diffpy.srrietveld.convert.strategyfile.__id__ diffpy.srrietveld.convert.strategyfile-module.html#__id__ -diffpy.srrietveld.convert.xmlparser diffpy.srrietveld.convert.xmlparser-module.html -diffpy.srrietveld.convert.xmlparser.__package__ diffpy.srrietveld.convert.xmlparser-module.html#__package__ -diffpy.srrietveld.convert.xmlparser.__id__ diffpy.srrietveld.convert.xmlparser-module.html#__id__ -diffpy.srrietveld.exceptions diffpy.srrietveld.exceptions-module.html -diffpy.srrietveld.exceptions.__package__ diffpy.srrietveld.exceptions-module.html#__package__ -diffpy.srrietveld.exceptions.__id__ diffpy.srrietveld.exceptions-module.html#__id__ -diffpy.srrietveld.export diffpy.srrietveld.export-module.html -diffpy.srrietveld.export.__generateCifFile diffpy.srrietveld.export-module.html#__generateCifFile -diffpy.srrietveld.export.exportEngineFile diffpy.srrietveld.export-module.html#exportEngineFile -diffpy.srrietveld.export.__generatePcrFile diffpy.srrietveld.export-module.html#__generatePcrFile -diffpy.srrietveld.export.__package__ diffpy.srrietveld.export-module.html#__package__ -diffpy.srrietveld.export.__id__ diffpy.srrietveld.export-module.html#__id__ -diffpy.srrietveld.export.__generateDISAGLFile diffpy.srrietveld.export-module.html#__generateDISAGLFile -diffpy.srrietveld.export.exportCifFile diffpy.srrietveld.export-module.html#exportCifFile -diffpy.srrietveld.export.exportDISAGLFile diffpy.srrietveld.export-module.html#exportDISAGLFile -diffpy.srrietveld.export.__generateEXPFile diffpy.srrietveld.export-module.html#__generateEXPFile -diffpy.srrietveld.fitrt diffpy.srrietveld.fitrt-module.html -diffpy.srrietveld.fitrt.__package__ diffpy.srrietveld.fitrt-module.html#__package__ -diffpy.srrietveld.fitrt.__id__ diffpy.srrietveld.fitrt-module.html#__id__ -diffpy.srrietveld.objectinfo diffpy.srrietveld.objectinfo-module.html -diffpy.srrietveld.objectinfo.setObjectInfo diffpy.srrietveld.objectinfo-module.html#setObjectInfo -diffpy.srrietveld.objectinfo.__id__ diffpy.srrietveld.objectinfo-module.html#__id__ -diffpy.srrietveld.objectinfo.__package__ diffpy.srrietveld.objectinfo-module.html#__package__ -diffpy.srrietveld.paramnames diffpy.srrietveld.paramnames-module.html -diffpy.srrietveld.paramnames.PARAMNAMES diffpy.srrietveld.paramnames-module.html#PARAMNAMES -diffpy.srrietveld.paramnames.__id__ diffpy.srrietveld.paramnames-module.html#__id__ -diffpy.srrietveld.paramnames.__package__ diffpy.srrietveld.paramnames-module.html#__package__ -diffpy.srrietveld.pattern diffpy.srrietveld.pattern-module.html -diffpy.srrietveld.pattern.PARAMNAMES diffpy.srrietveld.pattern-module.html#PARAMNAMES -diffpy.srrietveld.pattern.__package__ diffpy.srrietveld.pattern-module.html#__package__ -diffpy.srrietveld.pattern.__id__ diffpy.srrietveld.pattern-module.html#__id__ -diffpy.srrietveld.phase diffpy.srrietveld.phase-module.html -diffpy.srrietveld.phase.PARAMNAMES diffpy.srrietveld.phase-module.html#PARAMNAMES -diffpy.srrietveld.phase.__package__ diffpy.srrietveld.phase-module.html#__package__ -diffpy.srrietveld.phase.__id__ diffpy.srrietveld.phase-module.html#__id__ -diffpy.srrietveld.profile diffpy.srrietveld.profile-module.html -diffpy.srrietveld.profile.PARAMNAMES diffpy.srrietveld.profile-module.html#PARAMNAMES -diffpy.srrietveld.profile.__id__ diffpy.srrietveld.profile-module.html#__id__ -diffpy.srrietveld.profile.__package__ diffpy.srrietveld.profile-module.html#__package__ -diffpy.srrietveld.project diffpy.srrietveld.project-module.html -diffpy.srrietveld.project.copyObjectData diffpy.srrietveld.project-module.html#copyObjectData -diffpy.srrietveld.project.importEngineObject diffpy.srrietveld.project-module.html#importEngineObject -diffpy.srrietveld.project.__package__ diffpy.srrietveld.project-module.html#__package__ -diffpy.srrietveld.project.__id__ diffpy.srrietveld.project-module.html#__id__ -diffpy.srrietveld.project.exportEngineObject diffpy.srrietveld.project-module.html#exportEngineObject -diffpy.srrietveld.refinement diffpy.srrietveld.refinement-module.html -diffpy.srrietveld.refinement.PARAMNAMES diffpy.srrietveld.refinement-module.html#PARAMNAMES -diffpy.srrietveld.refinement.__id__ diffpy.srrietveld.refinement-module.html#__id__ -diffpy.srrietveld.refinement.__package__ diffpy.srrietveld.refinement-module.html#__package__ -diffpy.srrietveld.utility diffpy.srrietveld.utility-module.html -diffpy.srrietveld.utility.unique diffpy.srrietveld.utility-module.html#unique -diffpy.srrietveld.utility.printWarning diffpy.srrietveld.utility-module.html#printWarning -diffpy.srrietveld.utility.printDebugInfo diffpy.srrietveld.utility-module.html#printDebugInfo -diffpy.srrietveld.utility.parseXYToList diffpy.srrietveld.utility-module.html#parseXYToList -diffpy.srrietveld.utility.__package__ diffpy.srrietveld.utility-module.html#__package__ -diffpy.srrietveld.utility.checkFormat diffpy.srrietveld.utility-module.html#checkFormat -diffpy.srrietveld.utility.getFileid diffpy.srrietveld.utility-module.html#getFileid -diffpy.srrietveld.utility.importClass diffpy.srrietveld.utility-module.html#importClass -diffpy.srrietveld.version diffpy.srrietveld.version-module.html -diffpy.srrietveld.version.__id__ diffpy.srrietveld.version-module.html#__id__ -diffpy.srrietveld.version.__package__ diffpy.srrietveld.version-module.html#__package__ -trunk.diffpy.srrietveld.applications.refine trunk.diffpy.srrietveld.applications.refine-module.html -trunk.diffpy.srrietveld.applications.refine.__id__ trunk.diffpy.srrietveld.applications.refine-module.html#__id__ -trunk.diffpy.srrietveld.applications.refine.main trunk.diffpy.srrietveld.applications.refine-module.html#main -trunk.diffpy.srrietveld.applications.refine.applydata trunk.diffpy.srrietveld.applications.refine-module.html#applydata -diffpy.srrietveld.addon.datafile.DataFileConverter diffpy.srrietveld.addon.datafile.DataFileConverter-class.html -diffpy.srrietveld.addon.datafile.DataFileConverter.normalizeGSAS diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#normalizeGSAS -diffpy.srrietveld.addon.datafile.DataFileConverter.chiToFP diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#chiToFP -diffpy.srrietveld.addon.datafile.DataFileConverter.toGSASFile diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#toGSASFile -diffpy.srrietveld.addon.datafile.DataFileConverter.xyeToChi diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#xyeToChi -diffpy.srrietveld.addon.datafile.DataFileConverter.writeGSASStr diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#writeGSASStr -diffpy.srrietveld.addon.datafile.DataFileConverter.readDataFile diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#readDataFile -diffpy.srrietveld.addon.datafile.DataFileConverter.xyeToFP diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#xyeToFP -diffpy.srrietveld.addon.datafile.DataFileConverter.writeDataFile diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#writeDataFile -diffpy.srrietveld.addon.datafile.DataFileConverter.readGSASFile diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#readGSASFile -diffpy.srrietveld.addon.datafile.DataFileConverter.exportGSASToXYE diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#exportGSASToXYE -diffpy.srrietveld.addon.datafile.DataFileConverter.toFPFile diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#toFPFile -diffpy.srrietveld.addon.datafile.DataFileConverter.__init__ diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#__init__ -diffpy.srrietveld.addon.datafile.DataFileConverter.checkEXPFile diffpy.srrietveld.addon.datafile.DataFileConverter-class.html#checkEXPFile -diffpy.srrietveld.addon.debyefitting.DebyeFitting diffpy.srrietveld.addon.debyefitting.DebyeFitting-class.html -diffpy.srrietveld.addon.debyefitting.DebyeFitting._makeResidual diffpy.srrietveld.addon.debyefitting.DebyeFitting-class.html#_makeResidual -diffpy.srrietveld.addon.debyefitting.DebyeFitting.fit diffpy.srrietveld.addon.debyefitting.DebyeFitting-class.html#fit -diffpy.srrietveld.addon.debyefitting.DebyeFitting._optimize diffpy.srrietveld.addon.debyefitting.DebyeFitting-class.html#_optimize -diffpy.srrietveld.addon.debyefitting.DebyeFitting.plotResults diffpy.srrietveld.addon.debyefitting.DebyeFitting-class.html#plotResults -diffpy.srrietveld.addon.debyefitting.DebyeFitting.saveResults diffpy.srrietveld.addon.debyefitting.DebyeFitting-class.html#saveResults -diffpy.srrietveld.addon.debyefitting.DebyeFitting.__init__ diffpy.srrietveld.addon.debyefitting.DebyeFitting-class.html#__init__ -diffpy.srrietveld.addon.mcsampling.MonteCarloSampling diffpy.srrietveld.addon.mcsampling.MonteCarloSampling-class.html -diffpy.srrietveld.addon.mcsampling.MonteCarloSampling.getEngine diffpy.srrietveld.addon.mcsampling.MonteCarloSampling-class.html#getEngine -diffpy.srrietveld.addon.mcsampling.MonteCarloSampling.__init__ diffpy.srrietveld.addon.mcsampling.MonteCarloSampling-class.html#__init__ -diffpy.srrietveld.addon.mcsampling.MonteCarloSampling.genSamplingFromtimemap diffpy.srrietveld.addon.mcsampling.MonteCarloSampling-class.html#genSamplingFromtimemap -diffpy.srrietveld.addon.mcsampling.MonteCarloSampling.genSamplingFromchi diffpy.srrietveld.addon.mcsampling.MonteCarloSampling-class.html#genSamplingFromchi -diffpy.srrietveld.addon.mcsampling.MonteCarloSampling.genSamplingFromxye diffpy.srrietveld.addon.mcsampling.MonteCarloSampling-class.html#genSamplingFromxye -diffpy.srrietveld.addon.mcsampling.MonteCarloSampling.addSampleData diffpy.srrietveld.addon.mcsampling.MonteCarloSampling-class.html#addSampleData -diffpy.srrietveld.addon.structurefile.StructureFileConverter diffpy.srrietveld.addon.structurefile.StructureFileConverter-class.html -diffpy.srrietveld.addon.structurefile.StructureFileConverter.cifToDict diffpy.srrietveld.addon.structurefile.StructureFileConverter-class.html#cifToDict -diffpy.srrietveld.addon.structurefile.StructureFileConverter.__init__ diffpy.srrietveld.addon.structurefile.StructureFileConverter-class.html#__init__ -diffpy.srrietveld.atom.Atom diffpy.srrietveld.atom.Atom-class.html -diffpy.srrietveld.atom.Atom.getBiso diffpy.srrietveld.atom.Atom-class.html#getBiso -diffpy.srrietveld.atom.Atom.getXSigma diffpy.srrietveld.atom.Atom-class.html#getXSigma -diffpy.srrietveld.atom.Atom.getBisoSigma diffpy.srrietveld.atom.Atom-class.html#getBisoSigma -diffpy.srrietveld.atom.Atom.getEngineType diffpy.srrietveld.atom.Atom-class.html#getEngineType -diffpy.srrietveld.atom.Atom.getName diffpy.srrietveld.atom.Atom-class.html#getName -diffpy.srrietveld.atom.Atom.getZSigma diffpy.srrietveld.atom.Atom-class.html#getZSigma -diffpy.srrietveld.atom.Atom.getType diffpy.srrietveld.atom.Atom-class.html#getType -diffpy.srrietveld.atom.Atom.getX diffpy.srrietveld.atom.Atom-class.html#getX -diffpy.srrietveld.atom.Atom.getY diffpy.srrietveld.atom.Atom-class.html#getY -diffpy.srrietveld.atom.Atom.getZ diffpy.srrietveld.atom.Atom-class.html#getZ -diffpy.srrietveld.atom.Atom.getOccupation diffpy.srrietveld.atom.Atom-class.html#getOccupation -diffpy.srrietveld.atom.Atom.__init__ diffpy.srrietveld.atom.Atom-class.html#__init__ -diffpy.srrietveld.atom.Atom.getYSigma diffpy.srrietveld.atom.Atom-class.html#getYSigma -diffpy.srrietveld.atom.Atom.getUiso diffpy.srrietveld.atom.Atom-class.html#getUiso -diffpy.srrietveld.atom.Atom.getUisoSigma diffpy.srrietveld.atom.Atom-class.html#getUisoSigma -diffpy.srrietveld.buildfit.BuildFit diffpy.srrietveld.buildfit.BuildFit-class.html -diffpy.srrietveld.buildfit.BuildFit.buildPhase diffpy.srrietveld.buildfit.BuildFit-class.html#buildPhase -diffpy.srrietveld.buildfit.BuildFit.addBkgdPoints diffpy.srrietveld.buildfit.BuildFit-class.html#addBkgdPoints -diffpy.srrietveld.buildfit.BuildFit.buildPattern diffpy.srrietveld.buildfit.BuildFit-class.html#buildPattern -diffpy.srrietveld.buildfit.BuildFit.buildPeakProfile diffpy.srrietveld.buildfit.BuildFit-class.html#buildPeakProfile -diffpy.srrietveld.buildfit.BuildFit.addExre diffpy.srrietveld.buildfit.BuildFit-class.html#addExre -diffpy.srrietveld.buildfit.BuildFit.buildContribution diffpy.srrietveld.buildfit.BuildFit-class.html#buildContribution -diffpy.srrietveld.buildfit.BuildFit.buildFit diffpy.srrietveld.buildfit.BuildFit-class.html#buildFit -diffpy.srrietveld.buildfit.BuildFit.__init__ diffpy.srrietveld.buildfit.BuildFit-class.html#__init__ -diffpy.srrietveld.convert.datafile.DataFile diffpy.srrietveld.convert.datafile.DataFile-class.html -diffpy.srrietveld.convert.datafile.DataFile.prepDataFile diffpy.srrietveld.convert.datafile.DataFile-class.html#prepDataFile -diffpy.srrietveld.convert.datafile.DataFile.dump diffpy.srrietveld.convert.datafile.DataFile-class.html#dump -diffpy.srrietveld.convert.datafile.DataFile.__str__ diffpy.srrietveld.convert.datafile.DataFile-class.html#__str__ -diffpy.srrietveld.convert.datafile.DataFile.write diffpy.srrietveld.convert.datafile.DataFile-class.html#write -diffpy.srrietveld.convert.datafile.DataFile.__isConversionNeeded diffpy.srrietveld.convert.datafile.DataFile-class.html#__isConversionNeeded -diffpy.srrietveld.convert.datafile.DataFile.__init__ diffpy.srrietveld.convert.datafile.DataFile-class.html#__init__ -diffpy.srrietveld.convert.gsasinstparser.GSASInstFile diffpy.srrietveld.convert.gsasinstparser.GSASInstFile-class.html -diffpy.srrietveld.convert.gsasinstparser.GSASInstFile._readInstFile diffpy.srrietveld.convert.gsasinstparser.GSASInstFile-class.html#_readInstFile -diffpy.srrietveld.convert.gsasinstparser.GSASInstFile.parseTOFInst diffpy.srrietveld.convert.gsasinstparser.GSASInstFile-class.html#parseTOFInst -diffpy.srrietveld.convert.gsasinstparser.GSASInstFile.parseInstInfo diffpy.srrietveld.convert.gsasinstparser.GSASInstFile-class.html#parseInstInfo -diffpy.srrietveld.convert.gsasinstparser.GSASInstFile.parseCWInst diffpy.srrietveld.convert.gsasinstparser.GSASInstFile-class.html#parseCWInst -diffpy.srrietveld.convert.gsasinstparser.GSASInstFile.mapKey diffpy.srrietveld.convert.gsasinstparser.GSASInstFile-class.html#mapKey -diffpy.srrietveld.convert.gsasinstparser.GSASInstFile.parseInstType diffpy.srrietveld.convert.gsasinstparser.GSASInstFile-class.html#parseInstType -diffpy.srrietveld.convert.gsasinstparser.GSASInstFile.__init__ diffpy.srrietveld.convert.gsasinstparser.GSASInstFile-class.html#__init__ -diffpy.srrietveld.convert.listfilereader.CSVListFileReader diffpy.srrietveld.convert.listfilereader.CSVListFileReader-class.html -diffpy.srrietveld.convert.listfilereader.ListFileReader._validate diffpy.srrietveld.convert.listfilereader.ListFileReader-class.html#_validate -diffpy.srrietveld.convert.listfilereader.CSVListFileReader.readFile diffpy.srrietveld.convert.listfilereader.CSVListFileReader-class.html#readFile -diffpy.srrietveld.convert.listfilereader.ListFileReader.__init__ diffpy.srrietveld.convert.listfilereader.ListFileReader-class.html#__init__ -diffpy.srrietveld.convert.listfilereader.ListFileReader diffpy.srrietveld.convert.listfilereader.ListFileReader-class.html -diffpy.srrietveld.convert.listfilereader.ListFileReader._validate diffpy.srrietveld.convert.listfilereader.ListFileReader-class.html#_validate -diffpy.srrietveld.convert.listfilereader.ListFileReader.readFile diffpy.srrietveld.convert.listfilereader.ListFileReader-class.html#readFile -diffpy.srrietveld.convert.listfilereader.ListFileReader.__init__ diffpy.srrietveld.convert.listfilereader.ListFileReader-class.html#__init__ -diffpy.srrietveld.convert.strategyfile.StrategyFile diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html -diffpy.srrietveld.convert.strategyfile.StrategyFile.transRefinables diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#transRefinables -diffpy.srrietveld.convert.strategyfile.StrategyFile.getPosParamFullPath diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#getPosParamFullPath -diffpy.srrietveld.convert.strategyfile.StrategyFile.setStrategy diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#setStrategy -diffpy.srrietveld.convert.strategyfile.StrategyFile.removeStep diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#removeStep -diffpy.srrietveld.convert.strategyfile.StrategyFile._parsePath diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#_parsePath -diffpy.srrietveld.convert.strategyfile.StrategyFile.getStepParamList diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#getStepParamList -diffpy.srrietveld.convert.strategyfile.StrategyFile.__init__ diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#__init__ -diffpy.srrietveld.convert.strategyfile.StrategyFile.addNewStep diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#addNewStep -diffpy.srrietveld.convert.strategyfile.StrategyFile.readFile diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#readFile -diffpy.srrietveld.convert.strategyfile.StrategyFile.writeToFile diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#writeToFile -diffpy.srrietveld.convert.strategyfile.StrategyFile.getNumStep diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#getNumStep -diffpy.srrietveld.convert.strategyfile.StrategyFile.getStrategyStep diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#getStrategyStep -diffpy.srrietveld.convert.strategyfile.StrategyFile.getStrategy diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#getStrategy -diffpy.srrietveld.convert.strategyfile.StrategyFile.ResetVariableId diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#ResetVariableId -diffpy.srrietveld.convert.strategyfile.StrategyFile.addPosParam diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#addPosParam -diffpy.srrietveld.convert.strategyfile.StrategyFile.removePosParam diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#removePosParam -diffpy.srrietveld.convert.strategyfile.StrategyFile.getStrategyId diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#getStrategyId -diffpy.srrietveld.convert.strategyfile.StrategyFile.addParam diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#addParam -diffpy.srrietveld.convert.strategyfile.StrategyFile.mergeParamList diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#mergeParamList -diffpy.srrietveld.convert.strategyfile.StrategyFile.getNewVariableId diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#getNewVariableId -diffpy.srrietveld.convert.strategyfile.StrategyFile.getPosParamListId diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#getPosParamListId -diffpy.srrietveld.convert.strategyfile.StrategyFile.clear diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#clear -diffpy.srrietveld.convert.strategyfile.StrategyFile.getStepMethod diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#getStepMethod -diffpy.srrietveld.convert.strategyfile.StrategyFile.parseStrategyFile diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html#parseStrategyFile -diffpy.srrietveld.convert.xmlparser.BackgroundXML diffpy.srrietveld.convert.xmlparser.BackgroundXML-class.html -diffpy.srrietveld.convert.xmlparser.XMLFile.xmlToDict diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#xmlToDict -diffpy.srrietveld.convert.xmlparser.BackgroundXML.addToInstDict diffpy.srrietveld.convert.xmlparser.BackgroundXML-class.html#addToInstDict -diffpy.srrietveld.convert.xmlparser.XMLFile.importXMLFile diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#importXMLFile -diffpy.srrietveld.convert.xmlparser.BackgroundXML.__init__ diffpy.srrietveld.convert.xmlparser.BackgroundXML-class.html#__init__ -diffpy.srrietveld.convert.xmlparser.ExcludedRegionXML diffpy.srrietveld.convert.xmlparser.ExcludedRegionXML-class.html -diffpy.srrietveld.convert.xmlparser.XMLFile.xmlToDict diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#xmlToDict -diffpy.srrietveld.convert.xmlparser.XMLFile.importXMLFile diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#importXMLFile -diffpy.srrietveld.convert.xmlparser.ExcludedRegionXML.__init__ diffpy.srrietveld.convert.xmlparser.ExcludedRegionXML-class.html#__init__ -diffpy.srrietveld.convert.xmlparser.InstrumentXML diffpy.srrietveld.convert.xmlparser.InstrumentXML-class.html -diffpy.srrietveld.convert.xmlparser.XMLFile.xmlToDict diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#xmlToDict -diffpy.srrietveld.convert.xmlparser.XMLFile.importXMLFile diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#importXMLFile -diffpy.srrietveld.convert.xmlparser.InstrumentXML.__init__ diffpy.srrietveld.convert.xmlparser.InstrumentXML-class.html#__init__ -diffpy.srrietveld.convert.xmlparser.InstrumentXML.parseInstrumentXML diffpy.srrietveld.convert.xmlparser.InstrumentXML-class.html#parseInstrumentXML -diffpy.srrietveld.convert.xmlparser.StrategyXML diffpy.srrietveld.convert.xmlparser.StrategyXML-class.html -diffpy.srrietveld.convert.xmlparser.XMLFile.xmlToDict diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#xmlToDict -diffpy.srrietveld.convert.xmlparser.XMLFile.importXMLFile diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#importXMLFile -diffpy.srrietveld.convert.xmlparser.StrategyXML.__init__ diffpy.srrietveld.convert.xmlparser.StrategyXML-class.html#__init__ -diffpy.srrietveld.convert.xmlparser.StructureXML diffpy.srrietveld.convert.xmlparser.StructureXML-class.html -diffpy.srrietveld.convert.xmlparser.XMLFile.xmlToDict diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#xmlToDict -diffpy.srrietveld.convert.xmlparser.StructureXML.__init__ diffpy.srrietveld.convert.xmlparser.StructureXML-class.html#__init__ -diffpy.srrietveld.convert.xmlparser.StructureXML.parseStructureXML diffpy.srrietveld.convert.xmlparser.StructureXML-class.html#parseStructureXML -diffpy.srrietveld.convert.xmlparser.XMLFile.importXMLFile diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#importXMLFile -diffpy.srrietveld.convert.xmlparser.XMLFile diffpy.srrietveld.convert.xmlparser.XMLFile-class.html -diffpy.srrietveld.convert.xmlparser.XMLFile.xmlToDict diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#xmlToDict -diffpy.srrietveld.convert.xmlparser.XMLFile.importXMLFile diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#importXMLFile -diffpy.srrietveld.convert.xmlparser.XMLFile.__init__ diffpy.srrietveld.convert.xmlparser.XMLFile-class.html#__init__ -diffpy.srrietveld.exceptions.SrrConfigError diffpy.srrietveld.exceptions.SrrConfigError-class.html -diffpy.srrietveld.exceptions.SrrError.__str__ diffpy.srrietveld.exceptions.SrrError-class.html#__str__ -diffpy.srrietveld.exceptions.SrrConfigError.__init__ diffpy.srrietveld.exceptions.SrrConfigError-class.html#__init__ -diffpy.srrietveld.exceptions.SrrError diffpy.srrietveld.exceptions.SrrError-class.html -diffpy.srrietveld.exceptions.SrrError.__str__ diffpy.srrietveld.exceptions.SrrError-class.html#__str__ -diffpy.srrietveld.exceptions.SrrError.__init__ diffpy.srrietveld.exceptions.SrrError-class.html#__init__ -diffpy.srrietveld.exceptions.SrrFileError diffpy.srrietveld.exceptions.SrrFileError-class.html -diffpy.srrietveld.exceptions.SrrError.__str__ diffpy.srrietveld.exceptions.SrrError-class.html#__str__ -diffpy.srrietveld.exceptions.SrrFileError.__init__ diffpy.srrietveld.exceptions.SrrFileError-class.html#__init__ -diffpy.srrietveld.exceptions.SrrIOError diffpy.srrietveld.exceptions.SrrIOError-class.html -diffpy.srrietveld.exceptions.SrrError.__str__ diffpy.srrietveld.exceptions.SrrError-class.html#__str__ -diffpy.srrietveld.exceptions.SrrIOError.__init__ diffpy.srrietveld.exceptions.SrrIOError-class.html#__init__ -diffpy.srrietveld.exceptions.SrrInputError diffpy.srrietveld.exceptions.SrrInputError-class.html -diffpy.srrietveld.exceptions.SrrError.__str__ diffpy.srrietveld.exceptions.SrrError-class.html#__str__ -diffpy.srrietveld.exceptions.SrrInputError.__init__ diffpy.srrietveld.exceptions.SrrInputError-class.html#__init__ -diffpy.srrietveld.exceptions.SrrRunTimeError diffpy.srrietveld.exceptions.SrrRunTimeError-class.html -diffpy.srrietveld.exceptions.SrrError.__str__ diffpy.srrietveld.exceptions.SrrError-class.html#__str__ -diffpy.srrietveld.exceptions.SrrRunTimeError.__init__ diffpy.srrietveld.exceptions.SrrRunTimeError-class.html#__init__ -diffpy.srrietveld.exceptions.SrrValueError diffpy.srrietveld.exceptions.SrrValueError-class.html -diffpy.srrietveld.exceptions.SrrError.__str__ diffpy.srrietveld.exceptions.SrrError-class.html#__str__ -diffpy.srrietveld.exceptions.SrrValueError.__init__ diffpy.srrietveld.exceptions.SrrValueError-class.html#__init__ -diffpy.srrietveld.fitrt.FitRT diffpy.srrietveld.fitrt.FitRT-class.html -diffpy.srrietveld.fitrt.FitRT.setConstraint diffpy.srrietveld.fitrt.FitRT-class.html#setConstraint -diffpy.srrietveld.fitrt.FitRT.__setStrategy diffpy.srrietveld.fitrt.FitRT-class.html#__setStrategy -diffpy.srrietveld.fitrt.FitRT.run diffpy.srrietveld.fitrt.FitRT-class.html#run -diffpy.srrietveld.fitrt.FitRT.prepare diffpy.srrietveld.fitrt.FitRT-class.html#prepare -diffpy.srrietveld.fitrt.FitRT.prepareFile diffpy.srrietveld.fitrt.FitRT-class.html#prepareFile -diffpy.srrietveld.fitrt.FitRT.clean diffpy.srrietveld.fitrt.FitRT-class.html#clean -diffpy.srrietveld.fitrt.FitRT.refineSingleStep diffpy.srrietveld.fitrt.FitRT-class.html#refineSingleStep -diffpy.srrietveld.fitrt.FitRT.__init__ diffpy.srrietveld.fitrt.FitRT-class.html#__init__ -diffpy.srrietveld.objectinfo.ObjectInfo diffpy.srrietveld.objectinfo.ObjectInfo-class.html -diffpy.srrietveld.objectinfo.ObjectInfo.listParams diffpy.srrietveld.objectinfo.ObjectInfo-class.html#listParams -diffpy.srrietveld.objectinfo.ObjectInfo.getDescription diffpy.srrietveld.objectinfo.ObjectInfo-class.html#getDescription -diffpy.srrietveld.objectinfo.ObjectInfo.__init__ diffpy.srrietveld.objectinfo.ObjectInfo-class.html#__init__ -diffpy.srrietveld.objectinfo.ObjectInfo.get diffpy.srrietveld.objectinfo.ObjectInfo-class.html#get -diffpy.srrietveld.pattern.ExcludedRegion diffpy.srrietveld.pattern.ExcludedRegion-class.html -diffpy.srrietveld.pattern.ExcludedRegion.getBegin diffpy.srrietveld.pattern.ExcludedRegion-class.html#getBegin -diffpy.srrietveld.pattern.ExcludedRegion.getEngineType diffpy.srrietveld.pattern.ExcludedRegion-class.html#getEngineType -diffpy.srrietveld.pattern.ExcludedRegion.__init__ diffpy.srrietveld.pattern.ExcludedRegion-class.html#__init__ -diffpy.srrietveld.pattern.ExcludedRegion.getEnd diffpy.srrietveld.pattern.ExcludedRegion-class.html#getEnd -diffpy.srrietveld.pattern.Pattern diffpy.srrietveld.pattern.Pattern-class.html -diffpy.srrietveld.pattern.Pattern.getLambda1 diffpy.srrietveld.pattern.Pattern-class.html#getLambda1 -diffpy.srrietveld.pattern.Pattern.getLambda2 diffpy.srrietveld.pattern.Pattern-class.html#getLambda2 -diffpy.srrietveld.pattern.Pattern.getZeroSigma diffpy.srrietveld.pattern.Pattern-class.html#getZeroSigma -diffpy.srrietveld.pattern.Pattern.getRp diffpy.srrietveld.pattern.Pattern-class.html#getRp -diffpy.srrietveld.pattern.Pattern.getYcal diffpy.srrietveld.pattern.Pattern-class.html#getYcal -diffpy.srrietveld.pattern.Pattern.getLambda diffpy.srrietveld.pattern.Pattern-class.html#getLambda -diffpy.srrietveld.pattern.Pattern.getYobs diffpy.srrietveld.pattern.Pattern-class.html#getYobs -diffpy.srrietveld.pattern.Pattern.getLambda1Sigma diffpy.srrietveld.pattern.Pattern-class.html#getLambda1Sigma -diffpy.srrietveld.pattern.Pattern.getLambdaSigma diffpy.srrietveld.pattern.Pattern-class.html#getLambdaSigma -diffpy.srrietveld.pattern.Pattern.getUseFlag diffpy.srrietveld.pattern.Pattern-class.html#getUseFlag -diffpy.srrietveld.pattern.Pattern.getPolar diffpy.srrietveld.pattern.Pattern-class.html#getPolar -diffpy.srrietveld.pattern.Pattern.getEngineType diffpy.srrietveld.pattern.Pattern-class.html#getEngineType -diffpy.srrietveld.pattern.Pattern.getLambda2Sigma diffpy.srrietveld.pattern.Pattern-class.html#getLambda2Sigma -diffpy.srrietveld.pattern.Pattern.getBackgroundCoefficientsSigma diffpy.srrietveld.pattern.Pattern-class.html#getBackgroundCoefficientsSigma -diffpy.srrietveld.pattern.Pattern.getBackgroundCoefficients diffpy.srrietveld.pattern.Pattern-class.html#getBackgroundCoefficients -diffpy.srrietveld.pattern.Pattern.getNumOfBackgroundCoefficients diffpy.srrietveld.pattern.Pattern-class.html#getNumOfBackgroundCoefficients -diffpy.srrietveld.pattern.Pattern.getZero diffpy.srrietveld.pattern.Pattern-class.html#getZero -diffpy.srrietveld.pattern.Pattern.getTmax diffpy.srrietveld.pattern.Pattern-class.html#getTmax -diffpy.srrietveld.pattern.Pattern.getStep diffpy.srrietveld.pattern.Pattern-class.html#getStep -diffpy.srrietveld.pattern.Pattern.getAbsoluteDataFile diffpy.srrietveld.pattern.Pattern-class.html#getAbsoluteDataFile -diffpy.srrietveld.pattern.Pattern.getTmin diffpy.srrietveld.pattern.Pattern-class.html#getTmin -diffpy.srrietveld.pattern.Pattern.getPolarType diffpy.srrietveld.pattern.Pattern-class.html#getPolarType -diffpy.srrietveld.pattern.Pattern.listExcludedRegions diffpy.srrietveld.pattern.Pattern-class.html#listExcludedRegions -diffpy.srrietveld.pattern.Pattern.getBackgroundType diffpy.srrietveld.pattern.Pattern-class.html#getBackgroundType -diffpy.srrietveld.pattern.Pattern.getRatio diffpy.srrietveld.pattern.Pattern-class.html#getRatio -diffpy.srrietveld.pattern.Pattern.getDataFile diffpy.srrietveld.pattern.Pattern-class.html#getDataFile -diffpy.srrietveld.pattern.Pattern.__init__ diffpy.srrietveld.pattern.Pattern-class.html#__init__ -diffpy.srrietveld.pattern.Pattern.getXobs diffpy.srrietveld.pattern.Pattern-class.html#getXobs -diffpy.srrietveld.pattern.Pattern.getRwp diffpy.srrietveld.pattern.Pattern-class.html#getRwp -diffpy.srrietveld.pattern.Pattern.getScale diffpy.srrietveld.pattern.Pattern-class.html#getScale -diffpy.srrietveld.pattern.Pattern.getScaleSigma diffpy.srrietveld.pattern.Pattern-class.html#getScaleSigma -diffpy.srrietveld.phase.Phase diffpy.srrietveld.phase.Phase-class.html -diffpy.srrietveld.phase.Phase.getSpaceGroup diffpy.srrietveld.phase.Phase-class.html#getSpaceGroup -diffpy.srrietveld.phase.Phase.getGamma diffpy.srrietveld.phase.Phase-class.html#getGamma -diffpy.srrietveld.phase.Phase.getGammaSigma diffpy.srrietveld.phase.Phase-class.html#getGammaSigma -diffpy.srrietveld.phase.Phase.getAlpha diffpy.srrietveld.phase.Phase-class.html#getAlpha -diffpy.srrietveld.phase.Phase.listAtomNames diffpy.srrietveld.phase.Phase-class.html#listAtomNames -diffpy.srrietveld.phase.Phase.getEngineType diffpy.srrietveld.phase.Phase-class.html#getEngineType -diffpy.srrietveld.phase.Phase.getLatticeBSigma diffpy.srrietveld.phase.Phase-class.html#getLatticeBSigma -diffpy.srrietveld.phase.Phase.getName diffpy.srrietveld.phase.Phase-class.html#getName -diffpy.srrietveld.phase.Phase.getBeta diffpy.srrietveld.phase.Phase-class.html#getBeta -diffpy.srrietveld.phase.Phase.getLatticeCSigma diffpy.srrietveld.phase.Phase-class.html#getLatticeCSigma -diffpy.srrietveld.phase.Phase.getAtomByName diffpy.srrietveld.phase.Phase-class.html#getAtomByName -diffpy.srrietveld.phase.Phase.getLatticeASigma diffpy.srrietveld.phase.Phase-class.html#getLatticeASigma -diffpy.srrietveld.phase.Phase.listAtoms diffpy.srrietveld.phase.Phase-class.html#listAtoms -diffpy.srrietveld.phase.Phase.getLatticeA diffpy.srrietveld.phase.Phase-class.html#getLatticeA -diffpy.srrietveld.phase.Phase.getLatticeC diffpy.srrietveld.phase.Phase-class.html#getLatticeC -diffpy.srrietveld.phase.Phase.getLatticeB diffpy.srrietveld.phase.Phase-class.html#getLatticeB -diffpy.srrietveld.phase.Phase.__init__ diffpy.srrietveld.phase.Phase-class.html#__init__ -diffpy.srrietveld.phase.Phase.getNumOfAtoms diffpy.srrietveld.phase.Phase-class.html#getNumOfAtoms -diffpy.srrietveld.phase.Phase.getAlphaSigma diffpy.srrietveld.phase.Phase-class.html#getAlphaSigma -diffpy.srrietveld.phase.Phase.getBetaSigma diffpy.srrietveld.phase.Phase-class.html#getBetaSigma -diffpy.srrietveld.profile.Profile diffpy.srrietveld.profile.Profile-class.html -diffpy.srrietveld.profile.Profile.getEngineType diffpy.srrietveld.profile.Profile-class.html#getEngineType -diffpy.srrietveld.profile.Profile.listCoefficientNames diffpy.srrietveld.profile.Profile-class.html#listCoefficientNames -diffpy.srrietveld.profile.Profile.getCutOff diffpy.srrietveld.profile.Profile-class.html#getCutOff -diffpy.srrietveld.profile.Profile.__init__ diffpy.srrietveld.profile.Profile-class.html#__init__ -diffpy.srrietveld.profile.Profile.getProfileType diffpy.srrietveld.profile.Profile-class.html#getProfileType -diffpy.srrietveld.profile.Profile.getNumOfCoefficients diffpy.srrietveld.profile.Profile-class.html#getNumOfCoefficients -diffpy.srrietveld.project.Project diffpy.srrietveld.project.Project-class.html -diffpy.srrietveld.project.Project.verifyFitName diffpy.srrietveld.project.Project-class.html#verifyFitName -diffpy.srrietveld.project.Project.addJob diffpy.srrietveld.project.Project-class.html#addJob -diffpy.srrietveld.project.Project.plotHistory diffpy.srrietveld.project.Project-class.html#plotHistory -diffpy.srrietveld.project.Project.__export diffpy.srrietveld.project.Project-class.html#__export -diffpy.srrietveld.project.Project.importDataFiles diffpy.srrietveld.project.Project-class.html#importDataFiles -diffpy.srrietveld.project.Project.importEngineFit diffpy.srrietveld.project.Project-class.html#importEngineFit -diffpy.srrietveld.project.Project.close diffpy.srrietveld.project.Project-class.html#close -diffpy.srrietveld.project.Project.updateFit diffpy.srrietveld.project.Project-class.html#updateFit -diffpy.srrietveld.project.Project.getRefinementByName diffpy.srrietveld.project.Project-class.html#getRefinementByName -diffpy.srrietveld.project.Project.deleteJob diffpy.srrietveld.project.Project-class.html#deleteJob -diffpy.srrietveld.project.Project.__getResourceFileAbsPath diffpy.srrietveld.project.Project-class.html#__getResourceFileAbsPath -diffpy.srrietveld.project.Project.importProject diffpy.srrietveld.project.Project-class.html#importProject -diffpy.srrietveld.project.Project.importEngineFile diffpy.srrietveld.project.Project-class.html#importEngineFile -diffpy.srrietveld.project.Project.plot diffpy.srrietveld.project.Project-class.html#plot -diffpy.srrietveld.project.Project.updatePaths diffpy.srrietveld.project.Project-class.html#updatePaths -diffpy.srrietveld.project.Project.listParams diffpy.srrietveld.project.Project-class.html#listParams -diffpy.srrietveld.project.Project.plotPatterns diffpy.srrietveld.project.Project-class.html#plotPatterns -diffpy.srrietveld.project.Project.listRefinementNames diffpy.srrietveld.project.Project-class.html#listRefinementNames -diffpy.srrietveld.project.Project.updatePlot diffpy.srrietveld.project.Project-class.html#updatePlot -diffpy.srrietveld.project.Project.exportEngineFit diffpy.srrietveld.project.Project-class.html#exportEngineFit -diffpy.srrietveld.project.Project.__init__ diffpy.srrietveld.project.Project-class.html#__init__ -diffpy.srrietveld.project.Project.addToZip diffpy.srrietveld.project.Project-class.html#addToZip -diffpy.srrietveld.project.Project.saveToDisk diffpy.srrietveld.project.Project-class.html#saveToDisk -diffpy.srrietveld.project.Project.__updateRelativePaths diffpy.srrietveld.project.Project-class.html#__updateRelativePaths -diffpy.srrietveld.refinement.Refinement diffpy.srrietveld.refinement.Refinement-class.html -diffpy.srrietveld.refinement.Refinement.dumpInstrumentFile diffpy.srrietveld.refinement.Refinement-class.html#dumpInstrumentFile -diffpy.srrietveld.refinement.Refinement.dumpEngineFile diffpy.srrietveld.refinement.Refinement-class.html#dumpEngineFile -diffpy.srrietveld.refinement.Refinement.isParamTurnedOn diffpy.srrietveld.refinement.Refinement-class.html#isParamTurnedOn -diffpy.srrietveld.refinement.Refinement.listEnvParams diffpy.srrietveld.refinement.Refinement-class.html#listEnvParams -diffpy.srrietveld.refinement.Refinement.listEnvParamNames diffpy.srrietveld.refinement.Refinement-class.html#listEnvParamNames -diffpy.srrietveld.refinement.Refinement.getDataFileFromPattern diffpy.srrietveld.refinement.Refinement-class.html#getDataFileFromPattern -diffpy.srrietveld.refinement.Refinement.getParamListForStrategy diffpy.srrietveld.refinement.Refinement-class.html#getParamListForStrategy -diffpy.srrietveld.refinement.Refinement.listPhaseNames diffpy.srrietveld.refinement.Refinement-class.html#listPhaseNames -diffpy.srrietveld.refinement.Refinement.numStrategySteps diffpy.srrietveld.refinement.Refinement-class.html#numStrategySteps -diffpy.srrietveld.refinement.Refinement.dumpIncidentSpectrumFile diffpy.srrietveld.refinement.Refinement-class.html#dumpIncidentSpectrumFile -diffpy.srrietveld.refinement.Refinement.setStrategy diffpy.srrietveld.refinement.Refinement-class.html#setStrategy -diffpy.srrietveld.refinement.Refinement.getEngineType diffpy.srrietveld.refinement.Refinement-class.html#getEngineType -diffpy.srrietveld.refinement.Refinement.getNumOfCycles diffpy.srrietveld.refinement.Refinement-class.html#getNumOfCycles -diffpy.srrietveld.refinement.Refinement.getName diffpy.srrietveld.refinement.Refinement-class.html#getName -diffpy.srrietveld.refinement.Refinement.saveEngineFile diffpy.srrietveld.refinement.Refinement-class.html#saveEngineFile -diffpy.srrietveld.refinement.Refinement.getChi2 diffpy.srrietveld.refinement.Refinement-class.html#getChi2 -diffpy.srrietveld.refinement.Refinement.listPatterns diffpy.srrietveld.refinement.Refinement-class.html#listPatterns -diffpy.srrietveld.refinement.Refinement.getEngineFileExt diffpy.srrietveld.refinement.Refinement-class.html#getEngineFileExt -diffpy.srrietveld.refinement.Refinement.saveFilePathToDataset diffpy.srrietveld.refinement.Refinement-class.html#saveFilePathToDataset -diffpy.srrietveld.refinement.Refinement.dumpFileFromDataset diffpy.srrietveld.refinement.Refinement-class.html#dumpFileFromDataset -diffpy.srrietveld.refinement.Refinement.loadStrategyFile diffpy.srrietveld.refinement.Refinement-class.html#loadStrategyFile -diffpy.srrietveld.refinement.Refinement.getPhaseByName diffpy.srrietveld.refinement.Refinement-class.html#getPhaseByName -diffpy.srrietveld.refinement.Refinement.getNumOfPatterns diffpy.srrietveld.refinement.Refinement-class.html#getNumOfPatterns -diffpy.srrietveld.refinement.Refinement.strategy diffpy.srrietveld.refinement.Refinement-class.html#strategy -diffpy.srrietveld.refinement.Refinement.getInvolvedDatapaths diffpy.srrietveld.refinement.Refinement-class.html#getInvolvedDatapaths -diffpy.srrietveld.refinement.Refinement.addParamToStrategy diffpy.srrietveld.refinement.Refinement-class.html#addParamToStrategy -diffpy.srrietveld.refinement.Refinement.loadDataFile diffpy.srrietveld.refinement.Refinement-class.html#loadDataFile -diffpy.srrietveld.refinement.Refinement.removeParamFromStrategy diffpy.srrietveld.refinement.Refinement-class.html#removeParamFromStrategy -diffpy.srrietveld.refinement.Refinement.loadIncidentSpectrumFile diffpy.srrietveld.refinement.Refinement-class.html#loadIncidentSpectrumFile -diffpy.srrietveld.refinement.Refinement.listProfiles diffpy.srrietveld.refinement.Refinement-class.html#listProfiles -diffpy.srrietveld.refinement.Refinement.listPhases diffpy.srrietveld.refinement.Refinement-class.html#listPhases -diffpy.srrietveld.refinement.Refinement.dumpFiles diffpy.srrietveld.refinement.Refinement-class.html#dumpFiles -diffpy.srrietveld.refinement.Refinement.writeStrateyFile diffpy.srrietveld.refinement.Refinement-class.html#writeStrateyFile -diffpy.srrietveld.refinement.Refinement.__init__ diffpy.srrietveld.refinement.Refinement-class.html#__init__ -diffpy.srrietveld.refinement.Refinement.getOneStepStrategy diffpy.srrietveld.refinement.Refinement-class.html#getOneStepStrategy -diffpy.srrietveld.refinement.Refinement.findFileFromDataset diffpy.srrietveld.refinement.Refinement-class.html#findFileFromDataset -diffpy.srrietveld.refinement.Refinement.loadInstrumentFile diffpy.srrietveld.refinement.Refinement-class.html#loadInstrumentFile -diffpy.srrietveld.refinement.Refinement.dumpDataFile diffpy.srrietveld.refinement.Refinement-class.html#dumpDataFile -diffpy.srrietveld.refinement.Refinement.getNumOfPhases diffpy.srrietveld.refinement.Refinement-class.html#getNumOfPhases -diffpy.srrietveld.utility.UTF8Recoder diffpy.srrietveld.utility.UTF8Recoder-class.html -diffpy.srrietveld.utility.UTF8Recoder.__iter__ diffpy.srrietveld.utility.UTF8Recoder-class.html#__iter__ -diffpy.srrietveld.utility.UTF8Recoder.__init__ diffpy.srrietveld.utility.UTF8Recoder-class.html#__init__ -diffpy.srrietveld.utility.UTF8Recoder.next diffpy.srrietveld.utility.UTF8Recoder-class.html#next -diffpy.srrietveld.utility.UnicodeReader diffpy.srrietveld.utility.UnicodeReader-class.html -diffpy.srrietveld.utility.UnicodeReader.__iter__ diffpy.srrietveld.utility.UnicodeReader-class.html#__iter__ -diffpy.srrietveld.utility.UnicodeReader.__init__ diffpy.srrietveld.utility.UnicodeReader-class.html#__init__ -diffpy.srrietveld.utility.UnicodeReader.next diffpy.srrietveld.utility.UnicodeReader-class.html#next -diffpy.srrietveld.utility.UnicodeWriter diffpy.srrietveld.utility.UnicodeWriter-class.html -diffpy.srrietveld.utility.UnicodeWriter.writerow diffpy.srrietveld.utility.UnicodeWriter-class.html#writerow -diffpy.srrietveld.utility.UnicodeWriter.__init__ diffpy.srrietveld.utility.UnicodeWriter-class.html#__init__ -diffpy.srrietveld.utility.UnicodeWriter.writerows diffpy.srrietveld.utility.UnicodeWriter-class.html#writerows -trunk.diffpy.srrietveld.applications.refine.ReadInput trunk.diffpy.srrietveld.applications.refine.ReadInput-class.html -trunk.diffpy.srrietveld.applications.refine.ReadInput.run trunk.diffpy.srrietveld.applications.refine.ReadInput-class.html#run -trunk.diffpy.srrietveld.applications.refine.ReadInput.parseOptions trunk.diffpy.srrietveld.applications.refine.ReadInput-class.html#parseOptions -trunk.diffpy.srrietveld.applications.refine.ReadInput.__init__ trunk.diffpy.srrietveld.applications.refine.ReadInput-class.html#__init__ -trunk.diffpy.srrietveld.applications.refine.ReadInput.processInputs trunk.diffpy.srrietveld.applications.refine.ReadInput-class.html#processInputs diff --git a/static_root/doc/srrietveld/api/class-tree.html b/static_root/doc/srrietveld/api/class-tree.html deleted file mode 100644 index 2ebf2519..00000000 --- a/static_root/doc/srrietveld/api/class-tree.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - Class Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - - - -
      [frames] | no frames]
      -
      -
      - [ Module Hierarchy - | Class Hierarchy ] -

      -

      Class Hierarchy

      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/crarr.png b/static_root/doc/srrietveld/api/crarr.png deleted file mode 100644 index 26b43c52..00000000 Binary files a/static_root/doc/srrietveld/api/crarr.png and /dev/null differ diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld-module.html deleted file mode 100644 index d0c6083f..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld-module.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - diffpy.srrietveld - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld - - - - - -
      [frames] | no frames]
      -
      - -

      Package srrietveld

      source code

      -

      Constants: __version__ -- full version of this SrRietveld release

      - -
      -

      Version: - 1.0beta.dev-r6361-20110319 -

      -
      - - - - - - -
      - Submodules
      -
      - -
      - - - - - - - - - -
      - Variables
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - version -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld-pysrc.html deleted file mode 100644 index 35f9fb3a..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld-pysrc.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - diffpy.srrietveld - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Package diffpy.srrietveld

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2010 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Peng Tian 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14   
      -15  '''Constants: 
      -16      __version__ -- full version of this SrRietveld release 
      -17  ''' 
      -18   
      -19  from diffpy.srrietveld.version import __version__ 
      -20   
      -21  # End of file 
      -22   
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon-module.html deleted file mode 100644 index 75f2e52b..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon-module.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - diffpy.srrietveld.addon - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon - - - - - -
      [frames] | no frames]
      -
      - -

      Package addon

      source code

      - - - - - - - -
      - Submodules
      -
      - -
      - - - - - - - - - -
      - Variables
      -   - - __package__ = None -
      -

      Imports: - datafile -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon-pysrc.html deleted file mode 100644 index ed2dc33b..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon-pysrc.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - diffpy.srrietveld.addon - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Package diffpy.srrietveld.addon

      -
      -1   
      -2   
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.datafile-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.datafile-module.html deleted file mode 100644 index 0eaba3bc..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.datafile-module.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - diffpy.srrietveld.addon.datafile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module datafile - - - - - -
      [frames] | no frames]
      -
      - -

      Module datafile

      source code

      -
      -datafile.py is to convert different format files into Fullprof/GSAS readable 
      -format. And save x, y, sigma into data dictionary.
      -    Fullprof format is the standard XYSigma format.
      -    GSAS     format is one of the following:
      -                1. Timemap; 2. FXYE; 3. ESD; 4. STD.
      -
      -
      - - - - - - - - - - -
      - Classes
      -   - - DataFileConverter
      - Unify to convert input data file to engine file and save the - XYSigma into data dictionary. -
      - - - - - - - - - - - - -
      - Functions
      -   - - - - - - -
      createDataDict(datainfofile, - datadirectory)
      - Create datadict template for refine.py
      - source code - -
      - -
      -   - - - - - - -
      readFileList(datafilelist, - enginename)
      - Read datafile content based on datafilelist.
      - source code - -
      - -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: datafile.py 6420 2011-03-29 10:32:46Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld.addon' -
      -

      Imports: - checkFormat, - math, - os -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.datafile-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.datafile-pysrc.html deleted file mode 100644 index ecfb469c..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.datafile-pysrc.html +++ /dev/null @@ -1,603 +0,0 @@ - - - - - diffpy.srrietveld.addon.datafile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module datafile - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.addon.datafile

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Peng Tian 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ datafile.py is to convert different format files into Fullprof/GSAS readable  
      - 16  format. And save x, y, sigma into data dictionary. 
      - 17      Fullprof format is the standard XYSigma format. 
      - 18      GSAS     format is one of the following: 
      - 19                  1. Timemap; 2. FXYE; 3. ESD; 4. STD. 
      - 20   
      - 21  """ 
      - 22      
      - 23  __id__ = "$Id: datafile.py 6420 2011-03-29 10:32:46Z yshang $" 
      - 24   
      - 25  import os 
      - 26  import math 
      - 27  from diffpy.srrietveld.utility import checkFormat 
      - 28   
      -
      29 -class DataFileConverter: -
      30 """ Unify to convert input data file to engine file and - 31 save the XYSigma into data dictionary. """ - 32 -
      33 - def __init__(self, datafullpathname, instrumentfile=None, banklist=None): -
      34 """ Initialization """ - 35 self.inputfullname = datafullpathname - 36 self.inputformat = checkFormat(datafullpathname) - 37 self.instrumentfile = instrumentfile - 38 self.banklist = banklist - 39 - 40 self.datadict = {} - 41 if banklist == None: - 42 banklist = [1] - 43 for bankid in banklist: - 44 self.datadict[int(bankid)] = {"Name":"", "x":[], "y":[], "dy":[]} - 45 return -
      46 -
      47 - def readDataFile(self, filename): -
      48 """ Read input data file """ - 49 inputfile = open(filename, "r") - 50 filelines = inputfile.readlines() - 51 inputfile.close() - 52 return filelines -
      53 -
      54 - def writeDataFile(self, outlines, outfilename): -
      55 """ Write output data file """ - 56 outfile = open(outfilename, "w") - 57 outfile.write(outlines) - 58 outfile.close() - 59 return -
      60 -
      61 - def toFPFile(self, inputfile, outputfile, bankid, expfilename=""): -
      62 """ Convert input file to FullProf readable file. """ - 63 - 64 dataformat = checkFormat(inputfile) - 65 if dataformat == "xye": - 66 self.xyeToFP(inputfile, outputfile, bankid) - 67 elif dataformat == "chi": - 68 self.chiToFP(inputfile, outputfile, bankid) - 69 elif dataformat in ["gsa", "gda", "raw", "fxye"]: - 70 outbasename = os.path.basename(outputfile) - 71 processdir = outputfile.split(outbasename)[0] - 72 #outrootname = os.path.splitext(outbasename)[0] - 73 #outtxtname = outputfile.split(outbasename)[0] + outrootname + ".txt" - 74 gsadatafile = self.exportGSASToXYE(inputfile, self.instrumentfile, - 75 bankid, expfilename, processdir) - 76 #self.normalizeGSAS(gsadatafile) - 77 self.xyeToFP(gsadatafile, outputfile, bankid) - 78 #os.remove(gsadatafile) - 79 else: - 80 raise NotImplementedError - 81 return -
      82 -
      83 - def normalizeGSAS(self, gsadatafile): -
      84 """ Normalize GSAS data file from rawplot to XYSigma format. """ - 85 # 1. read file - 86 ifile = open(gsadatafile, "r") - 87 lines = ifile.readlines() - 88 ifile.close() - 89 - 90 # 2. writeout xyefile - 91 outstring = "" - 92 for id in range(6): - 93 outstring += "#\n" - 94 for line in lines[1:]: - 95 terms = line.strip().split() - 96 x = float(terms[0])*1000 - 97 y = float(terms[1])/float(terms[2]) - 98 dy = math.sqrt(float(terms[1]))/float(terms[2]) - 99 outstring += "%-10.4f %-10.4f %-10.5f\n" % (x, y, dy) -100 -101 # 3. write out xysigma file -102 self.writeDataFile(outstring, gsadatafile) -103 return -
      104 -
      105 - def toGSASFile(self, inputfile, outputfile, bankid, stype=None): -
      106 """ Convert input file to GSAS readable file. """ -107 -108 dataformat = checkFormat(inputfile) -109 if dataformat in ["dat", "chi", "txt", "xye"]: -110 filelines = self.readDataFile(inputfile) -111 else: -112 raise NotImplementedError -113 -114 datadict = self.datadict[bankid] -115 datadict["Name"] = outputfile -116 for line in filelines[4:]: -117 terms = line.strip().split() -118 if terms[0] == "#" or len(terms) != 2: -119 continue -120 else: -121 try: -122 x = float(terms[0]) -123 y = float(terms[1]) -124 # save data -125 datadict["x"].append(x) -126 except ValueError: -127 pass -128 try: -129 dy = float(terms[2]) -130 except: -131 dy = math.sqrt(abs(y)) -132 datadict["dy"].append(dy) -133 -134 if stype: -135 import random -136 y_rad = random.gauss(y, dy) -137 if y_rad <= 0: -138 y = 2 * y - y_rad -139 else: -140 y = y_rad -141 datadict["y"].append(y) -142 -143 outlines = self.writeGSASStr(bankid) -144 self.writeDataFile(outlines, outputfile) -145 -146 return -
      147 -
      148 - def readGSASFile(self, gsasfile, bankid): -
      149 """ Read GSAS file into datadict """ -150 # 0. convert GSAS file to XYSigma format -151 outbasename = os.path.basename(gsasfile) -152 outrootname = os.path.splitext(outbasename)[0] -153 outtxtname = gsasfile.split(outbasename)[0] + outrootname + ".txt" -154 gsadatafile = self.exportGSASToXY(gsasfile, self.instrumentfile, -155 bankid, outtxtname) -156 self.normalizeGSAS(gsadatafile) -157 # 1. read input file -158 filelines = self.readDataFile(gsadatafile) -159 -160 # 2. split out the x, y, dy -161 datadict = self.datadict[bankid] -162 datadict["Name"] = gsasfile -163 for line in filelines: -164 terms = line.strip().split() -165 if terms == []: -166 continue -167 if terms[0] == "#" and filelines.index(line) < 6: -168 pass -169 else: -170 try: -171 x = float(terms[0]) -172 y = float(terms[1]) -173 dy = float(terms[2]) -174 # save data -175 datadict["x"].append(x) -176 datadict["y"].append(y) -177 datadict["dy"].append(dy) -178 except ValueError: -179 pass -180 return -
      181 -
      182 - def writeGSASStr(self, bankid): -
      183 """ Return string of integrated intensities in GSAS format. -184 """ -185 lines = [] -186 ltitle = 'Angular Profile: %s' % os.path.basename(self.inputfullname) -187 if len(ltitle) > 80: ltitle = ltitle[:80] -188 lines.append("%-80s" % ltitle) -189 datadict = self.datadict[bankid] -190 nchan = len(datadict["y"]) -191 nrec = int(math.ceil(nchan/10.0)) -192 # two-theta0 and dtwo-theta in centidegrees -193 tth0_cdg = datadict["x"][0] * 100 -194 dtth_cdg = (datadict["x"][-1] - datadict["x"][0]) / \ -195 (len(datadict["x"]) - 1) * 100 -196 lbank = "BANK %4i %4i %4i CONST %9.5f %9.5f %9.5f %9.5f STD" % \ -197 (bankid, nchan, nrec, tth0_cdg, dtth_cdg, 0, 0) -198 lines.append("%-80s" % lbank) -199 lrecs = [ "%2i%6.0f" % (1, iobs) for iobs in datadict["y"] ] -200 for i in range(0, len(lrecs), 10): -201 lines.append("".join(lrecs[i:i+10])) -202 lines[-1] = "%-80s" % lines[-1] -203 rv = "\r\n".join(lines) + "\r\n" -204 return rv -
      205 -
      206 - def chiToFP(self, chifile, outputfile, bankid, stype=None): -
      207 """ Convert .chi file to Fullprof format file """ -208 -209 # 1. read input file -210 filelines = self.readDataFile(chifile) -211 -212 # 2. split out the x, y, dy -213 datadict = self.datadict[bankid] -214 datadict["Name"] = outputfile -215 outlines = "#\n" -216 outlines += "#\n" -217 for line in filelines: -218 terms = line.strip().split() -219 if terms == []: -220 continue -221 if terms[0] == "#" or filelines.index(line) < 4: -222 outlines += line -223 else: -224 try: -225 x = float(terms[0]) -226 y = float(terms[1]) -227 dy = math.sqrt(y) -228 if stype: -229 import random -230 y_rad = random.gauss(y, dy) -231 if y_rad <= 0: -232 y = 2 * y - y_rad -233 else: -234 y = y_rad -235 # save data -236 datadict["x"].append(x) -237 datadict["y"].append(y) -238 datadict["dy"].append(dy) -239 # add into outlines -240 outlines += "%-15s %-15s %-15s\n"% (x, y, dy) -241 except ValueError: -242 pass -243 -244 # 3. write out the Fullprof file -245 self.writeDataFile(outlines, outputfile) -246 return -
      247 -
      248 - def xyeToFP(self, xyefile, outputfile, bankid, stype=None): -
      249 """ Convert XYSigma format file to Fullprof format file """ -250 -251 # 1. read input file -252 filelines = self.readDataFile(xyefile) -253 -254 # 2. split out the x, y, dy -255 datadict = self.datadict[bankid] -256 datadict["Name"] = outputfile -257 outlines = "" -258 for line in filelines: -259 terms = line.strip().split() -260 if terms == []: -261 continue -262 if terms[0] == "#" and filelines.index(line) < 6: -263 outlines += line -264 else: -265 try: -266 x = float(terms[0]) -267 y = float(terms[1]) -268 dy = float(terms[2]) -269 if stype: -270 import random -271 y_rad = random.gauss(y, dy) -272 if y_rad <= 0: -273 y = 2 * y - y_rad -274 else: -275 y = y_rad -276 # save data -277 datadict["x"].append(x) -278 datadict["y"].append(y) -279 datadict["dy"].append(dy) -280 # add into outlines -281 outlines += "%-15s %-15s %-15s\n"% (x, y, dy) -282 except ValueError: -283 pass -284 -285 # 3. write out the Fullprof file -286 self.writeDataFile(outlines, outputfile) -287 return -
      288 -
      289 - def xyeToChi(self, inputfile, outputfile, bankid): -
      290 """ Convert XYSigma format file to .chi file """ -291 -292 # 1. read input file -293 filelines = self.readDataFile(inputfile) -294 -295 # 2. split out the x, y, dy -296 datadict = self.datadict[bankid] -297 datadict["Name"] = outputfile -298 outlines = "" -299 for line in filelines: -300 terms = line.strip().split() -301 if terms[0] == "#" and filelines.index(line) < 4: -302 outlines += line -303 continue -304 else: -305 try: -306 x = float(terms[0]) -307 y = float(terms[1]) -308 dy = float(terms[2]) -309 # save data -310 datadict["x"].append(x) -311 datadict["y"].append(y) -312 datadict["dy"].append(dy) -313 # add into outlines -314 outlines += "%-15s %-15s %-15s\n"% (x, y, dy) -315 except ValueError: -316 pass -317 -318 # 3. write out the Chi file -319 self.writeDataFile(outlines, outputfile) -320 return -
      321 -
      322 - def checkEXPFile(self, expfilename, gsafbasename): -
      323 """Check whether the file name is right in .EXP file -324 """ -325 print expfilename, gsafbasename -326 flines = self.readDataFile(expfilename) -327 lid = -1 -328 for line in flines: -329 lid += 1 -330 if line.count("HST 1 HFIL") == 1: -331 terms = line.strip().split() -332 if terms[3] == gsafbasename: -333 return -334 else: -335 relen = len(gsafbasename) -336 flines[lid] = line[:14] + gsafbasename + line[relen+14:] -337 ofile = open(expfilename, "w") -338 ofile.writelines(flines) -339 ofile.close() -340 return -341 return -
      342 -
      343 - def exportGSASToXYE(self, gsafname, iparmfname, bankid, expfilename, processdir): -
      344 """ Run Powpref and Genles to export diffraction pattern from raw GSAS file -345 """ -346 import shutil -347 import diffpy.pygsas.genles as GL -348 import diffpy.pygsas.rungsas as RG -349 -350 -351 expbasename = os.path.basename(expfilename) -352 exprootname = os.path.splitext(expbasename)[0] -353 expdes = os.path.join(processdir, exprootname.upper() + ".EXP") -354 shutil.copy(expfilename, expdes) -355 # check the EXP file, replace the file name if neccessary -356 gsafbasename = os.path.basename(gsafname) -357 self.checkEXPFile(expdes, gsafbasename) -358 -359 desgsaf = os.path.join(processdir, gsafbasename) -360 try: -361 shutil.copy(gsafname, desgsaf) -362 except: -363 pass -364 if iparmfname: -365 iparmfbasename = os.path.basename(iparmfname) -366 desiparm = os.path.join(processdir, iparmfbasename) -367 shutil.copy(iparmfname, desiparm) -368 GL.runPowGen(exprootname, processdir, "Refine", 0, "l") -369 lstfile = os.path.join(processdir, exprootname.upper() + ".LST") -370 lstbkfile = lstfile + "bk" -371 shutil.move(lstfile, lstbkfile) -372 RG.runHstdmp(exprootname, processdir, bankid) -373 -374 # write out XYE file in processdir -375 outfilename = os.path.join(processdir, exprootname + ".dat") -376 outlines = ["#\n", "#\n", "#\n", "#\n", "#\n", "#\n"] -377 hstfile = open(lstfile) -378 hstlines = hstfile.readlines() -379 hstfile.close() -380 hstlen = len(hstlines) -381 for line_id in range(1, hstlen): -382 terms = hstlines[line_id].strip().split() -383 try: -384 int(terms[0]) -385 x = float(terms[2])*1000 -386 y = float(terms[3]) -387 dy = math.sqrt(1/float(terms[7])) -388 newline = "%-10.4f %-10.4f %-10.5f\n" % (x, y, dy) -389 outlines.append(newline) -390 except: -391 continue -392 ofile = open(outfilename, "w") -393 ofile.writelines(outlines) -394 ofile.close() -395 return outfilename -
      396 -
      397 -def createDataDict(datainfofile, datadirectory): -
      398 """ Create datadict template for refine.py """ -399 datadict = {} -400 -401 # 1. read datainfofile -402 infofile = open(datainfofile, "r") -403 infolines = infofile.readlines() -404 infofile.close() -405 -406 # 2. split line and create datafile path -407 for line in infolines: -408 terms = line.strip().split() -409 try: -410 key = int(terms[1]) -411 except: -412 key = float(terms[1]) -413 try: -414 datadict[key] = {"Name": datadirectory + "/" + terms[0]} -415 except IOError: -416 raise IOError("%s isn't recognized!" % datainfofile) -417 -418 return datadict -
      419 -
      420 -def readFileList(datafilelist, enginename): -
      421 """ Read datafile content based on datafilelist.""" -422 import os, numpy -423 xlist = [] -424 ylist = [] -425 outfilelist = [] -426 -427 m = -1 -428 for datafile in datafilelist: -429 fileid = datafilelist.index(datafile) -430 dfv = DataFileConverter(datafile, banklist=[1]) -431 basefilename = os.path.basename(datafile) -432 if enginename == "fullprof": -433 outfilename = basefilename.split(".")[0] + ".dat" -434 dfv.toFPFile(datafile, outfilename, 1) -435 else: -436 outfilename = basefilename.split(".")[0] + ".gsa" -437 dfv.toGSASFile(datafile, outfilename, 1) -438 xlist.append(dfv.datadict[1]['x']) -439 ylist.append(dfv.datadict[1]['y']) -440 outfilelist.append(outfilename) -441 -442 if m == -1: -443 # the first assignment -444 m = len(xlist[-1]) -445 -446 # check it with the latest added x and y -447 if m != len(ylist[-1]) or m != len(xlist[-1]): -448 raise ValueError('Data is of wrong length.') -449 -450 -451 n = len(xlist) -452 x = numpy.empty((n, m)) -453 y = numpy.empty((n, m)) -454 -455 x[:] = xlist -456 y[:] = ylist -457 -458 return x, y, outfilelist -
      459 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.datafile.DataFileConverter-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.datafile.DataFileConverter-class.html deleted file mode 100644 index cf7d79df..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.datafile.DataFileConverter-class.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - diffpy.srrietveld.addon.datafile.DataFileConverter - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module datafile :: - Class DataFileConverter - - - - - -
      [frames] | no frames]
      -
      - -

      Class DataFileConverter

      source code

      -

      Unify to convert input data file to engine file and save the XYSigma - into data dictionary.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - datafullpathname, - instrumentfile=None, - banklist=None)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      checkEXPFile(self, - expfilename, - gsafbasename)
      - Check whether the file name is right in .EXP file
      - source code - -
      - -
      -   - - - - - - -
      chiToFP(self, - chifile, - outputfile, - bankid, - stype=None)
      - Convert .chi file to Fullprof format file
      - source code - -
      - -
      -   - - - - - - -
      exportGSASToXYE(self, - gsafname, - iparmfname, - bankid, - expfilename, - processdir)
      - Run Powpref and Genles to export diffraction pattern from raw GSAS - file
      - source code - -
      - -
      -   - - - - - - -
      normalizeGSAS(self, - gsadatafile)
      - Normalize GSAS data file from rawplot to XYSigma format.
      - source code - -
      - -
      -   - - - - - - -
      readDataFile(self, - filename)
      - Read input data file
      - source code - -
      - -
      -   - - - - - - -
      readGSASFile(self, - gsasfile, - bankid)
      - Read GSAS file into datadict
      - source code - -
      - -
      -   - - - - - - -
      toFPFile(self, - inputfile, - outputfile, - bankid, - expfilename='')
      - Convert input file to FullProf readable file.
      - source code - -
      - -
      -   - - - - - - -
      toGSASFile(self, - inputfile, - outputfile, - bankid, - stype=None)
      - Convert input file to GSAS readable file.
      - source code - -
      - -
      -   - - - - - - -
      writeDataFile(self, - outlines, - outfilename)
      - Write output data file
      - source code - -
      - -
      -   - - - - - - -
      writeGSASStr(self, - bankid)
      - Return string of integrated intensities in GSAS format.
      - source code - -
      - -
      -   - - - - - - -
      xyeToChi(self, - inputfile, - outputfile, - bankid)
      - Convert XYSigma format file to .chi file
      - source code - -
      - -
      -   - - - - - - -
      xyeToFP(self, - xyefile, - outputfile, - bankid, - stype=None)
      - Convert XYSigma format file to Fullprof format file
      - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.debyefitting-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.debyefitting-module.html deleted file mode 100644 index 0999346f..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.debyefitting-module.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - diffpy.srrietveld.addon.debyefitting - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module debyefitting - - - - - -
      [frames] | no frames]
      -
      - -

      Module debyefitting

      source code

      - - - - - - - - - -
      - Classes
      -   - - DebyeFitting
      - Class to perform Debye fitting -
      - - - - - - - - - - - - -
      - Functions
      -   - - - - - - -
      adps(m, - thetaD, - T)
      - Calculates atomic displacement factors within the Debye model
      - source code - -
      - -
      -   - - - - - - -
      debye(T, - m, - thetaD)
      - A wrapped version of 'adps' that can handle an array of T-values.
      - source code - -
      - -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: debyefitting.py 6718 2011-08-23 21:33:20Z yshan... -
      -   - - __package__ = 'diffpy.srrietveld.addon' -
      -

      Imports: - numpy -


      - - - - - - -
      - Function Details
      - -
      - -
      - - -
      -

      adps(m, - thetaD, - T) -

      -
      source code  -
      - -

      Calculates atomic displacement factors within the Debye model

      -

      <u^2> = (3h^2/4 pi^2 m kB thetaD)(phi(thetaD/T)/(thetaD/T) + - 1/4)

      -

      arguments: m -- float -- mass of the ion in atomic mass units (e.g., C - = 12) thetaD -- float -- Debye Temperature T -- float -- temperature.

      -

      return: Uiso -- float -- the thermal factor from the Debye recipe at - temp T

      -
      -
      -
      -
      -
      - - - - - - -
      - Variables Details
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: debyefitting.py 6718 2011-08-23 21:33:20Z yshang $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.debyefitting-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.debyefitting-pysrc.html deleted file mode 100644 index 3fcd62c8..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.debyefitting-pysrc.html +++ /dev/null @@ -1,353 +0,0 @@ - - - - - diffpy.srrietveld.addon.debyefitting - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module debyefitting - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.addon.debyefitting

      -
      -  1  ######################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2010 Trustees of the Columbia University 
      -  6  #                   in the City of New York. All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Yingrui Shang, Chris Farrow 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ######################################################################## 
      - 14   
      - 15  __id__ = '$Id: debyefitting.py 6718 2011-08-23 21:33:20Z yshang $' 
      - 16   
      -
      17 -class DebyeFitting(object): -
      18 '''Class to perform Debye fitting - 19 - 20 This fits the isotropic ADPs (Uiso) of a specified atom in a material - 21 according to the Debye model. - 22 - 23 Attributes - 24 x -- Temperature values (default none). - 25 y -- ADP values of the atom at temperatures specfied by x - 26 dy -- Uncertainty in y (default None). - 27 mass -- The mass of the atom in atomic mass units (e.g., 12 for carbon) - 28 _residual -- The residual function to be optimized. - 29 results -- The full results returned from the optimizer (using - 30 full_results = True). See the leastsq - 31 function from scipy.optimize for the format. - 32 thetaD -- The Debye temperature extracted from the ADPs by fitting the - 33 Debye model. - 34 offset -- The static offset in the ADPs extracted by fitting the Debye - 35 model. - 36 - 37 ''' - 38 -
      39 - def __init__(self, x, y, mass, dy = None): -
      40 '''Constructor of the fitting object - 41 - 42 x -- A numpy array of temperatures. - 43 y -- The thermal parameters over the calculation range. - 44 mass -- The mass of the atom in atomic mass units. - 45 dy -- The uncertainty in the thermal parameters over the - 46 calculation range. If this is None (default), then the - 47 uncertainties are set to unity. - 48 - 49 ''' - 50 self.x = x - 51 self.y = y - 52 self.dy = dy - 53 self.mass = mass - 54 self._residual = None - 55 self.results = None - 56 self.thetaD = None - 57 self.offset = None - 58 self.yfit = None - 59 - 60 if self.dy is None: - 61 import numpy - 62 self.dy = numpy.ones_like(self.x) - 63 return -
      64 -
      65 - def _makeResidual(self): -
      66 """Make the vector residual function to be optimized.""" - 67 if self.x is None or self.y is None or self.mass is None: - 68 m = "Temperature, ADPs and mass must be specified" - 69 raise AttributeError(m) - 70 - 71 def residual(*pars): - 72 - 73 self.thetaD, self.offset = pars[0] - 74 self.yfit = debye(self.x, self.mass, self.thetaD) - 75 self.yfit += self.offset - 76 - 77 chiv = (self.y - self.yfit) / self.dy - 78 - 79 return chiv -
      80 - 81 self._residual = residual - 82 - 83 return -
      84 -
      85 - def _optimize(self): -
      86 """Optimize the recipe created above using scipy. - 87 - 88 The FitRecipe we created in makeRecipe has a 'residual' method that we - 89 can be minimized using a scipy optimizer. The details are described in - 90 the source. - 91 - 92 """ - 93 from scipy.optimize.minpack import leastsq - 94 - 95 self.results = leastsq(self._residual, [100, 0], full_output = True) - 96 - 97 self.thetaD, self.offset = self.results[0] - 98 - 99 def _calc_error(args): -100 """Get the results and covarience of the fitted parameters""" -101 from numpy import array -102 from math import sqrt -103 p, cov, info, mesg, success = args -104 chisq=sum(info["fvec"]*info["fvec"]) -105 dof=len(info["fvec"])-len(p) -106 sigma = array([sqrt(cov[i,i])*sqrt(chisq/dof) for i in range(len(p))]) -107 return p, sigma -
      108 -109 params, sig = _calc_error(self.results) -110 -111 [self.thetaD, self.offset], [self.cov_thetaD, self.cov_offset] = params, sig -112 -113 return -114 -
      115 - def fit(self): -
      116 """Create the recipe, fit it and get the results.""" -117 self._makeResidual() -118 self._optimize() -119 return -
      120 -
      121 - def saveResults(self, filename): -
      122 """Save the results to a text file""" -123 content = [] -124 content.append('# ThetaD %e / %e ' % (self.thetaD, self.cov_thetaD)) -125 content.append('# offset %e / %e ' % (self.offset, self.cov_offset)) -126 content.append('x\ty\tyfit\tdy') -127 for ii in range(len(self.x)): -128 str = '%f\t%f\t%f\t%f' % (self.x[ii], self.y[ii],self.yfit[ii], self.dy[ii]) -129 content.append(str) -130 content = '\n'.join(content) -131 -132 f = open(filename, 'w') -133 f.write(content) -134 -135 return -
      136 -137 -
      138 - def plotResults(self): -
      139 """Plot the results contained within a refined FitRecipe.""" -140 x = self.x -141 y = self.y -142 #ycalc = self.results[2]['fvec'] -143 -144 # This stuff is specific to pylab from the matplotlib distribution. -145 import pylab -146 pylab.plot(x, y, 'b.', label = "data") -147 ylabel = "${\Theta}_D = %.2f K, offset = %.2f \AA^2$" %\ -148 (self.thetaD, self.offset) -149 pylab.plot(x, self.yfit, 'g-', label = ylabel) -150 pylab.legend(loc = (0.0,0.8)) -151 pylab.xlabel("Temperature (K)") -152 pylab.ylabel("$U_{iso} (\AA^2)$") -153 pylab.show() -154 return -
      155 -156 # End class DebyeFitting -157 -158 import numpy -159 # Definition of the debye fitting function -
      160 -def debye(T, m, thetaD): -
      161 """A wrapped version of 'adps' that can handle an array of T-values.""" -162 y = numpy.array([adps(m, thetaD, x) for x in T]) -163 return y -
      164 -
      165 -def adps(m, thetaD, T): -
      166 """Calculates atomic displacement factors within the Debye model -167 -168 <u^2> = (3h^2/4 pi^2 m kB thetaD)(phi(thetaD/T)/(thetaD/T) + 1/4) -169 -170 arguments: -171 m -- float -- mass of the ion in atomic mass units (e.g., C = 12) -172 thetaD -- float -- Debye Temperature -173 T -- float -- temperature. -174 -175 return: -176 Uiso -- float -- the thermal factor from the Debye recipe at temp T -177 -178 """ -179 h = 6.6260755e-34 # Planck's constant. J.s of m^2.kg/s -180 kB = 1.3806503e-23 # Boltzmann's constant. J/K -181 amu = 1.66053886e-27 # Atomic mass unit. kg -182 -183 def __phi(x): -184 """evaluates the phi integral needed in Debye calculation -185 -186 phi(x) = (1/x) int_0^x xi/(exp(xi)-1) dxi -187 -188 arguments: -189 x -- float -- value of thetaD (Debye temperature)/T -190 -191 returns: -192 phi -- float -- value of the phi function -193 -194 """ -195 def __debyeKernel(xi): -196 """function needed by debye calculators -197 -198 """ -199 y = xi/(numpy.exp(xi)-1) -200 return y -
      201 -202 import scipy.integrate -203 -204 int = scipy.integrate.quad(__debyeKernel, 0, x) -205 phi = (1/x) * int[0] -206 -207 return phi -208 -209 -210 m = m * amu -211 u2 = (3*h**2 / (4 * numpy.pi**2 *m *kB *thetaD))*\ -212 (__phi(thetaD/T)/(thetaD/T) + 1./4.) -213 u2 *= 1e20 -214 return u2 -215 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.debyefitting.DebyeFitting-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.debyefitting.DebyeFitting-class.html deleted file mode 100644 index 735c62b2..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.debyefitting.DebyeFitting-class.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - diffpy.srrietveld.addon.debyefitting.DebyeFitting - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module debyefitting :: - Class DebyeFitting - - - - - -
      [frames] | no frames]
      -
      - -

      Class DebyeFitting

      source code

      -
      -object --+
      -         |
      -        DebyeFitting
      -
      - -
      -
      -Class to perform Debye fitting
      -
      -This fits the isotropic ADPs (Uiso) of a specified atom in a material
      -according to the Debye model.
      -
      -Attributes
      -x       --  Temperature values (default none).
      -y       --  ADP values of the atom at temperatures specfied by x
      -dy      --  Uncertainty in y (default None).
      -mass    --  The mass of the atom in atomic mass units (e.g., 12 for carbon)
      -_residual   --  The residual function to be optimized.
      -results --  The full results returned from the optimizer (using
      -            full_results = True). See the leastsq
      -            function from scipy.optimize for the format.
      -thetaD  --  The Debye temperature extracted from the ADPs by fitting the
      -            Debye model.
      -offset  --  The static offset in the ADPs extracted by fitting the Debye
      -            model.
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - x, - y, - mass, - dy=None)
      - Constructor of the fitting object
      - source code - -
      - -
      -   - - - - - - -
      fit(self)
      - Create the recipe, fit it and get the results.
      - source code - -
      - -
      -   - - - - - - -
      plotResults(self)
      - Plot the results contained within a refined FitRecipe.
      - source code - -
      - -
      -   - - - - - - -
      saveResults(self, - filename)
      - Save the results to a text file
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

      -
      - - - - - - - - - -
      - Properties
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - x, - y, - mass, - dy=None) -
      (Constructor) -

      -
      source code  -
      - -
      -Constructor of the fitting object
      -
      -x       --  A numpy array of temperatures.
      -y       --  The thermal parameters over the calculation range.
      -mass    --  The mass of the atom in atomic mass units.
      -dy      --  The uncertainty in the thermal parameters over the
      -            calculation range. If this is None (default), then the
      -            uncertainties are set to unity.
      -
      -
      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.mcsampling-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.mcsampling-module.html deleted file mode 100644 index f64490ea..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.mcsampling-module.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - diffpy.srrietveld.addon.mcsampling - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module mcsampling - - - - - -
      [frames] | no frames]
      -
      - -

      Module mcsampling

      source code

      - - - - - - - - - -
      - Classes
      -   - - MonteCarloSampling
      - Monte Carlo Sampling for diffraction pattern. -
      - - - - - - - - - - - - -
      - Functions
      -   - - - - - - -
      importFromGSASstd(datafilename, - bankid)
      - Import a GSAS .raw file and get the dict of y, sd
      - source code - -
      - -
      -   - - - - - - -
      importFromGSAStimemap(datafilename, - bankid)
      - Import a GSAS .gsa/gda file and get the dict of y, sd
      - source code - -
      - -
      - - - - - - - - - -
      - Variables
      -   - - __package__ = 'diffpy.srrietveld.addon' -
      -

      Imports: - SrrError, - os, - tempfile -


      - - - - - - -
      - Function Details
      - -
      - -
      - - -
      -

      importFromGSASstd(datafilename, - bankid) -

      -
      source code  -
      - -

      Import a GSAS .raw file and get the dict of y, sd

      -

      Arguments:

      -
        -
      • - datafilename : full-path name of .raw file; -
      • -
      -

      Return: datadict: a dictionary that includes series of yobs, sobs

      -
      -
      -
      -
      - -
      - -
      - - -
      -

      importFromGSAStimemap(datafilename, - bankid) -

      -
      source code  -
      - -

      Import a GSAS .gsa/gda file and get the dict of y, sd

      -

      Arguments:

      -
        -
      • - datafilename : full-path name of .gsa/gda file; -
      • -
      -

      Return: datadict: a dictionary that includes series of yobs, sobs

      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.mcsampling-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.mcsampling-pysrc.html deleted file mode 100644 index eff7a8c1..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.mcsampling-pysrc.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diffpy.srrietveld.addon.mcsampling - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module mcsampling - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.addon.mcsampling

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2011 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Peng Tian 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  import tempfile, os 
      - 16  from diffpy.srrietveld.exceptions import SrrError 
      - 17   
      -
      18 -class MonteCarloSampling: -
      19 """ Monte Carlo Sampling for diffraction pattern. - 20 """ -
      21 - def __init__(self, fit, snum, stype="Normal"): -
      22 """Initialization. - 23 - 24 fit --- a diffpy.refinementdata.Refinement object that stores a fit with only one pattern - 25 snum --- number of samplings - 26 stype --- type of sampling distribution - 27 """ - 28 self.fit = fit - 29 self.snum = snum - 30 self.stype = stype - 31 self.engine = self.getEngine() - 32 self.tempDir = tempfile.mkdtemp() - 33 return -
      34 -
      35 - def getEngine(self): -
      36 """Get engine type from fit object. - 37 """ - 38 classname = self.fit.getAttr("rietveldcls") - 39 if classname.count("gsas") == 1: - 40 engine = "gsas" - 41 else: - 42 engine = "fullprof" - 43 return engine -
      44 -
      45 - def addSampleData(self): -
      46 """Convert data file if neccessary. - 47 """ - 48 from diffpy.srrietveld.addon.datafile import DataFileConverter as DFC - 49 - 50 # only one pattern - 51 fullpath = self.fit.getObject("Pattern").getObject(0).get("Datafile")[0] - 52 instrumentfile = str(self.fit.getObject("Pattern").getObject(0).get("Instrumentfile")[0]) - 53 if not os.path.exists(fullpath): - 54 raise SrrError("Can not access the data file: " + fullpath) - 55 - 56 expfilepath = os.path.join(os.getcwd(), self.fit.name + ".EXP") - 57 filebasename = os.path.basename(fullpath) - 58 rootname, extname = os.path.splitext(filebasename) - 59 newfullpath = os.path.join(self.tempDir, filebasename) - 60 dfc = DFC(fullpath, instrumentfile) - 61 - 62 # sampling based on the datafile format - 63 if extname.lower() == ".xye": - 64 self.genSamplingFromxye(fullpath, newfullpath, 1, self.snum, dfc) - 65 elif extname.lower() == ".chi": - 66 self.genSamplingFromchi(fullpath, newfullpath, 1, self.snum, dfc) - 67 elif extname.lower() in [".gsa", ".gda"]: #TIMEMAP case - 68 self.genSamplingFromtimemap(fullpath, newfullpath, 1, self.snum, dfc, expfilepath) - 69 else: - 70 raise NotImplementedError - 71 - 72 return self.fit -
      73 -
      74 - def genSamplingFromtimemap(self, fullpath, newfullpath, bankid, num, dfc, expfilepath): -
      75 """Sampling num of times based on distribution and save the new datafile in newfullpath. - 76 """ - 77 import random - 78 self.fit.reshape((num+1, ), ["SampleId", ], repeat=True) - 79 pattern = self.fit.getObject("Pattern").getObject(0) - 80 datafilelist = pattern.get("Datafile") - 81 datadict = importFromGSAStimemap(fullpath, 1) - 82 ys = datadict["yobs"] - 83 ss = datadict["sobs"] - 84 dstring = "" - 85 sidlist = [] - 86 for i in range(1, num+1): - 87 dline = "" - 88 sidlist.append(i) - 89 for idx in range(len(ys)): - 90 y_int = ys[idx] - 91 s_int = ss[idx] - 92 y_rad = random.gauss(y_int, s_int) - 93 if y_rad <= 0.0 : - 94 y_rad = 2 * y_int - y_rad - 95 if y_rad == 0.0: - 96 y_rad = y_int - 97 dstring += "%8.1f%8.1f" % (y_rad, s_int) - 98 if (idx+1)%5 == 0: - 99 dline += "%-80s\r\n" % dstring -100 dstring = "" -101 elif idx == len(ys)-1: -102 dline += "%-80s\r\n" % dstring -103 dstring = "" -104 datafullpath = newfullpath[:-4] + str(i) + ".gsa" -105 headerline = datadict["header"] -106 allline = headerline + dline -107 dfc.writeDataFile(allline, datafullpath) -108 if self.engine == "fullprof": -109 outfullpath = newfullpath[:-4] + str(i) + ".dat" -110 dfc.toFPFile(datafullpath, outfullpath, 1, expfilepath) -111 datafullpath = outfullpath -112 datafilelist[i] = datafullpath -113 self.fit.set("SampleId", sidlist) -114 self.fit.resetStatus() -115 return -
      116 -117 -
      118 - def genSamplingFromxye(self, fullpath, newfullpath, bankid, num, dfc): -
      119 """Sampling num of times based on distribution and save the new datafile in newfullpath. -120 """ -121 self.fit.reshape((num+1, ), ["SampleId", ], repeat=True) -122 pattern = self.fit.getObject("Pattern").getObject(0) -123 datafilelist = pattern.get("Datafile") -124 for i in range(1, num+1): -125 if self.engine == "fullprof": -126 datafullpath = newfullpath[:-4] + str(i) + ".xye" -127 dfc.xyetoFP(fullpath, datafullpath, 1, self.stype) -128 else: -129 datafullpath = newfullpath[:-4] + str(i) + ".gsa" -130 dfc.toGSASFile(fullpath, datafullpath, 1, self.stype) -131 datafilelist[i] = datafullpath -132 -133 self.fit.resetStatus() -134 return -
      135 -
      136 - def genSamplingFromchi(self, fullpath, newfullpath, bankid, num, dfc): -
      137 """Sampling num of times based on distribution and save the new datafile in newfullpath. -138 """ -139 self.fit.reshape((num+1, ), ["SampleId", ], repeat=True) -140 pattern = self.fit.getObject("Pattern").getObject(0) -141 datafilelist = pattern.get("Datafile") -142 for i in range(1, num+1): -143 if self.engine == "fullprof": -144 datafullpath = newfullpath[:-4] + str(i) + ".chi" -145 dfc.chitoFP(fullpath, datafullpath, 1, self.stype) -146 else: -147 datafullpath = newfullpath[:-4] + str(i) + ".gsa" -148 dfc.toGSASFile(fullpath, datafullpath, 1, self.stype) -149 datafilelist[i] = datafullpath -150 -151 self.fit.resetStatus() -152 return -
      153 -
      154 -def importFromGSAStimemap(datafilename, bankid): -
      155 """Import a GSAS .gsa/gda file and get the dict of y, sd -156 -157 Arguments: -158 - datafilename : full-path name of .gsa/gda file; -159 -160 Return: datadict: a dictionary that includes series of yobs, sobs -161 """ -162 try: -163 ffile = open(datafilename, "r") -164 lines = ffile.readlines() -165 ffile.close() -166 except IOError: -167 errmsg = "Fatal Error: Cannot Open File %-20s"% (datafilename) -168 raise IOError, errmsg -169 -170 datadict = {"header": "", "yobs": [], "sobs": []} -171 firstbankline = False -172 bankline = False -173 for line in lines: -174 terms = line.strip().split() -175 if terms[0] == "BANK" and terms[1] == str(bankid): -176 firstbankline = True -177 bankline = True -178 datadict["header"] += line -179 elif terms[0] == "BANK" and terms[1] != str(bankid): -180 firstbankline = False -181 bankline = True -182 elif firstbankline == False and bankline == False: -183 datadict["header"] += line -184 elif firstbankline == True and bankline == True: -185 for i in range(5): -186 try: -187 datadict["yobs"].append(float(terms[2*i])) -188 datadict["sobs"].append(float(terms[2*i+1])) -189 except: -190 break -191 return datadict -
      192 -
      193 -def importFromGSASstd(datafilename, bankid): -
      194 """Import a GSAS .raw file and get the dict of y, sd -195 -196 Arguments: -197 - datafilename : full-path name of .raw file; -198 -199 Return: datadict: a dictionary that includes series of yobs, sobs -200 """ -201 try: -202 ffile = open(datafilename, "r") -203 lines = ffile.readlines() -204 ffile.close() -205 except IOError: -206 errmsg = "Fatal Error: Cannot Open File %-20s"% (datafilename) -207 raise IOError, errmsg -208 -209 datadict = {"header": "", "countid": [], "yobs": [], "sobs": []} -210 firstbankline = False -211 bankline = False -212 for line in lines: -213 id = lines.index(line) -214 terms = line.strip().split() -215 if terms[0] == "BANK": -216 bankline = True -217 if terms[1] == str(bankid): -218 firstbankline = True -219 datadict["header"] += line -220 elif firstbankline == False and bankline == False: -221 datadict["header"] += line -222 elif firstbankline == True and bankline == True: -223 for i in range(10): -224 try: -225 datadict["countid"].append(int(line[8*i:(8*i+2)])) -226 yobs = int(line[(8*i+2):(8*i+7)]) -227 datadict["yobs"].append(yobs) -228 datadict["sobs"].append(yobs**0.5) -229 except: -230 break -231 return datadict -
      232 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.mcsampling.MonteCarloSampling-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.mcsampling.MonteCarloSampling-class.html deleted file mode 100644 index ff007c08..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.mcsampling.MonteCarloSampling-class.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - diffpy.srrietveld.addon.mcsampling.MonteCarloSampling - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module mcsampling :: - Class MonteCarloSampling - - - - - -
      [frames] | no frames]
      -
      - -

      Class MonteCarloSampling

      source code

      -

      Monte Carlo Sampling for diffraction pattern.

      - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - fit, - snum, - stype='Normal')
      - Initialization.
      - source code - -
      - -
      -   - - - - - - -
      addSampleData(self)
      - Convert data file if neccessary.
      - source code - -
      - -
      -   - - - - - - -
      genSamplingFromchi(self, - fullpath, - newfullpath, - bankid, - num, - dfc)
      - Sampling num of times based on distribution and save the new datafile - in newfullpath.
      - source code - -
      - -
      -   - - - - - - -
      genSamplingFromtimemap(self, - fullpath, - newfullpath, - bankid, - num, - dfc, - expfilepath)
      - Sampling num of times based on distribution and save the new datafile - in newfullpath.
      - source code - -
      - -
      -   - - - - - - -
      genSamplingFromxye(self, - fullpath, - newfullpath, - bankid, - num, - dfc)
      - Sampling num of times based on distribution and save the new datafile - in newfullpath.
      - source code - -
      - -
      -   - - - - - - -
      getEngine(self)
      - Get engine type from fit object.
      - source code - -
      - -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - fit, - snum, - stype='Normal') -
      (Constructor) -

      -
      source code  -
      - -

      Initialization.

      -

      fit --- a diffpy.refinementdata.Refinement object that stores a - fit with only one pattern snum --- number of samplings stype --- - type of sampling distribution

      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.structurefile-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.structurefile-module.html deleted file mode 100644 index 1caa7d51..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.structurefile-module.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - diffpy.srrietveld.addon.structurefile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module structurefile - - - - - -
      [frames] | no frames]
      -
      - -

      Module structurefile

      source code

      -

      structurefile.py is to convert different format structure files to a - dictionary. currently only cif file can be converted. Assume one cif for - one structure.

      - - - - - - - - - - -
      - Classes
      -   - - StructureFileConverter
      - Convert input structure file to a dictionary -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: structurefile.py 5657 2010-07-09 19:43:17Z juha... -
      -   - - __package__ = 'diffpy.srrietveld.addon' -
      -

      Imports: - Structure -


      - - - - - - -
      - Variables Details
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: structurefile.py 5657 2010-07-09 19:43:17Z juhas $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.structurefile-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.structurefile-pysrc.html deleted file mode 100644 index bb38c832..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.structurefile-pysrc.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - diffpy.srrietveld.addon.structurefile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module structurefile - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.addon.structurefile

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2009 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Peng Tian 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14   
      -15  """ structurefile.py is to convert different format structure files to a dictionary. 
      -16      currently only cif file can be converted. Assume one cif for one structure. 
      -17  """ 
      -18   
      -19  __id__ = "$Id: structurefile.py 5657 2010-07-09 19:43:17Z juhas $" 
      -20   
      -21  from diffpy.Structure import Structure 
      -22   
      -
      24 """ Convert input structure file to a dictionary """ -25 -
      26 - def __init__(self, structurefile): -
      27 """ Initialization """ -28 import os -29 self.strufile = structurefile -30 filename = os.path.basename(structurefile) -31 self.name = os.path.splitext(filename)[0] -32 self.structure = Structure() -33 self.atominfo = self.structure.read(structurefile) -34 self.strudict = {'PHASE':[]} -35 return -
      36 -
      37 - def cifToDict(self): -
      38 """ put cif content to dictionary """ -39 import re -40 -41 # set single Phase section -42 phase = {} -43 phase['Name'] = self.name -44 phase['a'] = self.structure.lattice.a -45 phase['b'] = self.structure.lattice.b -46 phase['c'] = self.structure.lattice.c -47 phase['alpha'] = self.structure.lattice.alpha -48 phase['beta'] = self.structure.lattice.beta -49 phase['gamma'] = self.structure.lattice.gamma -50 phase['Spacegroup'] = self.atominfo.cif_sgname -51 atomlist = self.atominfo.asymmetric_unit -52 for atom in atomlist: -53 atomkey = 'ATOM' + str(atomlist.index(atom)+1) -54 phase[atomkey] = [] -55 tempdict = {} -56 # find the atom name -57 res = re.search(r'([^0-9]*)', atom.name) -58 if res and res.groups(): -59 atomname = res.groups()[0] -60 else: -61 atomname = atom.name -62 tempdict['Name'] = atomname -63 tempdict['Symbol'] = atomname -64 tempdict['Typ'] = atomname -65 if atom.Bisoequiv <= 0.0: -66 tempdict['Biso'] = 1.0 -67 else: -68 tempdict['Biso'] = atom.Bisoequiv -69 xyz = map(None, atom.xyz) -70 tempdict['X'] = xyz[0] -71 tempdict['Y'] = xyz[1] -72 tempdict['Z'] = xyz[2] -73 phase[atomkey].append(tempdict) -74 self.strudict['PHASE'].append(phase) -75 return self.strudict -
      76 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.structurefile.StructureFileConverter-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.structurefile.StructureFileConverter-class.html deleted file mode 100644 index 23b36b1c..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.addon.structurefile.StructureFileConverter-class.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - diffpy.srrietveld.addon.structurefile.StructureFileConverter - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package addon :: - Module structurefile :: - Class StructureFileConverter - - - - - -
      [frames] | no frames]
      -
      - -

      Class StructureFileConverter

      source code

      -

      Convert input structure file to a dictionary

      - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - structurefile)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      cifToDict(self)
      - put cif content to dictionary
      - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.applications-module.html deleted file mode 100644 index c84bb71e..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications-module.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - diffpy.srrietveld.applications - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package applications - - - - - -
      [frames] | no frames]
      -
      - -

      Package applications

      source code

      -

      Constants: __version__ -- full version of this SrRietveld release

      - -
      -

      Version: - 1.0beta.dev-r6361-20110319 -

      -
      - - - - - - -
      - Submodules
      -
      - -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: __init__.py 5658 2010-07-09 20:05:34Z juhas $' -
      -   - - __package__ = 'diffpy.srrietveld.applications' -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.applications-pysrc.html deleted file mode 100644 index fd238e8d..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications-pysrc.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - diffpy.srrietveld.applications - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package applications - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Package diffpy.srrietveld.applications

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2010 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Pavol Juhas 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14   
      -15  '''Constants: 
      -16      __version__ -- full version of this SrRietveld release 
      -17  ''' 
      -18   
      -19  from diffpy.srrietveld.version import __version__ 
      -20   
      -21  # version 
      -22  __id__ = "$Id: __init__.py 5658 2010-07-09 20:05:34Z juhas $" 
      -23   
      -24  # End of file 
      -25   
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.refine-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.refine-module.html deleted file mode 100644 index 2e6832cf..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.refine-module.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - diffpy.srrietveld.applications.refine - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package applications :: - Module refine - - - - - -
      [frames] | no frames]
      -
      - -

      Module refine

      source code

      -

      Launch Rietveld refinement and control the refinement.

      - - - - - - - - - - -
      - Classes
      -   - - ReadInput
      - Parse input options and read xml files -
      - - - - - - - - - - - - -
      - Functions
      -   - - - - - - -
      applydata(fit, - datadict)
      - Expand fit to a fit array, with different data set
      - source code - -
      - -
      -   - - - - - - -
      main() - source code - -
      - -
      - - - - - - - - - -
      - Variables
      -   - - __id__ = "$Id: refine.py 5658 2010-07-09 20:05:34Z juhas $" -
      -

      Imports: - Project, - Manager, - SeqManager, - FitRT -


      - - - - - - -
      - Function Details
      - -
      - -
      - - -
      -

      applydata(fit, - datadict) -

      -
      source code  -
      - -

      Expand fit to a fit array, with different data set

      -

      fit -- a project fit object datadict -- a dictionary of data files

      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.refine-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.refine-pysrc.html deleted file mode 100644 index 3005f608..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.refine-pysrc.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - diffpy.srrietveld.applications.refine - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package applications :: - Module refine - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.applications.refine

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Peng Tian 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ Launch Rietveld refinement and control the refinement. """ 
      - 15  __id__ = "$Id: refine.py 5658 2010-07-09 20:05:34Z juhas $" 
      - 16   
      - 17  from diffpy.srrietveld.convert.xmlparser import * 
      - 18  from diffpy.srrietveld.project import Project 
      - 19  from diffpy.srrietveld.manager import Manager, SeqManager 
      - 20  from diffpy.srrietveld.fitrt import FitRT 
      - 21   
      -
      22 -class ReadInput: -
      23 """ Parse input options and read xml files """ -
      24 - def __init__(self): -
      25 """ Initialization """ - 26 import sys - 27 - 28 argv = sys.argv - 29 if len(argv) < 2: - 30 msg = "Automatic Launched Refinement On Rietveld Refinement\n" - 31 msg += "\n%-10s -h For Help"% (argv[0].split("/")[-1]) - 32 print msg - 33 sys.exit(1) - 34 - 35 self.parseOptions() - 36 self.processInputs() - 37 self.run() - 38 return -
      39 -
      40 - def parseOptions(self): -
      41 """ Parse the input options """ - 42 from optparse import OptionParser - 43 import diffpy.srrietveld.applications.srhelp as srhelp - 44 # init - 45 optparser = OptionParser() - 46 - 47 # define the input options, will be removed to a common place - 48 optparser.add_option("-i", "--instrument", dest="instrument", - 49 help = srhelp.helpstring["instrument"]) - 50 optparser.add_option("-s", "--structure" , dest="structure", - 51 help = srhelp.helpstring["structure"]) - 52 optparser.add_option("-d", "--data", dest="datafile", - 53 help = srhelp.helpstring["data"]) - 54 optparser.add_option("-r", "--strategy", dest="strategyfile", - 55 help = srhelp.helpstring["strategy"], default="calibrated") - 56 optparser.add_option("--bank", dest="banks", - 57 help = srhelp.helpstring["bank"], default = "1") - 58 optparser.add_option("-b", "--background", dest="backgroundfile", - 59 help = srhelp.helpstring["background"]) - 60 optparser.add_option("-e", "--engine", dest="engine", - 61 help = srhelp.helpstring["engine"], default="fullprof") - 62 optparser.add_option("--excludedregion", dest = "excludedregionfile", - 63 help = srhelp.helpstring["excludedregion"]) - 64 optparser.add_option("--infofile", dest="infofile", - 65 help="Information file. Information file contains 2 columns for" + - 66 "datafile and value of environment quantity (e.g. temperature)") - 67 optparser.add_option("--datadirectory", dest="datadirectory", - 68 help="Directory of source data file") - 69 - 70 (options, args) = optparser.parse_args() - 71 self.options = options - 72 return -
      73 -
      74 - def processInputs(self): -
      75 """ Process input files and pass into dictionaries. """ - 76 from diffpy.srrietveld.utility import checkFormat, parseXYToList - 77 from diffpy.srrietveld.convert.gsasinstparser import GSASInstFile - 78 from diffpy.srrietveld.addon.datafile import DataFileConverter, createDataDict - 79 from diffpy.srrietveld.addon.strategyfile import StrategyFileParser - 80 from diffpy.srrietveld.addon.structurefile import StructureFileConverter - 81 - 82 # Set engine and banklist - 83 self.engine = self.options.engine.lower() - 84 try: - 85 self.banklist = self.options.banks.split(",") - 86 except: - 87 self.banklist = self.options.banks - 88 - 89 # Instrument info process - 90 instrumentfile = self.options.instrument - 91 instfileformat = checkFormat(instrumentfile) - 92 if instfileformat == "xml": - 93 instxml = InstrumentXML(instrumentfile) - 94 self.instdict = instxml.parseInstrumentXML() - 95 elif instfileformat in ["iparm", "prm"]: - 96 gsasinst = GSASInstFile(instrumentfile, self.banklist, self.engine) - 97 self.instdict = gsasinst.parseInstInfo() - 98 else: - 99 raise NotImplementedError -100 -101 # Structure info process -102 structurefile = self.options.structure -103 strufileformat = checkFormat(structurefile) -104 if strufileformat == "xml": -105 struxml = StructureXML(structurefile) -106 self.strudict = struxml.parseStructureXML() -107 elif strufileformat == "cif": -108 strufile = StructureFileConverter(structurefile) -109 self.strudict = strufile.cifToDict() -110 else: -111 raise NotImplementedError -112 -113 # Data file process -114 datafile = self.options.datafile -115 infofile = self.options.infofile -116 if datafile != None: -117 # single dataset refinement -118 self.datadict = {1:{"Name": datafile}} -119 elif infofile != None: -120 # multiple datasets refinement -121 datadirectory = self.options.datadirectory -122 self.datadict = createDataDict(infofile, datadirectory) -123 else: -124 raise NotImplementedError -125 -126 for key, value in self.datadict.items(): -127 datafilename = value["Name"] -128 dataformat = checkFormat(datafilename) -129 datafileconverter = DataFileConverter(datafilename, instrumentfile, self.banklist) -130 for bankid in self.banklist: -131 if self.engine == "gsas" and dataformat in ["dat", "chi"]: -132 gsasfile = datafilename.split(dataformat)[0] + "gsa" -133 datafileconverter.toGSASFile(datafilename, gsasfile, int(bankid)) -134 elif self.engine == "gsas" and dataformat in ["gsa", "gda", "raw"]: -135 datafileconverter.readGSASFile(datafilename, int(bankid)) -136 elif self.engine == "fullprof" and dataformat in ["xye", "chi", "gsa", "gda", "raw"]: -137 fullproffile = datafilename.split(dataformat)[0] + "dat" -138 datafileconverter.toFPFile(datafilename, fullproffile, int(bankid)) -139 else: -140 raise NotImplementedError -141 self.datadict[key] = datafileconverter.datadict -142 -143 # Refine Strategy file process -144 strategyfile = self.options.strategyfile -145 strategyfileformat = checkFormat(strategyfile) -146 if strategyfileformat == "txt": -147 strategytxt = StrategyFileParser(strategyfile) -148 self.strategy = strategytxt.parseTXTFormat() -149 else: -150 raise NotImplementedError -151 -152 # Optional files: background and excludedregion: -153 backgroundfile = self.options.backgroundfile -154 if backgroundfile != None: -155 bkgdformat = checkFormat(backgroundfile) -156 if bkgdformat == "xml": -157 bkgd = BackgroundXML(backgroundfile) -158 bkgd.addToInstDict(self.instdict) -159 elif bkgdformat == "dat": -160 self.bkgdlist = parseXYToList(backgroundfile) -161 else: -162 raise NotImplementedError -163 excludedregionfile = self.options.excludedregionfile -164 if self.options.excludedregionfile != None: -165 exre = ExcludedRegionXML(excludedregionfile) -166 self.exredict = exre.xmlToDict(exre.exrexml) -167 return -
      168 -
      169 - def run(self): -
      170 """ Main controller of the refinement """ -171 from diffpy.srrietveld.buildfit import BuildFit -172 from diffpy.refinementdata.plot import backend -173 -174 backend.use('wx') -175 -176 # 1. Build Fit Object -177 sortedkeys = sorted(self.datadict.keys()) -178 buildfit = BuildFit(self.engine, self.strudict, self.instdict, -179 self.datadict[sortedkeys[0]]) -180 srrfit = buildfit.buildFit() -181 -182 # 2. Add optional background and excludedregion -183 if hasattr(self, "bkgdlist"): -184 buildfit.addBkgdPoints(srrfit, self.bkgdlist) -185 if hasattr(self, "exredict"): -186 buildfit.addExre(srrfit, self.exredict) -187 -188 # 3. check whether fit is ready -189 srrfit.validate() -190 -191 # force to rewrite everytime -192 project = Project('temp.srr','w') -193 -194 # Also create a fitlist to build a manager -195 fitlist = [] -196 -197 # 4. Refine -198 datafilenum = len(self.datadict.keys()) -199 if datafilenum > 1: -200 datalist = [] -201 fit = project.importEngineFit(srrfit, 'f1', shape = (datafilenum, )) -202 fitlist.append(fit) -203 datalist.append(self.datadict[sortedkeys[0]]) -204 i = 1 -205 for v in sortedkeys[1:]: -206 patterns = fit.fitdata.getObject("Pattern") -207 pattern = patterns.getObject(0) -208 text = pattern.get('Datafile') -209 text[i] = self.datadict[v][1]["Name"] -210 # also update: -211 fitlist.append(FitRT(project, fit.fitdata, i)) -212 i += 1 -213 datalist.append(self.datadict[v]) -214 -215 project.plot(fit.fitdata, 0) -216 # Now create a manager to run the refinement. -217 manager = SeqManager(fitlist, datalist, self.strategy) -218 else: -219 fitrt = project.importEngineFit(srrfit, 'f1') -220 fitlist.append(fitrt) -221 #project.plot(fitrt.fit) -222 manager = Manager(fitlist, self.strategy) -223 project.managers.append(manager) -224 # run fit -225 project.start() -226 backend.show() -227 # save project -228 project.close() -229 return -
      230 -231 -
      232 -def applydata(fit, datadict): -
      233 '''Expand fit to a fit array, with different data set -234 -235 fit -- a project fit object -236 datadict -- a dictionary of data files -237 ''' -238 pass -
      239 -
      240 -def main(): -
      241 ReadInput() -242 return -
      243 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.refine.ReadInput-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.refine.ReadInput-class.html deleted file mode 100644 index 497e6e5f..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.refine.ReadInput-class.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - diffpy.srrietveld.applications.refine.ReadInput - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package applications :: - Module refine :: - Class ReadInput - - - - - -
      [frames] | no frames]
      -
      - -

      Class ReadInput

      source code

      -

      Parse input options and read xml files

      - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      parseOptions(self)
      - Parse the input options
      - source code - -
      - -
      -   - - - - - - -
      processInputs(self)
      - Process input files and pass into dictionaries.
      - source code - -
      - -
      -   - - - - - - -
      run(self)
      - Main controller of the refinement
      - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srhelp-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srhelp-module.html deleted file mode 100644 index b6849952..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srhelp-module.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - diffpy.srrietveld.applications.srhelp - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package applications :: - Module srhelp - - - - - -
      [frames] | no frames]
      -
      - -

      Module srhelp

      source code

      - - - - - - - - - -
      - Functions
      -   - - - - - - -
      getHelp(optionname)
      - Get help string for an option name
      - source code - -
      - -
      - - - - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: srhelp.py 5658 2010-07-09 20:05:34Z juhas $' -
      -   - - __package__ = None -
      -   - - helpstring = {'background': 'Name of Data File Containing Back... -
      - - - - - - -
      - Function Details
      - -
      - -
      - - -
      -

      getHelp(optionname) -

      -
      source code  -
      - -

      Get help string for an option name

      -

      Arguement:

      -
        -
      • - optionname : str, name of an option supported -
      • -
      -

      Return : str

      -
      -
      -
      -
      -
      - - - - - - -
      - Variables Details
      - -
      - -
      -

      helpstring

      - -
      -
      -
      -
      Value:
      -
      -{'background': 'Name of Data File Containing Background Parameter or B\
      -ackground XML file',
      - 'bank': 'Bank(s) to refine in T.O.F. data',
      - 'data': 'Full-path Name of Data File',
      - 'engine': 'Type of Refinement Engine (i.e.,Refinement Backend). Fullp\
      -rof or GSAS',
      - 'excludedregion': 'Name of XML file to Indicate User Specified Exclud\
      -ed Region',
      -...
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srhelp-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srhelp-pysrc.html deleted file mode 100644 index 74a41b93..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srhelp-pysrc.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - diffpy.srrietveld.applications.srhelp - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package applications :: - Module srhelp - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.applications.srhelp

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2009 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Wenduo Zhou, Peng Tian 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14   
      -15  __id__ = "$Id: srhelp.py 5658 2010-07-09 20:05:34Z juhas $" 
      -16   
      -17  helpstring = { 
      -18          "instrument": "(1) Name of Instrument iparm file\n(2) Name of Instrument XML File", 
      -19          "structure": "Name of CIF File (.cif) or SrRietveld Crystal Structure XML File (.xml)", 
      -20          "data": "Full-path Name of Data File", 
      -21          "strategy": "(1) Name of Refinement Strategy or (2) Name of SrRietveld Refinement Strategy File", 
      -22          "bank": "Bank(s) to refine in T.O.F. data", 
      -23          "background": "Name of Data File Containing Background Parameter or Background XML file", 
      -24          "engine": "Type of Refinement Engine (i.e.,Refinement Backend). Fullprof or GSAS", 
      -25          "excludedregion": "Name of XML file to Indicate User Specified Excluded Region" 
      -26      } 
      -27   
      -
      28 -def getHelp(optionname): -
      29 """ Get help string for an option name -30 -31 Arguement: -32 - optionname : str, name of an option supported -33 -34 Return : str -35 """ -36 try: -37 resultstring = helpstring[optionname] -38 except KeyError, err: -39 errmsg = "Help string for option %-20s does not exist" -40 raise NotImplementedError, errmsg -41 -42 return resultstring -
      43 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srrgui-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srrgui-module.html deleted file mode 100644 index 1e58c57d..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srrgui-module.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - diffpy.srrietveld.applications.srrgui - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package applications :: - Module srrgui - - - - - -
      [frames] | no frames]
      -
      - -

      Module srrgui

      source code

      -

      SrRietveld GUI entry point.

      - - - - - - - - - - - - - - - - - - - - - - -
      - Functions
      -   - - - - - - -
      usage()
      - Show usage info.
      - source code - -
      - -
      -   - - - - - - -
      version() - source code - -
      - -
      -   - - - - - - -
      loadConfig(cfgFile=None)
      - Load the non ui global environment from the configuration files If - there is no config, files stored in home directory, then restore to - default
      - source code - -
      - -
      -   - - - - - - -
      processArguments(argv1)
      - Process command line arguments and store results in srrguiglobals.
      - source code - -
      - -
      -   - - - - - - -
      main()
      - Main entry point to SrRietveld.
      - source code - -
      - -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: srrgui.py 6500 2011-04-08 14:20:54Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld.applications' -
      -

      Imports: - sys, - os, - getopt, - GLOBALS, - SrrValueError -


      - - - - - - -
      - Function Details
      - -
      - -
      - - -
      -

      processArguments(argv1) -

      -
      source code  -
      - -

      Process command line arguments and store results in srrguiglobals. - This method updates cmdopts, cmdargs and dbopts attributes in the - srrguiglobals module.

      -

      argv1 -- list of command line arguments excluding the executable

      -

      Returns boolean flag to indicate if the execution should continue. The - flag is False, when options contain --help or --version. Raises - GetoptError for invalid options. Raises ValueError for more than one - project file arguments or when project is not a valid file.

      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srrgui-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srrgui-pysrc.html deleted file mode 100644 index 0e4a22a1..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.applications.srrgui-pysrc.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - diffpy.srrietveld.applications.srrgui - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package applications :: - Module srrgui - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.applications.srrgui

      -
      -  1  #!/usr/bin/env python 
      -  2  ############################################################################## 
      -  3  # 
      -  4  # diffpy.srrietveld by DANSE Diffraction group 
      -  5  #                   Simon J. L. Billinge 
      -  6  #                   (c) 2010 Trustees of the Columbia University 
      -  7  #                   in the City of New York.  All rights reserved. 
      -  8  # 
      -  9  # File coded by:    Pavol Juhas, Peng Tian 
      - 10  # 
      - 11  # See AUTHORS.txt for a list of people who contributed. 
      - 12  # See LICENSE.txt for license information. 
      - 13  # 
      - 14  ############################################################################## 
      - 15   
      - 16   
      - 17  """SrRietveld GUI entry point. 
      - 18  """ 
      - 19   
      - 20  # version 
      - 21  __id__ = "$Id: srrgui.py 6500 2011-04-08 14:20:54Z yshang $" 
      - 22   
      - 23   
      - 24  import sys 
      - 25  import os 
      - 26  import getopt 
      - 27  import diffpy.srrietveld.gui.srrguiglobals as GLOBALS 
      - 28  from diffpy.srrietveld.exceptions import SrrValueError 
      - 29   
      - 30  _help_message = """\ 
      - 31  SrRietveld - perform and analyse a series of Rietveld refinements. 
      - 32  Usage:  SCRIPTNAME [options] prototype.EXP 
      - 33          SCRIPTNAME [options] prototype.PCR 
      - 34  to start a new project based on prototype GSAS or FullProf refinement or 
      - 35          SCRIPTNAME project.srr 
      - 36  to open an existing SrRietveld project. 
      - 37   
      - 38  Options: 
      - 39      -h, --help      display this help and exit 
      - 40      -v, --version   show program version and exit 
      - 41      -d, --debug     debug mode - temporary files are not removed, standard 
      - 42                      output is not captured to the GUI window. 
      - 43  """.rstrip() 
      - 44   
      -
      45 -def usage(): -
      46 """Show usage info. - 47 """ - 48 myname = os.path.basename(sys.argv[0]) - 49 msg = _help_message.replace("SCRIPTNAME", myname) - 50 print msg - 51 return -
      52 - 53 -
      54 -def version(): -
      55 from diffpy.srrietveld import __version__ - 56 print "SrRietveld", __version__ - 57 return -
      58 -
      59 -def loadConfig(cfgFile = None): -
      60 '''Load the non ui global environment from the configuration files - 61 If there is no config, files stored in home directory, then restore to default''' - 62 - 63 if cfgFile is None: - 64 cfgFile = GLOBALS.defaultCfgPath('default.cfg') - 65 - 66 if os.path.exists(cfgFile): - 67 configPath = cfgFile - 68 else: - 69 configPath = GLOBALS.defaultCfgPath('default.cfg') - 70 - 71 GLOBALS.config.read(configPath) - 72 - 73 # get the options for refinement - 74 GLOBALS.isStrategyEnabled = \ - 75 GLOBALS.config.getboolean('refinement','enable_strategy') - 76 GLOBALS.isStrategyEnabledOnDivergence = \ - 77 GLOBALS.config.getboolean('refinement','enable_strategy_when_diverge') - 78 - 79 GLOBALS.gsasPath = GLOBALS.config.get('directories','gsas_path') - 80 GLOBALS.fullprofPath = GLOBALS.config.get('directories','fullprof_path') - 81 - 82 GLOBALS.workingDir = GLOBALS.config.get('directories', 'working_directory') - 83 GLOBALS.changeWithProjectFile = GLOBALS.config.getboolean('directories', 'change_with_project_file') - 84 - 85 # check if the workingDir is None or does not exist - 86 isGoodWD = True - 87 if not GLOBALS.workingDir or not os.path.exists(GLOBALS.workingDir): - 88 isGoodWD = False - 89 - 90 if not isGoodWD: - 91 GLOBALS.workingDir = os.getcwd() - 92 #os.chdir(GLOBALS.workingDir) - 93 - 94 return -
      95 -
      96 -def processArguments(argv1): -
      97 '''Process command line arguments and store results in srrguiglobals. - 98 This method updates cmdopts, cmdargs and dbopts attributes in the - 99 srrguiglobals module. -100 -101 argv1 -- list of command line arguments excluding the executable -102 -103 Returns boolean flag to indicate if the execution should continue. -104 The flag is False, when options contain --help or --version. -105 Raises GetoptError for invalid options. -106 Raises ValueError for more than one project file arguments or -107 when project is not a valid file. -108 ''' -109 # default parameters -110 opts, args = getopt.gnu_getopt(sys.argv[1:], "hvd", -111 ["help", "version", "debug"] ) -112 # process options -113 proceed = True -114 for o, a in opts: -115 if o in ("-h", "--help"): -116 usage() -117 proceed = False -118 elif o in ("-v", "--version"): -119 version() -120 proceed = False -121 elif o in ('-d', '--debug'): -122 GLOBALS.isDebug = True -123 proceed = True -124 GLOBALS.cmdopts = opts -125 # bail-out here if options contain --help or --version -126 if not proceed: return False -127 # otherwise continue checking arguments -128 if len(args) == 1 and not os.path.isfile(args[0]): -129 emsg = "Project file %s does not exist." % args[0] -130 raise ValueError(emsg) -131 elif len(args) > 1: -132 emsg = "Too many project files." -133 raise ValueError(emsg) -134 # ready to go -135 GLOBALS.cmdargs = args -136 return proceed -
      137 -138 -
      139 -def main(): -
      140 '''Main entry point to SrRietveld. -141 ''' -142 # process arguments -143 proceed = False -144 try: -145 loadConfig(GLOBALS.cfgFileName) -146 except: -147 loadConfig() -148 __msg = 'Can not load the configuration file: %s. The default configurations are loaded. ' -149 print __msg -150 -151 try: -152 proceed = processArguments(sys.argv[1:]) -153 except (getopt.GetoptError, ValueError), err: -154 print >> sys.stderr, err -155 sys.exit(1) -156 # bail out when no gui is needed -157 if not proceed: -158 sys.exit() -159 # initialize gui -160 import diffpy.srrietveld.gui.main as guimain -161 # Catch control errors, that may happen during project -162 # loading, before the GUI gets running -163 from diffpy.srrietveld.exceptions import SrrError -164 try: -165 guimain.main() -166 except SrrError, err: -167 print >> sys.stderr, err -168 sys.exit(1) -169 return -
      170 -171 -172 if __name__ == "__main__": -173 main() -174 -175 # End of file -176 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.atom-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.atom-module.html deleted file mode 100644 index eac010b7..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.atom-module.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - diffpy.srrietveld.atom - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module atom - - - - - -
      [frames] | no frames]
      -
      - -

      Module atom

      source code

      -

      This package contains the Atom class in SrRietveld, which is an script - interface to access the atom information

      - - - - - - - - - - -
      - Classes
      -   - - Atom
      - Atom is a Refinable component which contains multiple parameters. -
      - - - - - - - - - - - - - - - -
      - Variables
      -   - - PARAMNAMES = {'fullprof': {'Biso': 'AtomicDisplacementFactor.B... -
      -   - - __id__ = '$Id: atom.py 6726 2011-08-25 09:36:23Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - Refinable -


      - - - - - - -
      - Variables Details
      - -
      - -
      -

      PARAMNAMES

      - -
      -
      -
      -
      Value:
      -
      -{'fullprof': {'Biso': 'AtomicDisplacementFactor.Biso',
      -              'Rp': 'Rp',
      -              'Rwp': 'Rwp',
      -              'Tmax': 'Thmin',
      -              'Tmin': 'Thmax',
      -              'Uiso': 'AtomicDisplacementFactor.Uiso',
      -              'X': 'X',
      -              'Y': 'Y',
      -...
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.atom-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.atom-pysrc.html deleted file mode 100644 index be7cd2d1..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.atom-pysrc.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - - diffpy.srrietveld.atom - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module atom - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.atom

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Yingrui Shang 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15  This package contains the Atom class in SrRietveld, which is an script interface 
      - 16  to access the atom information 
      - 17  """ 
      - 18   
      - 19  __id__ = "$Id: atom.py 6726 2011-08-25 09:36:23Z yshang $" 
      - 20   
      - 21  from diffpy.refinementdata.refinable import Refinable 
      - 22  from diffpy.srrietveld.paramnames import PARAMNAMES 
      - 23   
      -
      24 -class Atom(Refinable): -
      25 - 26 """Atom is a Refinable component which contains multiple parameters. - 27 A composite function may also contain other functions. - 28 - 29 data member: - 30 - 31 formula: a string of the function definition in C style - 32 variables: a space separated string of all variables in the formula - 33 """ -
      34 - def __init__(self, owner, name=None, handle=None, formula=None, variables=None, shape=None): -
      35 """Initialization. - 36 - 37 @type owner: a data project - 38 @param owner: the owner, which is usually a refinement. - 39 @type name: string - 40 @param name the name of the pattern - 41 @type handle: a HDF5Handle object - 42 @param handle: a HDF5Handle pointing to the underlying HDF5 node. - 43 @type formula: string - 44 @param formula: a string of the function definition in C style - 45 @type variables: a space separated string - 46 @param variables: a space separated string of all variables - 47 - 48 A name is passed to the initialization method when creating a node. - 49 - 50 A handle is passed to the inialization method in two cases: - 51 1. when loading from a HDF5 file; - 52 2. when creating a HDF5 file but the object is a hard link to - 53 a preexisiting one. - 54 - 55 In the case when both name and handle are given, name will be simply ignored. - 56 In the case when neither name nor handle is given, an exception will be raised. - 57 - 58 Generally, in the scripting interface, users do not have to call this - 59 constructor directly - 60 """ - 61 Refinable.__init__(self, owner, name, handle, shape) - 62 return -
      63 - 64 -
      65 - def getEngineType(self): -
      66 '''Get the engine type for this refinement - 67 - 68 @return: the string of the engine type, for example I{"gsas"} or I{"fullprof"}''' - 69 - 70 return self.owner.owner.getEngineType() -
      71 -
      72 - def getBiso(self): -
      73 ''' - 74 Get the Biso values - 75 - 76 @return: the Biso values - 77 ''' - 78 return self.getByPath(PARAMNAMES[self.getEngineType()]["Biso"]) -
      79 -
      80 - def getBisoSigma(self): -
      81 ''' - 82 Get the Biso standard deviations - 83 - 84 @return: the Biso standard deviations - 85 ''' - 86 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]["Biso"]) -
      87 -
      88 - def getName(self): -
      89 ''' - 90 Get atom name. The atom name is the atom type with the id number - 91 - 92 @return: the atom name string - 93 ''' - 94 return self.getByPath(PARAMNAMES[self.getEngineType()]["name"]).first() -
      95 -
      96 - def getOccupation(self): -
      97 ''' - 98 Get the occupations of the atom - 99 -100 @return: the occupation values -101 ''' -102 return self.getByPath(PARAMNAMES[self.getEngineType()]["occupation"]) -
      103 -
      104 - def getType(self): -
      105 ''' -106 Get atom type -107 -108 @return: the atoms type -109 ''' -110 return self.getByPath(PARAMNAMES[self.getEngineType()]["type"]).first() -
      111 -
      112 - def getUiso(self): -
      113 ''' -114 Get the Uiso values -115 -116 @return: the Uiso values -117 ''' -118 return self.getByPath(PARAMNAMES[self.getEngineType()]["Uiso"]) -
      119 -
      120 - def getUisoSigma(self): -
      121 ''' -122 Get the Uiso standard deviations -123 -124 @return: the Uiso standard deviations -125 ''' -126 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]["Uiso"]) -
      127 -
      128 - def getX(self): -
      129 ''' -130 Get the x fractional coordinates -131 -132 @return: the x fractional coordinate values -133 ''' -134 return self.getByPath(PARAMNAMES[self.getEngineType()]["X"]) -
      135 -
      136 - def getXSigma(self): -
      137 ''' -138 Get the x fractional coordinate standard deviations -139 -140 @return: the x fractional coordinate standard deviations -141 ''' -142 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]["X"]) -
      143 -
      144 - def getY(self): -
      145 ''' -146 Get the y fractional coordinates -147 -148 @return: the y fractional coordinate values -149 ''' -150 return self.getByPath(PARAMNAMES[self.getEngineType()]["Y"]) -
      151 -
      152 - def getYSigma(self): -
      153 ''' -154 Get the y fractional coordinate standard deviations -155 -156 @return: the y fractional coordinate standard deviations -157 ''' -158 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]["Y"]) -
      159 -
      160 - def getZ(self): -
      161 ''' -162 Get the z fractional coordinates -163 -164 @return: the z fractional coordinate values -165 ''' -166 return self.getByPath(PARAMNAMES[self.getEngineType()]["Z"]) -
      167 -
      168 - def getZSigma(self): -
      169 ''' -170 Get the z fractional coordinate standard deviations -171 -172 @return: the z fractional coordinate standard deviations -173 ''' -174 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]["Z"]) -
      175 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.atom.Atom-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.atom.Atom-class.html deleted file mode 100644 index cab57f88..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.atom.Atom-class.html +++ /dev/null @@ -1,859 +0,0 @@ - - - - - diffpy.srrietveld.atom.Atom - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module atom :: - Class Atom - - - - - -
      [frames] | no frames]
      -
      - -

      Class Atom

      source code

      -
      -                       object --+        
      -                                |        
      -refinementdata.hdf5.object.Object --+    
      -                                    |    
      -   refinementdata.refinable.Refinable --+
      -                                        |
      -                                       Atom
      -
      - -
      -
      -Atom is a Refinable component which contains multiple parameters.
      -A composite function may also contain other functions.
      -
      -data member:
      -    
      -    formula: a string of the function definition in C style
      -    variables: a space separated string of all variables in the formula
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - owner, - name=None, - handle=None, - formula=None, - variables=None, - shape=None)
      - Initialization.
      - source code - -
      - -
      -   - - - - - - -
      getBiso(self)
      - Get the Biso values
      - source code - -
      - -
      -   - - - - - - -
      getBisoSigma(self)
      - Get the Biso standard deviations
      - source code - -
      - -
      -   - - - - - - -
      getEngineType(self)
      - Get the engine type for this refinement
      - source code - -
      - -
      -   - - - - - - -
      getName(self)
      - Get atom name.
      - source code - -
      - -
      -   - - - - - - -
      getOccupation(self)
      - Get the occupations of the atom
      - source code - -
      - -
      -   - - - - - - -
      getType(self)
      - Get atom type
      - source code - -
      - -
      -   - - - - - - -
      getUiso(self)
      - Get the Uiso values
      - source code - -
      - -
      -   - - - - - - -
      getUisoSigma(self)
      - Get the Uiso standard deviations
      - source code - -
      - -
      -   - - - - - - -
      getX(self)
      - Get the x fractional coordinates
      - source code - -
      - -
      -   - - - - - - -
      getXSigma(self)
      - Get the x fractional coordinate standard deviations
      - source code - -
      - -
      -   - - - - - - -
      getY(self)
      - Get the y fractional coordinates
      - source code - -
      - -
      -   - - - - - - -
      getYSigma(self)
      - Get the y fractional coordinate standard deviations
      - source code - -
      - -
      -   - - - - - - -
      getZ(self)
      - Get the z fractional coordinates
      - source code - -
      - -
      -   - - - - - - -
      getZSigma(self)
      - Get the z fractional coordinate standard deviations
      - source code - -
      - -
      -

      Inherited from refinementdata.refinable.Refinable: - addHistory, - addHistoryByPath, - addSigma, - addSigmaByPath, - findRefinement, - getHistory, - getHistoryByPath, - getSigma, - getSigmaByPath, - listHistories, - listRefined, - loadLocalObjects, - removeHistory, - update -

      -

      Inherited from refinementdata.hdf5.object.Object: - addObject, - copy, - copyMeta, - delete, - exportFile, - get, - getAttr, - getByPath, - getFlatIndex, - getMetaData, - getMultiDimIndex, - getObject, - getPyObj, - hasAttr, - hasMeta, - importFile, - isDescendant, - list, - listAttrs, - listNames, - listObjects, - load, - loadLocalData, - loadObject, - move, - range, - readStr, - removeObject, - rename, - repeat, - replicate, - reshape, - save, - set, - setAttr, - setByPath, - setLabels, - setPyObj, - unset, - unsetAttr, - writeStr -

      -

      Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

      -
      - - - - - - - - - -
      - Properties
      -

      Inherited from refinementdata.hdf5.object.Object: - labels, - name, - ndim, - path -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - owner, - name=None, - handle=None, - formula=None, - variables=None, - shape=None) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization.

      -
      -
      Parameters:
      -
        -
      • owner (a data project) - the owner, which is usually a refinement.
      • -
      • handle (a HDF5Handle object) - a HDF5Handle pointing to the underlying HDF5 node.
      • -
      • formula (string) - a string of the function definition in C style
      • -
      • variables (a space separated string) - a space separated string of all variables -

        A name is passed to the initialization method when creating a - node.

        -

        A handle is passed to the inialization method in two - cases:

        -
          -
        1. - when loading from a HDF5 file; -
        2. -
        3. - when creating a HDF5 file but the object is a hard link to a - preexisiting one. -
        4. -
        -

        In the case when both name and handle are given, name will be - simply ignored. In the case when neither name nor handle is - given, an exception will be raised.

        -

        Generally, in the scripting interface, users do not have to - call this constructor directly

      • -
      • name (string @param name the name of the pattern)
      • -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getBiso(self) -

      -
      source code  -
      - -

      Get the Biso values

      -
      -
      Returns:
      -
      the Biso values
      -
      -
      -
      - -
      - -
      - - -
      -

      getBisoSigma(self) -

      -
      source code  -
      - -

      Get the Biso standard deviations

      -
      -
      Returns:
      -
      the Biso standard deviations
      -
      -
      -
      - -
      - -
      - - -
      -

      getEngineType(self) -

      -
      source code  -
      - -

      Get the engine type for this refinement

      -
      -
      Returns:
      -
      the string of the engine type, for example - "gsas" or "fullprof"
      -
      -
      -
      - -
      - -
      - - -
      -

      getName(self) -

      -
      source code  -
      - -

      Get atom name. The atom name is the atom type with the id number

      -
      -
      Returns:
      -
      the atom name string
      -
      -
      -
      - -
      - -
      - - -
      -

      getOccupation(self) -

      -
      source code  -
      - -

      Get the occupations of the atom

      -
      -
      Returns:
      -
      the occupation values
      -
      -
      -
      - -
      - -
      - - -
      -

      getType(self) -

      -
      source code  -
      - -

      Get atom type

      -
      -
      Returns:
      -
      the atoms type
      -
      -
      -
      - -
      - -
      - - -
      -

      getUiso(self) -

      -
      source code  -
      - -

      Get the Uiso values

      -
      -
      Returns:
      -
      the Uiso values
      -
      -
      -
      - -
      - -
      - - -
      -

      getUisoSigma(self) -

      -
      source code  -
      - -

      Get the Uiso standard deviations

      -
      -
      Returns:
      -
      the Uiso standard deviations
      -
      -
      -
      - -
      - -
      - - -
      -

      getX(self) -

      -
      source code  -
      - -

      Get the x fractional coordinates

      -
      -
      Returns:
      -
      the x fractional coordinate values
      -
      -
      -
      - -
      - -
      - - -
      -

      getXSigma(self) -

      -
      source code  -
      - -

      Get the x fractional coordinate standard deviations

      -
      -
      Returns:
      -
      the x fractional coordinate standard deviations
      -
      -
      -
      - -
      - -
      - - -
      -

      getY(self) -

      -
      source code  -
      - -

      Get the y fractional coordinates

      -
      -
      Returns:
      -
      the y fractional coordinate values
      -
      -
      -
      - -
      - -
      - - -
      -

      getYSigma(self) -

      -
      source code  -
      - -

      Get the y fractional coordinate standard deviations

      -
      -
      Returns:
      -
      the y fractional coordinate standard deviations
      -
      -
      -
      - -
      - -
      - - -
      -

      getZ(self) -

      -
      source code  -
      - -

      Get the z fractional coordinates

      -
      -
      Returns:
      -
      the z fractional coordinate values
      -
      -
      -
      - -
      - -
      - - -
      -

      getZSigma(self) -

      -
      source code  -
      - -

      Get the z fractional coordinate standard deviations

      -
      -
      Returns:
      -
      the z fractional coordinate standard deviations
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.bugreport-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.bugreport-module.html deleted file mode 100644 index 1f1cbc44..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.bugreport-module.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - diffpy.srrietveld.bugreport - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module bugreport - - - - - -
      [frames] | no frames]
      -
      - -

      Module bugreport

      source code

      -

      Routines for submitting bugreport through www.diffpy.org.

      - - - - - - - - - - - - - -
      - Functions
      -   - - - - - - -
      getFormData(content, - index=0)
      - Extract action attribute from the first form in HTML document.
      - source code - -
      - -
      -   - - - - - - -
      submitBugReport(formfields)
      - Fill in and submit bugreport form at FORM_URL.
      - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Variables
      -   - - FORM_ENCPW = 'LPR3rU9s' -
      -   - - FORM_REALM = 'diffpy' -
      -   - - FORM_URL = 'http://www.diffpy.org/bugreport/srrietveld/' -
      -   - - FORM_USER = 'diffuser' -
      -   - - ROOT_URL = 'http://www.diffpy.org/' -
      -   - - __id__ = '$Id: bugreport.py 6462 2011-04-02 00:41:29Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - HTMLParser, - SrrIOError, - SrrValueError, - urlparse -


      - - - - - - -
      - Function Details
      - -
      - -
      - - -
      -

      getFormData(content, - index=0) -

      -
      source code  -
      - -

      Extract action attribute from the first form in HTML document.

      -

      content -- HTML code index -- zero-based index of the form in the - HTML document

      -

      Return a tuple of (formattr, formdata) dictionaries, where formattr -- - has all the attributes of the <form> element formdata -- has all - the contain input field names and their values

      -
      -
      -
      -
      - -
      - -
      - - -
      -

      submitBugReport(formfields) -

      -
      source code  -
      - -
      -Fill in and submit bugreport form at FORM_URL.
      -The post url is obtained by parsing the first HTML form.
      -
      -formfields -- dictionary containing the keys.  When optional
      -              fields are not specified, use defaults as listed:
      -
      -              "reporter"    optional, ["anonymous"]
      -              "summary"     required
      -              "description" required
      -              "component"   optional, ["srrietveld"]
      -              "version"     optional, [current version of SrRietveld]
      -              "traceback"   optional, [""]
      -
      -              All values get stripped from leading and trailing spaces.
      -              Any other keys in formfields are ignored.
      -
      -No return value.
      -Raise KeyError when formfields does not have required keys.
      -Raise IOError on failed posting.
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.bugreport-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.bugreport-pysrc.html deleted file mode 100644 index 23e33f5a..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.bugreport-pysrc.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - diffpy.srrietveld.bugreport - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module bugreport - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.bugreport

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2010 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Pavol Juhas, Peng Tian 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """Routines for submitting bugreport through www.diffpy.org. 
      - 16  """ 
      - 17   
      - 18  # version 
      - 19  __id__ = "$Id: bugreport.py 6462 2011-04-02 00:41:29Z yshang $" 
      - 20   
      - 21  import urlparse 
      - 22  import HTMLParser 
      - 23  from diffpy.srrietveld.exceptions import SrrIOError, SrrValueError 
      - 24   
      - 25  # constants: 
      - 26   
      - 27  ROOT_URL = "http://www.diffpy.org/" 
      - 28  FORM_URL = urlparse.urljoin(ROOT_URL, "bugreport/srrietveld/") 
      - 29  FORM_REALM = "diffpy" 
      - 30  FORM_USER = "diffuser" 
      - 31  FORM_ENCPW = "LPR3rU9s" 
      - 32   
      - 33   
      - 34  # Routines 
      - 35   
      -
      36 -def submitBugReport(formfields): -
      37 """Fill in and submit bugreport form at FORM_URL. - 38 The post url is obtained by parsing the first HTML form. - 39 - 40 formfields -- dictionary containing the keys. When optional - 41 fields are not specified, use defaults as listed: - 42 - 43 "reporter" optional, ["anonymous"] - 44 "summary" required - 45 "description" required - 46 "component" optional, ["srrietveld"] - 47 "version" optional, [current version of SrRietveld] - 48 "traceback" optional, [""] - 49 - 50 All values get stripped from leading and trailing spaces. - 51 Any other keys in formfields are ignored. - 52 - 53 No return value. - 54 Raise KeyError when formfields does not have required keys. - 55 Raise IOError on failed posting. - 56 """ - 57 import urllib - 58 import urllib2 - 59 import cookielib - 60 from diffpy.srrietveld import __version__ - 61 # build dictionary with default values: - 62 formdata_user = { - 63 "reporter" : formfields.get("reporter", "").strip() or "anonymous", - 64 "summary" : formfields["summary"], - 65 "description" : formfields["description"], - 66 "component" : formfields.get("component", "srrietveld"), - 67 "version" : formfields.get("version", __version__), - 68 "traceback" : formfields.get("traceback", ""), - 69 } - 70 # format formdata_user items: - 71 for k in formdata_user: - 72 formdata_user[k] = formdata_user[k].strip() - 73 if formdata_user["description"]: - 74 formdata_user["description"] += "\n" - 75 if formdata_user["traceback"]: - 76 formdata_user["traceback"] = "\n" + formdata_user["traceback"] + "\n" - 77 # open FORM_URL - 78 handler = urllib2.HTTPBasicAuthHandler() - 79 handler.add_password(FORM_REALM, ROOT_URL, - 80 FORM_USER, FORM_ENCPW.encode('rot13')) - 81 cookier = urllib2.HTTPCookieProcessor(cookielib.LWPCookieJar()) - 82 opener = urllib2.build_opener(handler, cookier) - 83 formcontent = opener.open(FORM_URL).read() - 84 # find where does the form post its data - 85 try: - 86 formattr, formdata = getFormData(formcontent) - 87 # invalid web form would throw ValueError, raise this as - 88 # IOError so we get a meaningful error message from the gui. - 89 except ValueError, err: - 90 emsg = "Invalid webform - %s" % err - 91 raise SrrIOError(emsg) - 92 # build the formadata dictionary - 93 formdata.update(formdata_user) - 94 post_url = urlparse.urljoin(FORM_URL, formattr['action']) - 95 post_headers = {'User-agent' : 'SrRietveld (compatible; MSIE 5.5; WindowsNT)'} - 96 post_content = urllib.urlencode(formdata) - 97 post_request = urllib2.Request(post_url, post_content, post_headers) - 98 post_handle = opener.open(post_request) - 99 # result can be obtained by post_handle.read(), but it is not needed -100 return -
      101 -102 -
      103 -def getFormData(content, index=0): -
      104 """Extract action attribute from the first form in HTML document. -105 -106 content -- HTML code -107 index -- zero-based index of the form in the HTML document -108 -109 Return a tuple of (formattr, formdata) dictionaries, where -110 formattr -- has all the attributes of the <form> element -111 formdata -- has all the contain input field names and their values -112 """ -113 datagetter = _HTMLFormDataGetter() -114 fmattr, fmdata = datagetter(content) -115 rv = (fmattr[index], fmdata[index]) -116 return rv -
      117 -118 -119 # Helper classes -120 -121 -
      122 -class _HTMLFormDataGetter(HTMLParser.HTMLParser): -
      123 """Helper HTMLParser for extracting form data attributes from -124 the first form. -125 -126 Instance data: -127 -128 _formattrs -- list of attribute dictionaries for all <form> tags -129 _formdata -- list of input data dictionaries from all <form> tags -130 -131 See also getFormData(). -132 """ -133 -134 -135 # declaration of instance data attributes -136 _formattrs = None -137 _formdata = None -138 -139 -
      140 - def handle_starttag(self, tag, attrs): -
      141 """Store data dictionary for all HTML forms in the document. -142 """ -143 dattr = dict(attrs) -144 if tag == "form": -145 self._formattrs.append(dattr) -146 self._formdata.append({}) -147 if tag == "input" and 'name' in dattr: -148 name = dattr['name'] -149 value = dattr.get('value', '') -150 self._formdata[-1][name] = value -151 return -
      152 -153 -
      154 - def __call__(self, content): -
      155 """Return a list of data dictionaries for all HTML forms in the document. -156 -157 content -- HTML code -158 -159 Return two lists of dictionaries for form attributes and form data. -160 Raise ValueError for invalid HTML code or when no form is present. -161 """ -162 self.reset() -163 self._formattrs = [] -164 self._formdata = [] -165 try: -166 self.feed(content) -167 self.close() -168 except HTMLParser.HTMLParseError, err: -169 raise SrrValueError, str(err) -170 return (self._formattrs, self._formdata) -
      171 -172 -173 # End of class _HTMLFormDataGetter -174 -175 -176 # test code -177 -178 if __name__ == "__main__": -179 import time -180 submitBugReport({ -181 "summary" : "test, do not post", -182 "description" : "posted from submitBugReport on " + time.ctime(), -183 }) -184 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.bugreport._HTMLFormDataGetter-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.bugreport._HTMLFormDataGetter-class.html deleted file mode 100644 index 44d83618..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.bugreport._HTMLFormDataGetter-class.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - diffpy.srrietveld.bugreport._HTMLFormDataGetter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module bugreport :: - Class _HTMLFormDataGetter - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class _HTMLFormDataGetter

      source code

      -
      -markupbase.ParserBase --+    
      -                        |    
      -    HTMLParser.HTMLParser --+
      -                            |
      -                           _HTMLFormDataGetter
      -
      - -
      -

      Helper HTMLParser for extracting form data attributes from the first - form.

      -

      Instance data:

      -

      _formattrs -- list of attribute dictionaries for all <form> - tags _formdata -- list of input data dictionaries from all - <form> tags

      -

      See also getFormData().

      - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      handle_starttag(self, - tag, - attrs)
      - Store data dictionary for all HTML forms in the document.
      - source code - -
      - -
      -   - - - - - - -
      __call__(self, - content)
      - Return a list of data dictionaries for all HTML forms in the - document.
      - source code - -
      - -
      -

      Inherited from HTMLParser.HTMLParser: - __init__, - check_for_whole_start_tag, - clear_cdata_mode, - close, - error, - feed, - get_starttag_text, - goahead, - handle_charref, - handle_comment, - handle_data, - handle_decl, - handle_endtag, - handle_entityref, - handle_pi, - handle_startendtag, - parse_endtag, - parse_pi, - parse_starttag, - reset, - set_cdata_mode, - unescape, - unknown_decl -

      -

      Inherited from markupbase.ParserBase: - getpos, - parse_comment, - parse_declaration, - parse_marked_section, - updatepos -

      -

      Inherited from markupbase.ParserBase (private): - _parse_doctype_attlist, - _parse_doctype_element, - _parse_doctype_entity, - _parse_doctype_notation, - _parse_doctype_subset, - _scan_name -

      -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - _formattrs = None -
      -   - - _formdata = None -
      -

      Inherited from HTMLParser.HTMLParser: - CDATA_CONTENT_ELEMENTS, - entitydefs -

      -

      Inherited from markupbase.ParserBase (private): - _decl_otherchars -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      handle_starttag(self, - tag, - attrs) -

      -
      source code  -
      - -

      Store data dictionary for all HTML forms in the document.

      -
      -
      Overrides: - HTMLParser.HTMLParser.handle_starttag -
      -
      -
      -
      - -
      - -
      - - -
      -

      __call__(self, - content) -
      (Call operator) -

      -
      source code  -
      - -

      Return a list of data dictionaries for all HTML forms in the - document.

      -

      content -- HTML code

      -

      Return two lists of dictionaries for form attributes and form data. - Raise ValueError for invalid HTML code or when no form is present.

      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.buildfit-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.buildfit-module.html deleted file mode 100644 index f26ab23c..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.buildfit-module.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - diffpy.srrietveld.buildfit - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module buildfit - - - - - -
      [frames] | no frames]
      -
      - -

      Module buildfit

      source code

      -

      The file contains functions for building a Fit object.

      - - - - - - - - - - -
      - Classes
      -   - - BuildFit
      - BuildFit class is to build fit object based on the GUI inputs. -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: buildfit.py 6300 2011-03-10 21:34:27Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - SrrConfigError, - UT -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.buildfit-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.buildfit-pysrc.html deleted file mode 100644 index 82fa6912..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.buildfit-pysrc.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - diffpy.srrietveld.buildfit - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module buildfit - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.buildfit

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Peng Tian 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """The file contains functions for building a Fit object. 
      - 16  """ 
      - 17  __id__ = "$Id: buildfit.py 6300 2011-03-10 21:34:27Z yshang $" 
      - 18  import diffpy.srrietveld.utility as UT 
      - 19  from diffpy.srrietveld.exceptions import SrrConfigError 
      - 20   
      -
      21 -class BuildFit: -
      22 """ BuildFit class is to build fit object based on the GUI inputs. """ -
      23 - def __init__(self, enginename, strudict, instdict, datadict): -
      24 """ Initialization """ - 25 self.engine = "diffpy.py" + enginename - 26 self.strudict = strudict - 27 self.instdict = instdict - 28 self.datadict = datadict - 29 return -
      30 -
      31 - def buildFit(self): -
      32 """ Build fit object """ - 33 # import engine fit - 34 fit = UT.importClass(self.engine+".fit", "fit", "Fit", None) - 35 self.buildPhase(fit) - 36 self.buildPattern(fit) - 37 self.buildContribution(fit) - 38 self.buildPeakProfile(fit) - 39 return fit -
      40 -
      41 - def buildPhase(self, fit): -
      42 """ Build phase """ - 43 for phasekey, phasevalue in self.strudict.items(): - 44 if phasekey.count("PHASE") == 1: - 45 # set engine phase - 46 phase = UT.importClass(self.engine+".phase", "phase", "Phase", fit) - 47 atomdict = {} - 48 for key, value in phasevalue[0].items(): - 49 if key.startswith("ATOM"): - 50 # set engine atom - 51 atom = UT.importClass(self.engine+".atom", "atom", - 52 "AtomCrystal", None) - 53 for akey, avalue in value[0].items(): - 54 if akey in ["Uiso", "Biso"]: - 55 atomadp = UT.importClass(self.engine+".atom", "atom", - 56 "AtomicDisplacementFactorIsotropic", None) - 57 elif akey in ["U11", "B11"]: - 58 atomadp = UT.importClass(self.engine+".atom", "atom", - 59 "AtomicDisplacementFactorAnisotropic", None) - 60 if akey.startswith("U") or akey.startswith("B"): - 61 atomadp.set(akey, avalue) - 62 else: - 63 atom.set(akey, avalue) - 64 atom.set("AtomicDisplacementFactor", atomadp) - 65 atomdict[key] = atom - 66 elif key in phase.ParamDict: - 67 phase.set(key, value) - 68 for key in sorted(atomdict.keys()): - 69 phase.set("Atom", atomdict[key]) - 70 # add into fit - 71 fit.set("Phase", phase) - 72 return -
      73 -
      74 - def buildPattern(self, fit): -
      75 """ Build pattern - 76 FIXME: only for one bank now - 77 """ - 78 instname = self.instdict["Name"] - 79 if instname in ["NPDF", "POWGEN", "TOF"]: - 80 patternname = "PatternTOF" - 81 radiationtype = "NeutronTOF" - 82 elif instname in ["RAPDF", "NeutronCW", "Xray"]: - 83 patternname = "Pattern2Theta" - 84 radiationtype = "NeutronCW" - 85 if instname in ["RAPDF", "Xray"]: - 86 radiationtype = "Xray" - 87 else: - 88 raise SrrConfigError("SrRietveld doesn't support %s!"%instname) - 89 # set engine pattern - 90 pattern = UT.importClass(self.engine+".pattern", "pattern", patternname, fit) - 91 # add into fit - 92 fit.set("Pattern", pattern) - 93 pattern.setDataProperty([self.datadict.keys()[0], - 94 self.datadict.values()[0]["Name"]], radiationtype) - 95 for patternkey, patternvalue in self.instdict.items(): - 96 # set the single parameters - 97 if patternkey in pattern.ParamDict: - 98 pattern.set(patternkey, patternvalue) - 99 elif patternkey == "MEASUREMENT": -100 # set measurement range and scale factor -101 for mkey, mvalue in patternvalue[0].items(): -102 if mkey in pattern.ParamDict: -103 pattern.set(mkey, mvalue) -104 elif patternkey == "BACKGROUND": -105 # add background -106 bgtype = patternvalue[0]["Type"] -107 background = UT.importClass(self.engine+".pattern", -108 "pattern", bgtype, pattern) -109 pattern.set("Background",background) -110 for bgkey, bgvalue in patternvalue[0].items(): -111 if bgkey == "Type": -112 continue -113 else: -114 background.set(bgkey, bgvalue) -115 elif patternkey == "EXCLUDEDREGION": -116 # add excludedregion -117 exre = UT.importClass(self.engine+".pattern", "pattern", -118 "ExcludedRegion", pattern) -119 for key, value in patternvalue[0].items(): -120 exre.set(key, value) -121 pattern.set("ExcludedRegion", exre) -122 elif patternkey == "ENERGY": -123 for key, value in patternvalue[0].items(): -124 pattern.set(key, value) -125 elif patternkey == "LPFACTOR": -126 lpfactor = pattern.get("LPFactor") -127 for key, value in patternvalue[0].items(): -128 lpfactor.set(key, value) -129 -130 return -
      131 -
      132 - def buildContribution(self, fit): -
      133 """ Build contribution """ -134 phaselist = fit.get("Phase") -135 patternlist = fit.get("Pattern") -136 #print phaselist, patternlist -137 for phase in phaselist: -138 for pattern in patternlist: -139 classname = pattern.__class__.__name__ -140 contributionname = "Contribution" + classname.split("Pattern")[1] -141 contribution = UT.importClass(self.engine+".contribution", -142 "contribution", contributionname, fit, pattern, phase) -143 fit.set("Contribution", contribution) -144 -145 for key, value in self.instdict["MEASUREMENT"][0].items(): -146 if key in contribution.ParamDict.keys(): -147 contribution.set(key, value) -148 -149 if "EXPDECAYFUNCTION" in self.instdict.keys(): -150 expdecay = contribution.get("ExpDecayFunction") -151 for key, value in self.instdict["EXPDECAYFUNCTION"][0].items(): -152 expdecay.set(key, value) -153 else: -154 pass -155 return -
      156 -157 -
      158 - def buildPeakProfile(self, fit): -
      159 """ Build peakprofile """ -160 contributionlist = fit.get("Contribution") -161 profile_id = -1 -162 for instkey, instvalue in self.instdict.items(): -163 if instkey.count("PEAKPROFILE") == 1: -164 profile = UT.importClass(self.engine+".contribution", -165 "contribution", instvalue[0]["Type"], None) -166 for key, value in instvalue[0].items(): -167 if key != "Type": -168 profile.set(key, value) -169 profile_id += 1 -170 contribution = contributionlist[profile_id] -171 contribution.set("Profile", profile) -172 return -
      173 -
      174 - def addBkgdPoints(self, fit, bkgdlist): -
      175 """ Add background points to fit """ -176 patterns = fit.get("Pattern") -177 for pattern in patterns: -178 pattern.addBackgroundPoints(bkgdlist) -179 return -
      180 -
      181 - def addExre(self, fit, exredict): -
      182 """ Add excludedregion to fit """ -183 patterns = fit.get("Pattern") -184 for pattern in patterns: -185 pattern_id = patterns.index(pattern) + 1 -186 bankterm = "BANK" + str(pattern_id) -187 if bankterm in exredict.keys(): -188 exre = UT.importClass(self.engine+".pattern", "pattern", -189 "ExcludedRegion", pattern) -190 for key, value in exredict[bankterm][0].items(): -191 exre.set(key, value) -192 pattern.set("ExcludedRegion", exre) -193 return -
      194 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.buildfit.BuildFit-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.buildfit.BuildFit-class.html deleted file mode 100644 index c9e5d95b..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.buildfit.BuildFit-class.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - diffpy.srrietveld.buildfit.BuildFit - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module buildfit :: - Class BuildFit - - - - - -
      [frames] | no frames]
      -
      - -

      Class BuildFit

      source code

      -

      BuildFit class is to build fit object based on the GUI inputs.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - enginename, - strudict, - instdict, - datadict)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      addBkgdPoints(self, - fit, - bkgdlist)
      - Add background points to fit
      - source code - -
      - -
      -   - - - - - - -
      addExre(self, - fit, - exredict)
      - Add excludedregion to fit
      - source code - -
      - -
      -   - - - - - - -
      buildContribution(self, - fit)
      - Build contribution
      - source code - -
      - -
      -   - - - - - - -
      buildFit(self)
      - Build fit object
      - source code - -
      - -
      -   - - - - - - -
      buildPattern(self, - fit)
      - Build pattern FIXME: only for one bank now
      - source code - -
      - -
      -   - - - - - - -
      buildPeakProfile(self, - fit)
      - Build peakprofile
      - source code - -
      - -
      -   - - - - - - -
      buildPhase(self, - fit)
      - Build phase
      - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert-module.html deleted file mode 100644 index 34ff6f2d..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert-module.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - diffpy.srrietveld.convert - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert - - - - - -
      [frames] | no frames]
      -
      - -

      Package convert

      source code

      - - - - - - - -
      - Submodules
      -
      - -
      - - - - - - - - - -
      - Variables
      -   - - __package__ = None -
      -

      Imports: - datafile, - strategyfile -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert-pysrc.html deleted file mode 100644 index 90402f12..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert-pysrc.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - diffpy.srrietveld.convert - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Package diffpy.srrietveld.convert

      -
      -1   
      -2   
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.datafile-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.datafile-module.html deleted file mode 100644 index 803fedc8..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.datafile-module.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - diffpy.srrietveld.convert.datafile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module datafile - - - - - -
      [frames] | no frames]
      -
      - -

      Module datafile

      source code

      -

      Read the information from the data file. Currently an interface. Using - the functionality in addon/datafile.py, will improve later

      - - - - - - - - - - -
      - Classes
      -   - - DataFile
      - The data file class -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: datafile.py 6718 2011-08-23 21:33:20Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld.convert' -
      -

      Imports: - DataFileConverter, - SrrFileError, - os -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.datafile-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.datafile-pysrc.html deleted file mode 100644 index 42876b76..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.datafile-pysrc.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - diffpy.srrietveld.convert.datafile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module datafile - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.convert.datafile

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Yingrui Shang 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  '''Read the information from the data file. Currently an interface. Using the  
      - 15  functionality in addon/datafile.py, will improve later''' 
      - 16   
      - 17  __id__ = "$Id: datafile.py 6718 2011-08-23 21:33:20Z yshang $" 
      - 18   
      - 19  from diffpy.srrietveld.addon.datafile import DataFileConverter 
      - 20  from diffpy.srrietveld.exceptions import SrrFileError 
      - 21  import os 
      - 22   
      -
      23 -class DataFile: -
      24 '''The data file class''' -
      25 - def __init__(self, filepath = None, engine = None, - 26 xobs = None, yobs = None, ysig = None, rootname = None): -
      27 '''Constructor, the DataFile can be initiated either from a file path - 28 or arrays of data - 29 filepath - the filepath of the data file - 30 engine - the engine type - 31 xobs, yobs, ysig - the data arrays to initialize the data file - 32 rootname - the rootname of the file when constructed from x/y data arrays. - 33 NOTE: the extension name is always dat in this case''' - 34 - 35 if filepath is not None: - 36 if not os.path.exists(filepath): - 37 raise SrrFileError('The data file ' + filepath + ' does not exist.') - 38 if not os.path.isfile(filepath): - 39 raise SrrFileError('The data file path' + filepath + 'is not' + \ - 40 'a path to a file. ') - 41 - 42 self.engine = engine - 43 self.filename = os.path.basename(filepath) - 44 self.data = open(filepath, 'rb').read() - 45 - 46 self.xobs = [] - 47 self.yobs = [] - 48 self.ysig = [] - 49 - 50 if xobs is not None: - 51 self.xobs = xobs - 52 self.yobs = yobs - 53 self.ysig = ysig - 54 - 55 self.filename = 'datafile.dat' if rootname is None else rootname + '.dat' - 56 - 57 # the length of the data is determined by xobs - 58 line = [] - 59 for idx, xx in enumerate(xobs): - 60 if self.ysig is not None: - 61 line.append("%s %s %s" %(xx, self.yobs[idx], self.ysig[idx])) - 62 else: - 63 line.append("%s %s" %(xx, self.yobs[idx])) - 64 - 65 self.data = '\n'.join(line) - 66 - 67 return -
      68 -
      69 - def __str__(self): -
      70 '''String conversion''' - 71 return str(self.data) -
      72 -
      73 - def __isConversionNeeded(self): -
      74 '''Check if the file needs conversion - 75 engine - gsas or fullprof - 76 return - True if conversion is needed''' - 77 engine = self.engine - 78 - 79 root, ext = os.path.splitext(self.filename) - 80 if engine.lower() == 'gsas': - 81 if ext in [".chi", ".dat", ".txt", 'xye']: - 82 return True - 83 elif ext in [".gsa", ".gda", "fxye", "raw"]: - 84 return False - 85 if engine.lower() == 'fullprof': - 86 if ext in [".chi", ".gsa", ".gda", "fxye", "raw"]: - 87 return True - 88 elif ext in [".dat"]: - 89 return False - 90 else: - 91 from diffpy.srrietveld.utility import printWarning - 92 __warningMsg = 'Data file extension is not recognized. The ' + \ - 93 'refinement may not run correctly. ' - 94 printWarning(__warningMsg) - 95 - 96 return False -
      97 -
      98 - def dump(self, directory, basename = None): -
      99 '''dump the file to the directory -100 dir: the directory to dump the file -101 rootname: the new file name, if not none will replace self.filename -102 return the file path where the file dumped''' -103 nm = self.filename if basename is None else basename -104 filepath = os.path.join(directory, nm) -105 with open(filepath, 'wb') as f: -106 f.write(self.data) -107 return filepath -
      108 -
      109 - def write(self, filepath): -
      110 '''Write to filepath''' -111 with open(filepath, 'wb') as f: -112 f.write(self.data) -113 return -
      114 -
      115 - def prepDataFile(self, newDir, instrumentFile = None, filename = None): -
      116 '''Prepare the data file for different engines, and dump the prepared -117 file to a path. If conversion is not needed, the origianl file will be -118 dumped new directory - the path to dump the file -119 engine - the engine -120 rootName - the file name if different from that saved in the object -121 return the path to the prepared data file''' -122 from diffpy.srrietveld.addon.datafile import DataFileConverter -123 from diffpy.srrietveld.utility import printWarning -124 -125 if not instrumentFile: -126 instrumentFile = None -127 -128 fullpath = self.dump(newDir, filename) -129 -130 root, ext = os.path.splitext(fullpath) -131 -132 if filename: -133 root = os.path.splitext(filename)[0] -134 -135 newPath = fullpath -136 -137 if self.__isConversionNeeded(): -138 dataFile = DataFileConverter(fullpath) -139 if self.engine.lower() == 'gsas': -140 newPath = root + '.gsa' -141 # bank id is always 1 -142 dataFile.toGSASFile(fullpath, newPath, 1) -143 if self.engine.lower() == 'fullprof': -144 newPath = root + '.dat' -145 -146 if ext.lower() != '.chi': -147 __warningMsg = 'To convert GSAS data file, installation of ' + \ -148 'GSAS is needed and an instrument file is required. ' -149 -150 printWarning(__warningMsg) -151 # FIXM: convert gsas data file name to fullprof data file name -152 # search the local directory for EXP files, may implement a -153 # better algrethm -154 dfc = DataFileConverter(fullpath, instrumentFile) -155 import glob -156 desfile = os.path.join(os.getcwd(), "*.EXP") -157 expfilename = None -158 for fn in glob.glob(desfile): -159 expfilename = fn -160 if expfilename: -161 dfc.toFPFile(fullpath, newPath, 1, expfilename) -162 elif ext.lower() == '.chi': -163 dfc.toFPFile(fullpath, newPath, 1) -164 else: -165 __warningMsg = "To convert GSAS data file, GSAS is needed " + \ -166 "to be installed and an instrument file is required." + \ -167 "The gsas data file can not be converted. The refinment may " + \ -168 "not run. " -169 printWarning(__warningMsg) -170 -171 return newPath -
      172 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.datafile.DataFile-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.datafile.DataFile-class.html deleted file mode 100644 index ecad0971..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.datafile.DataFile-class.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - diffpy.srrietveld.convert.datafile.DataFile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module datafile :: - Class DataFile - - - - - -
      [frames] | no frames]
      -
      - -

      Class DataFile

      source code

      -

      The data file class

      - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - filepath=None, - engine=None, - xobs=None, - yobs=None, - ysig=None, - rootname=None)
      - Constructor, the DataFile can be initiated either from a file path -or arrays of data -filepath - the filepath of the data file -engine - the engine type -xobs, yobs, ysig - the data arrays to initialize the data file -rootname - the rootname of the file when constructed from x/y data arrays.
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - String conversion
      - source code - -
      - -
      -   - - - - - - -
      dump(self, - directory, - basename=None)
      - dump the file to the directory dir: the directory to dump the file - rootname: the new file name, if not none will replace self.filename - return the file path where the file dumped
      - source code - -
      - -
      -   - - - - - - -
      prepDataFile(self, - newDir, - instrumentFile=None, - filename=None)
      - Prepare the data file for different engines, and dump the prepared - file to a path.
      - source code - -
      - -
      -   - - - - - - -
      write(self, - filepath)
      - Write to filepath
      - source code - -
      - -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - filepath=None, - engine=None, - xobs=None, - yobs=None, - ysig=None, - rootname=None) -
      (Constructor) -

      -
      source code  -
      - -
      -Constructor, the DataFile can be initiated either from a file path 
      -or arrays of data
      -filepath - the filepath of the data file
      -engine - the engine type
      -xobs, yobs, ysig - the data arrays to initialize the data file
      -rootname - the rootname of the file when constructed from x/y data arrays. 
      -    NOTE: the extension name is always dat in this case
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      prepDataFile(self, - newDir, - instrumentFile=None, - filename=None) -

      -
      source code  -
      - -

      Prepare the data file for different engines, and dump the prepared - file to a path. If conversion is not needed, the origianl file will be - dumped new directory - the path to dump the file engine - the engine - rootName - the file name if different from that saved in the object - return the path to the prepared data file

      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.gsasinstparser-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.gsasinstparser-module.html deleted file mode 100644 index 7369d98e..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.gsasinstparser-module.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - diffpy.srrietveld.convert.gsasinstparser - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module gsasinstparser - - - - - -
      [frames] | no frames]
      -
      - -

      Module gsasinstparser

      source code

      -

      gsasinstparser.py is to parse the instrument info from .exp/iparm file - to get instrument instance for FullProf and GSAS.

      - - - - - - - - - - -
      - Classes
      -   - - GSASInstFile
      - Class to parse the instrument info from GSAS instrument file. -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: gsasinstparser.py 6462 2011-04-02 00:41:29Z ysh... -
      -   - - __package__ = 'diffpy.srrietveld.convert' -
      -

      Imports: - SrrError, - SrrValueError -


      - - - - - - -
      - Variables Details
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: gsasinstparser.py 6462 2011-04-02 00:41:29Z yshang $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.gsasinstparser-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.gsasinstparser-pysrc.html deleted file mode 100644 index 398761e3..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.gsasinstparser-pysrc.html +++ /dev/null @@ -1,414 +0,0 @@ - - - - - diffpy.srrietveld.convert.gsasinstparser - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module gsasinstparser - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.convert.gsasinstparser

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Peng Tian 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ 
      - 16   gsasinstparser.py is to parse the instrument info from .exp/iparm file 
      - 17   to get instrument instance for FullProf and GSAS. 
      - 18  """ 
      - 19  from diffpy.srrietveld.exceptions import SrrValueError, SrrError 
      - 20   
      - 21  __id__ = "$Id: gsasinstparser.py 6462 2011-04-02 00:41:29Z yshang $" 
      - 22   
      -
      23 -class GSASInstFile: -
      24 """ Class to parse the instrument info from GSAS instrument file. - 25 - 26 methods: - 27 _readInstFile - 28 parseInstType - 29 parseTOFInst - 30 parseCWInst - 31 """ -
      32 - def __init__(self, instfilename, banklist=None, engine="gsas"): -
      33 """ Initialization - 34 - 35 Arguments: - 36 instfilename : str, GSAS readable instrument file - 37 banklist : tuple, list of bank IDs for refinement - 38 - 39 Return : None - 40 """ - 41 self._instfilename = instfilename - 42 self._banklist = banklist - 43 self._content = self._readInstFile() - 44 self._engine = engine - 45 self._instdict = {} - 46 self._instdict["Name"] = self.parseInstType() - 47 return -
      48 -
      49 - def parseInstInfo(self): -
      50 """ Parse Instrument Info into dict """ - 51 if self._instdict["Name"] == "TOF": - 52 self.parseTOFInst() - 53 else: - 54 self.parseCWInst() - 55 return self._instdict -
      56 -
      57 - def _readInstFile(self): -
      58 """Read the GSAS Instrument file and find the instrument type - 59 Return : - 60 content : the list of lines in instrument file - 61 """ - 62 try: - 63 ifile = open(self._instfilename, "r") - 64 ilines = ifile.readlines() - 65 ifile.close() - 66 except ValueError, e: - 67 errmsg = "Cannot open %s : %s!" % (self._instfilename, e.message) - 68 raise SrrValueError(errmsg) - 69 - 70 return ilines -
      71 -
      72 - def parseInstType(self): -
      73 """Read the instrument type from file - 74 Return : - 75 type : str, type of instrument - 76 """ - 77 # 1. parse the htype from file - 78 term = "INS HTYPE" - 79 line = self.mapKey(term) - 80 sym = line.split()[2] - 81 - 82 # 2. match to the instrument type - 83 typedict = {"PNTR": "TOF", "PNCR": "NeutronCW", "PXCR": "Xray"} - 84 if sym in typedict.keys(): - 85 type = typedict[sym] - 86 - 87 return type -
      88 -
      89 - def parseTOFInst(self): -
      90 """Read the TOF instrument info - 91 Return : self._instdict - 92 """ - 93 # 1. Import - 94 for bankid in self._banklist: - 95 # 1.1 Find the TMIN, TMAX - 96 term = "INS %iI ITYP"% int(bankid) - 97 line = self.mapKey(term) - 98 terms = line.split() - 99 self._instdict["MEASUREMENT"] = [{}] -100 if self._engine == "gsas": -101 self._instdict["IFIL"] = self._instfilename -102 self._instdict["MEASUREMENT"][0]["TMIN"] = float(terms[4]) -103 self._instdict["MEASUREMENT"][0]["TMAX"] = float(terms[5]) -104 elif self._engine == "fullprof": -105 self._instdict["MEASUREMENT"][0]["Thmin"] = float(terms[4]) -106 self._instdict["MEASUREMENT"][0]["Thmax"] = float(terms[5]) -107 else: -108 raise NotImplementedError -109 -110 # 1.2 Find geometry DIFC/Dtt1, DIFA/Dtt2 and Zero -111 term = "INS %i ICONS"% int(bankid) -112 line = self.mapKey(term) -113 terms = line.split() -114 self._instdict["ENERGY"] = [{}] -115 if self._engine == "gsas": -116 self._instdict["ENERGY"][0]["DIFC"] = float(terms[3]) -117 self._instdict["ENERGY"][0]["DIFA"] = float(terms[4]) -118 self._instdict["ENERGY"][0]["ZERO"] = float(terms[5]) -119 elif self._engine == "fullprof": -120 self._instdict["ENERGY"][0]["Dtt1"] = float(terms[3]) -121 self._instdict["ENERGY"][0]["Dtt2"] = float(terms[4]) -122 self._instdict["ENERGY"][0]["Zero"] = float(terms[5]) -123 -124 # 1.3 Profile & Decay -125 # As default, choose the first profile -126 term = "INS %iPRCF1"% int(bankid) -127 line = self.mapKey(term) -128 if line is not None: -129 self._instdict["PEAKPROFILE"] = [{}] -130 terms = line.split() -131 ptyp = int(terms[2]) -132 if self._engine == "gsas": -133 self._instdict["PEAKPROFILE"][0]["CTOF"] = float(terms[4]) * 100 -134 else: -135 raise NotImplementedError -136 self._instdict["PEAKPROFILE"][0]["Type"] = "ProfileTOF" + str(ptyp) -137 -138 if ptyp == 1: -139 cof_prof = {0: "alp0", 1: "alp1", 2: "bet0", 3: "bet1", 4: "sig0", -140 5: "sig1", 6: "sig2", 7: "s1ec", 8: "s2ec", 9: "rstr", -141 10: "rsta", 11: "rsca"} -142 elif ptyp == 2: -143 cof_prof = {0: "alp0", 1: "alp1", 2: "beta", 3: "switch", 4: "sig0", -144 5: "sig1", 6: "sig2", 7:"gam0", 8: "gam1", 9: "gam2", -145 10: "ptec", 11: "stec", 12: "difc", 13: "difa", 14: "zero"} -146 elif ptyp == 3: -147 cof_prof = {0: "alp", 1: "bet0", 2: "bet1", 3: "sig0", 4: "sig1", -148 5: "sig2", 6: "gam0", 7: "gam1", 8: "gam2", 9: "gsf", -149 10: "g1ec", 11: "g2ec", 12: "rstr", 13: "rsta", 14: "rsca", -150 15: "L11", 16: "L22", 17: "L33", 18: "L12", 19: "L13", 20: "L23"} -151 elif ptyp == 4: -152 cof_prof = {0: "alp", 1: "bet0", 2: "bet1", 3: "sig1", 4: "sig2", -153 5: "gam2", 6: "g2ec", 7: "gsf", 8: "rstr", 9: "rsta", 10: "rsca", -154 11: "eta", 12: "S400"} -155 elif ptyp == 5: -156 cof_prof = {0: "alp", 1: "bet0", 2: "bet1", 3: "sig0", 4: "sig1", -157 5: "sig2", 6: "gam0", 7: "gam1", 8: "gam2", 9: "gsf", 10: "g1ec", -158 11: "g2ec", 12: "rstr", 13: "rsta", 14: "rsca", 15: "D11", 16: "D22", -159 17: "D33", 18: "D12", 19: "D13", 20: "D23"} -160 id_line = 0 -161 for k in range(int(terms[3])): -162 if k % 4 == 0: -163 id_line += 1 -164 iterm = "INS %iPRCF1%i" % (int(bankid), id_line) -165 pline = self.mapKey(iterm) -166 pterms = pline.split() -167 para_name = cof_prof[k] -168 try: -169 self._instdict["PEAKPROFILE"][0][para_name] = float(pterms[k%4+2]) -170 except ValueError, e: -171 errmsg = "Cannot find value for %s : %s!" % (para_name, e.message) -172 raise SrrValueError(errmsg) -173 else: -174 errmsg = "No profile information in instrument file %s!" % self._instfilename -175 raise SrrError(errmsg) -176 -177 return -
      178 -
      179 - def parseCWInst(self): -
      180 """Read the CW instrument info -181 -182 Return : self._instdict -183 """ -184 bankid = int(self._banklist[0]) -185 # 1. Find geometry Lambda/Lambda2 and Zero -186 term = "INS %i ICONS"% bankid -187 line = self.mapKey(term) -188 if line is not None: -189 terms = line.split() -190 if self._engine == "gsas": -191 self._instdict["IFIL"] = self._instfilename -192 self._instdict["ENERGY"] = [{}] -193 self._instdict["ENERGY"][0]["LAM1"] = float(terms[3]) -194 self._instdict["ENERGY"][0]["LAM2"] = float(terms[4]) -195 self._instdict["ENERGY"][0]["ZERO"] = float(terms[5]) -196 elif self._engine == "fullprof": -197 self._instdict["ENERGY"] = [{}] -198 self._instdict["ENERGY"][0]["Lambda"] = float(terms[3]) -199 self._instdict["ENERGY"][0]["Lambda2"] = float(terms[4]) -200 self._instdict["ENERGY"][0]["Zero"] = float(terms[5]) -201 else: -202 errmsg = "No wavelength information in %s!" % self._instfilename -203 raise SrrError(errmsg) -204 -205 # 3. Profile -206 # As default, choose the first profile -207 term = "INS %iPRCF1"% bankid -208 line = self.mapKey(term) -209 if line is not None: -210 self._instdict["PEAKPROFILE"] = [{}] -211 terms = line.split() -212 ptyp = int(terms[2]) -213 if self._engine == "gsas": -214 self._instdict["PEAKPROFILE"][0]["CTOF"] = float(terms[4]) * 100 -215 else: -216 raise NotImplementedError -217 self._instdict["PEAKPROFILE"][0]["Type"] = "Profile2Theta" + str(ptyp) -218 -219 if ptyp == 1: -220 cof_prof = {0: "U", 1: "V", 2: "W", 3: "asym", 4: "F1", 5: "F2"} -221 elif ptyp == 2: -222 cof_prof = {0: "GU", 1: "GV", 2: "GW", 3: "LX", 4: "LY", 5: "trns", -223 6: "asym", 7: "shft", 8: "GP", 9: "stec", 10: "ptec", -224 11: "sfec", 12: "L11", 13: "L22", 14: "L33", 15: "L12", -225 16: "L13", 17: "L23"} -226 elif ptyp == 3: -227 cof_prof = {0: "GU", 1: "GV", 2: "GW", 3: "GP", 4: "LX", 5: "LY", -228 6: "SL", 7: "HL", 8: "trns", 9: "shft", 10: "stec", -229 11: "ptec", 12: "sfec", 13: "L11", 14: "L22", 15: "L33", -230 16: "L12", 17: "L13", 18: "L23"} -231 elif ptyp == 4: -232 cof_prof = {0: "GU", 1: "GV", 2: "GW", 3: "GP", 4: "LX", 5: "ptec", -233 6: "trns", 7: "shft", 8: "sfec", 9: "SL", 10: "HL", -234 11: "eta", 12: "S400", 13: "S004"} -235 elif ptyp == 5: -236 cof_prof = {0: "GU", 1: "GV", 2: "GW", 3: "GP", 4: "LX", 5: "LY", -237 6: "SL", 7: "HL", 8: "trns", 9: "shft", 10: "stec", -238 11: "ptec", 12: "sfec", 13: "D11", 14: "D22", 15: "D33", -239 16: "D12", 17: "D13", 18: "D23"} -240 -241 id_line = 0 -242 for k in range(int(terms[3])): -243 if k % 4 == 0: -244 id_line += 1 -245 iterm = "INS %iPRCF1%i" % (bankid, id_line) -246 pline = self.mapKey(iterm) -247 pterms = pline.split() -248 para_name = cof_prof[k] -249 try: -250 self._instdict["PEAKPROFILE"][0][para_name] = float(pterms[k%4+2]) -251 except ValueError, e: -252 errmsg = "Cannot find value for %s | %s!" % (para_name, e.message) -253 raise SrrValueError(errmsg) -254 else: -255 errmsg = "No profile information in instrument file %s!" % self._instfilename -256 raise SrrError(errmsg) -257 -258 return -
      259 -
      260 - def mapKey(self, key): -
      261 """ Find the FIRST line that includes the key in lines -262 -263 Argument: -264 - key : key value -265 -266 Return : str -267 """ -268 rline = None -269 -270 for line in self._content: -271 if line.count(key) == 1: -272 rline = line -273 break -274 -275 return rline -
      276 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.gsasinstparser.GSASInstFile-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.gsasinstparser.GSASInstFile-class.html deleted file mode 100644 index b18dc9ab..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.gsasinstparser.GSASInstFile-class.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - diffpy.srrietveld.convert.gsasinstparser.GSASInstFile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module gsasinstparser :: - Class GSASInstFile - - - - - -
      [frames] | no frames]
      -
      - -

      Class GSASInstFile

      source code

      -
      -Class to parse the instrument info from GSAS instrument file.
      -
      -methods:
      -    _readInstFile
      -    parseInstType
      -    parseTOFInst
      -    parseCWInst
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - instfilename, - banklist=None, - engine='gsas')
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      mapKey(self, - key)
      - Find the FIRST line that includes the key in lines
      - source code - -
      - -
      -   - - - - - - -
      parseCWInst(self)
      - Read the CW instrument info
      - source code - -
      - -
      -   - - - - - - -
      parseInstInfo(self)
      - Parse Instrument Info into dict
      - source code - -
      - -
      -   - - - - - - -
      parseInstType(self)
      - Read the instrument type from file...
      - source code - -
      - -
      -   - - - - - - -
      parseTOFInst(self)
      - Read the TOF instrument info Return : self._instdict
      - source code - -
      - -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - instfilename, - banklist=None, - engine='gsas') -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization
      -
      -Arguments:
      -    instfilename    :   str, GSAS readable instrument file
      -    banklist        :   tuple, list of bank IDs for refinement
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      mapKey(self, - key) -

      -
      source code  -
      - -
      -Find the FIRST line that includes the key in lines
      -
      -Argument:
      -- key       :   key value
      -
      -Return  :   str
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseCWInst(self) -

      -
      source code  -
      - -

      Read the CW instrument info

      -

      Return : self._instdict

      -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseInstType(self) -

      -
      source code  -
      - -
      -Read the instrument type from file
      -Return  :
      -    type  :    str, type of instrument
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader-module.html deleted file mode 100644 index 866276d2..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader-module.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - diffpy.srrietveld.convert.listfilereader - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module listfilereader - - - - - -
      [frames] | no frames]
      -
      - -

      Module listfilereader

      source code

      -

      Load list of datafiles for sequential refinement and associated - environment variables such as temperature or pressure.

      - - - - - - - - - - - - - -
      - Classes
      -   - - CSVListFileReader
      - ListFileReader specialized for comma-separated-values (CSV) format. -
      -   - - ListFileReader
      - Object for loading datafiles and temperatures from a list file. -
      - - - - - - - - - - - - -
      - Functions
      -   - - - - - - -
      readListFile(filename, - fmt=None, - basepath=None)
      - Load an return ListFileReader instance from the specified file.
      - source code - -
      - -
      -   - - - - - - -
      resolveColumnLabel(label)
      - Convert column label to a standard name.
      - source code - -
      - -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: listfilereader.py 6515 2011-04-13 14:52:02Z juh... -
      -   - - __package__ = 'diffpy.srrietveld.convert' -
      -

      Imports: - SrrFileError, - os, - re -


      - - - - - - -
      - Function Details
      - -
      - -
      - - -
      -

      readListFile(filename, - fmt=None, - basepath=None) -

      -
      source code  -
      - -
      -Load an return ListFileReader instance from the specified file.
      -
      -filename -- path to the list file to be loaded.  Uses CSV reader
      -            for ".csv" extensions or plain text reader otherwise.
      -fmt      -- optional filename format.  Use "csv" for CSV reader
      -            or "txt" for plain text reader.  When None, determine
      -            format from the filename extension.
      -basepath -- when specified, make loaded datapaths relative to the
      -            basepath directory.  Use '.' for the current directory.
      -            Do not modify datapaths when None.
      -
      -Return a ListFileReader instance.
      -Raise ValueError for invalid fmt value.
      -Raise SrrFileError for non-existent or corrupted file.
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      resolveColumnLabel(label) -

      -
      source code  -
      - -

      Convert column label to a standard name. This applies aliases as - defined in the _LABELALIASES and maps bank002 to bank2. Otherwise the - label remains unchanged.

      -

      label -- string label to be converted to standard name.

      -

      Return string.

      -
      -
      -
      -
      -
      - - - - - - -
      - Variables Details
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: listfilereader.py 6515 2011-04-13 14:52:02Z juhas $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader-pysrc.html deleted file mode 100644 index 71c02195..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader-pysrc.html +++ /dev/null @@ -1,377 +0,0 @@ - - - - - diffpy.srrietveld.convert.listfilereader - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module listfilereader - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.convert.listfilereader

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2011 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Peng Tian 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """Load list of datafiles for sequential refinement and associated environment 
      - 16  variables such as temperature or pressure. 
      - 17  """ 
      - 18   
      - 19  import os 
      - 20  import re 
      - 21  from diffpy.srrietveld.exceptions import SrrFileError 
      - 22   
      - 23  # module version 
      - 24  __id__ = "$Id: listfilereader.py 6515 2011-04-13 14:52:02Z juhas $" 
      - 25   
      - 26  # these aliases map alternate names of column labels to the standard name 
      - 27  _LABELALIASES = { 
      - 28          'run' : 'datafile', 
      - 29  } 
      - 30   
      -
      31 -def readListFile(filename, fmt=None, basepath=None): -
      32 '''Load an return ListFileReader instance from the specified file. - 33 - 34 filename -- path to the list file to be loaded. Uses CSV reader - 35 for ".csv" extensions or plain text reader otherwise. - 36 fmt -- optional filename format. Use "csv" for CSV reader - 37 or "txt" for plain text reader. When None, determine - 38 format from the filename extension. - 39 basepath -- when specified, make loaded datapaths relative to the - 40 basepath directory. Use '.' for the current directory. - 41 Do not modify datapaths when None. - 42 - 43 Return a ListFileReader instance. - 44 Raise ValueError for invalid fmt value. - 45 Raise SrrFileError for non-existent or corrupted file. - 46 ''' - 47 if fmt is None: - 48 readerclass = (os.path.splitext(filename)[1].lower() == '.csv' - 49 and CSVListFileReader or ListFileReader) - 50 elif fmt == 'csv': - 51 readerclass = CSVListFileReader - 52 elif fmt == 'txt': - 53 readerclass = ListFileReader - 54 else: - 55 emsg = 'Invalid fmt value, supported formats are "csv" and "txt".' - 56 raise ValueError(fmt) - 57 rv = readerclass(filename=filename) - 58 if basepath is not None: - 59 fdir = os.path.dirname(filename) - 60 makerelpath = (lambda f: - 61 os.path.relpath(os.path.join(fdir, f), basepath)) - 62 for lb in rv.banklabels: - 63 rv.column[lb] = map(makerelpath, rv.column[lb]) - 64 return rv -
      65 - 66 -
      67 -def resolveColumnLabel(label): -
      68 '''Convert column label to a standard name. - 69 This applies aliases as defined in the _LABELALIASES and maps - 70 bank002 to bank2. Otherwise the label remains unchanged. - 71 - 72 label -- string label to be converted to standard name. - 73 - 74 Return string. - 75 ''' - 76 lbare1 = label.strip() - 77 if lbare1.lower() in _LABELALIASES: - 78 return resolveColumnLabel(_LABELALIASES[lbare1.lower()]) - 79 # convert DataFilE to datafile - 80 if lbare1.lower() == 'datafile': - 81 lbare1 = lbare1.lower() - 82 # convert bank01 to bank1 - 83 rv = re.sub(r'(?i)^(bank)(\d+)$', - 84 lambda mx: 'bank%i' % int(mx.group(2)), lbare1) - 85 return rv -
      86 - 87 # ---------------------------------------------------------------------------- - 88 -
      89 -class ListFileReader(object): -
      90 '''Object for loading datafiles and temperatures from a list file. - 91 Bank columns are loaded as list of strings, all other columns are - 92 converted to floats. - 93 - 94 Class variables: - 95 - 96 labelaliases -- dictionary of alternative column labels. - 97 - 98 Instance variables: - 99 -100 columnlabels -- list of column labels in the loaded list file -101 banklabels -- list of bank-column labels sorted by bank index -102 column -- dictionary that maps column label to associated -103 list of values. -104 ''' -105 -
      106 - def __init__(self, filename=None, fp=None): -
      107 '''Initializa ListFileReader -108 -109 filename -- optional path to a list file to be loaded -110 fp -- file type object to be read -111 -112 Only one of filename, fp arguments can be specified. -113 ''' -114 # check arguments -115 if None not in (filename, fp): -116 emsg = "Specify either filename or fp, not both." -117 raise ValueError(emsg) -118 self.columnlabels = [] -119 self.banklabels = [] -120 self.column = {} -121 if filename is not None: -122 try: -123 with open(filename, 'rb') as fp1: -124 self.readFile(fp1) -125 except IOError, e: -126 raise SrrFileError(e) -127 if fp is not None: -128 self.readFile(fp) -129 return -
      130 -131 -
      132 - def readFile(self, fp): -
      133 '''Read listfile from a file-type object fp. -134 -135 No return value. -136 Raise SrrFileError if file loading failed. -137 ''' -138 # new variables -139 columnlabels = [] -140 column = {} -141 lineiter = iter(enumerate(fp)) -142 # load header line -143 for nr, line in lineiter: -144 nr += 1 -145 w = line.split() -146 # skip blank and comment lines -147 if not w or w[0].startswith('#'): continue -148 columnlabels = map(resolveColumnLabel, w) -149 for lb in columnlabels: column[lb] = [] -150 self._validate(columnlabels, column) -151 break -152 # load data body -153 ncols = len(columnlabels) -154 for nr, line in lineiter: -155 nr += 1 -156 w = line.split() -157 # skip blank and comment lines -158 if not w or w[0].startswith('#'): continue -159 if len(w) != ncols: -160 emsg = "%i: expected %i columns, found %i." % ( -161 nr, ncols, len(w)) -162 raise SrrFileError(emsg) -163 for lb, wi in zip(columnlabels, w): -164 column[lb].append(wi) -165 self._validate(columnlabels, column) -166 return -
      167 -168 -
      169 - def _validate(self, columnlabels, column): -
      170 '''Check consistency of the loaded data, convert non-bank -171 columns to floats and if everything is OK, update the instance -172 attributes. -173 -174 Raise SrrFileError when something is not OK. -175 ''' -176 # check for duplicate columns -177 lbidx = {} -178 for idx, lb in enumerate(columnlabels): -179 if lb in lbidx: -180 emsg = "Duplicate labels in columns %i, %i" % ( -181 lbidx[lb] + 1, idx + 1) -182 raise SrrFileError(emsg) -183 lbidx[lb] = idx -184 # sort bank labels by their index -185 banklabels = filter(re.compile(r'(?:bank\d+|datafile)$').match, -186 columnlabels) -187 banklabels.sort(key=lambda s: int(filter(str.isdigit, s) or 0)) -188 # require at least one bankN label -189 if columnlabels and not banklabels: -190 emsg = "Missing column label 'datafile' or 'bankN'." -191 raise SrrFileError(emsg) -192 # convert non-bank columns to floats -193 for lb, col in column.iteritems(): -194 # skip the bank columns -195 if lb in banklabels: continue -196 try: -197 col[:] = map(float, col) -198 except ValueError, e: -199 emsg = "Error converting %i-th column to floats: %s" % ( -200 columnlabels.index(lb) + 1, e) -201 raise SrrFileError(emsg) -202 # everything OK here, assign the new variables -203 self.columnlabels = columnlabels -204 self.banklabels = banklabels -205 self.column = column -
      206 -207 # End of class ListFileReader -208 -209 # ---------------------------------------------------------------------------- -210 -
      211 -class CSVListFileReader(ListFileReader): -
      212 '''ListFileReader specialized for comma-separated-values (CSV) format. -213 ''' -214 -
      215 - def readFile(self, fp): -
      216 '''Read CSV-formatted listfile from a file-type object fp. -217 -218 No return value. -219 Raise SrrFileError if file loading failed. -220 ''' -221 import csv -222 reader = csv.reader(fp) -223 try: -224 rows = [row for row in reader] -225 except csv.Error, e: -226 emsg = "%i: %s" % (reader.line_num, e) -227 raise SrrFileError(emsg) -228 headrow = rows and rows.pop(0) or [] -229 columnlabels = map(resolveColumnLabel, headrow) -230 column = dict(zip(columnlabels, map(list, zip(*rows)))) -231 self._validate(columnlabels, column) -232 return -
      233 -234 # End of class CSVListFileReader -235 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader.CSVListFileReader-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader.CSVListFileReader-class.html deleted file mode 100644 index eeae45e3..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader.CSVListFileReader-class.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - diffpy.srrietveld.convert.listfilereader.CSVListFileReader - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module listfilereader :: - Class CSVListFileReader - - - - - -
      [frames] | no frames]
      -
      - -

      Class CSVListFileReader

      source code

      -
      -    object --+    
      -             |    
      -ListFileReader --+
      -                 |
      -                CSVListFileReader
      -
      - -
      -

      ListFileReader specialized for comma-separated-values (CSV) - format.

      - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      readFile(self, - fp)
      - Read CSV-formatted listfile from a file-type object fp.
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

      -
          Inherited from ListFileReader
      -   - - - - - - -
      __init__(self, - filename=None, - fp=None)
      - Initializa ListFileReader
      - source code - -
      - -
      - - - - - - - - - -
      - Properties
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      readFile(self, - fp) -

      -
      source code  -
      - -

      Read CSV-formatted listfile from a file-type object fp.

      -

      No return value. Raise SrrFileError if file loading failed.

      -
      -
      Overrides: - ListFileReader.readFile -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader.ListFileReader-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader.ListFileReader-class.html deleted file mode 100644 index 78807f9a..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.listfilereader.ListFileReader-class.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diffpy.srrietveld.convert.listfilereader.ListFileReader - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module listfilereader :: - Class ListFileReader - - - - - -
      [frames] | no frames]
      -
      - -

      Class ListFileReader

      source code

      -
      -object --+
      -         |
      -        ListFileReader
      -
      - -
      Known Subclasses:
      -
      - -
      - -
      -
      -Object for loading datafiles and temperatures from a list file.
      -Bank columns are loaded as list of strings, all other columns are
      -converted to floats.
      -
      -Class variables:
      -
      -labelaliases -- dictionary of alternative column labels.
      -
      -Instance variables:
      -
      -columnlabels -- list of column labels in the loaded list file
      -banklabels   -- list of bank-column labels sorted by bank index
      -column       -- dictionary that maps column label to associated
      -                list of values.
      -
      -
      - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - filename=None, - fp=None)
      - Initializa ListFileReader
      - source code - -
      - -
      -   - - - - - - -
      readFile(self, - fp)
      - Read listfile from a file-type object fp.
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

      -
      - - - - - - - - - -
      - Properties
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - filename=None, - fp=None) -
      (Constructor) -

      -
      source code  -
      - -

      Initializa ListFileReader

      -

      filename -- optional path to a list file to be loaded fp -- file - type object to be read

      -

      Only one of filename, fp arguments can be specified.

      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      readFile(self, - fp) -

      -
      source code  -
      - -

      Read listfile from a file-type object fp.

      -

      No return value. Raise SrrFileError if file loading failed.

      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.strategyfile-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.strategyfile-module.html deleted file mode 100644 index a2c5dd14..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.strategyfile-module.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - diffpy.srrietveld.convert.strategyfile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module strategyfile - - - - - -
      [frames] | no frames]
      -
      - -

      Module strategyfile

      source code

      -

      Parse different strategy file provided by users

      - - - - - - - - - - -
      - Classes
      -   - - StrategyFile
      - Parse the strategy file into a list of dictionaries for later - refinement [{method: [[fullpath, value, constrain formula], ...]}, - {... -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: strategyfile.py 6671 2011-07-29 02:22:12Z yshan... -
      -   - - __package__ = 'diffpy.srrietveld.convert' -
      -

      Imports: - SrrFileError, - os -


      - - - - - - -
      - Variables Details
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: strategyfile.py 6671 2011-07-29 02:22:12Z yshang $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.strategyfile-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.strategyfile-pysrc.html deleted file mode 100644 index edaf6c7d..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.strategyfile-pysrc.html +++ /dev/null @@ -1,487 +0,0 @@ - - - - - diffpy.srrietveld.convert.strategyfile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module strategyfile - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.convert.strategyfile

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Peng Tian 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ Parse different strategy file provided by users """ 
      - 16   
      - 17  __id__ = "$Id: strategyfile.py 6671 2011-07-29 02:22:12Z yshang $" 
      - 18   
      - 19  import os 
      - 20  from diffpy.srrietveld.exceptions import SrrFileError 
      - 21   
      -
      22 -class StrategyFile: -
      23 ''' Parse the strategy file into a list of dictionaries for later refinement - 24 [{method: [[fullpath, value, constrain formula], ...]}, {...}, ...] - 25 ''' -
      26 - def __init__(self, fit, strategyfile=None, strategy=None): -
      27 """ Initialization """ - 28 self.fit = fit - 29 self.strategyfile = strategyfile - 30 # Default value of strategy is None, then make it empty. - 31 # NOTE: if make the default value to be empty list, then strategy will - 32 # be a static variable and every initiation of StrategyFile the - 33 # passed in strategy variable will keep the previous value, which is - 34 # highly undesired - 35 if strategy is None: - 36 strategy = [] - 37 self.strategy = strategy - 38 self.variableid = 0 - 39 - 40 if strategyfile: - 41 self.parseStrategyFile() - 42 - 43 if strategy: - 44 # if only input strategylist(assume list in good format), - 45 # need to reset variableid - 46 self.ResetVariableId() - 47 return -
      48 -
      49 - def readFile(self): -
      50 """ Read file """ - 51 sifile = open(self.strategyfile, "rU") - 52 self.inlines = sifile.readlines() - 53 sifile.close() - 54 return -
      55 -
      56 - def parseStrategyFile(self): -
      57 """ Parse .txt format file - 58 strateylist = [{method: [[fullpath, value, constrain formula], ...]}, {...}, ...] - 59 method: 'Rietveld' or 'Lebail' - 60 fullpath: full path of parameter; - 61 value: initial value of refined parameter; - 62 formula of constraint: 1.0*Var_paramname - 63 """ - 64 # 1. read file - 65 self.readFile() - 66 - 67 # 2. parse the content into list - 68 paramlist = [] - 69 method = "" - 70 step = {} - 71 stepn = -1 - 72 for ln, line in enumerate(self.inlines): - 73 line = line.strip() - 74 if not line: - 75 continue - 76 if line.startswith('#'): - 77 continue - 78 terms = line.split() - 79 #if terms[0] in [""]: - 80 # continue - 81 - 82 if len(terms) == 3: # the first parameter in a step - 83 # save the last step - 84 if stepn >= 0: - 85 step[method] = paramlist - 86 self.strategy.append(step) - 87 stepn += 1 - 88 - 89 step = {} - 90 paramlist = [] - 91 - 92 method = terms[0] - 93 generalpath = terms[1] - 94 generalformula = terms[2] - 95 - 96 elif len(terms) == 2: # the following parameters in a step - 97 generalpath = terms[0] - 98 generalformula = terms[1] - 99 else: -100 raise SrrFileError("The format of strategy file is wrong in line %d" % ln) -101 -102 # add last step paramlist if method is the same -103 #if self.strategy: -104 # lastmethod, lastparamlist = self.strategy[-1].items()[0] -105 # if lastmethod == method: -106 # for param in lastparamlist: -107 # paramlist.append(param) -108 -109 # specify the template into used cases -110 #FIXME: since generalized strategy files are used, some of the -111 # parameters may not exist, for example the sig0 in profile -4 -112 # if it failed, then continue to the next line -113 try: -114 pftuplelist = self.transRefinables(generalpath, generalformula) -115 except: -116 continue -117 for fullpath, formula in pftuplelist: -118 paramlist.append([fullpath, '', formula]) -119 -120 # get the last step -121 step[method] = paramlist -122 self.strategy.append(step) -123 -124 return -
      125 -
      126 - def ResetVariableId(self): -
      127 """ When input strategylist, need to reset variableid. -128 """ -129 variableids = [] -130 for step in self.strategy: -131 for param in step.values()[0]: -132 variableid = param[2].split("_")[1] -133 if variableid not in variableids: -134 variableids.append(variableid) -135 self.variableid += 1 -136 param[2].replace(variableid, str(self.variableid)) -137 return -
      138 -
      139 - def transRefinables(self, generalpath, generalformula): -
      140 """ Translate the generalpath and generalformula in strategyfile -141 And return the pftuplelist containing the list of parameters for the project. -142 """ -143 pftuplelist = [] -144 # special treatment needs for Lattice -145 if generalpath.endswith("Lattice"): -146 parpaths = [] -147 for name in ["a", "b", "c", "alpha", "beta", "gamma"]: -148 parpaths.extend(self._parsePath(generalpath.replace("Lattice", name))) -149 elif generalpath.endswith("Background"): -150 # FIXME: the group indexing of upper node is not supported, such as -151 # pattern[:].Background.BCK[:] while BCK[:] is interpreted, but pattern[:] -152 # is not expanded -153 backgroundobj = self.fit.getByPath(generalpath) -154 if isinstance(backgroundobj, list): -155 backgroundobj = backgroundobj[0] -156 -157 if backgroundobj.get("BCK"): -158 generalpath += ".BCK[:]" -159 else: -160 generalpath += ".BACK[:]" -161 parpaths = self._parsePath(generalpath) -162 else: -163 parpaths = self._parsePath(generalpath) -164 for path in parpaths: -165 self.variableid += 1 -166 formula = generalformula.split("_")[0] + "_" + str(self.variableid) -167 pftuplelist.append((path, formula)) -168 -169 return pftuplelist -
      170 -171 -
      172 - def _parsePath(self, path): -
      173 """Parse a path having a form as ABC[1], without '.' -174 -175 path -- the path to an parameter or parameter array -176 return: a list of translated paths. -177 """ -178 import re -179 res = re.search(r'(.+)\[([0-9:]+)\]$', path) -180 if res: -181 parpath, index= res.groups() -182 -183 # The code below build either a slice or an int from the string -184 if index.count(':') > 0: -185 # try to make a slice -186 index = slice(*[{True: lambda n: None, False: int}[x == ''](x) -187 for x in (index.split(':') + ['', '', ''])[:3]]) -188 else: -189 index = int(index) -190 -191 datasets = self.fit.getByPath(parpath) -192 if not isinstance(datasets, list): -193 datasets = [datasets, ] -194 -195 paths = [] -196 for dataset in datasets: -197 if isinstance(index, int): -198 paths.append(dataset.path + '[%i]'%index) -199 else: -200 n = dataset.shape[-1] -201 start, stop, step = index.indices(n) -202 parpath = dataset.path -203 for i in range(start, stop, step): -204 paths.append(parpath+'[%i]'%i) -205 -206 return paths -207 -208 datasets = self.fit.getByPath(path) -209 if not isinstance(datasets, list): -210 # it may be a list or not -211 datasets = [datasets,] -212 -213 return [dataset.path for dataset in datasets] -
      214 -
      215 - def writeToFile(self, fullpath): -
      216 '''write the strateg list to a local file. The strategy is read from the -217 strategy member variable, no the lines -218 fullpath - the file path to write into -219 return''' -220 import diffpy.srrietveld.gui.srrguiglobals as GLOBALS -221 lines = [] -222 lines.append("# SrRietveld project file: %s" % GLOBALS.project.basepath + GLOBALS.project.name) -223 lines.append("# Refinement name:" + self.fit.name) -224 for step in self.strategy: -225 method = step.keys()[0] # each step got only one key, the method -226 line = "" -227 for ln, param in enumerate(step[method]): -228 datapath = param[0].split('.', 1)[-1] -229 fomular = param[2] -230 if ln == 0: # the first step,add the refinement method -231 line = "\t".join([method, datapath, fomular]) -232 else: -233 line = "\t".join(["\t", datapath, fomular]) -234 -235 lines.append(line) -236 -237 with open(fullpath, "w") as f: -238 f.write(os.linesep.join(lines)) -239 -240 return -
      241 -
      242 - def getStrategy(self): -
      243 """ Get the strategy list """ -244 return self.strategy -
      245 -
      246 - def setStrategy(self, strategylist): -
      247 """ Set new list to strategylist """ -248 self.strategy = strategylist -249 return -
      250 -
      251 - def getStrategyStep(self, step): -
      252 """ Get the step dict """ -253 return self.strategy[step-1] -
      254 -
      255 - def getStepParamList(self, step): -
      256 """ Get strategy for certain step """ -257 if step == 0: -258 return [] -259 else: -260 return self.strategy[step-1].values()[0] -
      261 -
      262 - def getStepMethod(self, step): -
      263 """ Get method for certain step """ -264 if step == 0: # no strategy, default Rietveld -265 return "Rietveld" -266 else: -267 return self.strategy[step-1].keys()[0] -
      268 -
      269 - def getStrategyId(self, stepstrategy): -
      270 """ Get the order of the stepstrategy """ -271 return self.strategy.index(stepstrategy) + 1 -
      272 -
      273 - def getNumStep(self): -
      274 """ Get total number of steps """ -275 return len(self.strategy) -
      276 -
      277 - def getNewVariableId(self): -
      278 """ Get new variable id """ -279 self.variableid += 1 -280 return self.variableid -
      281 -
      282 - def mergeParamList(self, newparam, paramlist): -
      283 """ Form a new paramlist """ -284 currparamlist = [] -285 currparamlist.append(newparam) -286 for param in paramlist: -287 currparamlist.append(param) -288 return currparamlist -
      289 -
      290 - def getPosParamFullPath(self, id): -
      291 """ Get Fullpath for id parameter in strategyeditor """ -292 paramlist, stepparamid = self.getPosParamListId(id) -293 param = paramlist[stepparamid] -294 return param[0] -
      295 -
      296 - def removePosParam(self, id): -
      297 """ Remove the position in strategyeditor from parameter list """ -298 paramlist, stepparamid = self.getPosParamListId(id) -299 paramlist.pop(stepparamid) -300 return -
      301 -
      302 - def addPosParam(self, id, param): -
      303 """ Add the parameter into paramlist """ -304 paramlist, stepparamid = self.getPosParamListId(id) -305 paramlist.insert(stepparamid, param) -306 return -
      307 -
      308 - def getPosParamListId(self, id): -
      309 """ Get corresponding paramlist to id of strategyeditor """ -310 paramid = 0 -311 stepid = 0 -312 for step in self.strategy: -313 stepid += 1 -314 paramlist = step.values()[0] -315 stepparamid = -1 -316 for param in paramlist: -317 paramid += 1 -318 stepparamid += 1 -319 if (paramid+stepid) == id: -320 return paramlist, stepparamid -321 return -
      322 -
      323 - def removeStep(self, step): -
      324 """ Remove the step from list """ -325 self.strategy.pop(step-1) -326 return -
      327 -
      328 - def addParam(self, step, posid, fullpath, value='', formula=None): -
      329 """ Add the fullpath into parameter list """ -330 strategystep = self.strategy[step-1] -331 paramlist = strategystep.values()[0] -332 if formula == None: -333 self.variableid += 1 -334 formula = "1.0*Var_" + str(self.variableid) -335 paramlist.insert(posid, [fullpath, value, formula]) -336 return -
      337 -
      338 - def addNewStep(self, step, method, paramlist): -
      339 """ Addd new strategystep """ -340 self.strategy.insert(step, {method: paramlist}) -341 return -
      342 -
      343 - def clear(self): -
      344 """ Clean the strategy list """ -345 self.strategy = [] -346 return -
      347 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html deleted file mode 100644 index 9f21783c..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.strategyfile.StrategyFile-class.html +++ /dev/null @@ -1,601 +0,0 @@ - - - - - diffpy.srrietveld.convert.strategyfile.StrategyFile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module strategyfile :: - Class StrategyFile - - - - - -
      [frames] | no frames]
      -
      - -

      Class StrategyFile

      source code

      -

      Parse the strategy file into a list of dictionaries for later - refinement [{method: [[fullpath, value, constrain formula], ...]}, {...}, - ...]

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      ResetVariableId(self)
      - When input strategylist, need to reset variableid.
      - source code - -
      - -
      -   - - - - - - -
      __init__(self, - fit, - strategyfile=None, - strategy=None)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      addNewStep(self, - step, - method, - paramlist)
      - Addd new strategystep
      - source code - -
      - -
      -   - - - - - - -
      addParam(self, - step, - posid, - fullpath, - value='', - formula=None)
      - Add the fullpath into parameter list
      - source code - -
      - -
      -   - - - - - - -
      addPosParam(self, - id, - param)
      - Add the parameter into paramlist
      - source code - -
      - -
      -   - - - - - - -
      clear(self)
      - Clean the strategy list
      - source code - -
      - -
      -   - - - - - - -
      getNewVariableId(self)
      - Get new variable id
      - source code - -
      - -
      -   - - - - - - -
      getNumStep(self)
      - Get total number of steps
      - source code - -
      - -
      -   - - - - - - -
      getPosParamFullPath(self, - id)
      - Get Fullpath for id parameter in strategyeditor
      - source code - -
      - -
      -   - - - - - - -
      getPosParamListId(self, - id)
      - Get corresponding paramlist to id of strategyeditor
      - source code - -
      - -
      -   - - - - - - -
      getStepMethod(self, - step)
      - Get method for certain step
      - source code - -
      - -
      -   - - - - - - -
      getStepParamList(self, - step)
      - Get strategy for certain step
      - source code - -
      - -
      -   - - - - - - -
      getStrategy(self)
      - Get the strategy list
      - source code - -
      - -
      -   - - - - - - -
      getStrategyId(self, - stepstrategy)
      - Get the order of the stepstrategy
      - source code - -
      - -
      -   - - - - - - -
      getStrategyStep(self, - step)
      - Get the step dict
      - source code - -
      - -
      -   - - - - - - -
      mergeParamList(self, - newparam, - paramlist)
      - Form a new paramlist
      - source code - -
      - -
      -   - - - - - - -
      parseStrategyFile(self)
      - Parse .txt format file...
      - source code - -
      - -
      -   - - - - - - -
      readFile(self)
      - Read file
      - source code - -
      - -
      -   - - - - - - -
      removePosParam(self, - id)
      - Remove the position in strategyeditor from parameter list
      - source code - -
      - -
      -   - - - - - - -
      removeStep(self, - step)
      - Remove the step from list
      - source code - -
      - -
      -   - - - - - - -
      setStrategy(self, - strategylist)
      - Set new list to strategylist
      - source code - -
      - -
      -   - - - - - - -
      transRefinables(self, - generalpath, - generalformula)
      - Translate the generalpath and generalformula in strategyfile And - return the pftuplelist containing the list of parameters for the - project.
      - source code - -
      - -
      -   - - - - - - -
      writeToFile(self, - fullpath)
      - write the strateg list to a local file.
      - source code - -
      - -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      parseStrategyFile(self) -

      -
      source code  -
      - -
      -Parse .txt format file
      -strateylist = [{method: [[fullpath, value, constrain formula], ...]}, {...}, ...]
      -       method: 'Rietveld' or 'Lebail'
      -       fullpath: full path of parameter;
      -       value: initial value of refined parameter;
      -       formula of constraint: 1.0*Var_paramname
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      writeToFile(self, - fullpath) -

      -
      source code  -
      - -

      write the strateg list to a local file. The strategy is read from the - strategy member variable, no the lines fullpath - the file path to write - into return

      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser-module.html deleted file mode 100644 index 876855ed..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser-module.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - diffpy.srrietveld.convert.xmlparser - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module xmlparser - - - - - -
      [frames] | no frames]
      -
      - -

      Module xmlparser

      source code

      -

      XMLfile parser is to parse XML input files.

      - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Classes
      -   - - BackgroundXML -
      -   - - ExcludedRegionXML -
      -   - - InstrumentXML -
      -   - - StrategyXML -
      -   - - StructureXML -
      -   - - XMLFile
      - Parser XML file -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: xmlparser.py 5658 2010-07-09 20:05:34Z juhas $' -
      -   - - __package__ = 'diffpy.srrietveld.convert' -
      -

      Imports: - xml -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser-pysrc.html deleted file mode 100644 index 6f1a6a43..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser-pysrc.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - diffpy.srrietveld.convert.xmlparser - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module xmlparser - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.convert.xmlparser

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Peng Tian 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ XMLfile parser is to parse XML input files. """ 
      - 16   
      - 17  __id__ = "$Id: xmlparser.py 5658 2010-07-09 20:05:34Z juhas $" 
      - 18   
      - 19  import xml.dom.minidom 
      - 20   
      -
      21 -class XMLFile: -
      22 """ Parser XML file""" -
      23 - def __init__(self): -
      24 """ Initialization """ - 25 return -
      26 -
      27 - def importXMLFile(self, filename): -
      28 """ Import general XML file """ - 29 try: - 30 xmlfile = open(filename, "r") - 31 rietxml = xml.dom.minidom.parse(xmlfile) - 32 xmlfile.close() - 33 except IOError: - 34 errmsg = "%-10s Cannot Be Found" % (filename) - 35 raise IOError(errmsg) - 36 return rietxml -
      37 -
      38 - def xmlToDict(self, xmlnode): -
      39 """ Convert an XML object to a dictionary """ - 40 rdict = {} - 41 # 1. Attribution - 42 if xmlnode.attributes is not None: - 43 for index in range(xmlnode.attributes.length): - 44 attrname = xmlnode.attributes.item(index).name - 45 attrval = xmlnode.attributes.getNamedItem(attrname).value - 46 try: - 47 rdict[str(attrname)] = int(attrval) - 48 continue - 49 except: - 50 try: - 51 rdict[str(attrname)] = float(attrval) - 52 continue - 53 except: - 54 rdict[str(attrname)] = str(attrval) - 55 - 56 - 57 # 2. Recursive to call child nodes - 58 for child in xmlnode.childNodes: - 59 if child == None: - 60 continue - 61 if not rdict.has_key(str(child.localName)): - 62 rdict[str(child.localName)] = [] - 63 rdict[str(child.localName)].append( self.xmlToDict(child) ) - 64 - 65 return rdict -
      66 -
      67 -class StructureXML(XMLFile): -
      68 - def __init__(self, structurefilename): -
      69 self.structurefile = structurefilename - 70 self.structurexml = self.importXMLFile(structurefilename) - 71 return -
      72 -
      73 - def parseStructureXML(self): -
      74 for childnode in self.structurexml.childNodes: - 75 if childnode.localName == "MODEL": - 76 modelnode = childnode - 77 break - 78 if childnode.localName != "MODEL" or modelnode == None: - 79 raise NotImplementedError("Not recognized xml format!") - 80 - 81 self.strudict = self.xmlToDict(modelnode) - 82 return self.strudict -
      83 -
      84 -class InstrumentXML(XMLFile): -
      85 - def __init__(self, instrumentfilename): -
      86 self.instrumentfile = instrumentfilename - 87 self.instrumentxml = self.importXMLFile(instrumentfilename) - 88 return -
      89 -
      90 - def parseInstrumentXML(self): -
      91 for childnode in self.instrumentxml.childNodes: - 92 if childnode.localName == "INSTRUMENT": - 93 instrumentnode = childnode - 94 break - 95 if childnode.localName != "INSTRUMENT" or instrumentnode == None: - 96 raise NotImplementedError("Not recognized xml format!") - 97 - 98 self.instdict = self.xmlToDict(instrumentnode) - 99 return self.instdict -
      100 -
      101 -class StrategyXML(XMLFile): -
      102 - def __init__(self, strategyfilename): -
      103 self.strategyfile = strategyfilename -104 self.strategyxml = self.importXMLFile(strategyfilename) -105 return -
      106 -
      107 -class BackgroundXML(XMLFile): -
      108 - def __init__(self, backgroundfilename): -
      109 self.backgroundfile = backgroundfilename -110 self.backgroundxml = self.importXMLFile(backgroundfilename) -111 return -
      112 -
      113 - def addToInstDict(self, instdict): -
      114 instdict["BACKGROUND"] = [] -115 for childnode in self.backgroundxml.childNodes: -116 if childnode.localName == "BACKGROUND": -117 instdict["BACKGROUND"].append(self.xmlToDict(childnode)) -118 else: -119 raise NotImplementedError("Not recognized xml format!") -120 return instdict -
      121 -
      122 -class ExcludedRegionXML(XMLFile): -
      123 - def __init__(self, excludedregionfilename): -
      124 self.excludedregionfile = excludedregionfilename -125 self.exrexml = self.importXMLFile(excludedregionfilename) -126 return -
      127 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.BackgroundXML-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.BackgroundXML-class.html deleted file mode 100644 index 317778dd..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.BackgroundXML-class.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - diffpy.srrietveld.convert.xmlparser.BackgroundXML - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module xmlparser :: - Class BackgroundXML - - - - - -
      [frames] | no frames]
      -
      - -

      Class BackgroundXML

      source code

      -
      -XMLFile --+
      -          |
      -         BackgroundXML
      -
      - -
      - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - backgroundfilename)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      addToInstDict(self, - instdict) - source code - -
      - -
          Inherited from XMLFile
      -   - - - - - - -
      importXMLFile(self, - filename)
      - Import general XML file
      - source code - -
      - -
      -   - - - - - - -
      xmlToDict(self, - xmlnode)
      - Convert an XML object to a dictionary
      - source code - -
      - -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - backgroundfilename) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization

      -
      -
      Overrides: - XMLFile.__init__ -
      (inherited documentation)
      - -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.ExcludedRegionXML-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.ExcludedRegionXML-class.html deleted file mode 100644 index b78ec62a..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.ExcludedRegionXML-class.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - diffpy.srrietveld.convert.xmlparser.ExcludedRegionXML - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module xmlparser :: - Class ExcludedRegionXML - - - - - -
      [frames] | no frames]
      -
      - -

      Class ExcludedRegionXML

      source code

      -
      -XMLFile --+
      -          |
      -         ExcludedRegionXML
      -
      - -
      - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - excludedregionfilename)
      - Initialization
      - source code - -
      - -
          Inherited from XMLFile
      -   - - - - - - -
      importXMLFile(self, - filename)
      - Import general XML file
      - source code - -
      - -
      -   - - - - - - -
      xmlToDict(self, - xmlnode)
      - Convert an XML object to a dictionary
      - source code - -
      - -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - excludedregionfilename) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization

      -
      -
      Overrides: - XMLFile.__init__ -
      (inherited documentation)
      - -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.InstrumentXML-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.InstrumentXML-class.html deleted file mode 100644 index 45fab580..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.InstrumentXML-class.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - diffpy.srrietveld.convert.xmlparser.InstrumentXML - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module xmlparser :: - Class InstrumentXML - - - - - -
      [frames] | no frames]
      -
      - -

      Class InstrumentXML

      source code

      -
      -XMLFile --+
      -          |
      -         InstrumentXML
      -
      - -
      - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - instrumentfilename)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      parseInstrumentXML(self) - source code - -
      - -
          Inherited from XMLFile
      -   - - - - - - -
      importXMLFile(self, - filename)
      - Import general XML file
      - source code - -
      - -
      -   - - - - - - -
      xmlToDict(self, - xmlnode)
      - Convert an XML object to a dictionary
      - source code - -
      - -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - instrumentfilename) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization

      -
      -
      Overrides: - XMLFile.__init__ -
      (inherited documentation)
      - -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.StrategyXML-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.StrategyXML-class.html deleted file mode 100644 index 3fc1d672..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.StrategyXML-class.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - diffpy.srrietveld.convert.xmlparser.StrategyXML - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module xmlparser :: - Class StrategyXML - - - - - -
      [frames] | no frames]
      -
      - -

      Class StrategyXML

      source code

      -
      -XMLFile --+
      -          |
      -         StrategyXML
      -
      - -
      - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - strategyfilename)
      - Initialization
      - source code - -
      - -
          Inherited from XMLFile
      -   - - - - - - -
      importXMLFile(self, - filename)
      - Import general XML file
      - source code - -
      - -
      -   - - - - - - -
      xmlToDict(self, - xmlnode)
      - Convert an XML object to a dictionary
      - source code - -
      - -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - strategyfilename) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization

      -
      -
      Overrides: - XMLFile.__init__ -
      (inherited documentation)
      - -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.StructureXML-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.StructureXML-class.html deleted file mode 100644 index 39c6a6fe..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.StructureXML-class.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - diffpy.srrietveld.convert.xmlparser.StructureXML - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module xmlparser :: - Class StructureXML - - - - - -
      [frames] | no frames]
      -
      - -

      Class StructureXML

      source code

      -
      -XMLFile --+
      -          |
      -         StructureXML
      -
      - -
      - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - structurefilename)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      parseStructureXML(self) - source code - -
      - -
          Inherited from XMLFile
      -   - - - - - - -
      importXMLFile(self, - filename)
      - Import general XML file
      - source code - -
      - -
      -   - - - - - - -
      xmlToDict(self, - xmlnode)
      - Convert an XML object to a dictionary
      - source code - -
      - -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - structurefilename) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization

      -
      -
      Overrides: - XMLFile.__init__ -
      (inherited documentation)
      - -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.XMLFile-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.XMLFile-class.html deleted file mode 100644 index 7a629ad3..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.convert.xmlparser.XMLFile-class.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - diffpy.srrietveld.convert.xmlparser.XMLFile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Package convert :: - Module xmlparser :: - Class XMLFile - - - - - -
      [frames] | no frames]
      -
      - -

      Class XMLFile

      source code

      -
      Known Subclasses:
      -
      - -
      - -
      -

      Parser XML file

      - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      importXMLFile(self, - filename)
      - Import general XML file
      - source code - -
      - -
      -   - - - - - - -
      xmlToDict(self, - xmlnode)
      - Convert an XML object to a dictionary
      - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions-module.html deleted file mode 100644 index c7c3dc57..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions-module.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - diffpy.srrietveld.exceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module exceptions - - - - - -
      [frames] | no frames]
      -
      - -

      Module exceptions

      source code

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Classes
      -   - - SrrConfigError
      - SrRietveld config exception. -
      -   - - SrrError
      - Basic SrRietveld exception class. -
      -   - - SrrFileError
      - SrRietveld file exception -
      -   - - SrrIOError
      - SrRietveld input / output exception -
      -   - - SrrInputError
      - SrRietveld exception by user input -
      -   - - SrrRunTimeError
      - SrRietveld run time exception -
      -   - - SrrValueError
      - SrRietveld value exception -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: exceptions.py 6300 2011-03-10 21:34:27Z yshang $' -
      -   - - __package__ = None -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions-pysrc.html deleted file mode 100644 index 9277505c..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions-pysrc.html +++ /dev/null @@ -1,465 +0,0 @@ - - - - - diffpy.srrietveld.exceptions - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module exceptions - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.exceptions

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2010 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Jiwu Liu 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14   
      -
      15 -class SrrError(Exception): -
      16 """Basic SrRietveld exception class.""" -
      17 - def __init__(self, info, errType): -
      18 """initialize -19 -20 info -- description string -21 """ -22 Exception.__init__(self) -23 self.info = info -24 self.type = errType -25 return -
      26 -
      27 - def __str__(self): -
      28 return self.info -
      29 -
      30 -class SrrConfigError(SrrError): -
      31 """ SrRietveld config exception.""" -
      32 - def __init__(self, info): -
      33 """initialize -34 -35 info -- description string -36 """ -37 -38 SrrError.__init__(self, info, self.__class__.__name__) -39 return -
      40 -class SrrFileError(SrrError): -
      41 '''SrRietveld file exception''' -
      42 - def __init__(self, info): -
      43 """initialize -44 -45 info -- description string -46 """ -47 SrrError.__init__(self, info, self.__class__.__name__) -48 return -
      49 -class SrrIOError(SrrError): -
      50 '''SrRietveld input / output exception''' -
      51 - def __init__(self, info): -
      52 """initialize -53 -54 info -- description string -55 """ -56 SrrError.__init__(self, info, self.__class__.__name__) -57 return -
      58 -
      59 -class SrrRunTimeError(SrrError): -
      60 '''SrRietveld run time exception''' -
      61 - def __init__(self, info): -
      62 """initialize -63 -64 info -- description string -65 """ -66 SrrError.__init__(self, info, self.__class__.__name__) -67 return -
      68 -class SrrValueError(SrrError): -
      69 '''SrRietveld value exception''' -
      70 - def __init__(self, info): -
      71 """initialize -72 -73 info -- description string -74 """ -75 SrrError.__init__(self, info, self.__class__.__name__) -76 return -
      77 -class SrrInputError(SrrError): -
      78 '''SrRietveld exception by user input''' -
      79 - def __init__(self, info): -
      80 """initialize -81 -82 info -- description string -83 """ -84 SrrError.__init__(self, info, self.__class__.__name__) -85 return -
      86 # version -87 __id__ = "$Id: exceptions.py 6300 2011-03-10 21:34:27Z yshang $" -88 -89 # End of file -90 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrConfigError-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrConfigError-class.html deleted file mode 100644 index 33b462cc..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrConfigError-class.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - diffpy.srrietveld.exceptions.SrrConfigError - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module exceptions :: - Class SrrConfigError - - - - - -
      [frames] | no frames]
      -
      - -

      Class SrrConfigError

      source code

      -
      -              object --+            
      -                       |            
      -exceptions.BaseException --+        
      -                           |        
      -        exceptions.Exception --+    
      -                               |    
      -                        SrrError --+
      -                                   |
      -                                  SrrConfigError
      -
      - -
      -

      SrRietveld config exception.

      - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - info)
      - initialize
      - source code - -
      - -
      -

      Inherited from exceptions.Exception: - __new__ -

      -

      Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

      -

      Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

      -
          Inherited from SrrError
      -   - - - - - - -
      __str__(self)
      - str(x)
      - source code - -
      - -
      - - - - - - - - - -
      - Properties
      -

      Inherited from exceptions.BaseException: - args, - message -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - info) -
      (Constructor) -

      -
      source code  -
      - -

      initialize

      -

      info -- description string

      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrError-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrError-class.html deleted file mode 100644 index dc6956df..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrError-class.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - diffpy.srrietveld.exceptions.SrrError - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module exceptions :: - Class SrrError - - - - - -
      [frames] | no frames]
      -
      - -

      Class SrrError

      source code

      -
      -              object --+        
      -                       |        
      -exceptions.BaseException --+    
      -                           |    
      -        exceptions.Exception --+
      -                               |
      -                              SrrError
      -
      - -
      Known Subclasses:
      -
      - -
      - -
      -

      Basic SrRietveld exception class.

      - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - info, - errType)
      - initialize
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - str(x)
      - source code - -
      - -
      -

      Inherited from exceptions.Exception: - __new__ -

      -

      Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

      -

      Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

      -
      - - - - - - - - - -
      - Properties
      -

      Inherited from exceptions.BaseException: - args, - message -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - info, - errType) -
      (Constructor) -

      -
      source code  -
      - -

      initialize

      -

      info -- description string

      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      __str__(self) -
      (Informal representation operator) -

      -
      source code  -
      - -

      str(x)

      -
      -
      Overrides: - object.__str__ -
      (inherited documentation)
      - -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrFileError-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrFileError-class.html deleted file mode 100644 index 25e0ecca..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrFileError-class.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - diffpy.srrietveld.exceptions.SrrFileError - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module exceptions :: - Class SrrFileError - - - - - -
      [frames] | no frames]
      -
      - -

      Class SrrFileError

      source code

      -
      -              object --+            
      -                       |            
      -exceptions.BaseException --+        
      -                           |        
      -        exceptions.Exception --+    
      -                               |    
      -                        SrrError --+
      -                                   |
      -                                  SrrFileError
      -
      - -
      -

      SrRietveld file exception

      - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - info)
      - initialize
      - source code - -
      - -
      -

      Inherited from exceptions.Exception: - __new__ -

      -

      Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

      -

      Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

      -
          Inherited from SrrError
      -   - - - - - - -
      __str__(self)
      - str(x)
      - source code - -
      - -
      - - - - - - - - - -
      - Properties
      -

      Inherited from exceptions.BaseException: - args, - message -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - info) -
      (Constructor) -

      -
      source code  -
      - -

      initialize

      -

      info -- description string

      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrIOError-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrIOError-class.html deleted file mode 100644 index 159de8f7..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrIOError-class.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - diffpy.srrietveld.exceptions.SrrIOError - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module exceptions :: - Class SrrIOError - - - - - -
      [frames] | no frames]
      -
      - -

      Class SrrIOError

      source code

      -
      -              object --+            
      -                       |            
      -exceptions.BaseException --+        
      -                           |        
      -        exceptions.Exception --+    
      -                               |    
      -                        SrrError --+
      -                                   |
      -                                  SrrIOError
      -
      - -
      -

      SrRietveld input / output exception

      - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - info)
      - initialize
      - source code - -
      - -
      -

      Inherited from exceptions.Exception: - __new__ -

      -

      Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

      -

      Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

      -
          Inherited from SrrError
      -   - - - - - - -
      __str__(self)
      - str(x)
      - source code - -
      - -
      - - - - - - - - - -
      - Properties
      -

      Inherited from exceptions.BaseException: - args, - message -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - info) -
      (Constructor) -

      -
      source code  -
      - -

      initialize

      -

      info -- description string

      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrInputError-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrInputError-class.html deleted file mode 100644 index 3815a77e..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrInputError-class.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - diffpy.srrietveld.exceptions.SrrInputError - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module exceptions :: - Class SrrInputError - - - - - -
      [frames] | no frames]
      -
      - -

      Class SrrInputError

      source code

      -
      -              object --+            
      -                       |            
      -exceptions.BaseException --+        
      -                           |        
      -        exceptions.Exception --+    
      -                               |    
      -                        SrrError --+
      -                                   |
      -                                  SrrInputError
      -
      - -
      -

      SrRietveld exception by user input

      - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - info)
      - initialize
      - source code - -
      - -
      -

      Inherited from exceptions.Exception: - __new__ -

      -

      Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

      -

      Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

      -
          Inherited from SrrError
      -   - - - - - - -
      __str__(self)
      - str(x)
      - source code - -
      - -
      - - - - - - - - - -
      - Properties
      -

      Inherited from exceptions.BaseException: - args, - message -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - info) -
      (Constructor) -

      -
      source code  -
      - -

      initialize

      -

      info -- description string

      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrRunTimeError-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrRunTimeError-class.html deleted file mode 100644 index 5d6c22a3..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrRunTimeError-class.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - diffpy.srrietveld.exceptions.SrrRunTimeError - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module exceptions :: - Class SrrRunTimeError - - - - - -
      [frames] | no frames]
      -
      - -

      Class SrrRunTimeError

      source code

      -
      -              object --+            
      -                       |            
      -exceptions.BaseException --+        
      -                           |        
      -        exceptions.Exception --+    
      -                               |    
      -                        SrrError --+
      -                                   |
      -                                  SrrRunTimeError
      -
      - -
      -

      SrRietveld run time exception

      - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - info)
      - initialize
      - source code - -
      - -
      -

      Inherited from exceptions.Exception: - __new__ -

      -

      Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

      -

      Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

      -
          Inherited from SrrError
      -   - - - - - - -
      __str__(self)
      - str(x)
      - source code - -
      - -
      - - - - - - - - - -
      - Properties
      -

      Inherited from exceptions.BaseException: - args, - message -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - info) -
      (Constructor) -

      -
      source code  -
      - -

      initialize

      -

      info -- description string

      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrValueError-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrValueError-class.html deleted file mode 100644 index aee9f880..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.exceptions.SrrValueError-class.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - diffpy.srrietveld.exceptions.SrrValueError - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module exceptions :: - Class SrrValueError - - - - - -
      [frames] | no frames]
      -
      - -

      Class SrrValueError

      source code

      -
      -              object --+            
      -                       |            
      -exceptions.BaseException --+        
      -                           |        
      -        exceptions.Exception --+    
      -                               |    
      -                        SrrError --+
      -                                   |
      -                                  SrrValueError
      -
      - -
      -

      SrRietveld value exception

      - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - info)
      - initialize
      - source code - -
      - -
      -

      Inherited from exceptions.Exception: - __new__ -

      -

      Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

      -

      Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

      -
          Inherited from SrrError
      -   - - - - - - -
      __str__(self)
      - str(x)
      - source code - -
      - -
      - - - - - - - - - -
      - Properties
      -

      Inherited from exceptions.BaseException: - args, - message -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - info) -
      (Constructor) -

      -
      source code  -
      - -

      initialize

      -

      info -- description string

      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.export-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.export-module.html deleted file mode 100644 index de500176..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.export-module.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - diffpy.srrietveld.export - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module export - - - - - -
      [frames] | no frames]
      -
      - -

      Module export

      source code

      - - - - - - - - - - - - - - - -
      - Functions
      -   - - - - - - -
      exportCifFile(fit, - exportDir, - rootname, - index)
      - Save the EXP file based on user selections and inputs
      - source code - -
      - -
      -   - - - - - - -
      exportDISAGLFile(fit, - exportDir, - rootName, - index)
      - save the bond length angle file
      - source code - -
      - -
      -   - - - - - - -
      exportEngineFile(fit, - exportDir, - rootName, - index)
      - Save the EXP file based on user selections and inputs fit - the fit - object exportDir - the directory to export the files rootName - the - root name of the files to separate files for different datasets index - - the index of the file
      - source code - -
      - -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: export.py 6718 2011-08-23 21:33:20Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - DataFile, - EXPFile, - GLOBALS, - SrrRunTimeError, - UTIILS, - copy, - os, - pcrFileWriter, - shutil, - tempfile -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.export-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.export-pysrc.html deleted file mode 100644 index ba315878..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.export-pysrc.html +++ /dev/null @@ -1,372 +0,0 @@ - - - - - diffpy.srrietveld.export - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module export - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.export

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2010 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Yingrui Shang 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  __id__ = "$Id: export.py 6718 2011-08-23 21:33:20Z yshang $" 
      - 15   
      - 16  '''The functions to export the results from SrRietveld''' 
      - 17  import tempfile, shutil, os 
      - 18  from diffpy.pygsas.expfile import EXPFile 
      - 19  from diffpy.pyfullprof.pcrfilewriter import pcrFileWriter 
      - 20  from diffpy.srrietveld.convert.datafile import DataFile 
      - 21  import copy 
      - 22  import diffpy.srrietveld.gui.srrguiglobals as GLOBALS 
      - 23  import diffpy.srrietveld.utility as UTIILS 
      - 24  from diffpy.srrietveld.exceptions import SrrRunTimeError 
      - 25   
      -
      26 -def __generateCifFile(fit, rootName, index): -
      27 '''generate the exp and gsa file in the workingDir - 28 fit -- the fit object - 29 workingDir -- the directory to put all the generated files - 30 rootName -- The rootName for the files, etc rootName.EXP, rootName.gsa - 31 index -- the index of the data in the fit to be exported - 32 return status of runDISAGL - 33 ''' - 34 # save the exp file first - 35 #tmpDir = __generateEXPFile(fit, rootName, index) - 36 #from diffpy.pygsas.genles import runPowGen - 37 #runPowGen(rootName, tmpDir, 'refine', 1, 'r') - 38 - 39 tmpDir = __generateDISAGLFile(fit, rootName, index) - 40 - 41 from diffpy.pygsas.export import runGSAS2CIF - 42 - 43 runGSAS2CIF(rootName, tmpDir) - 44 - 45 return tmpDir -
      46 -
      47 -def exportCifFile(fit, exportDir, rootname, index): -
      48 '''Save the EXP file based on user selections and inputs''' - 49 - 50 et = fit.getEngineType() - 51 if et != 'gsas': - 52 __msg = 'Exporting to CIF file is only supported for GSAS projects.' - 53 UTIILS.printWarning(__msg) - 54 - 55 tmpDir = __generateCifFile(fit, rootname, index) - 56 - 57 fileList = [os.path.join(tmpDir, f) - 58 for f in os.listdir(tmpDir)] - 59 - 60 for f in fileList: - 61 shutil.copyfile(f, os.path.join(exportDir ,os.path.basename(f))) - 62 # delete the temp working directory - 63 try: - 64 shutil.rmtree(tmpDir) - 65 except Exception, e: - 66 print e.message - 67 - 68 return -
      69 - 70 # End class ExportCifDialog - 71 -
      72 -def __generateDISAGLFile(fit, rootName, index): -
      73 '''generate the exp and gsa file in the workingDir - 74 fit -- the fit object - 75 workingDir -- the directory to put all the generated files - 76 rootName -- The rootName for the files, etc rootName.EXP, rootName.gsa - 77 index -- the index of the data in the fit to be exported - 78 return status of runDISAGL - 79 ''' - 80 # Generate the EXP file first - 81 tmpDir = __generateEXPFile(fit, rootName , index) - 82 from diffpy.pygsas.genles import runPowGen - 83 from diffpy.pygsas.export import runDISAGL - 84 runPowGen(rootName, tmpDir, 'refine', 1, 'r') - 85 status = runDISAGL(rootName, tmpDir) - 86 - 87 return tmpDir -
      88 -
      89 -def exportDISAGLFile(fit, exportDir, rootName, index): -
      90 '''save the bond length angle file''' - 91 - 92 et = fit.getEngineType() - 93 if et != 'gsas': - 94 __msg = 'Exporting to DISAGL file is only supported for GSAS projects.' - 95 UTIILS.printWarning(__msg) - 96 - 97 # Generate the disagl file - 98 tmpDir = __generateDISAGLFile(fit, rootName, index) - 99 -100 fileList = [os.path.join(tmpDir, f) -101 for f in os.listdir(tmpDir)] -102 -103 for f in fileList: -104 shutil.copyfile(f, os.path.join(exportDir ,os.path.basename(f))) -105 # delete the temp working directory -106 try: -107 shutil.rmtree(tmpDir) -108 except Exception, e: -109 print e.message -110 -111 return -
      112 -
      113 -def __generateEXPFile(fit, rootName, index): -
      114 '''generate the exp and gsa file in the workingDir -115 fit -- the fit object -116 workingDir -- the directory to put all the generated files -117 rootName -- The rootName for the files, etc rootName.EXP, rootName.gsa -118 index -- the index of the data in the fit to be exported -119 return no return value -120 ''' -121 tmpDir = tempfile.mkdtemp() -122 # Export the supporting files from pattern: data file, MFIL (gsas only), -123 # instrument file, etc -124 patterns = fit.getObject('Pattern') -125 -126 # dump the instrument file, MFIL, and data files into the directory -127 dataFiles = [] -128 for bid, pt in enumerate(patterns): -129 instFilePath = fit.dumpInstrumentFile(tmpDir, index, bid) -130 fit.dumpIncidentSpectrumFile(tmpDir, index, bid) -131 -132 dataFilePath = fit.dumpDataFile(tmpDir, index, bid) -133 df = DataFile(dataFilePath, fit.getEngineType()) -134 dataFiles.append(os.path.basename(df.prepDataFile(tmpDir, instFilePath))) -135 -136 # export the exp engine file -137 ds = fit.get('enginefile') -138 -139 expFile = EXPFile(expdata = str(ds[index])) -140 # Get number of patterns -141 numPatterns = len(fit.getObject("Pattern")) -142 for ii in range(numPatterns): -143 if dataFiles[ii]: -144 # histogram key generator -145 keybase = ('HST%i' % (ii + 1),) -146 hstkey = lambda *a : keybase + a -147 # histogram name -148 #expFile.setValue(hstkey("HNAM"), pattern.get("HNAM")) -149 # histogram data file -150 expFile.setValue(hstkey("HFIL"), dataFiles[ii]) -151 -152 expFile.write(os.path.join(tmpDir, rootName+'.EXP')) -153 -154 return tmpDir -
      155 -
      156 -def exportEngineFile(fit, exportDir, rootName, index): -
      157 '''Save the EXP file based on user selections and inputs -158 fit - the fit object -159 exportDir - the directory to export the files -160 rootName - the root name of the files to separate files for different datasets -161 index - the index of the file''' -162 try: -163 if fit.getEngineType() == 'gsas': -164 tmpDir = __generateEXPFile(fit, rootName, index) -165 elif fit.getEngineType() == 'fullprof': -166 tmpDir = __generatePcrFile(fit, rootName, index) -167 except Exception, e: -168 if GLOBALS.isDebug: -169 UTIILS.printDebugInfo() -170 else: -171 raise SrrRunTimeError('Error generating engine files:' + e.message) -172 # copy out the exp file and data file -173 fileList = [os.path.join(tmpDir, f) -174 for f in os.listdir(tmpDir)] -175 -176 for f in fileList: -177 shutil.copyfile(f, os.path.join(exportDir,os.path.basename(f))) -178 try: -179 shutil.rmtree(tmpDir) -180 except Exception, e: -181 print e.message -
      182 -
      183 -def __generatePcrFile(fit, rootName, index): -
      184 '''generate the pcr and data file in the workingDir -185 fit -- the fit object -186 rootName -- The rootName for the files, etc rootName.pcr, rootName.dat -187 index -- the index of the data in the fit to be exported -188 return the extension name for the data file -189 ''' -190 -191 tmpDir = tempfile.mkdtemp() -192 -193 patterns = fit.getObject('Pattern') -194 dataFiles = [] -195 for bid, pt in enumerate(patterns): -196 dataFilePath = fit.dumpDataFile(tmpDir, index, bid) -197 dataFiles.append(os.path.basename(dataFilePath)) -198 -199 enginefit = fit.owner.exportEngineFit(fit, index) -200 -201 # change the data file path in the engine fit -202 ef = copy.deepcopy(enginefit) -203 for bid, pattern in enumerate(ef.get('Pattern')): -204 pattern.set('Datafile', dataFiles[bid]) -205 -206 pcrFileWriter(ef, str(os.path.join(tmpDir, rootName+'.pcr')), [], 'r') -207 -208 return tmpDir -
      209 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.fitrt-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.fitrt-module.html deleted file mode 100644 index d4aa9e18..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.fitrt-module.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - diffpy.srrietveld.fitrt - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module fitrt - - - - - -
      [frames] | no frames]
      -
      - -

      Module fitrt

      source code

      - - - - - - - - - -
      - Classes
      -   - - FitRT
      - FitRT provides the runtime control of refinements. -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: fitrt.py 6626 2011-06-07 08:32:48Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - DataFile, - FPError, - GLOBALS, - GSASError, - Refinement, - SrrRunTimeError, - UTILS, - copy, - os, - printWarning, - shutil, - tempfile -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.fitrt-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.fitrt-pysrc.html deleted file mode 100644 index 95f570f2..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.fitrt-pysrc.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - - diffpy.srrietveld.fitrt - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module fitrt - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.fitrt

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou, Peng Tian, Jiwu Liu 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  __id__ = "$Id: fitrt.py 6626 2011-06-07 08:32:48Z yshang $" 
      - 16   
      - 17  import tempfile, shutil, copy, os 
      - 18  from diffpy.srrietveld.exceptions import SrrRunTimeError 
      - 19  from diffpy.refinementdata.refinement import Refinement 
      - 20  from diffpy.pyfullprof.exception import RietException as FPError 
      - 21  from diffpy.pygsas.exception import RietException as GSASError 
      - 22  from diffpy.srrietveld.gui import srrguiglobals as GLOBALS  
      - 23  from diffpy.srrietveld.utility import printWarning 
      - 24  from diffpy.srrietveld.convert.datafile import DataFile 
      - 25  import diffpy.srrietveld.utility as UTILS 
      - 26   
      -
      27 -class FitRT(object): -
      28 """FitRT provides the runtime control of refinements. It uses two basic ways - 29 to run a refinement, either step by step or finish everything by one call. - 30 - 31 Data member: - 32 - 33 fit -- a diffpy.refinementdata.Refinement object that stores a fit - 34 strategy -- a refine strategy to be applied - 35 index -- the index to a single fit (if multiple fits are saved - 36 together as an array) - 37 enginefit -- the engine fit object - 38 step -- record the refinement step - 39 tempDir -- the working folder - 40 workdingDir -- the current working directory - 41 """ -
      42 - def __init__(self, job, fit,index=None): -
      43 """ Initialization. - 44 - 45 job -- the job this fitrt belonged to - 46 fit -- a diffpy.refinementdata.Refinement object that stores a fit - 47 index -- the index to a single fit (if multiple fits are saved - 48 together as an array) - 49 """ - 50 self.fit = fit - 51 self.job = job - 52 - 53 self.index = index - 54 - 55 self.enginefit = None - 56 self.step = 0 - 57 # temp working directory - 58 self.tempDir = None - 59 # main working directory - 60 self.workingDir = os.getcwd() - 61 # the strategy may be enabled temporarily even when the global variable - 62 # is false - 63 self.isStrategyEnabled = GLOBALS.isStrategyEnabled - 64 - 65 return -
      66 -
      67 - def __setStrategy(self, isStrategyEnabled): -
      68 '''Set the strategy based on the global settings''' - 69 if isStrategyEnabled: - 70 self.strategy = copy.deepcopy(self.fit.getPyObj("Strategy")) - 71 else: - 72 self.strategy = self.fit.getOneStepStrategy() - 73 - 74 return -
      75 -
      76 - def run(self, isStrategyEnabled = False, continuous=True): -
      77 """Run the refinement according to its strategy. - 78 - 79 isStrategyEnabled -- if the strategy is enabled - 80 - 81 continuous -- run the whole refinement continuously or not - 82 - 83 return: True if the refinement finished. False if not. - 84 """ - 85 - 86 - 87 self.isStrategyEnabled = isStrategyEnabled - 88 - 89 # Prepare - 90 if self.prepare(): - 91 # FIXME: if fit is built from a exp/pcr file, dry run should be skipped - 92 try: - 93 os.chdir(self.tempDir) - 94 # fix all parameters - 95 self.enginefit.fixAll() - 96 self.enginefit.refine(cycle=5, srtype="l", - 97 mode="refine", signature=["dry", '.']) - 98 - 99 except (FPError, GSASError), e: -100 self.fit.setStatus(Refinement.ERROR, self.index) -101 self.enginefit = None -102 self.tempDir = None -103 os.chdir(self.workingDir) -104 self.clean() -105 UTILS.printWarning(e.message) -106 # in this case, do not go on. -107 return True -108 -109 GLOBALS.project.updateFit(self) -110 if not continuous: -111 return False -112 -113 else: -114 self.fit.setStatus(Refinement.ERROR, self.index) -115 self.enginefit = None -116 self.tempDir = None -117 os.chdir(self.workingDir) -118 self.clean() -119 # in this case, do not go on. -120 return True -121 -122 # Run the strategy -123 self.__setStrategy(isStrategyEnabled) -124 -125 while self.step < len(self.strategy): -126 -127 try: -128 # when refine diverges, -129 self.refineSingleStep() -130 except (FPError, GSASError), e: -131 self.fit.setStatus(Refinement.ERROR, self.index) -132 self.enginefit = None -133 self.tempDir = None -134 os.chdir(self.workingDir) -135 self.clean() -136 return True -137 -138 GLOBALS.project.updateFit(self) -139 self.step += 1 -140 -141 if not continuous: -142 break -143 -144 # Not finish yet -145 if self.step < len(self.strategy): -146 -147 os.chdir(self.workingDir) -148 return False -149 -150 self.fit.setStatus(self.fit.FINISHED, self.index) -151 -152 os.chdir(self.workingDir) -153 self.clean() -154 -155 return True -
      156 -157 #------------------------------------------------------------------------------ -158 -
      159 - def prepare(self): -
      160 """Prepare the refinement, consisting of three steps: -161 1. Check if the engine fit object is available -162 2. Create temporary folder for running -163 3. Generate the data file -164 -165 return: True if it runs sucessfully, otherwise False. -166 """ -167 #NOTE: if tempDir is created, the preparation should have been done already. -168 if self.tempDir: -169 return False -170 -171 # A. check if my engine fit is available -172 if self.enginefit is None: -173 self.enginefit = self.fit.owner.exportEngineFit(self.fit, self.index) -174 -175 # B. Backup Directory -176 self.tempDir = tempfile.mkdtemp() -177 -178 # C. Generate the datafile -179 patterns = self.fit.getObject('Pattern') -180 -181 #check the engine type -182 engineName = self.fit.getEngineType() -183 -184 # loop through all tbe patterns and dump the files into the temp folder -185 -186 for bankid, pattern in enumerate(patterns): -187 -188 ds = pattern.get('Instrumentfile') -189 if ds is not None: -190 instFilePath = self.fit.findFileFromDataset(ds, self.index) -191 else: instFilePath = None -192 -193 for param in ['Datafile', 'MFIL']: -194 # convert to gsas file -195 ds = pattern.get(param) -196 -197 if ds is None: -198 if param == "Datafile": -199 __msg = 'The data file path is not specified. ' -200 UTILS.printWarning(__msg) -201 return False -202 else: -203 continue -204 -205 filepath = self.fit.findFileFromDataset(ds, self.index) -206 -207 if filepath: -208 # get the file abs path from the rel path stored, and the base -209 # path of the fit object -210 filepath = os.path.abspath( -211 os.path.join(GLOBALS.project.basepath, -212 filepath) -213 ) -214 else: -215 if param == 'Datafile': -216 __msg = 'The data file is not found. ' -217 UTILS.printWarning(__msg) -218 return False -219 else: -220 continue -221 -222 dataFile = DataFile(filepath = filepath, engine = engineName) -223 -224 filepath = dataFile.prepDataFile(self.tempDir, -225 instFilePath) -226 -227 # the data file name may be updated, change the file name -228 # in engine fit -229 engPattern = self.enginefit.Pattern.get(bankid) -230 if hasattr(engPattern, param): -231 engPattern.set( param, os.path.basename(filepath) ) -232 else: -233 if param == "Datafile": -234 __msg = 'The data file path is not set in the engine file. ' -235 UTILS.printWarning(__msg) -236 return False -237 -238 return True -
      239 -
      240 - def clean(self): -
      241 '''Clean up after each refinement''' -242 from diffpy.srrietveld.gui.srrguiglobals import isDebug -243 if not isDebug: # only remove the tmp directories when not debugging -244 if self.tempDir: -245 from shutil import rmtree -246 from os import path -247 if path.exists(self.tempDir): -248 rmtree(self.tempDir) -249 -250 return -
      251 -
      252 - def prepareFile(self, fid, engineName, bankid = None, instFilePath = None): -
      253 """Write or move data/instrument files in running/tmp directory -254 -255 enginename -- the type of engine, can be either gsas or fullprof -256 fid -- the file id -257 bankid -- the bankid, used to convert the file format -258 instFilePath -- The instrument file path -259 -260 return the file name -261 """ -262 from hashlib import sha1 -263 #FIXME:The datafile converter does not take bank id other htan 1 so far -264 bankid = 1 -265 -266 from diffpy.srrietveld.addon.datafile import DataFileConverter as DFC -267 -268 fileList = GLOBALS.project.getObject('SourceFileList') -269 -270 fileObj = fileList.findFileByID(fid) -271 -272 # dump the file content to the tempDir with the file name saved -273 # in fileObj.fileName -274 fileObj.dump(self.tempDir) -275 -276 oldPath = os.path.join(self.tempDir, fileObj.fileName) -277 -278 # convert the fullprof type file to gsas -279 root, ext = os.path.splitext(fileObj.fileName) -280 if engineName == 'gsas': -281 -282 if ext.lower() in [".chi", ".dat", ".txt"]: -283 -284 fileName = root + '.gsa' -285 newPath = os.path.join(self.tempDir, fileName) -286 -287 #check if the file already exist -288 -289 if os.path.isfile(newPath) and \ -290 fileObj.fid == sha1(open(newPath, 'rb').read()).hexdigest(): -291 __message = "A different file with same name exist. " + \ -292 "will be replaced with the new one" -293 print __message -294 -295 dfc = DFC(oldPath) -296 # FIXME: only export the first bank? -297 dfc.toGSASFile(oldPath, newPath, bankid) -298 -299 -300 if engineName == 'fullprof': -301 fileName = root + '.dat' -302 newPath = os.path.join(self.tempDir, fileName) -303 -304 if ext.lower() in [".chi", ".gsa", ".gda", "fxye"]: -305 if instFilePath is not None: -306 instFid = sha1(open(instFilePath, 'rb').read()).hexdigest() -307 -308 if ext.lower() != '.chi' and fid != instFid: -309 __warningMsg = 'To convert GSAS data file, installation of ' + \ -310 'GSAS is needed and an instrument file is required. ' -311 -312 printWarning(__warningMsg) -313 # FIXM: convert gsas data file name to fullprof data file name -314 # search the local directory for EXP files, may implement a -315 # better algrethm -316 dfc = DFC(oldPath, instFilePath) -317 import glob -318 desfile = os.path.join(os.getcwd(), "*.EXP") -319 for fn in glob.glob(desfile): -320 expfilename = fn -321 if expfilename: -322 dfc.toFPFile(oldPath, newPath, bankid, expfilename) -323 elif ext.lower() == '.chi': -324 dfc.toFPFile(oldPath, newPath, bankid) -325 else: -326 __warningMsg = "To convert GSAS data file, GSAS is needed " + \ -327 "to be installed and an instrument file is required." + \ -328 "The gsas data file can not be converted. The refinment may " + \ -329 "not run. " -330 printWarning(__warningMsg) -331 -332 if ext.lower() not in [".chi", ".gsa", ".gda", "fxye", '.dat', '.raw']: -333 __warningMsg = 'Data file extension is not recognized. The ' + \ -334 'refinement may not run correctly. ' -335 printWarning(__warningMsg) -336 -337 return fileName -
      338 -339 -
      340 - def refineSingleStep(self): -
      341 """Refine a single step in the strategy list. -342 """ -343 import re -344 -345 # Set addlist + currenttuple -346 strategystep = copy.deepcopy(self.strategy[self.step]) -347 method, paramlist = strategystep.items()[0] -348 -349 headparam = paramlist[0][0] -350 refmsg = "\nRefinable Parameter = %-10s Over-all Step = %-5s Refine-Type = %-10s\n"% \ -351 (headparam, self.step, method) -352 refmsg += "%-10sNew Variables: \n"% ("") -353 for param in paramlist: -354 # Set constraint -355 fullpath = param[0] -356 formula = param[2] -357 self.setConstraint(fullpath, formula) -358 refmsg += "%-20s%-20s: %-20s\n"% ("", fullpath, formula) -359 print refmsg -360 -361 # Refine and Save -362 sig = str(self.step) + "_" + headparam.split(".")[-1] -363 '''Windows directory name can not include following chars: -364 < (less than)> (greater than) : (colon) " (double quote) -365 / (forward slash) \ (backslash) | (vertical bar or pipe) -366 ? (question mark) * (asterisk)''' -367 sig = sig.replace(':','.') -368 fitsummary = self.enginefit.refine(40, srtype = method.lower()[0], -369 mode = "refine", signature=[sig, '.']) -370 -371 # Screen Output -372 chi2 = fitsummary.getResidueValue(-1, residname="Chi2") -373 rwp = fitsummary.getResidueValue(-1, residname="Rwp") -374 re = fitsummary.getResidueValue(-1, residname="Re") -375 -376 print "%-10s: Chi2 = %-15s Rp = %-15s Rexp = %-15s"% (method, chi2, rwp, re) -377 print ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" -378 -379 return -
      380 -381 -
      382 - def setConstraint(self, key, formula): -
      383 """ Turn on the refinement flag for parameters -384 """ -385 fitname = key.split(".")[0] -386 key = key.replace(fitname+".", "") -387 try: -388 # Set the int value -389 newvalue = int(formula) -390 except: -391 # Set the float value -392 try: -393 newvalue = float(formula) -394 except: -395 self.enginefit.setConstraintByPath(key, formula) -396 return -397 self.enginefit.setByPath(key, newvalue) -398 return -
      399 # End Of File -400 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.fitrt.FitRT-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.fitrt.FitRT-class.html deleted file mode 100644 index b5560def..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.fitrt.FitRT-class.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - diffpy.srrietveld.fitrt.FitRT - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module fitrt :: - Class FitRT - - - - - -
      [frames] | no frames]
      -
      - -

      Class FitRT

      source code

      -
      -object --+
      -         |
      -        FitRT
      -
      - -
      -
      -FitRT provides the runtime control of refinements. It uses two basic ways
      -to run a refinement, either step by step or finish everything by one call.
      -
      -Data member:
      -
      -    fit       -- a diffpy.refinementdata.Refinement object that stores a fit
      -    strategy  -- a refine strategy to be applied
      -    index     -- the index to a single fit (if multiple fits are saved
      -                 together as an array)
      -    enginefit -- the engine fit object
      -    step      -- record the refinement step
      -    tempDir   -- the working folder
      -    workdingDir -- the current working directory
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - job, - fit, - index=None)
      - Initialization.
      - source code - -
      - -
      -   - - - - - - -
      clean(self)
      - Clean up after each refinement
      - source code - -
      - -
      -   - - - - - - -
      prepare(self)
      - Prepare the refinement, consisting of three steps:
      - source code - -
      - -
      -   - - - - - - -
      prepareFile(self, - fid, - engineName, - bankid=None, - instFilePath=None)
      - Write or move data/instrument files in running/tmp directory
      - source code - -
      - -
      -   - - - - - - -
      refineSingleStep(self)
      - Refine a single step in the strategy list.
      - source code - -
      - -
      -   - - - - - - -
      run(self, - isStrategyEnabled=False, - continuous=True)
      - Run the refinement according to its strategy.
      - source code - -
      - -
      -   - - - - - - -
      setConstraint(self, - key, - formula)
      - Turn on the refinement flag for parameters
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

      -
      - - - - - - - - - -
      - Properties
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - job, - fit, - index=None) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization.
      -
      -job       -- the job this fitrt belonged to
      -fit       -- a diffpy.refinementdata.Refinement object that stores a fit
      -index     -- the index to a single fit (if multiple fits are saved
      -             together as an array)
      -
      -
      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      prepare(self) -

      -
      source code  -
      - -

      Prepare the refinement, consisting of three steps:

      -
        -
      1. - Check if the engine fit object is available -
      2. -
      3. - Create temporary folder for running -
      4. -
      5. - Generate the data file -

        return: True if it runs sucessfully, otherwise False.

        -
      6. -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      prepareFile(self, - fid, - engineName, - bankid=None, - instFilePath=None) -

      -
      source code  -
      - -

      Write or move data/instrument files in running/tmp directory

      -

      enginename -- the type of engine, can be either gsas or fullprof fid - -- the file id bankid -- the bankid, used to convert the file format - instFilePath -- The instrument file path

      -

      return the file name

      -
      -
      -
      -
      - -
      - -
      - - -
      -

      run(self, - isStrategyEnabled=False, - continuous=True) -

      -
      source code  -
      - -

      Run the refinement according to its strategy.

      -

      isStrategyEnabled -- if the strategy is enabled

      -

      continuous -- run the whole refinement continuously or not

      -

      return: True if the refinement finished. False if not.

      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.objectinfo-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.objectinfo-module.html deleted file mode 100644 index 0793e79b..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.objectinfo-module.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - diffpy.srrietveld.objectinfo - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module objectinfo - - - - - -
      [frames] | no frames]
      -
      - -

      Module objectinfo

      source code

      -

      This module contains the definition of the ObjectInfo class.

      - - - - - - - - - - -
      - Classes
      -   - - ObjectInfo
      - ObjectInfo uses the info in the engine definition to define what is - allowed to be set in an object, namely the legal content of an - object. -
      - - - - - - - - - -
      - Functions
      -   - - - - - - -
      setObjectInfo(refinementObj)
      - Set the object info for the engine.
      - source code - -
      - -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: objectinfo.py 6718 2011-08-23 21:33:20Z yshang $' -
      -   - - __package__ = None -
      - - - - - - -
      - Function Details
      - -
      - -
      - - -
      -

      setObjectInfo(refinementObj) -

      -
      source code  -
      - -

      Set the object info for the engine.

      -
      -
      Parameters:
      -
        -
      • refinementObj (Refinement object) - the ObjectInfo will be generated and set to the refinementObj
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.objectinfo-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.objectinfo-pysrc.html deleted file mode 100644 index ae1b7ec3..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.objectinfo-pysrc.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - diffpy.srrietveld.objectinfo - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module objectinfo - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.objectinfo

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Jiwu Liu, Yingrui Shang 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """This module contains the definition of the ObjectInfo class. """ 
      - 16   
      - 17  __id__ = "$Id: objectinfo.py 6718 2011-08-23 21:33:20Z yshang $" 
      - 18   
      -
      19 -class ObjectInfo: -
      20 """ - 21 ObjectInfo uses the info in the engine definition to define what is allowed - 22 to be set in an object, namely the legal content of an object. - 23 """ -
      24 - def __init__(self, cls=None): -
      25 '''Initialization. - 26 - 27 @type cls: an engine class - 28 @param cls: the class of the engine fit object - 29 @return: no value - 30 ''' - 31 self.cls = cls - 32 return -
      33 -
      34 - def listParams(self): -
      35 """ - 36 List all the parameters that can be refined by the engine. - 37 - 38 @return: a list of refinable parameter names - 39 """ - 40 params = [] - 41 if self.cls is None: - 42 return params - 43 for name, info in self.cls.ParamDict.items(): - 44 if info.__class__.__name__ == 'RefineInfo': - 45 params.append(name) - 46 for name, info in self.cls.ParamListDict.items(): - 47 if info.__class__.__name__ == 'RefineInfo': - 48 params.append(name) - 49 - 50 return params -
      51 -
      52 - def getDescription(self, paramname): -
      53 """ - 54 Get the description of a parameter. - 55 - 56 @type paramname: string - 57 @param paramname: parameter name - 58 @return: a string to describe the parameter - 59 """ - 60 if paramname in self.cls.ParamDict: - 61 return self.cls.ParamDict[paramname].description - 62 if paramname in self.cls.ParamListDict: - 63 return self.cls.ParamListDict[paramname].description - 64 - 65 return '' -
      66 -
      67 - def get(self,paramname): -
      68 """ - 69 Get the full info of a parameter. - 70 - 71 @type paramname: string - 72 @param paramname: parameter name - 73 @return: an Info object defined in the engine. - 74 """ - 75 if paramname in self.cls.ParamDict: - 76 return self.cls.ParamDict[paramname] - 77 if paramname in self.cls.ParamListDict: - 78 return self.cls.ParamListDict[paramname] - 79 - 80 return None -
      81 -
      82 -def setObjectInfo(refinementObj): -
      83 """ - 84 Set the object info for the engine. - 85 - 86 @type refinementObj: Refinement object - 87 @param refinementObj: the ObjectInfo will be generated and set to the - 88 refinementObj - 89 @return: no return value - 90 """ - 91 try: - 92 engineclassname = refinementObj.getAttr('rietveldcls') - 93 modulename, classname = engineclassname.rsplit('.', 1) - 94 module = __import__(modulename, globals(), locals(), [classname], -1) - 95 engineclass = getattr(module, classname) - 96 refinementObj.info = ObjectInfo(engineclass) - 97 except (ImportError, AttributeError, ValueError): - 98 refinementObj.info = ObjectInfo() - 99 -100 for myobjchild in refinementObj.objects: -101 setObjectInfo(myobjchild) -102 -103 return -
      104 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.objectinfo.ObjectInfo-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.objectinfo.ObjectInfo-class.html deleted file mode 100644 index 529912d2..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.objectinfo.ObjectInfo-class.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - diffpy.srrietveld.objectinfo.ObjectInfo - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module objectinfo :: - Class ObjectInfo - - - - - -
      [frames] | no frames]
      -
      - -

      Class ObjectInfo

      source code

      -

      ObjectInfo uses the info in the engine definition to define what is - allowed to be set in an object, namely the legal content of an - object.

      - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - cls=None)
      - Initialization.
      - source code - -
      - -
      -   - - - - - - -
      get(self, - paramname)
      - Get the full info of a parameter.
      - source code - -
      - -
      -   - - - - - - -
      getDescription(self, - paramname)
      - Get the description of a parameter.
      - source code - -
      - -
      -   - - - - - - -
      listParams(self)
      - List all the parameters that can be refined by the engine.
      - source code - -
      - -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - cls=None) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization.

      -
      -
      Parameters:
      -
        -
      • cls (an engine class) - the class of the engine fit object
      • -
      -
      Returns:
      -
      no value
      -
      -
      -
      - -
      - -
      - - -
      -

      get(self, - paramname) -

      -
      source code  -
      - -

      Get the full info of a parameter.

      -
      -
      Parameters:
      -
        -
      • paramname (string) - parameter name
      • -
      -
      Returns:
      -
      an Info object defined in the engine.
      -
      -
      -
      - -
      - -
      - - -
      -

      getDescription(self, - paramname) -

      -
      source code  -
      - -

      Get the description of a parameter.

      -
      -
      Parameters:
      -
        -
      • paramname (string) - parameter name
      • -
      -
      Returns:
      -
      a string to describe the parameter
      -
      -
      -
      - -
      - -
      - - -
      -

      listParams(self) -

      -
      source code  -
      - -

      List all the parameters that can be refined by the engine.

      -
      -
      Returns:
      -
      a list of refinable parameter names
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.paramnames-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.paramnames-module.html deleted file mode 100644 index 2211a903..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.paramnames-module.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - diffpy.srrietveld.paramnames - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module paramnames - - - - - -
      [frames] | no frames]
      -
      - -

      Module paramnames

      source code

      -

      This module contains the parameter name mapping for GSAS and FullProf - The key is the access name of the parameters, and the value is the path - of the parameter, from the logic parent object.

      - - - - - - - - - - - - - - - - -
      - Variables
      -   - - PARAMNAMES = {'fullprof': {'Biso': 'AtomicDisplacementFactor.B... -
      -   - - __id__ = '$Id: paramnames.py 6728 2011-08-26 21:54:11Z yshang $' -
      -   - - __package__ = None -
      - - - - - - -
      - Variables Details
      - -
      - -
      -

      PARAMNAMES

      - -
      -
      -
      -
      Value:
      -
      -{'fullprof': {'Biso': 'AtomicDisplacementFactor.Biso',
      -              'Rp': 'Rp',
      -              'Rwp': 'Rwp',
      -              'Tmax': 'Thmin',
      -              'Tmin': 'Thmax',
      -              'Uiso': 'AtomicDisplacementFactor.Uiso',
      -              'X': 'X',
      -              'Y': 'Y',
      -...
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.paramnames-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.paramnames-pysrc.html deleted file mode 100644 index a3db8d46..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.paramnames-pysrc.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - diffpy.srrietveld.paramnames - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module paramnames - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.paramnames

      -
      -  1  #!/usr/bin/env python 
      -  2  ######################################################################## 
      -  3  # 
      -  4  # diffpy.refinementdata - by DANSE Diffraction group 
      -  5  #                         Simon J. L. Billinge 
      -  6  #                         (c) 2009 Trustees of the Columbia University 
      -  7  #                         in the City of New York. All rights reserved. 
      -  8  # 
      -  9  # File coded by:   Yingrui Shang 
      - 10  # 
      - 11  # See AUTHORS.txt for a list of people who contributed. 
      - 12  # See LICENSE.txt for license information. 
      - 13  # 
      - 14  ######################################################################## 
      - 15   
      - 16  ''' 
      - 17  This module contains the parameter name mapping for GSAS and FullProf 
      - 18  The key is the access name of the parameters, and the value is the path of the  
      - 19  parameter, from the logic parent object. 
      - 20   
      - 21  ''' 
      - 22   
      - 23  # module version 
      - 24  __id__ = '$Id: paramnames.py 6728 2011-08-26 21:54:11Z yshang $' 
      - 25   
      - 26  PARAMNAMES = { 
      - 27      'gsas':{ 
      - 28              #params under refinement 
      - 29              'chi2':'Chi2', 
      - 30              'ncycle':'NCY', 
      - 31              #params under phase 
      - 32              'spacegroup':'Spacegroup', 
      - 33              'a':'a', 
      - 34              'b':'b', 
      - 35              'c':'c', 
      - 36              'alpha':'alpha', 
      - 37              'beta':'beta', 
      - 38              'gamma':'gamma', 
      - 39              #params under pattern 
      - 40              'datafile':'Datafile', 
      - 41              'datafile_absolute':'Datafile_abspath', 
      - 42              'zero':'ZERO', 
      - 43              'scale':'HSCALE', 
      - 44              'lambda':'LAM1', 
      - 45              'lambda1':'LAM1', 
      - 46              'lambda2':'LAM2', 
      - 47              'Rp':'Rp', 
      - 48              'Rwp':'Rwp', 
      - 49              'ratio':'KRATIO', 
      - 50              'step':'Step', 
      - 51              'Tmin':'TMIN', 
      - 52              'Tmax':'TMAX', 
      - 53              'polar':'POLA', 
      - 54              'polar_type':'IPOLA', 
      - 55              'background_type':'BTYP', 
      - 56              'background_coefficients':'Background.BACK', 
      - 57              'used':'ISUSED', 
      - 58              'xobs':'xobs', 
      - 59              'yobs':'yobs', 
      - 60              'ycal':'ycal', 
      - 61              'excluded_region':'ExcludedRegion', 
      - 62              #params under exluded region 
      - 63              'begin':'begin', 
      - 64              'end':'end', 
      - 65              #params under profile 
      - 66              'cut_off':'Cutoff', 
      - 67              'profile_type':'PTYP', 
      - 68              'profile_parameters':'Parameters', 
      - 69              #params under atom 
      - 70              'name':'Name', 
      - 71              'type':'Typ', 
      - 72              'occupation':'occ', 
      - 73              'X':'X', 
      - 74              'Y':'Y', 
      - 75              'Z':'Z', 
      - 76              'Uiso':'AtomicDisplacementFactor.Uiso', 
      - 77              'Biso':'AtomicDisplacementFactor.Biso', 
      - 78               
      - 79      }, 
      - 80      'fullprof':{ 
      - 81              #params under refinement 
      - 82              'chi2':'Chi2', 
      - 83              'ncycle':'NCY', 
      - 84              #params under phase 
      - 85              'space_group':'Spacegroup', 
      - 86              'a':'a', 
      - 87              'b':'b', 
      - 88              'c':'c', 
      - 89              'alpha':'alpha', 
      - 90              'beta':'beta', 
      - 91              'gamma':'gamma', 
      - 92              #params under pattern 
      - 93              'data_file':'Datafile', 
      - 94              'data_file_absolute':'Datafile_abspath', 
      - 95              'zero':'Zero', 
      - 96              'scale':'Scale', 
      - 97              'lambda':'Lambda', 
      - 98              'lambda1':'Lambda1', 
      - 99              'lambda2':'Lambda2', 
      -100              'step':'Step', 
      -101              'ratio':'Ratio', 
      -102              'Rp':'Rp', 
      -103              'Rwp':'Rwp', 
      -104              'Tmin':'Thmax', 
      -105              'Tmax':'Thmin', 
      -106              'polar':'LPFactor.Rpolarz', 
      -107              'polar_type':'LPFactor.Ilo', 
      -108              'background_type':'Nba', 
      -109              'background_coefficients':'Background.BCK', 
      -110              'used':'ISUSED', 
      -111              'xobs':'xobs', 
      -112              'yobs':'yobs', 
      -113              'ycal':'ycal', 
      -114              'excluded_region':'ExcludedRegion', 
      -115              #params under exluded region 
      -116              'begin':'begin', 
      -117              'end':'end', 
      -118              #params under profile 
      -119              'cut_off':'Wdt', 
      -120              'profile_type':'Npr', 
      -121              'profile_parameters':'Parameters', 
      -122              #params under atom 
      -123              'name':'Name', 
      -124              'type':'Typ', 
      -125              'occupation':'occ', 
      -126              'X':'X', 
      -127              'Y':'Y', 
      -128              'Z':'Z', 
      -129              'Uiso':'AtomicDisplacementFactor.Uiso', 
      -130              'Biso':'AtomicDisplacementFactor.Biso', 
      -131      } 
      -132  } 
      -133   
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern-module.html deleted file mode 100644 index c4203db7..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern-module.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - diffpy.srrietveld.pattern - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module pattern - - - - - -
      [frames] | no frames]
      -
      - -

      Module pattern

      source code

      -

      This package contains the Pattern class in SrRietveld, which is an - script interface to access the structure information

      - - - - - - - - - - - - - -
      - Classes
      -   - - ExcludedRegion
      - This is a script interface of the excluded region, with access - functions to the begin and end parameters in the object -
      -   - - Pattern
      - Pattern inherits the Pattern class in diffpy.refinementdata. -
      - - - - - - - - - - - - - - - -
      - Variables
      -   - - PARAMNAMES = {'fullprof': {'Biso': 'AtomicDisplacementFactor.B... -
      -   - - __id__ = '$Id: pattern.py 6727 2011-08-26 21:53:10Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - BasePattern, - Refinable -


      - - - - - - -
      - Variables Details
      - -
      - -
      -

      PARAMNAMES

      - -
      -
      -
      -
      Value:
      -
      -{'fullprof': {'Biso': 'AtomicDisplacementFactor.Biso',
      -              'Rp': 'Rp',
      -              'Rwp': 'Rwp',
      -              'Tmax': 'Thmin',
      -              'Tmin': 'Thmax',
      -              'Uiso': 'AtomicDisplacementFactor.Uiso',
      -              'X': 'X',
      -              'Y': 'Y',
      -...
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern-pysrc.html deleted file mode 100644 index 30e80f66..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern-pysrc.html +++ /dev/null @@ -1,886 +0,0 @@ - - - - - diffpy.srrietveld.pattern - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module pattern - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.pattern

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Yingrui Shang 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15  This package contains the Pattern class in SrRietveld, which is an script interface 
      - 16  to access the structure information 
      - 17  """ 
      - 18   
      - 19  __id__ = "$Id: pattern.py 6727 2011-08-26 21:53:10Z yshang $" 
      - 20   
      - 21  from diffpy.refinementdata.pattern import Pattern as BasePattern 
      - 22  from diffpy.refinementdata.refinable import Refinable 
      - 23  from diffpy.srrietveld.paramnames import PARAMNAMES 
      - 24   
      -
      25 -class Pattern(BasePattern): -
      26 """ - 27 Pattern inherits the Pattern class in diffpy.refinementdata. Its basic - 28 data is the array of 2theta, time of flight, intensity, error. It may not - 29 have a list of parameters. It may have a file object which stores the original - 30 data. - 31 - 32 data member: - 33 - 34 xobs: the observed data - 35 yobs: the observed y data - 36 ycal: the refined y data - 37 refl: the reflection list - 38 srcfiles: the source files, including data files and source files - 39 """ - 40 - 41 -
      42 - def __init__(self, owner, name=None, handle=None, shape=None): -
      43 """Initialization - 44 - 45 @type owner: a data project - 46 @param owner: the owner, which is usually a refinement. - 47 @type name: string - 48 @param name the name of the pattern - 49 @type handle: a HDF5Handle object - 50 @param handle: a HDF5Handle pointing to the underlying HDF5 node. - 51 - 52 A name is passed to the initialization method when creating a node. - 53 - 54 A handle is passed to the inialization method in two cases: - 55 1. when loading from a HDF5 file; - 56 2. when creating a HDF5 file but the object is a hard link to - 57 a preexisiting one. - 58 - 59 In the case when both name and handle are given, name will be simply ignored. - 60 In the case when neither name nor handle is given, an exception will be raised. - 61 - 62 Usually in the scripting interface, users do not have to worry about the - 63 initialization - 64 """ - 65 BasePattern.__init__(self, owner, name, handle, shape) - 66 - 67 return -
      68 -
      69 - def getAbsoluteDataFile(self): -
      70 ''' - 71 Get the absolute data file path - 72 - 73 @return: the absolute data path strings - 74 ''' - 75 return self.getByPath(PARAMNAMES[self.getEngineType()]['data_file_absolute']) -
      76 -
      77 - def getBackgroundCoefficients(self): -
      78 ''' - 79 Get the background coefficients in a two dimensional array - 80 - 81 @return: the background coefficient values in a two dimensional array - 82 ''' - 83 return self.getByPath(PARAMNAMES[self.getEngineType()]['background_coefficients']) -
      84 -
      86 ''' - 87 Get the background coefficients standard deviations in a two dimensional array - 88 - 89 @return: the background coefficient standard deviations in a two dimensional array - 90 ''' - 91 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]['background_coefficients']) -
      92 -
      93 - def getBackgroundType(self): -
      94 ''' - 95 Get the background type identification number. This number has different - 96 meanings in engines. - 97 - 98 @return: an integer represent the type of the background function - 99 ''' -100 return self.getByPath(PARAMNAMES[self.getEngineType()]['background_type']).first() -
      101 -
      102 - def getDataFile(self): -
      103 ''' -104 Get the path of the data file. -105 -106 @return: the data path strings -107 ''' -108 return self.getByPath(PARAMNAMES[self.getEngineType()]['data_file']) -
      109 -
      110 - def getEngineType(self): -
      111 '''Get the engine type for this refinement -112 -113 @return: the string of the engine type, for example I{"gsas"} or I{"fullprof"}''' -114 -115 return self.owner.owner.getEngineType() -
      116 -
      117 - def getPolarType(self): -
      118 ''' -119 Get the polarization type id numbers. These numbers have different meanings -120 in different engine files, please refer to the manual of the refinement engine. -121 -122 @return: the Tmin of the pattern as float -123 ''' -124 return self.getByPath(PARAMNAMES[self.getEngineType()]['polar_type']) -
      125 -
      126 - def getLambda(self): -
      127 ''' -128 Get the refined wavelength value. In FullProf, there can be only one -129 lambda value can be refined -130 -131 @return: the values of wavelength in angstroms -132 ''' -133 return self.getByPath(PARAMNAMES[self.getEngineType()]['lambda']) -
      134 -
      135 - def getLambdaSigma(self): -
      136 ''' -137 Get the refined wavelength standard deviation. In FullProf, there can be only one -138 lambda value can be refined -139 -140 @return: the wavelength standard deviation -141 ''' -142 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]['lambda']) -
      143 -
      144 - def getLambda1(self): -
      145 ''' -146 Get the first wavelength value -147 -148 @return: the values of the wavelength in angstroms -149 ''' -150 return self.getByPath(PARAMNAMES[self.getEngineType()]['lambda1']) -
      151 -
      152 - def getLambda1Sigma(self): -
      153 ''' -154 Get the first wavelength standard deviation -155 -156 @return: the wavelength standard deviation -157 ''' -158 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]['lambda1']) -
      159 -
      160 - def getLambda2(self): -
      161 ''' -162 Get the second wavelength value -163 -164 @return: the values of the wavelength in angstroms -165 ''' -166 return self.getByPath(PARAMNAMES[self.getEngineType()]['lambda2']) -
      167 -
      168 - def getLambda2Sigma(self): -
      169 ''' -170 Get the second wavelength standard deviation -171 -172 @return: the wavelength standard deviation -173 ''' -174 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]['lambda2']) -
      175 -
      177 ''' -178 Get the number of background coefficients. This is number is from the -179 dimensions of the background coefficients array -180 -181 @return: the number of background coefficients -182 ''' -183 return len(self.getBackgroundCoefficients()[0]) -
      184 -
      185 - def getPolar(self): -
      186 ''' -187 Get the polarization factors -188 -189 @return: the polarization factors -190 ''' -191 return self.getByPath(PARAMNAMES[self.getEngineType()]['polar']) -
      192 -
      193 - def getRp(self): -
      194 ''' -195 Get the Rp value of the refinement list -196 -197 @return: the values of Rp -198 ''' -199 return self.getByPath(PARAMNAMES[self.getEngineType()]['Rp']) -
      200 -
      201 - def getRwp(self): -
      202 ''' -203 Get the Rwp value of the refinement list -204 -205 @return: the values of Rwp -206 ''' -207 return self.getByPath(PARAMNAMES[self.getEngineType()]['Rwp']) -
      208 -
      209 - def getRatio(self): -
      210 ''' -211 Get the ratio value of the refinement list. These values are read from -212 the engine files, and not calculated in SrRietveld. -213 -214 @return: the values of ratios of intensities of lambda2 / lambda1 -215 ''' -216 return self.getByPath(PARAMNAMES[self.getEngineType()]['ratio']) -
      217 -
      218 - def getScale(self): -
      219 ''' -220 Get the scale factor of the pattern -221 -222 @return: the scale factor of the pattern as float -223 ''' -224 return self.getByPath(PARAMNAMES[self.getEngineType()]['scale']) -
      225 -
      226 - def getScaleSigma(self): -
      227 ''' -228 Get the scale factor standard deviation -229 -230 @return: the scale factor standard deviation -231 ''' -232 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]['scale']) -
      233 -
      234 - def getStep(self): -
      235 ''' -236 Get the step values -237 -238 @return: the step sizes -239 ''' -240 return self.getByPath(PARAMNAMES[self.getEngineType()]['step']) -
      241 -
      242 - def getTmin(self): -
      243 ''' -244 Get the Tmin of the pattern -245 -246 @return: the Tmin of the pattern as float -247 ''' -248 return self.getByPath(PARAMNAMES[self.getEngineType()]['Tmin']) -
      249 -
      250 - def getUseFlag(self): -
      251 ''' -252 Get the use flag of this pattern. In GSAS a histogram can be flagged as -253 used (True) or unused (False). The pattern will be included in the -254 refinement only if its used. The pattern will always be used in a -255 FullProf refinement. -256 -257 @return: the use flags (boolean) of this pattern in refinements -258 ''' -259 return self.getByPath(PARAMNAMES[self.getEngineType()]['used']) -
      260 -
      261 - def getTmax(self): -
      262 ''' -263 Get the Tmax of the pattern -264 -265 @return: the Tmax of the pattern as float -266 ''' -267 return self.getByPath(PARAMNAMES[self.getEngineType()]['Tmax']) -
      268 -
      269 - def getXobs(self): -
      270 ''' -271 Get the observed x axis points. This parameters is only available after -272 the refinement is complete. -273 -274 @return: a multi-dimensional array with the x axis points. -275 ''' -276 return self.getByPath(PARAMNAMES[self.getEngineType()]['xobs']) -
      277 -
      278 - def getYobs(self): -
      279 ''' -280 Get the observed y values. This parameters is only available after -281 the refinement is complete. -282 -283 @return: a multi-dimensional array with the observed y values. -284 ''' -285 return self.getByPath(PARAMNAMES[self.getEngineType()]['yobs']) -
      286 -
      287 - def getYcal(self): -
      288 ''' -289 Get the calculated y values. This parameters is only available after -290 the refinement is complete. -291 -292 @return: a multi-dimensional array with the calculated y values. -293 ''' -294 return self.getByPath(PARAMNAMES[self.getEngineType()]['ycal']) -
      295 -
      296 - def getZero(self): -
      297 ''' -298 Get the zero shift value for this pattern -299 -300 @return: the zero shift value as float -301 ''' -302 return self.getByPath(PARAMNAMES[self.getEngineType()]['zero']) -
      303 -
      304 - def getZeroSigma(self): -
      305 ''' -306 Get the zero shift standard deviation -307 -308 @return: the zero shift standard deviation -309 ''' -310 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]['zero']) -
      311 -
      312 - def listExcludedRegions(self): -
      313 ''' -314 Get the excluded regions as list -315 ''' -316 return [obj for obj in self.listObjects(recursively = True) if obj.name.startswith('ExcludedRegion[')] -
      317 -
      318 -class ExcludedRegion(Refinable): -
      319 ''' -320 This is a script interface of the excluded region, with access functions to -321 the begin and end parameters in the object -322 ''' -
      323 - def __init__(self, owner, name=None, handle=None, formula=None, variables=None, shape=None): -
      324 """Initialization. -325 -326 @type owner: a data project -327 @param owner: the owner, which is usually a refinement. -328 @type name: string -329 @param name the name of the pattern -330 @type handle: a HDF5Handle object -331 @param handle: a HDF5Handle pointing to the underlying HDF5 node. -332 @type formula: string -333 @param formula: a string of the function definition in C style -334 @type variables: a space separated string -335 @param variables: a space separated string of all variables -336 -337 A name is passed to the initialization method when creating a node. -338 -339 A handle is passed to the inialization method in two cases: -340 1. when loading from a HDF5 file; -341 2. when creating a HDF5 file but the object is a hard link to -342 a preexisiting one. -343 -344 In the case when both name and handle are given, name will be simply ignored. -345 In the case when neither name nor handle is given, an exception will be raised. -346 -347 Generally, in the scripting interface, users do not have to call this -348 constructor directly -349 """ -350 Refinable.__init__(self, owner, name, handle, shape) -351 return -
      352 -
      353 - def getBegin(self): -
      354 ''' -355 Get the begin values of the excluded region -356 -357 @return: begin values -358 ''' -359 return self.getByPath(PARAMNAMES[self.getEngineType()]["begin"]) -
      360 -
      361 - def getEnd(self): -
      362 ''' -363 Get the end values of the excluded region -364 -365 @return: end values -366 ''' -367 return self.getByPath(PARAMNAMES[self.getEngineType()]["end"]) -
      368 -369 -
      370 - def getEngineType(self): -
      371 '''Get the engine type for this refinement -372 -373 @return: the string of the engine type, for example I{"gsas"} or I{"fullprof"}''' -374 -375 return self.owner.owner.getEngineType() -
      376 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern.ExcludedRegion-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern.ExcludedRegion-class.html deleted file mode 100644 index e808a1e9..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern.ExcludedRegion-class.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - diffpy.srrietveld.pattern.ExcludedRegion - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module pattern :: - Class ExcludedRegion - - - - - -
      [frames] | no frames]
      -
      - -

      Class ExcludedRegion

      source code

      -
      -                       object --+        
      -                                |        
      -refinementdata.hdf5.object.Object --+    
      -                                    |    
      -   refinementdata.refinable.Refinable --+
      -                                        |
      -                                       ExcludedRegion
      -
      - -
      -

      This is a script interface of the excluded region, with access - functions to the begin and end parameters in the object

      - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - owner, - name=None, - handle=None, - formula=None, - variables=None, - shape=None)
      - Initialization.
      - source code - -
      - -
      -   - - - - - - -
      getBegin(self)
      - Get the begin values of the excluded region
      - source code - -
      - -
      -   - - - - - - -
      getEnd(self)
      - Get the end values of the excluded region
      - source code - -
      - -
      -   - - - - - - -
      getEngineType(self)
      - Get the engine type for this refinement
      - source code - -
      - -
      -

      Inherited from refinementdata.refinable.Refinable: - addHistory, - addHistoryByPath, - addSigma, - addSigmaByPath, - findRefinement, - getHistory, - getHistoryByPath, - getSigma, - getSigmaByPath, - listHistories, - listRefined, - loadLocalObjects, - removeHistory, - update -

      -

      Inherited from refinementdata.hdf5.object.Object: - addObject, - copy, - copyMeta, - delete, - exportFile, - get, - getAttr, - getByPath, - getFlatIndex, - getMetaData, - getMultiDimIndex, - getObject, - getPyObj, - hasAttr, - hasMeta, - importFile, - isDescendant, - list, - listAttrs, - listNames, - listObjects, - load, - loadLocalData, - loadObject, - move, - range, - readStr, - removeObject, - rename, - repeat, - replicate, - reshape, - save, - set, - setAttr, - setByPath, - setLabels, - setPyObj, - unset, - unsetAttr, - writeStr -

      -

      Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

      -
      - - - - - - - - - -
      - Properties
      -

      Inherited from refinementdata.hdf5.object.Object: - labels, - name, - ndim, - path -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - owner, - name=None, - handle=None, - formula=None, - variables=None, - shape=None) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization.

      -
      -
      Parameters:
      -
        -
      • owner (a data project) - the owner, which is usually a refinement.
      • -
      • handle (a HDF5Handle object) - a HDF5Handle pointing to the underlying HDF5 node.
      • -
      • formula (string) - a string of the function definition in C style
      • -
      • variables (a space separated string) - a space separated string of all variables -

        A name is passed to the initialization method when creating a - node.

        -

        A handle is passed to the inialization method in two - cases:

        -
          -
        1. - when loading from a HDF5 file; -
        2. -
        3. - when creating a HDF5 file but the object is a hard link to a - preexisiting one. -
        4. -
        -

        In the case when both name and handle are given, name will be - simply ignored. In the case when neither name nor handle is - given, an exception will be raised.

        -

        Generally, in the scripting interface, users do not have to - call this constructor directly

      • -
      • name (string @param name the name of the pattern)
      • -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getBegin(self) -

      -
      source code  -
      - -

      Get the begin values of the excluded region

      -
      -
      Returns:
      -
      begin values
      -
      -
      -
      - -
      - -
      - - -
      -

      getEnd(self) -

      -
      source code  -
      - -

      Get the end values of the excluded region

      -
      -
      Returns:
      -
      end values
      -
      -
      -
      - -
      - -
      - - -
      -

      getEngineType(self) -

      -
      source code  -
      - -

      Get the engine type for this refinement

      -
      -
      Returns:
      -
      the string of the engine type, for example - "gsas" or "fullprof"
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern.Pattern-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern.Pattern-class.html deleted file mode 100644 index bcfdb916..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.pattern.Pattern-class.html +++ /dev/null @@ -1,1466 +0,0 @@ - - - - - diffpy.srrietveld.pattern.Pattern - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module pattern :: - Class Pattern - - - - - -
      [frames] | no frames]
      -
      - -

      Class Pattern

      source code

      -
      -                       object --+            
      -                                |            
      -refinementdata.hdf5.object.Object --+        
      -                                    |        
      -   refinementdata.refinable.Refinable --+    
      -                                        |    
      -           refinementdata.pattern.Pattern --+
      -                                            |
      -                                           Pattern
      -
      - -
      -
      -
      -Pattern inherits the Pattern class in diffpy.refinementdata. Its basic 
      -data is the array of 2theta, time of flight, intensity, error. It may not 
      -have a list of parameters. It may have a file object which stores the original 
      -data. 
      -
      -data member:
      -    
      -    xobs: the observed data
      -    yobs: the observed y data
      -    ycal: the refined y data
      -    refl: the reflection list
      -    srcfiles: the source files, including data files and source files 
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - owner, - name=None, - handle=None, - shape=None)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      getAbsoluteDataFile(self)
      - Get the absolute data file path
      - source code - -
      - -
      -   - - - - - - -
      getBackgroundCoefficients(self)
      - Get the background coefficients in a two dimensional array
      - source code - -
      - -
      -   - - - - - - -
      getBackgroundCoefficientsSigma(self)
      - Get the background coefficients standard deviations in a two - dimensional array
      - source code - -
      - -
      -   - - - - - - -
      getBackgroundType(self)
      - Get the background type identification number.
      - source code - -
      - -
      -   - - - - - - -
      getDataFile(self)
      - Get the path of the data file.
      - source code - -
      - -
      -   - - - - - - -
      getEngineType(self)
      - Get the engine type for this refinement
      - source code - -
      - -
      -   - - - - - - -
      getLambda(self)
      - Get the refined wavelength value.
      - source code - -
      - -
      -   - - - - - - -
      getLambda1(self)
      - Get the first wavelength value
      - source code - -
      - -
      -   - - - - - - -
      getLambda1Sigma(self)
      - Get the first wavelength standard deviation
      - source code - -
      - -
      -   - - - - - - -
      getLambda2(self)
      - Get the second wavelength value
      - source code - -
      - -
      -   - - - - - - -
      getLambda2Sigma(self)
      - Get the second wavelength standard deviation
      - source code - -
      - -
      -   - - - - - - -
      getLambdaSigma(self)
      - Get the refined wavelength standard deviation.
      - source code - -
      - -
      -   - - - - - - -
      getNumOfBackgroundCoefficients(self)
      - Get the number of background coefficients.
      - source code - -
      - -
      -   - - - - - - -
      getPolar(self)
      - Get the polarization factors
      - source code - -
      - -
      -   - - - - - - -
      getPolarType(self)
      - Get the polarization type id numbers.
      - source code - -
      - -
      -   - - - - - - -
      getRatio(self)
      - Get the ratio value of the refinement list.
      - source code - -
      - -
      -   - - - - - - -
      getRp(self)
      - Get the Rp value of the refinement list
      - source code - -
      - -
      -   - - - - - - -
      getRwp(self)
      - Get the Rwp value of the refinement list
      - source code - -
      - -
      -   - - - - - - -
      getScale(self)
      - Get the scale factor of the pattern
      - source code - -
      - -
      -   - - - - - - -
      getScaleSigma(self)
      - Get the scale factor standard deviation
      - source code - -
      - -
      -   - - - - - - -
      getStep(self)
      - Get the step values
      - source code - -
      - -
      -   - - - - - - -
      getTmax(self)
      - Get the Tmax of the pattern
      - source code - -
      - -
      -   - - - - - - -
      getTmin(self)
      - Get the Tmin of the pattern
      - source code - -
      - -
      -   - - - - - - -
      getUseFlag(self)
      - Get the use flag of this pattern.
      - source code - -
      - -
      -   - - - - - - -
      getXobs(self)
      - Get the observed x axis points.
      - source code - -
      - -
      -   - - - - - - -
      getYcal(self)
      - Get the calculated y values.
      - source code - -
      - -
      -   - - - - - - -
      getYobs(self)
      - Get the observed y values.
      - source code - -
      - -
      -   - - - - - - -
      getZero(self)
      - Get the zero shift value for this pattern
      - source code - -
      - -
      -   - - - - - - -
      getZeroSigma(self)
      - Get the zero shift standard deviation
      - source code - -
      - -
      -   - - - - - - -
      listExcludedRegions(self)
      - Get the excluded regions as list
      - source code - -
      - -
      -

      Inherited from refinementdata.pattern.Pattern: - get, - loadLocalData, - set -

      -

      Inherited from refinementdata.refinable.Refinable: - addHistory, - addHistoryByPath, - addSigma, - addSigmaByPath, - findRefinement, - getHistory, - getHistoryByPath, - getSigma, - getSigmaByPath, - listHistories, - listRefined, - loadLocalObjects, - removeHistory, - update -

      -

      Inherited from refinementdata.hdf5.object.Object: - addObject, - copy, - copyMeta, - delete, - exportFile, - getAttr, - getByPath, - getFlatIndex, - getMetaData, - getMultiDimIndex, - getObject, - getPyObj, - hasAttr, - hasMeta, - importFile, - isDescendant, - list, - listAttrs, - listNames, - listObjects, - load, - loadObject, - move, - range, - readStr, - removeObject, - rename, - repeat, - replicate, - reshape, - save, - setAttr, - setByPath, - setLabels, - setPyObj, - unset, - unsetAttr, - writeStr -

      -

      Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

      -
      - - - - - - - - - -
      - Properties
      -

      Inherited from refinementdata.hdf5.object.Object: - labels, - name, - ndim, - path -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - owner, - name=None, - handle=None, - shape=None) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization

      -
      -
      Parameters:
      -
        -
      • owner (a data project) - the owner, which is usually a refinement.
      • -
      • handle (a HDF5Handle object) - a HDF5Handle pointing to the underlying HDF5 node. -

        A name is passed to the initialization method when creating a - node.

        -

        A handle is passed to the inialization method in two - cases:

        -
          -
        1. - when loading from a HDF5 file; -
        2. -
        3. - when creating a HDF5 file but the object is a hard link to a - preexisiting one. -
        4. -
        -

        In the case when both name and handle are given, name will be - simply ignored. In the case when neither name nor handle is - given, an exception will be raised.

        -

        Usually in the scripting interface, users do not have to worry - about the initialization

      • -
      • name (string @param name the name of the pattern)
      • -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getAbsoluteDataFile(self) -

      -
      source code  -
      - -

      Get the absolute data file path

      -
      -
      Returns:
      -
      the absolute data path strings
      -
      -
      -
      - -
      - -
      - - -
      -

      getBackgroundCoefficients(self) -

      -
      source code  -
      - -

      Get the background coefficients in a two dimensional array

      -
      -
      Returns:
      -
      the background coefficient values in a two dimensional array
      -
      -
      -
      - -
      - -
      - - -
      -

      getBackgroundCoefficientsSigma(self) -

      -
      source code  -
      - -

      Get the background coefficients standard deviations in a two - dimensional array

      -
      -
      Returns:
      -
      the background coefficient standard deviations in a two - dimensional array
      -
      -
      -
      - -
      - -
      - - -
      -

      getBackgroundType(self) -

      -
      source code  -
      - -

      Get the background type identification number. This number has - different meanings in engines.

      -
      -
      Returns:
      -
      an integer represent the type of the background function
      -
      -
      -
      - -
      - -
      - - -
      -

      getDataFile(self) -

      -
      source code  -
      - -

      Get the path of the data file.

      -
      -
      Returns:
      -
      the data path strings
      -
      -
      -
      - -
      - -
      - - -
      -

      getEngineType(self) -

      -
      source code  -
      - -

      Get the engine type for this refinement

      -
      -
      Returns:
      -
      the string of the engine type, for example - "gsas" or "fullprof"
      -
      -
      -
      - -
      - -
      - - -
      -

      getLambda(self) -

      -
      source code  -
      - -

      Get the refined wavelength value. In FullProf, there can be only one - lambda value can be refined

      -
      -
      Returns:
      -
      the values of wavelength in angstroms
      -
      -
      -
      - -
      - -
      - - -
      -

      getLambda1(self) -

      -
      source code  -
      - -

      Get the first wavelength value

      -
      -
      Returns:
      -
      the values of the wavelength in angstroms
      -
      -
      -
      - -
      - -
      - - -
      -

      getLambda1Sigma(self) -

      -
      source code  -
      - -

      Get the first wavelength standard deviation

      -
      -
      Returns:
      -
      the wavelength standard deviation
      -
      -
      -
      - -
      - -
      - - -
      -

      getLambda2(self) -

      -
      source code  -
      - -

      Get the second wavelength value

      -
      -
      Returns:
      -
      the values of the wavelength in angstroms
      -
      -
      -
      - -
      - -
      - - -
      -

      getLambda2Sigma(self) -

      -
      source code  -
      - -

      Get the second wavelength standard deviation

      -
      -
      Returns:
      -
      the wavelength standard deviation
      -
      -
      -
      - -
      - -
      - - -
      -

      getLambdaSigma(self) -

      -
      source code  -
      - -

      Get the refined wavelength standard deviation. In FullProf, there can - be only one lambda value can be refined

      -
      -
      Returns:
      -
      the wavelength standard deviation
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumOfBackgroundCoefficients(self) -

      -
      source code  -
      - -

      Get the number of background coefficients. This is number is from the - dimensions of the background coefficients array

      -
      -
      Returns:
      -
      the number of background coefficients
      -
      -
      -
      - -
      - -
      - - -
      -

      getPolar(self) -

      -
      source code  -
      - -

      Get the polarization factors

      -
      -
      Returns:
      -
      the polarization factors
      -
      -
      -
      - -
      - -
      - - -
      -

      getPolarType(self) -

      -
      source code  -
      - -

      Get the polarization type id numbers. These numbers have different - meanings in different engine files, please refer to the manual of the - refinement engine.

      -
      -
      Returns:
      -
      the Tmin of the pattern as float
      -
      -
      -
      - -
      - -
      - - -
      -

      getRatio(self) -

      -
      source code  -
      - -

      Get the ratio value of the refinement list. These values are read from - the engine files, and not calculated in SrRietveld.

      -
      -
      Returns:
      -
      the values of ratios of intensities of lambda2 / lambda1
      -
      -
      -
      - -
      - -
      - - -
      -

      getRp(self) -

      -
      source code  -
      - -

      Get the Rp value of the refinement list

      -
      -
      Returns:
      -
      the values of Rp
      -
      -
      -
      - -
      - -
      - - -
      -

      getRwp(self) -

      -
      source code  -
      - -

      Get the Rwp value of the refinement list

      -
      -
      Returns:
      -
      the values of Rwp
      -
      -
      -
      - -
      - -
      - - -
      -

      getScale(self) -

      -
      source code  -
      - -

      Get the scale factor of the pattern

      -
      -
      Returns:
      -
      the scale factor of the pattern as float
      -
      -
      -
      - -
      - -
      - - -
      -

      getScaleSigma(self) -

      -
      source code  -
      - -

      Get the scale factor standard deviation

      -
      -
      Returns:
      -
      the scale factor standard deviation
      -
      -
      -
      - -
      - -
      - - -
      -

      getStep(self) -

      -
      source code  -
      - -

      Get the step values

      -
      -
      Returns:
      -
      the step sizes
      -
      -
      -
      - -
      - -
      - - -
      -

      getTmax(self) -

      -
      source code  -
      - -

      Get the Tmax of the pattern

      -
      -
      Returns:
      -
      the Tmax of the pattern as float
      -
      -
      -
      - -
      - -
      - - -
      -

      getTmin(self) -

      -
      source code  -
      - -

      Get the Tmin of the pattern

      -
      -
      Returns:
      -
      the Tmin of the pattern as float
      -
      -
      -
      - -
      - -
      - - -
      -

      getUseFlag(self) -

      -
      source code  -
      - -

      Get the use flag of this pattern. In GSAS a histogram can be flagged - as used (True) or unused (False). The pattern will be included in the - refinement only if its used. The pattern will always be used in a - FullProf refinement.

      -
      -
      Returns:
      -
      the use flags (boolean) of this pattern in refinements
      -
      -
      -
      - -
      - -
      - - -
      -

      getXobs(self) -

      -
      source code  -
      - -

      Get the observed x axis points. This parameters is only available - after the refinement is complete.

      -
      -
      Returns:
      -
      a multi-dimensional array with the x axis points.
      -
      -
      -
      - -
      - -
      - - -
      -

      getYcal(self) -

      -
      source code  -
      - -

      Get the calculated y values. This parameters is only available after - the refinement is complete.

      -
      -
      Returns:
      -
      a multi-dimensional array with the calculated y values.
      -
      -
      -
      - -
      - -
      - - -
      -

      getYobs(self) -

      -
      source code  -
      - -

      Get the observed y values. This parameters is only available after the - refinement is complete.

      -
      -
      Returns:
      -
      a multi-dimensional array with the observed y values.
      -
      -
      -
      - -
      - -
      - - -
      -

      getZero(self) -

      -
      source code  -
      - -

      Get the zero shift value for this pattern

      -
      -
      Returns:
      -
      the zero shift value as float
      -
      -
      -
      - -
      - -
      - - -
      -

      getZeroSigma(self) -

      -
      source code  -
      - -

      Get the zero shift standard deviation

      -
      -
      Returns:
      -
      the zero shift standard deviation
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.phase-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.phase-module.html deleted file mode 100644 index e702a190..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.phase-module.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - diffpy.srrietveld.phase - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module phase - - - - - -
      [frames] | no frames]
      -
      - -

      Module phase

      source code

      -

      This package contains the Phase class in SrRietveld, which is an - script interface to access the structure information

      - - - - - - - - - - -
      - Classes
      -   - - Phase
      - A Phase object saves the structure to be refined. -
      - - - - - - - - - - - - - - - -
      - Variables
      -   - - PARAMNAMES = {'fullprof': {'Biso': 'AtomicDisplacementFactor.B... -
      -   - - __id__ = '$Id: phase.py 6726 2011-08-25 09:36:23Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - Structure, - UTILS -


      - - - - - - -
      - Variables Details
      - -
      - -
      -

      PARAMNAMES

      - -
      -
      -
      -
      Value:
      -
      -{'fullprof': {'Biso': 'AtomicDisplacementFactor.Biso',
      -              'Rp': 'Rp',
      -              'Rwp': 'Rwp',
      -              'Tmax': 'Thmin',
      -              'Tmin': 'Thmax',
      -              'Uiso': 'AtomicDisplacementFactor.Uiso',
      -              'X': 'X',
      -              'Y': 'Y',
      -...
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.phase-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.phase-pysrc.html deleted file mode 100644 index c7463ccf..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.phase-pysrc.html +++ /dev/null @@ -1,549 +0,0 @@ - - - - - diffpy.srrietveld.phase - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module phase - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.phase

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Yingrui Shang 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15  This package contains the Phase class in SrRietveld, which is an script interface 
      - 16  to access the structure information 
      - 17  """ 
      - 18   
      - 19  __id__ = "$Id: phase.py 6726 2011-08-25 09:36:23Z yshang $" 
      - 20   
      - 21  from diffpy.refinementdata.structure import Structure 
      - 22  from diffpy.srrietveld.paramnames import PARAMNAMES 
      - 23  import diffpy.srrietveld.utility as UTILS  
      - 24   
      -
      25 -class Phase(Structure): -
      26 """A Phase object saves the structure to be refined. It contains the - 27 a list of variables to represent a structure. such as a, b, c, alpha, beta, - 28 gamma and so on. - 29 - 30 data member: - 31 spacegroup: space group of the structure - 32 a,b,c: the lattice constant - 33 alpha,beta,gamma: the lattice angle - 34 - 35 This class is also an interface for the Structure class in - 36 diffpy.refinementdata.structure package, to provide convenient access functions - 37 to the structure data - 38 """ -
      39 - def __init__(self, owner, name=None, handle=None, shape=None): -
      40 """ - 41 Constructor. The construction of a Phase object is taken care of by the - 42 Project. Users do not have to call this function directly. - 43 - 44 @type owner: a data object - 45 @param owner: the owner, which is usually a Refinement object. - 46 @type name: string - 47 @param name: the node name. - 48 @type handle: a HDF5Handle object - 49 @param handle: a HDF5Handle pointing to the underlying HDF5 node. - 50 @type shape: tuple - 51 @param shape: the shape of the data object. Each element denotes - 52 the number of elements in each dimension - 53 - 54 A name is passed to the initialization method when creating a node. - 55 - 56 A handle is passed to the inialization method in two cases: - 57 1. when loading from a HDF5 file; - 58 2. when creating a HDF5 file but the object is a hard link to - 59 a preexisiting one. - 60 - 61 In the case when both name and handle are given, name will be simply ignored. - 62 In the case when neither name nor handle is given, an exception will be raised. - 63 """ - 64 Structure.__init__(self, owner, name, handle, shape) - 65 return -
      66 -
      67 - def getAtomByName(self, name): -
      68 ''' - 69 Get the atom by its name - 70 - 71 @type name: string - 72 @param name: the atom name - 73 - 74 @return: the atom object with the name if exists. None if no such - 75 phase object. The program will emit a warning if duplicate - 76 atom names exist, and the first atom obj with the same name - 77 will be returned - 78 ''' - 79 - 80 rv = [None] - 81 rv = [obj for obj in self.listAtoms() if obj.name == name] - 82 if len(rv) > 1: - 83 __msg = 'Duplicate phase names, the first refinement is returned' - 84 UTILS.printWarning(__msg) - 85 - 86 return rv[0] -
      87 -
      88 - def getSpaceGroup(self): -
      89 """ - 90 Get the space group of the phase - 91 - 92 @return: return the space group string list - 93 """ - 94 return self.getByPath(PARAMNAMES[self.getEngineType()]["space_group"]) -
      95 -
      96 - def getLatticeA(self): -
      97 """ - 98 Get the lattice parameter a in angstroms - 99 -100 @return: the lattice a values -101 """ -102 return self.getByPath(PARAMNAMES[self.getEngineType()]["a"]) -
      103 -
      104 - def getLatticeASigma(self): -
      105 """ -106 Get the standard deviation of lattice parameter a in angstroms -107 -108 @return: the lattice a values -109 """ -110 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]["a"]) -
      111 -112 -
      113 - def getLatticeB(self): -
      114 """ -115 Get the lattice parameter b in anstrom -116 -117 @return: the lattice b values -118 """ -119 return self.getByPath(PARAMNAMES[self.getEngineType()][ "b"]) -
      120 -
      121 - def getLatticeBSigma(self): -
      122 """ -123 Get the standard deviation of lattice parameter b in anstrom -124 -125 @return: the lattice b standard deviations -126 """ -127 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()][ "b"]) -
      128 -
      129 - def getLatticeC(self): -
      130 """ -131 Get the lattice parameter c in anstrom -132 -133 @return: the lattice c values -134 """ -135 return self.getByPath(PARAMNAMES[self.getEngineType()]["c"]) -
      136 -
      137 - def getLatticeCSigma(self): -
      138 """ -139 Get the standard deviation of lattice parameter c in anstrom -140 -141 @return: the lattice c standard deviations -142 """ -143 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]["c"]) -
      144 -145 -
      146 - def getAlpha(self): -
      147 """ -148 Get the alpha value in degree -149 -150 @return: if index is None, return the alpha value list in a Dataset -151 if index is a number or tuple, return the a value as a float -152 """ -153 return self.getByPath(PARAMNAMES[self.getEngineType()]["alpha"]) -
      154 -
      155 - def getAlphaSigma(self): -
      156 """ -157 Get the alpha value in degree -158 -159 @return: if index is None, return the alpha value list in a Dataset -160 if index is a number or tuple, return the a value as a float -161 """ -162 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]["alpha"]) -
      163 -164 -
      165 - def getBeta(self): -
      166 """ -167 Get the beta value in degree -168 -169 @return: if index is None, return the beta value list in a Dataset -170 if index is a number or tuple, return the a value as a float -171 """ -172 return self.getByPath(PARAMNAMES[self.getEngineType()]["beta"]) -
      173 -
      174 - def getBetaSigma(self): -
      175 """ -176 Get the standard deviation beta value in degree -177 -178 @return: the beta standard deviations -179 """ -180 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]["beta"]) -
      181 -
      182 - def getEngineType(self): -
      183 '''Get the engine type for this refinement -184 -185 @return: the string of the engine type, for example I{"gsas"} or I{"fullprof"}''' -186 -187 return self.owner.owner.getEngineType() -
      188 -
      189 - def getGamma(self): -
      190 """ -191 Get the gamma value in degree -192 -193 @return: return the gamma values -194 """ -195 return self.getByPath(PARAMNAMES[self.getEngineType()]["gamma"]) -
      196 -
      197 - def getGammaSigma(self): -
      198 """ -199 Get the standard deviation gamma value in degree -200 -201 @return: return the gamma standard deviations -202 """ -203 return self.getSigmaByPath(PARAMNAMES[self.getEngineType()]["gamma"]) -
      204 -
      205 - def getName(self): -
      206 ''' -207 Get the phase name -208 -209 @return: string -210 ''' -211 return self.get('Name').first() -
      212 -
      213 - def getNumOfAtoms(self): -
      214 """ -215 Get number of atoms in the phase -216 -217 @return: number of atoms -218 """ -219 return len(self.listAtoms()) -
      220 -
      221 - def listAtoms(self): -
      222 """ -223 List the atoms -224 -225 @return: a list of Atom objects -226 """ -227 return [obj for obj in self.listObjects(recursively = True) if obj.name.startswith('Atom[')] -
      228 -
      229 - def listAtomNames(self): -
      230 ''' -231 List the atom names -232 -233 @return: a list of atom names in this phase -234 ''' -235 return[atom.getName() for atom in self.listAtoms()] -
      236 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.phase.Phase-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.phase.Phase-class.html deleted file mode 100644 index 3437168f..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.phase.Phase-class.html +++ /dev/null @@ -1,1066 +0,0 @@ - - - - - diffpy.srrietveld.phase.Phase - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module phase :: - Class Phase - - - - - -
      [frames] | no frames]
      -
      - -

      Class Phase

      source code

      -
      -                       object --+            
      -                                |            
      -refinementdata.hdf5.object.Object --+        
      -                                    |        
      -   refinementdata.refinable.Refinable --+    
      -                                        |    
      -       refinementdata.structure.Structure --+
      -                                            |
      -                                           Phase
      -
      - -
      -
      -A Phase object saves the structure to be refined. It contains the 
      -a list of variables to represent a structure. such as a, b, c, alpha, beta, 
      -gamma and so on. 
      -
      -data member:
      -    spacegroup: space group of the structure
      -    a,b,c:  the lattice constant
      -    alpha,beta,gamma: the lattice angle
      -
      -This class is also an interface for the Structure class in 
      -diffpy.refinementdata.structure package, to provide convenient access functions
      -to the structure data 
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - owner, - name=None, - handle=None, - shape=None)
      - Constructor.
      - source code - -
      - -
      -   - - - - - - -
      getAlpha(self)
      - Get the alpha value in degree
      - source code - -
      - -
      -   - - - - - - -
      getAlphaSigma(self)
      - Get the alpha value in degree
      - source code - -
      - -
      -   - - - - - - -
      getAtomByName(self, - name)
      - Get the atom by its name
      - source code - -
      - -
      -   - - - - - - -
      getBeta(self)
      - Get the beta value in degree
      - source code - -
      - -
      -   - - - - - - -
      getBetaSigma(self)
      - Get the standard deviation beta value in degree
      - source code - -
      - -
      -   - - - - - - -
      getEngineType(self)
      - Get the engine type for this refinement
      - source code - -
      - -
      -   - - - - - - -
      getGamma(self)
      - Get the gamma value in degree
      - source code - -
      - -
      -   - - - - - - -
      getGammaSigma(self)
      - Get the standard deviation gamma value in degree
      - source code - -
      - -
      -   - - - - - - -
      getLatticeA(self)
      - Get the lattice parameter a in angstroms
      - source code - -
      - -
      -   - - - - - - -
      getLatticeASigma(self)
      - Get the standard deviation of lattice parameter a in angstroms
      - source code - -
      - -
      -   - - - - - - -
      getLatticeB(self)
      - Get the lattice parameter b in anstrom
      - source code - -
      - -
      -   - - - - - - -
      getLatticeBSigma(self)
      - Get the standard deviation of lattice parameter b in anstrom
      - source code - -
      - -
      -   - - - - - - -
      getLatticeC(self)
      - Get the lattice parameter c in anstrom
      - source code - -
      - -
      -   - - - - - - -
      getLatticeCSigma(self)
      - Get the standard deviation of lattice parameter c in anstrom
      - source code - -
      - -
      -   - - - - - - -
      getName(self)
      - Get the phase name
      - source code - -
      - -
      -   - - - - - - -
      getNumOfAtoms(self)
      - Get number of atoms in the phase
      - source code - -
      - -
      -   - - - - - - -
      getSpaceGroup(self)
      - Get the space group of the phase
      - source code - -
      - -
      -   - - - - - - -
      listAtomNames(self)
      - List the atom names
      - source code - -
      - -
      -   - - - - - - -
      listAtoms(self)
      - List the atoms
      - source code - -
      - -
      -

      Inherited from refinementdata.structure.Structure: - readSource, - writeSource -

      -

      Inherited from refinementdata.refinable.Refinable: - addHistory, - addHistoryByPath, - addSigma, - addSigmaByPath, - findRefinement, - getHistory, - getHistoryByPath, - getSigma, - getSigmaByPath, - listHistories, - listRefined, - loadLocalObjects, - removeHistory, - update -

      -

      Inherited from refinementdata.hdf5.object.Object: - addObject, - copy, - copyMeta, - delete, - exportFile, - get, - getAttr, - getByPath, - getFlatIndex, - getMetaData, - getMultiDimIndex, - getObject, - getPyObj, - hasAttr, - hasMeta, - importFile, - isDescendant, - list, - listAttrs, - listNames, - listObjects, - load, - loadLocalData, - loadObject, - move, - range, - readStr, - removeObject, - rename, - repeat, - replicate, - reshape, - save, - set, - setAttr, - setByPath, - setLabels, - setPyObj, - unset, - unsetAttr, - writeStr -

      -

      Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

      -
      - - - - - - - - - -
      - Properties
      -

      Inherited from refinementdata.hdf5.object.Object: - labels, - name, - ndim, - path -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - owner, - name=None, - handle=None, - shape=None) -
      (Constructor) -

      -
      source code  -
      - -
      -
      -Constructor. The construction of a Phase object is taken care of by the
      -Project. Users do not have to call this function directly. 
      -
      -@type owner:    a data object
      -@param owner:    the owner, which is usually a Refinement object.
      -@type name:    string
      -@param name:    the node name.
      -@type handle:    a HDF5Handle object
      -@param handle:    a HDF5Handle pointing to the underlying HDF5 node. 
      -@type shape:    tuple
      -@param shape:    the shape of the data object. Each element denotes 
      -                the number of elements in each dimension
      -
      -A name is passed to the initialization method when creating a node.
      -
      -A handle is passed to the inialization method in two cases:
      -    1.  when loading from a HDF5 file;
      -    2.  when creating a HDF5 file but the object is a hard link to 
      -        a preexisiting one.
      -        
      -In the case when both name and handle are given, name will be simply ignored.
      -In the case when neither name nor handle is given, an exception will be raised.
      -
      -
      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getAlpha(self) -

      -
      source code  -
      - -

      Get the alpha value in degree

      -
      -
      Returns:
      -
      if index is None, return the alpha value list in a Dataset if - index is a number or tuple, return the a value as a float
      -
      -
      -
      - -
      - -
      - - -
      -

      getAlphaSigma(self) -

      -
      source code  -
      - -

      Get the alpha value in degree

      -
      -
      Returns:
      -
      if index is None, return the alpha value list in a Dataset if - index is a number or tuple, return the a value as a float
      -
      -
      -
      - -
      - -
      - - -
      -

      getAtomByName(self, - name) -

      -
      source code  -
      - -

      Get the atom by its name

      -
      -
      Parameters:
      -
        -
      • name (string) - the atom name
      • -
      -
      Returns:
      -
      the atom object with the name if exists. None if no such phase - object. The program will emit a warning if duplicate atom names - exist, and the first atom obj with the same name will be returned
      -
      -
      -
      - -
      - -
      - - -
      -

      getBeta(self) -

      -
      source code  -
      - -

      Get the beta value in degree

      -
      -
      Returns:
      -
      if index is None, return the beta value list in a Dataset if - index is a number or tuple, return the a value as a float
      -
      -
      -
      - -
      - -
      - - -
      -

      getBetaSigma(self) -

      -
      source code  -
      - -

      Get the standard deviation beta value in degree

      -
      -
      Returns:
      -
      the beta standard deviations
      -
      -
      -
      - -
      - -
      - - -
      -

      getEngineType(self) -

      -
      source code  -
      - -

      Get the engine type for this refinement

      -
      -
      Returns:
      -
      the string of the engine type, for example - "gsas" or "fullprof"
      -
      -
      -
      - -
      - -
      - - -
      -

      getGamma(self) -

      -
      source code  -
      - -

      Get the gamma value in degree

      -
      -
      Returns:
      -
      return the gamma values
      -
      -
      -
      - -
      - -
      - - -
      -

      getGammaSigma(self) -

      -
      source code  -
      - -

      Get the standard deviation gamma value in degree

      -
      -
      Returns:
      -
      return the gamma standard deviations
      -
      -
      -
      - -
      - -
      - - -
      -

      getLatticeA(self) -

      -
      source code  -
      - -

      Get the lattice parameter a in angstroms

      -
      -
      Returns:
      -
      the lattice a values
      -
      -
      -
      - -
      - -
      - - -
      -

      getLatticeASigma(self) -

      -
      source code  -
      - -

      Get the standard deviation of lattice parameter a in angstroms

      -
      -
      Returns:
      -
      the lattice a values
      -
      -
      -
      - -
      - -
      - - -
      -

      getLatticeB(self) -

      -
      source code  -
      - -

      Get the lattice parameter b in anstrom

      -
      -
      Returns:
      -
      the lattice b values
      -
      -
      -
      - -
      - -
      - - -
      -

      getLatticeBSigma(self) -

      -
      source code  -
      - -

      Get the standard deviation of lattice parameter b in anstrom

      -
      -
      Returns:
      -
      the lattice b standard deviations
      -
      -
      -
      - -
      - -
      - - -
      -

      getLatticeC(self) -

      -
      source code  -
      - -

      Get the lattice parameter c in anstrom

      -
      -
      Returns:
      -
      the lattice c values
      -
      -
      -
      - -
      - -
      - - -
      -

      getLatticeCSigma(self) -

      -
      source code  -
      - -

      Get the standard deviation of lattice parameter c in anstrom

      -
      -
      Returns:
      -
      the lattice c standard deviations
      -
      -
      -
      - -
      - -
      - - -
      -

      getName(self) -

      -
      source code  -
      - -

      Get the phase name

      -
      -
      Returns:
      -
      string
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumOfAtoms(self) -

      -
      source code  -
      - -

      Get number of atoms in the phase

      -
      -
      Returns:
      -
      number of atoms
      -
      -
      -
      - -
      - -
      - - -
      -

      getSpaceGroup(self) -

      -
      source code  -
      - -

      Get the space group of the phase

      -
      -
      Returns:
      -
      return the space group string list
      -
      -
      -
      - -
      - -
      - - -
      -

      listAtomNames(self) -

      -
      source code  -
      - -

      List the atom names

      -
      -
      Returns:
      -
      a list of atom names in this phase
      -
      -
      -
      - -
      - -
      - - -
      -

      listAtoms(self) -

      -
      source code  -
      - -

      List the atoms

      -
      -
      Returns:
      -
      a list of Atom objects
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.profile-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.profile-module.html deleted file mode 100644 index cfeecde6..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.profile-module.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - diffpy.srrietveld.profile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module profile - - - - - -
      [frames] | no frames]
      -
      - -

      Module profile

      source code

      -

      This package contains the Pattern class in SrRietveld, which is an - script interface to access the structure information

      - - - - - - - - - - -
      - Classes
      -   - - Profile
      - Profile is a Function component which contains multiple parameters. -
      - - - - - - - - - - - - - - - -
      - Variables
      -   - - PARAMNAMES = {'fullprof': {'Biso': 'AtomicDisplacementFactor.B... -
      -   - - __id__ = '$Id: profile.py 6728 2011-08-26 21:54:11Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - Function -


      - - - - - - -
      - Variables Details
      - -
      - -
      -

      PARAMNAMES

      - -
      -
      -
      -
      Value:
      -
      -{'fullprof': {'Biso': 'AtomicDisplacementFactor.Biso',
      -              'Rp': 'Rp',
      -              'Rwp': 'Rwp',
      -              'Tmax': 'Thmin',
      -              'Tmin': 'Thmax',
      -              'Uiso': 'AtomicDisplacementFactor.Uiso',
      -              'X': 'X',
      -              'Y': 'Y',
      -...
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.profile-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.profile-pysrc.html deleted file mode 100644 index 855743a5..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.profile-pysrc.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - diffpy.srrietveld.profile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module profile - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.profile

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Yingrui Shang 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15  This package contains the Pattern class in SrRietveld, which is an script interface 
      - 16  to access the structure information 
      - 17  """ 
      - 18   
      - 19  __id__ = "$Id: profile.py 6728 2011-08-26 21:54:11Z yshang $" 
      - 20   
      - 21  from diffpy.refinementdata.function import Function 
      - 22  from diffpy.srrietveld.paramnames import PARAMNAMES 
      - 23   
      -
      24 -class Profile(Function): -
      25 """Profile is a Function component which contains multiple parameters. - 26 A composite function may also contain other functions. - 27 - 28 data member: - 29 - 30 formula: a string of the function definition in C style - 31 variables: a space separated string of all variables in the formula - 32 """ -
      33 - def __init__(self, owner, name=None, handle=None, formula=None, variables=None, shape=None): -
      34 """Initialization. - 35 - 36 @type owner: a data project - 37 @param owner: the owner, which is usually a refinement. - 38 @type name: string - 39 @param name the name of the pattern - 40 @type handle: a HDF5Handle object - 41 @param handle: a HDF5Handle pointing to the underlying HDF5 node. - 42 @type formula: string - 43 @param formula: a string of the function definition in C style - 44 @type variables: a space separated string - 45 @param variables: a space separated string of all variables - 46 - 47 A name is passed to the initialization method when creating a node. - 48 - 49 A handle is passed to the inialization method in two cases: - 50 1. when loading from a HDF5 file; - 51 2. when creating a HDF5 file but the object is a hard link to - 52 a preexisiting one. - 53 - 54 In the case when both name and handle are given, name will be simply ignored. - 55 In the case when neither name nor handle is given, an exception will be raised. - 56 - 57 Generally, in the scripting interface, users do not have to call this - 58 constructor directly - 59 """ - 60 Function.__init__(self, owner, name, handle, shape) - 61 return -
      62 - 63 -
      64 - def getCutOff(self): -
      65 ''' - 66 Get the peak cut off factors from GSAS and the cut-off of the peak profile - 67 tails for FullProf (Wdt) - 68 - 69 @return: cut off related values - 70 ''' - 71 - 72 return self.getByPath(PARAMNAMES[self.getEngineType()]["cut_off"]) -
      73 -
      74 - def getEngineType(self): -
      75 '''Get the engine type for this refinement - 76 - 77 @return: the string of the engine type, for example I{"gsas"} or I{"fullprof"}''' - 78 - 79 return self.owner.owner.owner.getEngineType() -
      80 -
      81 - def listCoefficientNames(self): -
      82 ''' - 83 List the names of the profile function coefficients - 84 - 85 @return: a list of coefficient names - 86 ''' - 87 coefficients = self.getByPath(PARAMNAMES[self.getEngineType()]["profile_parameters"]).first() - 88 return coefficients.split() -
      89 -
      90 - def getNumOfCoefficients(self): -
      91 ''' - 92 Get number of profile coefficients - 93 - 94 @return: number of profile coefficients - 95 ''' - 96 coefficients = self.getByPath(PARAMNAMES[self.getEngineType()]["profile_parameters"]).first() - 97 return len(coefficients.split()) -
      98 -
      99 - def getProfileType(self): -
      100 ''' -101 Get the profile type number. This number is different in engines. User -102 has to refer to the manual of the engine program for meanings of this -103 id number. Since the profile type should be the same for all the single -104 refinements in the series. So only a single number is returned. -105 -106 @return: the profile function identification number -107 ''' -108 return self.getByPath(PARAMNAMES[self.getEngineType()]["profile_type"]).first() -
      109 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.profile.Profile-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.profile.Profile-class.html deleted file mode 100644 index 026db3f0..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.profile.Profile-class.html +++ /dev/null @@ -1,524 +0,0 @@ - - - - - diffpy.srrietveld.profile.Profile - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module profile :: - Class Profile - - - - - -
      [frames] | no frames]
      -
      - -

      Class Profile

      source code

      -
      -                       object --+            
      -                                |            
      -refinementdata.hdf5.object.Object --+        
      -                                    |        
      -   refinementdata.refinable.Refinable --+    
      -                                        |    
      -         refinementdata.function.Function --+
      -                                            |
      -                                           Profile
      -
      - -
      -
      -Profile is a Function component which contains multiple parameters.
      -A composite function may also contain other functions.
      -
      -data member:
      -    
      -    formula: a string of the function definition in C style
      -    variables: a space separated string of all variables in the formula
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - owner, - name=None, - handle=None, - formula=None, - variables=None, - shape=None)
      - Initialization.
      - source code - -
      - -
      -   - - - - - - -
      getCutOff(self)
      - Get the peak cut off factors from GSAS and the cut-off of the peak - profile tails for FullProf (Wdt)
      - source code - -
      - -
      -   - - - - - - -
      getEngineType(self)
      - Get the engine type for this refinement
      - source code - -
      - -
      -   - - - - - - -
      getNumOfCoefficients(self)
      - Get number of profile coefficients
      - source code - -
      - -
      -   - - - - - - -
      getProfileType(self)
      - Get the profile type number.
      - source code - -
      - -
      -   - - - - - - -
      listCoefficientNames(self)
      - List the names of the profile function coefficients
      - source code - -
      - -
      -

      Inherited from refinementdata.refinable.Refinable: - addHistory, - addHistoryByPath, - addSigma, - addSigmaByPath, - findRefinement, - getHistory, - getHistoryByPath, - getSigma, - getSigmaByPath, - listHistories, - listRefined, - loadLocalObjects, - removeHistory, - update -

      -

      Inherited from refinementdata.hdf5.object.Object: - addObject, - copy, - copyMeta, - delete, - exportFile, - get, - getAttr, - getByPath, - getFlatIndex, - getMetaData, - getMultiDimIndex, - getObject, - getPyObj, - hasAttr, - hasMeta, - importFile, - isDescendant, - list, - listAttrs, - listNames, - listObjects, - load, - loadLocalData, - loadObject, - move, - range, - readStr, - removeObject, - rename, - repeat, - replicate, - reshape, - save, - set, - setAttr, - setByPath, - setLabels, - setPyObj, - unset, - unsetAttr, - writeStr -

      -

      Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

      -
      - - - - - - - - - -
      - Properties
      -

      Inherited from refinementdata.hdf5.object.Object: - labels, - name, - ndim, - path -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - owner, - name=None, - handle=None, - formula=None, - variables=None, - shape=None) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization.

      -
      -
      Parameters:
      -
        -
      • owner (a data project) - the owner, which is usually a refinement.
      • -
      • handle (a HDF5Handle object) - a HDF5Handle pointing to the underlying HDF5 node.
      • -
      • formula (string) - a string of the function definition in C style
      • -
      • variables (a space separated string) - a space separated string of all variables -

        A name is passed to the initialization method when creating a - node.

        -

        A handle is passed to the inialization method in two - cases:

        -
          -
        1. - when loading from a HDF5 file; -
        2. -
        3. - when creating a HDF5 file but the object is a hard link to a - preexisiting one. -
        4. -
        -

        In the case when both name and handle are given, name will be - simply ignored. In the case when neither name nor handle is - given, an exception will be raised.

        -

        Generally, in the scripting interface, users do not have to - call this constructor directly

      • -
      • name (string @param name the name of the pattern)
      • -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getCutOff(self) -

      -
      source code  -
      - -

      Get the peak cut off factors from GSAS and the cut-off of the peak - profile tails for FullProf (Wdt)

      -
      -
      Returns:
      -
      cut off related values
      -
      -
      -
      - -
      - -
      - - -
      -

      getEngineType(self) -

      -
      source code  -
      - -

      Get the engine type for this refinement

      -
      -
      Returns:
      -
      the string of the engine type, for example - "gsas" or "fullprof"
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumOfCoefficients(self) -

      -
      source code  -
      - -

      Get number of profile coefficients

      -
      -
      Returns:
      -
      number of profile coefficients
      -
      -
      -
      - -
      - -
      - - -
      -

      getProfileType(self) -

      -
      source code  -
      - -

      Get the profile type number. This number is different in engines. User - has to refer to the manual of the engine program for meanings of this id - number. Since the profile type should be the same for all the single - refinements in the series. So only a single number is returned.

      -
      -
      Returns:
      -
      the profile function identification number
      -
      -
      -
      - -
      - -
      - - -
      -

      listCoefficientNames(self) -

      -
      source code  -
      - -

      List the names of the profile function coefficients

      -
      -
      Returns:
      -
      a list of coefficient names
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.project-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.project-module.html deleted file mode 100644 index 3d596e0a..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.project-module.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - diffpy.srrietveld.project - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module project - - - - - -
      [frames] | no frames]
      -
      - -

      Module project

      source code

      -

      This module contains the definition of the Project class. A SrRietveld - Project object can be initiated from saved refinement project file, and - the methods in this module can be used to access and manipulate the data - file.

      - - - - - - - - - - -
      - Classes
      -   - - Project
      - Project class defines a SrRietveld refinement project. -
      - - - - - - - - - - - - - - - -
      - Functions
      -   - - - - - - -
      copyObjectData(srcobj, - destobj, - srcindexlist, - destindexlist)
      - Copy data to another object.
      - source code - -
      - -
      -   - - - - - - -
      exportEngineObject(engineobjowner, - key, - myobj, - index=None)
      - Export a saved HDF5Object to an engine object.
      - source code - -
      - -
      -   - - - - - - -
      importEngineObject(myobjowner, - engineobj, - id, - index=None)
      - Import an engine object into myobject
      - source code - -
      - -
      - - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: project.py 6735 2011-08-27 20:05:44Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - Atom, - DataError, - ExcludedRegion, - GLOBALS, - Object, - ObjectInfo, - ObjectList, - Pattern, - Phase, - Profile, - ProjectData, - Refinable, - Refinement, - SrrFileError, - SrrIOError, - UTILS, - math, - os, - setObjectInfo, - shutil, - stat, - tempfile, - zipfile -


      - - - - - - -
      - Function Details
      - -
      - -
      - - -
      -

      copyObjectData(srcobj, - destobj, - srcindexlist, - destindexlist) -

      -
      source code  -
      - -

      Copy data to another object.

      -

      srcobj -- the source object destobj -- the target parent - object srcindexlist -- a list of indices to read data from srcobj - destindexlist -- a list of indices to write data to destobj

      -
      -
      -
      -
      - -
      - -
      - - -
      -

      exportEngineObject(engineobjowner, - key, - myobj, - index=None) -

      -
      source code  -
      - -

      Export a saved HDF5Object to an engine object.

      -
      -
      Parameters:
      -
        -
      • engineobjowner (a data object) - the owner of the engine object
      • -
      • myobj (a refinement object) - the source refinement object
      • -
      • index (interger or tuple) - the index to the single value if the object is multiplexed
      • -
      -
      Returns:
      -
      the newly created engine object
      -
      -
      -
      - -
      - -
      - - -
      -

      importEngineObject(myobjowner, - engineobj, - id, - index=None) -

      -
      source code  -
      - -

      Import an engine object into myobject

      -
      -
      Parameters:
      -
        -
      • myobjowner (an data object) - the owner of the refinement object to be created
      • -
      • engineobj (an engine fit object) - the engine object to be imported
      • -
      • id (integer or string) - the name/index of the refinement object to be created/obtained in - myobjowner
      • -
      • index (index or tuple) - when modify an object, indicate the index to the value to be - modified -

        return: the newly created local object

      • -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.project-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.project-pysrc.html deleted file mode 100644 index 17ce8553..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.project-pysrc.html +++ /dev/null @@ -1,1283 +0,0 @@ - - - - - diffpy.srrietveld.project - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module project - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.project

      -
      -   1  ############################################################################## 
      -   2  # 
      -   3  # diffpy.srrietveld by DANSE Diffraction group 
      -   4  #                   Simon J. L. Billinge 
      -   5  #                   (c) 2009 Trustees of the Columbia University 
      -   6  #                   in the City of New York.  All rights reserved. 
      -   7  # 
      -   8  # File coded by:    Jiwu Liu, Yingrui Shang 
      -   9  # 
      -  10  # See AUTHORS.txt for a list of people who contributed. 
      -  11  # See LICENSE.txt for license information. 
      -  12  # 
      -  13  ############################################################################## 
      -  14   
      -  15  """This module contains the definition of the Project class. A SrRietveld Project 
      -  16  object can be initiated from saved refinement project file, and the methods in  
      -  17  this module can be used to access and manipulate the data file.""" 
      -  18   
      -  19  __id__ = "$Id: project.py 6735 2011-08-27 20:05:44Z yshang $" 
      -  20   
      -  21   
      -  22  # Storage/Data 
      -  23  from diffpy.refinementdata.project import Project as ProjectData 
      -  24  from diffpy.srrietveld.refinement import Refinement 
      -  25  from diffpy.srrietveld.pattern import Pattern, ExcludedRegion 
      -  26  from diffpy.srrietveld.atom import Atom 
      -  27  from diffpy.refinementdata.dataerrors import DataError 
      -  28  from diffpy.srrietveld.phase import Phase 
      -  29  from diffpy.srrietveld.profile import Profile 
      -  30  from diffpy.refinementdata.refinable import Refinable 
      -  31  from diffpy.refinementdata.hdf5.objectlist import ObjectList 
      -  32  from diffpy.refinementdata.hdf5.object import Object 
      -  33  import diffpy.srrietveld.gui.srrguiglobals as GLOBALS 
      -  34  from diffpy.srrietveld.exceptions import SrrFileError, SrrIOError 
      -  35  import os, shutil, stat, zipfile, tempfile, math 
      -  36  import diffpy.srrietveld.utility as UTILS 
      -  37  from diffpy.srrietveld.objectinfo import ObjectInfo, setObjectInfo 
      -  38   
      -
      39 -class Project(ProjectData): -
      40 ''' - 41 Project class defines a SrRietveld refinement project. It consists of a - 42 number of single refinements. A project can call different Rietveld engines - 43 to run its refinements. - 44 - 45 A project object contains the list of refinemenets, and list of jobs. - 46 ''' -
      47 - def __init__ (self, path, mode='a', mainframe=None): -
      48 """ - 49 Create a SrRietveld project from saved project data file. - 50 - 51 @type path: file path string - 52 @param path: the path of the project data file. If it does not exist, - 53 an empty project will be created. - 54 @type mode: one character string, possible value r, w, a - 55 @param mode: the mode to open the project. - 56 - r -- read, - 57 - w -- write, - 58 - a -- append - 59 @type mainframe: the main frame object - 60 @param mainframe: the pointer to the main window in the GUI object - 61 set to be None in script mode - 62 """ - 63 ProjectData.__init__(self, path, mode) - 64 - 65 self.mainframe = mainframe - 66 self.plots = [] - 67 self.jobs = [] - 68 for fit in self.objects: - 69 setObjectInfo(fit) - 70 fit.alive = 0 - 71 - 72 # save the path of the hdf5 data file location, used to determine the - 73 # relative paths of the raw files - 74 self.basepath = os.path.dirname(path) - 75 self.fullpath = path - 76 - 77 self.updatePaths() - 78 # indication that if the project data need to be saved to the disk - 79 self.altered = True - 80 - 81 return -
      82 -
      83 - def addJob(self, job): -
      84 """ - 85 Add a job to the job list of the project - 86 - 87 @type job: a Job object - 88 @param job: a refinement job to be added - 89 @return: no return value - 90 """ - 91 if job not in self.jobs: - 92 self.jobs.append(job) - 93 - 94 return -
      95 -
      96 - def addToZip(self, zipFilePath): -
      97 """ - 98 Archive the project data file, and other associated files, such as the - 99 histogram files, instrument files, and incident spectrum files into a - 100 zip folder. - 101 - 102 @type zipFilePath: zip file path string - 103 @param zipFilePath: the full path to save the zip file - 104 @return: no return value - 105 """ - 106 - 107 # the file can only be compressed (ZIP_DEFLATED) when the zlib is installed. - 108 # TODO: the allowZip64 should be true if the zip file is larger than 2gb - 109 # do not see the needs so far - 110 try: - 111 import zlib - 112 zipflg = zipfile.ZIP_DEFLATED - 113 except ImportError: - 114 zipflg = zipfile.ZIP_STORED - 115 - 116 zpf = zipfile.ZipFile(zipFilePath, 'w', zipflg) - 117 - 118 # create a temp project file, change the file paths - 119 tmpf, tmpfp = tempfile.mkstemp() - 120 - 121 self.__export(tmpfp) - 122 - 123 tmpproj = Project(tmpfp) - 124 # change the mode of a new file - 125 os.chmod(tmpfp, stat.S_IRUSR|stat.S_IWUSR|stat.S_IRGRP|stat.S_IROTH) - 126 tmpproj.basepath = os.path.dirname(tmpfp) - 127 tmpproj.fullpath = tmpfp - 128 # update the relative paths - 129 tmpproj.__updateRelativePaths() - 130 - 131 # get the files from teh pattern - 132 fitList = tmpproj.listRefinements() - 133 arcname = lambda pr, fp: os.path.join(pr, os.path.basename(fp)) - 134 - 135 #store the arc names already saved - 136 savedArcNames = [] - 137 - 138 for fitid, fit in enumerate(fitList): - 139 patterns = fit.getObject("Pattern") - 140 for bid, pt in enumerate(patterns): - 141 for param in ["Datafile", "MFIL", "Instrumentfile"]: - 142 arcdir = os.path.join(param.lower(), fit.name) - 143 - 144 ds = pt.get(param) - 145 - 146 if ds: - 147 dname = ds.name - 148 absds = pt.get(dname + '_abspath') - 149 # loop over all datasets in the refinement list - 150 for index in fit.range(): - 151 filepath = fit.findFileFromDataset(ds, index) - 152 if filepath: - 153 # only write the file when it's not saved before - 154 if arcname(arcdir, filepath) not in savedArcNames: - 155 zpf.write(filepath, arcname(arcdir, filepath)) - 156 savedArcNames.append(arcname(arcdir, filepath)) - 157 - 158 elif param == "Datafile": - 159 df = fit.getDataFileFromPattern(index, bid) - 160 if df: - 161 tmpDir = tempfile.mkdtemp() - 162 filepath = df.dump(tmpDir) - 163 if arcname(param, filepath) not in savedArcNames: - 164 zpf.write(filepath, arcname(param, filepath)) - 165 savedArcNames.append(arcname(param, filepath)) - 166 else: - 167 __msg = "The file (%s) for index %s, bank id %s is not found.The project in zip file may not be able to run correctly. " % (param, str(fit.getFlatIndex(index)), str(bid)) - 168 UTILS.printWarning(__msg) - 169 - 170 # change the file paths in the copied project - 171 if filepath: - 172 ds[index] = arcname(arcdir, filepath) - 173 if absds: - 174 absds[index] = '' - 175 # save the change - 176 tmpproj.save() - 177 # the archived project file name is set to be same to the zip file name - 178 projectFileName = os.path.splitext(os.path.basename(zipFilePath))[0] + '.srr' - 179 zpf.write(tmpfp, projectFileName) - 180 - 181 zpf.close() - 182 - 183 return -
      184 -
      185 - def close(self): -
      186 """ - 187 Close the opened project. - 188 @return: no return value - 189 """ - 190 # save the data - 191 for plot in self.plots: - 192 if plot.alive: - 193 plot.close() - 194 - 195 ProjectData.close(self) - 196 return -
      197 -
      198 - def deleteJob(self, job): -
      199 """ - 200 Delete job from the job list - 201 - 202 @type job: a job object - 203 @param job: the job to be deleted - 204 @return: no return value - 205 - 206 """ - 207 try: - 208 self.jobs.remove(job) - 209 except: - 210 if GLOBALS.isDebug: - 211 UTILS.printDebugInfo() - 212 else: - 213 UTILS.printWarning("No such job in the job list") - 214 - 215 return -
      216 -
      217 - def exportEngineFit(self, refinementObj, index=None): -
      218 """Build an engine fit based on given fit and index. - 219 - 220 @type refinementObj: a diffpy.refinementdata.Refinement object or its derivatives - 221 @param refinementObj: a refinement usually contains a series of single refinements - 222 The information will be read from this object to construct - 223 a engine fit, which contains information for a single - 224 step refinement - 225 @type index: tuple or int - 226 @param index: the index of the single refinement in the refinementObj - 227 a tuple represents the index in a multidimensinal data - 228 if the refinementObj is one dimensional, index can be - 229 an integer - 230 @return: an engine fit object - 231 """ - 232 enginefit = exportEngineObject(None, None, refinementObj, index) - 233 - 234 if refinementObj.getEngineType() == 'gsas': - 235 engineFileStr = str(refinementObj.get('enginefile')[index]) - 236 - 237 - 238 enginefit.expfile.readString(engineFileStr) - 239 - 240 # connect phase with pattern - 241 for i, contribution in enumerate(enginefit.get("Contribution")): - 242 mycontribution = refinementObj.getObject("Contribution").getObject(i) - 243 patternindex = mycontribution.getAttr('patternindex') - 244 phaseindex = mycontribution.getAttr('phaseindex') - 245 if patternindex is None: - 246 patternindex = 0 - 247 if phaseindex is None: - 248 phaseindex =0 - 249 - 250 # if a project is saved in a 64 bit system and loaded in a 32bit system - 251 # the int64 type has to converted to an ordinary integer - 252 patternindex = int(patternindex) - 253 phaseindex = int(phaseindex) - 254 - 255 pattern = enginefit.get("Pattern", patternindex) - 256 phase = enginefit.get("Phase", phaseindex) - 257 contribution.setParentPattern(pattern) - 258 contribution.setParentPhase(phase) - 259 - 260 return enginefit -
      261 -
      262 - def getRefinementByName(self, name): -
      263 ''' - 264 Get the refinement object by its name - 265 - 266 @type name: string - 267 @param name: the refinement name to get - 268 - 269 @return: the refinement object with the name, None if there is no such - 270 refinement object. If there are duplicate names, the first - 271 refinement object with this name will be returned, and the - 272 program with emit a warning - 273 ''' - 274 - 275 rv = [None] - 276 rv = [obj for obj in self.listRefinements() if obj.name == name] - 277 if len(rv) > 1: - 278 __msg = 'Duplicate refinement names, the first refinement is returned' - 279 UTILS.printWarning(__msg) - 280 - 281 return rv[0] -
      282 -
      283 - def importDataFiles(self): -
      284 """ - 285 Read the data files and instrument files into the pattern objects - 286 - 287 @return: no return value - 288 """ - 289 # since the job will run somewhere else, pack all its datafiles. - 290 for pattern in self.listObjects(Pattern, True): - 291 datafiles = pattern.get('Datafile') - 292 instruments = pattern.get('Instrumentfile') - 293 uniquefiles = set() - 294 for index in pattern.range(): - 295 if datafiles and datafiles[index]: - 296 uniquefiles.add(datafiles[index]) - 297 if instruments and instruments[index]: - 298 uniquefiles.add(instruments[index]) - 299 for fname in uniquefiles: - 300 pattern.importFile(fname) - 301 - 302 return -
      303 -
      304 - def importEngineFile(self, fullpath, refinementObjName=None): -
      305 """ - 306 Import an engine file (EXP or pcr files). A refinement will be created - 307 based on the data in the imported engine file. - 308 - 309 @type fullpath: file path string - 310 @param fullpath: the full file path of the engine file to be imported - 311 @type refinementObjName: string - 312 @param refinementObjName: the proposed name of the refinement object to be created. - 313 If the refinementObjName is None, the engine file name will be used - 314 @return: no return value - 315 """ - 316 import os.path - 317 - 318 # if there is already one fit loaded, keep the path of the project, if - 319 # this is the first fit loaded, change the path - 320 if len(self.listRefinements()) == 0: - 321 self.basepath = os.path.dirname(fullpath) - 322 - 323 filename = os.path.basename(fullpath) - 324 if not refinementObjName: - 325 refinementObjName = os.path.splitext(filename)[0] - 326 - 327 refinementObjName = self.verifyFitName(refinementObjName) - 328 - 329 fileformat = os.path.splitext(filename)[1].lower() - 330 if fileformat == ".exp": - 331 from diffpy.pygsas.fitloader import loadFitFromEXP - 332 enginefit = loadFitFromEXP(fullpath) - 333 elif fileformat == ".pcr": - 334 from diffpy.pyfullprof.fit import Fit as EngineFit - 335 from diffpy.pyfullprof.pcrfilereader import ImportFitFromFullProf - 336 importfile = ImportFitFromFullProf(fullpath) - 337 enginefit = EngineFit(None) - 338 importfile.ImportFile(enginefit) - 339 else: - 340 raise SrrFileError('Engine file name extension is not supported.' + \ - 341 'Only EXP and pcr files are currently supported in SrRietveld.') - 342 - 343 enginefit.fixAll() - 344 fit = self.importEngineFit(enginefit, refinementObjName, fullpath) - 345 - 346 self.altered = True - 347 - 348 return fit -
      349 -
      350 - def importEngineFit(self, enginefit, name, fullpath, index=None): -
      351 """ - 352 Import an engine Fit object. It is provided for backward compatiblity, - 353 namely when the fit is created using xml interface. - 354 - 355 @type enginefit: an engine Fit object - 356 @param enginefit: the engine fit, which contains all the information for - 357 one refinement for that engine (GSAS or FullProf) - 358 @type name: string - 359 @param name: the name to be assigned to the new Fit object - 360 @type fullpath: file path string - 361 @param fullpath: the fullpath is used to locate the supplement files - 362 (data, instrument, engine files) - 363 @type index: - 364 @param index: the index to a Fit in a Fit array ( not applicable if shape - 365 is given ) - 366 - 367 @return: the new Fit object - 368 """ - 369 - 370 # Try to find the files - 371 # since all path in engine files are relative to the file itself, - 372 # get the dir of the engine file first - 373 engineFileDir = os.path.dirname(fullpath) - 374 - 375 # fit is the storage of the new Fit. - 376 fit = importEngineObject(self, enginefit, name, index=index) - 377 - 378 # save the abs path in patterns - 379 patterns = fit.getObject('Pattern') - 380 for bankid, pattern in enumerate(patterns): - 381 - 382 absPath = {} - 383 for param in ['Datafile', 'MFIL', 'Instrumentfile']: - 384 absPath[param] = None - 385 ds = pattern.get(param) - 386 if ds is None: - 387 continue - 388 p = str(pattern.get(param).first()) - 389 if not p:# this parameter is not set - 390 __message = 'The %s param is not set in the engine' % (param) - 391 print __message - 392 absPath[param] = "" - 393 else: - 394 absPath[param] = self.__getResourceFileAbsPath(p, engineFileDir) - 395 # print warnings if file does not exist - 396 if not os.path.exists(absPath[param]): # The file does not exist - 397 - 398 paramDesc = '' - 399 if param == 'Datafile': - 400 paramDesc = 'data file' - 401 elif param == 'MFIL': - 402 paramDesc = 'incident spectrum' - 403 elif param == 'Instrumentfile': - 404 paramDesc = 'instrument file' - 405 - 406 __warning = 'Can not find the ' + paramDesc + \ - 407 ' for pattern %s, ' % (bankid + 1) + \ - 408 'you may need to reload the file or input the right file path. ' - 409 - 410 from diffpy.srrietveld.utility import printWarning - 411 printWarning(__warning) - 412 - 413 if absPath['Datafile'] is not None: - 414 fit.loadDataFile(absPath['Datafile'], index = 0, bankid = bankid) - 415 if absPath['Instrumentfile'] is not None: - 416 fit.loadInstrumentFile(absPath['Instrumentfile'], index = 0, bankid = bankid) - 417 if absPath['MFIL'] is not None: - 418 fit.loadIncidentSpectrumFile(absPath['MFIL'], index = 0, bankid = bankid) - 419 - 420 fit.saveEngineFile(fullpath) - 421 #fit.reshape((1, ), ['Index', ], repeat=True) - 422 fit.reshape((1, ), ['Index', ], repeat=True) - 423 fit.set('Index', [1]) - 424 fit.alive = 0 - 425 - 426 return fit -
      427 -
      428 - def importProject(self, projPath): -
      429 """ - 430 Import the refinements from another project file. - 431 @type projPath: file path string - 432 @param projPath: the file path of the project to be imported. - 433 @return: no return value - 434 """ - 435 tmpfile, tmppath = tempfile.mkstemp() - 436 # has to check the name of the refinement not the same to the - 437 # existing refinement, so needs to copy the refinements to another - 438 # place before copy - 439 shutil.copy(projPath, tmppath) - 440 proj = Project(tmppath) - 441 - 442 for fit in proj.listRefinements(): - 443 fit.rename(self.verifyFitName(fit.name)) - 444 - 445 self.add(proj) - 446 - 447 return -
      448 -
      449 - def listParams(self, obj, recursively=False, excluded=[]): -
      450 """ - 451 List all parameters in an object. - 452 - 453 - 454 @type obj: a data object - 455 @param obj: the object whose parameters to be listed - 456 @type recursively: boolean - 457 @param recursively: if True, the parameters in the sub-objects will - 458 be included. False otherwise - 459 @type excluded: a list of objects, whose child parameters should be - 460 excluded in the result - 461 @return: a list of parameters (Dataset object). - 462 """ - 463 params = [] - 464 for name in obj.info.listParams(): - 465 # to all the datasets - 466 - 467 params.append(obj.get(name)) - 468 - 469 # subobjects - 470 if recursively: - 471 for childobj in obj.listObjects(): - 472 if childobj.name not in excluded: - 473 # continue - 474 #for grandchildobj in childobj.listObjects(Refinable, True): - 475 params.extend(self.listParams(childobj, True)) - 476 - 477 return params -
      478 -
      479 - def listRefinementNames(self): -
      480 """Different from the methdo listRefinemetns, this function will return - 481 a list of names of the refinements - 482 @return: the names of the refinements in this project""" - 483 - 484 return [refObj.name for refObj in self.listRefinements()] -
      485 -
      486 - def plot(self, ydatasets, xdataset=None, xlabel=''): -
      487 """ - 488 Make a plot of selected Dataset objects - 489 @type ydatasets: a list of Dataset objects - 490 @param ydatasets: contains the list of y values in the plot - 491 @type xdataset: a Dataset object - 492 @param xdataset: the x values in the plot. If xdataset is None - 493 a list of consecutive integers will be used - 494 @return: the plot figure object - 495 """ - 496 - 497 from diffpy.refinementdata.plot.figure import Figure - 498 name = ','.join([dataset.name for dataset in ydatasets]) - 499 figure = Figure(self.mainframe, name) - 500 if xlabel: - 501 figure.selection.xlabel = xlabel - 502 - 503 # prepare the metadata, using all refinement metadata - 504 datasets = ydatasets[:] - 505 if xdataset: - 506 datasets.append(xdataset) - 507 fits = set() - 508 for dataset in datasets: - 509 fits.add(dataset.owner.findRefinement()) - 510 - 511 metadata = [] - 512 for fit in fits: - 513 metadata.extend(fit.getMetaData()) - 514 - 515 figure.plot(xdataset, ydatasets, metadata=metadata) - 516 self.plots.append(figure) - 517 figure.frame.updateIndexBox() - 518 return figure -
      519 -
      520 - def plotHistory(self, datasets): -
      521 """ - 522 Make a plot of the historic values of selected parameters. - 523 - 524 @type datasets: a list of Dataset objects - 525 @param datasets: the data to be plotted - 526 @return: no return value - 527 """ - 528 histories = [] - 529 for dataset in datasets: - 530 history = dataset.owner.getHistory(dataset.name) - 531 if history is not None: - 532 histories.append(history) - 533 - 534 self.plot(histories, xlabel='step') - 535 return -
      536 -
      537 - def plotPatterns(self, objects): -
      538 """Make a quick plot of patterns. - 539 - 540 objects -- a list of selected objects - 541 """ - 542 from diffpy.refinementdata.plot.patternfigure import PatternFigure - 543 def _plotPattern(_pattern): - 544 _figure = PatternFigure(self.mainframe, _pattern.path, figsize=(6, 4)) - 545 _figure.selection.addMetadata(_pattern.findRefinement().getMetaData()) - 546 _figure.plotPattern(_pattern) - 547 _figure.frame.updateIndexBox() - 548 self.plots.append(_figure) -
      549 - 550 - 551 for object in objects: - 552 if isinstance(object, Pattern): - 553 _plotPattern(object) - 554 else: - 555 patterns = object.listObjects(Pattern, True) - 556 if patterns: - 557 for pattern in patterns: - 558 _plotPattern(pattern) - 559 return -
      560 -
      561 - def updateFit(self, fitrt): -
      562 """ - 563 Update the fit data with an fit object. - 564 - 565 @param fitrt: the run-time fit instance - 566 @return: no return value - 567 """ - 568 # change steps. - 569 fitrt.fit.steps[fitrt.index] = fitrt.step+1 - 570 - 571 def _updateValue(parpath): - 572 # get the latest value from the refinement - 573 _value = fitrt.enginefit.getByPath(parpath) - 574 - 575 # get the historical storge of the parameter - 576 _history = fitrt.fit.getHistoryByPath(parpath) - 577 if _history is None: - 578 _history = fitrt.fit.addHistoryByPath(parpath) - 579 - 580 _history.update(fitrt.step, _value, fitrt.index) - 581 - 582 # data is the up-to-date storage - 583 _param = fitrt.fit.getByPath(parpath) - 584 _param[fitrt.index] = _value - 585 - 586 return - 587 - 588 def _updateSigma(constraint): - 589 # get the sigma, using the constraint's parname without index - 590 _path = constraint.owner.path+'.'+constraint.parname - 591 _sigma = fitrt.fit.getSigmaByPath(_path) - 592 - 593 if _sigma is None: - 594 _sigma = fitrt.fit.addSigmaByPath(_path) - 595 - 596 if constraint.index is not None: - 597 if fitrt.index is None: - 598 _index = constraint.index - 599 else: - 600 if isinstance(fitrt.index, tuple): - 601 _index = list(fitrt.index) - 602 else: - 603 _index = [fitrt.index,] - 604 _index.append(constraint.index) - 605 _index = tuple(_index) - 606 _sigma[_index] = constraint.sigma - 607 else: - 608 _sigma[fitrt.index] = constraint.sigma - 609 - 610 return - 611 - 612 def _tolist(refl): - 613 # put the reflection positiosn to a list of positions - 614 _value = [] - 615 for key in refl: - 616 for dd in refl[key]: - 617 for val in dd.values(): - 618 _value.append(val[0]) - 619 #_value = [x[0] for x in refl[0][0].values()] - 620 _value.sort() - 621 return _value - 622 - 623 # get all constrained parameter paths, but count paramlist only once. - 624 pathlist = [ c.owner.path+'.'+c.parname for c in fitrt.enginefit.Refine.constraints] - 625 pathlist = set(pathlist) - 626 - 627 for path in pathlist: - 628 _updateValue(path) - 629 # update Uiso in fullprof or Biso in GSAS refinemetns - 630 if path.endswith('Uiso') or path.endswith('Biso'): - 631 if path.endswith('Uiso'): - 632 _path = path.rsplit('.', 1)[0] + '.Biso' - 633 elif path.endswith('Biso'): - 634 _path = path.rsplit('.', 1)[0] + '.Uiso' - 635 _updateValue(_path) - 636 - 637 for constraint in fitrt.enginefit.Refine.constraints: - 638 _updateSigma(constraint) - 639 # update Uiso in fullprof or Biso in GSAS refinemetns - 640 if constraint.parname in ['Biso', 'Uiso']: - 641 if constraint.parname == 'Uiso': - 642 _parname = 'Biso' - 643 elif constraint.parname == 'Biso': - 644 _parname = 'Uiso' - 645 - 646 _path = constraint.owner.path + '.' + _parname - 647 _sigma = fitrt.fit.getSigmaByPath(_path) - 648 - 649 if _sigma is None: - 650 _sigma = fitrt.fit.addSigmaByPath(_path) - 651 - 652 if _parname == 'Biso': - 653 _val = constraint.sigma * 8 * math.pow(math.pi, 2) - 654 elif _parname == 'Uiso': - 655 _val = constraint.sigma / ( 8 * math.pow(math.pi, 2)) - 656 - 657 if constraint.index is not None: - 658 if fitrt.index is None: - 659 _index = constraint.index - 660 else: - 661 if isinstance(fitrt.index, tuple): - 662 _index = list(fitrt.index) - 663 else: - 664 _index = [fitrt.index,] - 665 _index.append(constraint.index) - 666 _index = tuple(_index) - 667 - 668 _sigma[_index] = _val - 669 else: - 670 _sigma[fitrt.index] = _val - 671 - 672 - 673 _updateValue('Chi2') - 674 - 675 for pattern in fitrt.enginefit.Pattern.get(): - 676 _updateValue(pattern.path+'.Rp') - 677 _updateValue(pattern.path+'.Rwp') - 678 - 679 # update the histogram value saved in pattern - 680 for dname in ['xobs', 'yobs', 'ycal', 'refl']: - 681 mypattern = fitrt.fit.getByPath(pattern.path) - 682 dataset = mypattern.get(dname) - 683 if dname == 'refl': - 684 data = _tolist(getattr(pattern, '_reflections')) - 685 else: - 686 data = getattr(pattern, '_'+dname) - 687 if dataset is None: - 688 mypattern.set(dname, data, repeat=True, grow=True) - 689 else: - 690 dataset[fitrt.index] = data - 691 - 692 - 693 if self.mainframe: - 694 from diffpy.refinementdata.plot import backend - 695 backend.lock() - 696 if fitrt.step > 0: - 697 self.mainframe.updateStrategyPanel(fitrt) - 698 self.updatePlot(fitrt.index) - 699 backend.unlock() - 700 return - 701 -
      702 - def updatePaths(self): -
      703 """ - 704 Update the histogram and instrument file paths saved in the project - 705 @return: no return value - 706 """ - 707 for fit in self.listRefinements(): - 708 patterns = fit.getObject("Pattern") - 709 for pt in patterns: - 710 for param in ['Datafile', 'MFIL', 'Instrumentfile']: - 711 ds = pt.get(param) - 712 if ds: - 713 for idx in fit.range(): - 714 fit.findFileFromDataset(ds, idx) - 715 return -
      716 -
      717 - def updatePlot(self, index=None): -
      718 """ - 719 Update all plots based the data in the project - 720 - 721 @type index: tuple or int - 722 @param index: the index of the curve in the plot - 723 @return: no return value - 724 """ - 725 for plot in self.plots[:]: - 726 if plot.alive: - 727 plot.update(index) - 728 else: - 729 self.plots.remove(plot) - 730 - 731 return -
      732 -
      733 - def saveToDisk(self, fullpath): -
      734 """ - 735 Save the project data to local drive. - 736 - 737 @type fullpath: file path string - 738 @param fullpath: the file path to save the project data - 739 @return: no return value - 740 """ - 741 self.save() - 742 try: - 743 - 744 # if file names are same, remove the original one first - 745 srcpath = self.fullpath - 746 - 747 if self.fullpath == fullpath: - 748 tmpfobj, tmpfpath = tempfile.mkstemp() - 749 shutil.copy2(self.fullpath, tmpfpath) - 750 os.remove(fullpath) - 751 srcpath = tmpfpath - 752 - 753 shutil.copy2(srcpath, fullpath) - 754 # change the mode of a new file - 755 os.chmod(fullpath, stat.S_IRUSR|stat.S_IWUSR|stat.S_IRGRP|stat.S_IROTH) - 756 self.basepath = os.path.dirname(fullpath) - 757 self.fullpath = fullpath - 758 self.__updateRelativePaths() - 759 self.save() - 760 - 761 except Exception,e: - 762 if GLOBALS.isDebug: - 763 import sys, traceback - 764 exc_type, exc_value, exc_traceback = sys.exc_info() - 765 traceback.print_exception(exc_type, exc_value, exc_traceback, - 766 limit=2, file=sys.stdout) - 767 else: - 768 raise SrrIOError("Can not save file: " + str(e)) - 769 - 770 return -
      771 -
      772 - def verifyFitName(self, fitName): -
      773 """ - 774 Compare the fitname with existing names of refienments in the project. - 775 A valid name will be returned. - 776 - 777 - All the I{dots (.)} will be replaced with I{underscore (_)} - 778 - The same refinement names will be surfixed with numbers with brakets - 779 such as I{Refinement}, I{Refinement (1)}, I{Refinement (2)} - 780 @type fitName: string - 781 @param fitName: refinement name to be verified - 782 - 783 @return: If fitName is valid, return value - 784 will be the same as fitName; if fitName conains invalid - 785 characters or has duplications, a valid refinement name will - 786 be returned - 787 """ - 788 nameid = 0 - 789 fitName = fitName.replace('.', '_') - 790 for fit in self.listRefinements(): - 791 if fit.name == fitName: - 792 nameid += 1 - 793 if nameid != 0: - 794 newname = fitName + "_%s"%(nameid) - 795 else: - 796 newname = fitName - 797 - 798 return newname -
      799 -
      800 - def __export(self, filePath): -
      801 """ - 802 Export the project to another location, without changing the original file - 803 This is different from saving as, since the original state, basepath, - 804 etc. of the project is not changed. The original file will be copied to - 805 a temp dir, and then the project will be saved to the export directory. - 806 Then the protected old file will be saved back - 807 - 808 @type filePath: file path string - 809 @param filePath: the file path where the project will be exported - 810 @return: no return value - 811 """ - 812 - 813 oldPath = self.fullpath - 814 oldBase = self.basepath - 815 oldAltered = self.altered - 816 tmpfile, tmppath = tempfile.mkstemp() - 817 - 818 shutil.copy(self.fullpath, tmppath) - 819 - 820 self.saveToDisk(filePath) - 821 - 822 shutil.copy(tmppath, oldPath) - 823 try: - 824 os.remove(tmppath) - 825 except: - 826 UTILS.printWarning("Can not delete the temp project file after archive the project") - 827 - 828 self.fullpath = oldPath - 829 self.basepath = oldBase - 830 self.altered = oldAltered - 831 self.__updateRelativePaths() - 832 - 833 return -
      834 -
      835 - def __updateRelativePaths(self, basepath = None): -
      836 """ - 837 As long as the base path is changed, the relative paths saved in - 838 patterns need to be updated. - 839 - 840 @type basepath: folder path string - 841 @param basepath: the basepath used to determine the relative path, use - 842 project basepath if None - 843 @return: no return value - 844 - 845 """ - 846 if basepath is None: basepath = self.basepath - 847 - 848 fits = self.listRefinements() - 849 for fit in fits: - 850 patterns = fit.getObject("Pattern") - 851 for pt in patterns: - 852 for param in ['Datafile', 'MFIL', 'Instrumentfile']: - 853 ds = pt.get(param) - 854 if ds is not None: - 855 for idx in fit.range(): - 856 filepath = fit.findFileFromDataset(ds, idx) - 857 if filepath is not None: - 858 fit.saveFilePathToDataset(filepath, ds, - 859 index = idx, - 860 basepath = basepath) - 861 - 862 return -
      863 -
      864 - def __getResourceFileAbsPath(self, relFilePath, engineFileDir): -
      865 """ - 866 Get the absolute file path. The filePath may be relative, to the engine file - 867 directory, which may also be different from the current working dir - 868 - 869 @type relFilePath: file path string - 870 @param relFilePath: relative file path - 871 @type engineFileDir: directory path string - 872 @param engineFileDir: the directory where the engine file sits - 873 @return: the absolute file path - 874 """ - 875 absFilePath = None - 876 if not os.path.isabs(relFilePath): - 877 absFilePath = os.path.join(engineFileDir, relFilePath) - 878 else: - 879 absFilePath = relFilePath - 880 return absFilePath -
      881 - 882 # end class Project - 883 - 884 ## Import/Export an engine object. - 885 # The following functions Define the translation from Rietveld engine classes - 886 # to RefinementData classes - 887 -
      888 -def importEngineObject(myobjowner, engineobj, id, index=None): -
      889 """ - 890 Import an engine object into myobject - 891 - 892 @type myobjowner: an data object - 893 @param myobjowner: the owner of the refinement object to be created - 894 @type engineobj: an engine fit object - 895 @param engineobj: the engine object to be imported - 896 @type id: integer or string - 897 @param id: the name/index of the refinement object to be created/obtained in myobjowner - 898 @type index: index or tuple - 899 @param index: when modify an object, indicate the index to the value to be modified - 900 - 901 return: the newly created local object - 902 """ - 903 # Do not import refine and its children - 904 if engineobj.__class__.__name__.startswith('Refine'): - 905 return None - 906 - 907 - 908 myobj = myobjowner.getObject(id) - 909 if myobj is None: - 910 #Get the corresponding HDF5 class - 911 objclassname = engineobj.__class__.__name__ - 912 if objclassname.startswith('Fit'): - 913 myobjclass = Refinement - 914 elif objclassname.startswith('Pattern'): - 915 myobjclass = Pattern - 916 elif objclassname.startswith('Phase'): - 917 myobjclass = Phase - 918 elif objclassname.startswith('Profile'): - 919 myobjclass = Profile - 920 elif engineobj.name.startswith('Atom['): - 921 myobjclass = Atom - 922 elif engineobj.name.startswith('ExcludedRegion['): - 923 myobjclass = ExcludedRegion - 924 else: - 925 # if nothing matches, return the default storage type - 926 myobjclass = Refinable - 927 - 928 #Create the HDF5 Object - 929 if isinstance(myobjowner, ObjectList): - 930 assert(id==len(myobjowner)) - 931 myobj = myobjowner.appendObject(myobjclass) - 932 else: - 933 myobj = myobjowner.addObject(id, myobjclass) - 934 - 935 myobj.setAttr('rietveldcls', engineobj.__class__.__module__ + '.' - 936 + engineobj.__class__.__name__) - 937 engineobjclass = getattr(__import__(engineobj.__class__.__module__, - 938 globals(), locals(), - 939 [engineobj.__class__.__name__], -1), - 940 engineobj.__class__.__name__) - 941 myobj.info = ObjectInfo(engineobjclass) - 942 - 943 if engineobj.__class__.__name__.startswith("Contribution"): - 944 myobj.setAttr("phaseindex", engineobj.getPhaseIndex()) - 945 myobj.setAttr("patternindex", engineobj.getPatternIndex()) - 946 - 947 def _importEngineParameter(infodict): - 948 for param in infodict: - 949 # update parameter itself - 950 dataset = myobj.get(param) - 951 - 952 if dataset is None: - 953 info = infodict[param] - 954 grow = False - 955 #NOTE: since there are two engine classes for the same thing, we - 956 # check its name instead the type. - 957 if info.__class__.__name__ == 'StringInfo' and not info.fixlen: - 958 grow = True - 959 - 960 dataset = myobj.set(param, engineobj.get(param), repeat=True, grow=grow) - 961 if dataset.name == 'BACK': - 962 labels = myobj.labels - 963 labels.append('Order') - 964 dataset.setLabels(labels) - 965 else: - 966 dataset[index] = engineobj.get(param) -
      967 - 968 # add parameters - 969 _importEngineParameter(engineobj.ParamDict) - 970 - 971 # add parameter list - 972 _importEngineParameter(engineobj.ParamListDict) - 973 - 974 # add subclass, which is a single object - 975 for childname in engineobj.ObjectDict: - 976 engineobjchild = engineobj.get(childname) - 977 importEngineObject(myobj, engineobjchild, childname, index=index) - 978 - 979 # add container, which is a list of objects - 980 for childname in engineobj.ObjectListDict: - 981 mycontainer = myobj.getObject(childname) - 982 if mycontainer is None: - 983 mycontainer = myobj.addObject(childname, ObjectList) - 984 mycontainer.info = ObjectInfo() - 985 enginecontainer = engineobj.get(childname) - 986 for i in range(len(enginecontainer)): - 987 engineobjchild = engineobj.get(childname, i) - 988 importEngineObject(mycontainer, engineobjchild, i, index=index) - 989 - 990 return myobj - 991 - 992 -
      993 -def exportEngineObject(engineobjowner, key, myobj, index=None): -
      994 """ - 995 Export a saved HDF5Object to an engine object. - 996 - 997 @type engineobjowner: a data object - 998 @param engineobjowner: the owner of the engine object - 999 -1000 @type myobj: a refinement object -1001 @param myobj: the source refinement object -1002 @type index: interger or tuple -1003 @param index: the index to the single value if the object is multiplexed -1004 -1005 @return: the newly created engine object -1006 """ -1007 try: -1008 engineclassname = myobj.getAttr('rietveldcls') -1009 modulename, classname = engineclassname.rsplit('.', 1) -1010 module = __import__(modulename, globals(), locals(), [classname], -1) -1011 engineclass = getattr(module, classname) -1012 except (ImportError, AttributeError, ValueError): -1013 #NOTE: If one class is removed after upgrade, do error handling here. -1014 raise DataError('Unknown object "%s" found.'%engineclassname) -1015 -1016 engineobj = engineclass(engineobjowner) -1017 -1018 if engineobjowner is not None: -1019 engineobjowner.set(key, engineobj) -1020 -1021 # traverse the HDF5Object -1022 import numpy -1023 for param in myobj.list(): -1024 if param.name not in engineobj.ParamDict and param.name not in engineobj.ParamListDict: -1025 continue -1026 if len(param.shape) == 0: # unrefined fit -1027 value = param.first() -1028 else: -1029 value = param[index] -1030 -1031 if isinstance(value, numpy.ndarray): -1032 if value.ndim == 1: -1033 for x in value: -1034 engineobj.set(param.name, x) -1035 elif value.ndim == 0: -1036 engineobj.set(param.name, value[()]) -1037 else: -1038 raise DataError('Parameter "%s" has more than one dimensions' %param) -1039 continue -1040 engineobj.set(param.name, value) -1041 -1042 # parse the object -1043 for myobjchild in myobj.objects: -1044 subkey = myobjchild.name -1045 if isinstance(myobjchild, ObjectList): -1046 # this is a container object -1047 for obj in myobjchild.objects: -1048 exportEngineObject(engineobj, subkey, obj, index) -1049 else: -1050 exportEngineObject(engineobj, subkey, myobjchild, index) -1051 -1052 return engineobj -
      1053 -
      1054 -def copyObjectData(srcobj, destobj, srcindexlist, destindexlist): -
      1055 """ -1056 Copy data to another object. -1057 -1058 srcobj -- the source object -1059 destobj -- the target parent object -1060 srcindexlist -- a list of indices to read data from srcobj -1061 destindexlist -- a list of indices to write data to destobj -1062 """ -1063 # copy attributes -1064 for attr, val in srcobj.listAttrs(withValue=True): -1065 destobj.setAttr(attr, val) -1066 -1067 destobj.copyMeta(srcobj) -1068 -1069 # set data -1070 for srcdata in srcobj.list(): -1071 destdata = destobj.get(srcdata.name) -1072 if destdata is None: -1073 # create one -1074 destdata = destobj.replicate(srcdata, srcindexlist[0], None) -1075 -1076 for srcindex, destindex in zip(srcindexlist, destindexlist): -1077 destdata[destindex] = srcdata[srcindex] -1078 -1079 if isinstance(srcobj, ObjectList): -1080 # traverse by index -1081 for i, childobj in enumerate(srcobj.listObjects()): -1082 destchildobj = destobj.getObject(i) -1083 if destchildobj is None: -1084 # the destobj's children are down by 1 -1085 destchildobj = destobj.appendObject(childobj.__class__) -1086 -1087 # copy data -1088 copyObjectData(childobj, destchildobj, srcindexlist, destindexlist) -1089 else: # a normal object -1090 # traverse by name -1091 for childobj in srcobj.listObjects(): -1092 destchildobj = destobj.getObject(childobj.name) -1093 if destchildobj is None: -1094 destchildobj = destobj.addObject(childobj.name, childobj.__class__) -1095 -1096 copyObjectData(childobj, destchildobj, srcindexlist, destindexlist) -1097 -1098 if isinstance(srcobj, Refinable): -1099 # A Refinable instance. Both src and dest has history and sigma by default -1100 copyObjectData(srcobj.history, destobj.history, srcindexlist, destindexlist) -1101 copyObjectData(srcobj.sigma, destobj.sigma, srcindexlist, destindexlist) -1102 -1103 return destobj -
      1104 # EOF -1105 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.project.Project-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.project.Project-class.html deleted file mode 100644 index 444923e4..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.project.Project-class.html +++ /dev/null @@ -1,1216 +0,0 @@ - - - - - diffpy.srrietveld.project.Project - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module project :: - Class Project - - - - - -
      [frames] | no frames]
      -
      - -

      Class Project

      source code

      -
      -                       object --+        
      -                                |        
      -refinementdata.hdf5.object.Object --+    
      -                                    |    
      -       refinementdata.project.Project --+
      -                                        |
      -                                       Project
      -
      - -
      -

      Project class defines a SrRietveld refinement project. It consists of - a number of single refinements. A project can call different Rietveld - engines to run its refinements.

      -

      A project object contains the list of refinemenets, and list of - jobs.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - path, - mode='a', - mainframe=None)
      - Create a SrRietveld project from saved project data file.
      - source code - -
      - -
      -   - - - - - - -
      addJob(self, - job)
      - Add a job to the job list of the project
      - source code - -
      - -
      -   - - - - - - -
      addToZip(self, - zipFilePath)
      - Archive the project data file, and other associated files, such as - the histogram files, instrument files, and incident spectrum files - into a zip folder.
      - source code - -
      - -
      -   - - - - - - -
      close(self)
      - Close the opened project.
      - source code - -
      - -
      -   - - - - - - -
      deleteJob(self, - job)
      - Delete job from the job list
      - source code - -
      - -
      -   - - - - - - -
      exportEngineFit(self, - refinementObj, - index=None)
      - Build an engine fit based on given fit and index.
      - source code - -
      - -
      -   - - - - - - -
      getRefinementByName(self, - name)
      - Get the refinement object by its name
      - source code - -
      - -
      -   - - - - - - -
      importDataFiles(self)
      - Read the data files and instrument files into the pattern objects
      - source code - -
      - -
      -   - - - - - - -
      importEngineFile(self, - fullpath, - refinementObjName=None)
      - Import an engine file (EXP or pcr files).
      - source code - -
      - -
      -   - - - - - - -
      importEngineFit(self, - enginefit, - name, - fullpath, - index=None)
      - Import an engine Fit object.
      - source code - -
      - -
      -   - - - - - - -
      importProject(self, - projPath)
      - Import the refinements from another project file.
      - source code - -
      - -
      -   - - - - - - -
      listParams(self, - obj, - recursively=False, - excluded=[])
      - List all parameters in an object.
      - source code - -
      - -
      -   - - - - - - -
      listRefinementNames(self)
      - Different from the methdo listRefinemetns, this function will return - a list of names of the refinements
      - source code - -
      - -
      -   - - - - - - -
      plot(self, - ydatasets, - xdataset=None, - xlabel='')
      - Make a plot of selected Dataset objects
      - source code - -
      - -
      -   - - - - - - -
      plotHistory(self, - datasets)
      - Make a plot of the historic values of selected parameters.
      - source code - -
      - -
      -   - - - - - - -
      plotPatterns(self, - objects)
      - Make a quick plot of patterns.
      - source code - -
      - -
      -   - - - - - - -
      saveToDisk(self, - fullpath)
      - Save the project data to local drive.
      - source code - -
      - -
      -   - - - - - - -
      updateFit(self, - fitrt)
      - Update the fit data with an fit object.
      - source code - -
      - -
      -   - - - - - - -
      updatePaths(self)
      - Update the histogram and instrument file paths saved in the project
      - source code - -
      - -
      -   - - - - - - -
      updatePlot(self, - index=None)
      - Update all plots based the data in the project
      - source code - -
      - -
      -   - - - - - - -
      verifyFitName(self, - fitName)
      - Compare the fitname with existing names of refienments in the - project.
      - source code - -
      - -
      -

      Inherited from refinementdata.project.Project: - add, - addRefinement, - listRefinements, - removeRefinement -

      -

      Inherited from refinementdata.hdf5.object.Object: - addObject, - copy, - copyMeta, - delete, - exportFile, - get, - getAttr, - getByPath, - getFlatIndex, - getMetaData, - getMultiDimIndex, - getObject, - getPyObj, - hasAttr, - hasMeta, - importFile, - isDescendant, - list, - listAttrs, - listNames, - listObjects, - load, - loadLocalData, - loadLocalObjects, - loadObject, - move, - range, - readStr, - removeObject, - rename, - repeat, - replicate, - reshape, - save, - set, - setAttr, - setByPath, - setLabels, - setPyObj, - unset, - unsetAttr, - writeStr -

      -

      Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

      -
      - - - - - - - - - -
      - Properties
      -

      Inherited from refinementdata.hdf5.object.Object: - labels, - name, - ndim, - path -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - path, - mode='a', - mainframe=None) -
      (Constructor) -

      -
      source code  -
      - -

      Create a SrRietveld project from saved project data file.

      -
      -
      Parameters:
      -
        -
      • path (file path string) - the path of the project data file. If it does not exist, an empty - project will be created.
      • -
      • mode (one character string, possible value r, w, a) - the mode to open the project. -
          -
        • - r -- read, -
        • -
        • - w -- write, -
        • -
        • - a -- append -
        • -
      • -
      • mainframe (the main frame object) - the pointer to the main window in the GUI object set to be None - in script mode
      • -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      addJob(self, - job) -

      -
      source code  -
      - -

      Add a job to the job list of the project

      -
      -
      Parameters:
      -
        -
      • job (a Job object) - a refinement job to be added
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      addToZip(self, - zipFilePath) -

      -
      source code  -
      - -

      Archive the project data file, and other associated files, such as the - histogram files, instrument files, and incident spectrum files into a zip - folder.

      -
      -
      Parameters:
      -
        -
      • zipFilePath (zip file path string) - the full path to save the zip file
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      close(self) -

      -
      source code  -
      - -

      Close the opened project.

      -
      -
      Returns:
      -
      no return value
      -
      Overrides: - refinementdata.project.Project.close -
      -
      -
      -
      - -
      - -
      - - -
      -

      deleteJob(self, - job) -

      -
      source code  -
      - -

      Delete job from the job list

      -
      -
      Parameters:
      -
        -
      • job (a job object) - the job to be deleted
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      exportEngineFit(self, - refinementObj, - index=None) -

      -
      source code  -
      - -

      Build an engine fit based on given fit and index.

      -
      -
      Parameters:
      -
        -
      • refinementObj (a diffpy.refinementdata.Refinement object or its derivatives) - a refinement usually contains a series of single refinements The - information will be read from this object to construct a engine - fit, which contains information for a single step refinement
      • -
      • index (tuple or int) - the index of the single refinement in the refinementObj a tuple - represents the index in a multidimensinal data if the - refinementObj is one dimensional, index can be an integer
      • -
      -
      Returns:
      -
      an engine fit object
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefinementByName(self, - name) -

      -
      source code  -
      - -

      Get the refinement object by its name

      -
      -
      Parameters:
      -
        -
      • name (string) - the refinement name to get
      • -
      -
      Returns:
      -
      the refinement object with the name, None if there is no such - refinement object. If there are duplicate names, the first - refinement object with this name will be returned, and the - program with emit a warning
      -
      -
      -
      - -
      - -
      - - -
      -

      importDataFiles(self) -

      -
      source code  -
      - -

      Read the data files and instrument files into the pattern objects

      -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      importEngineFile(self, - fullpath, - refinementObjName=None) -

      -
      source code  -
      - -

      Import an engine file (EXP or pcr files). A refinement will be created - based on the data in the imported engine file.

      -
      -
      Parameters:
      -
        -
      • fullpath (file path string) - the full file path of the engine file to be imported
      • -
      • refinementObjName (string) - the proposed name of the refinement object to be created. If the - refinementObjName is None, the engine file name will be used
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      importEngineFit(self, - enginefit, - name, - fullpath, - index=None) -

      -
      source code  -
      - -

      Import an engine Fit object. It is provided for backward compatiblity, - namely when the fit is created using xml interface.

      -
      -
      Parameters:
      -
        -
      • enginefit (an engine Fit object) - the engine fit, which contains all the information for one - refinement for that engine (GSAS or FullProf)
      • -
      • name (string) - the name to be assigned to the new Fit object
      • -
      • fullpath (file path string) - the fullpath is used to locate the supplement files (data, - instrument, engine files)
      • -
      • index () - the index to a Fit in a Fit array ( not applicable if shape is - given )
      • -
      -
      Returns:
      -
      the new Fit object
      -
      -
      -
      - -
      - -
      - - -
      -

      importProject(self, - projPath) -

      -
      source code  -
      - -

      Import the refinements from another project file.

      -
      -
      Parameters:
      -
        -
      • projPath (file path string) - the file path of the project to be imported.
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      listParams(self, - obj, - recursively=False, - excluded=[]) -

      -
      source code  -
      - -

      List all parameters in an object.

      -
      -
      Parameters:
      -
        -
      • obj (a data object) - the object whose parameters to be listed
      • -
      • recursively (boolean) - if True, the parameters in the sub-objects will be included. - False otherwise
      • -
      • excluded (a list of objects, whose child parameters should be excluded in - the result)
      • -
      -
      Returns:
      -
      a list of parameters (Dataset object).
      -
      -
      -
      - -
      - -
      - - -
      -

      listRefinementNames(self) -

      -
      source code  -
      - -

      Different from the methdo listRefinemetns, this function will return a - list of names of the refinements

      -
      -
      Returns:
      -
      the names of the refinements in this project
      -
      -
      -
      - -
      - -
      - - -
      -

      plot(self, - ydatasets, - xdataset=None, - xlabel='') -

      -
      source code  -
      - -

      Make a plot of selected Dataset objects

      -
      -
      Parameters:
      -
        -
      • ydatasets (a list of Dataset objects) - contains the list of y values in the plot
      • -
      • xdataset (a Dataset object) - the x values in the plot. If xdataset is None a list of - consecutive integers will be used
      • -
      -
      Returns:
      -
      the plot figure object
      -
      -
      -
      - -
      - -
      - - -
      -

      plotHistory(self, - datasets) -

      -
      source code  -
      - -

      Make a plot of the historic values of selected parameters.

      -
      -
      Parameters:
      -
        -
      • datasets (a list of Dataset objects) - the data to be plotted
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      plotPatterns(self, - objects) -

      -
      source code  -
      - -

      Make a quick plot of patterns.

      -

      objects -- a list of selected objects

      -
      -
      -
      -
      - -
      - -
      - - -
      -

      saveToDisk(self, - fullpath) -

      -
      source code  -
      - -

      Save the project data to local drive.

      -
      -
      Parameters:
      -
        -
      • fullpath (file path string) - the file path to save the project data
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      updateFit(self, - fitrt) -

      -
      source code  -
      - -

      Update the fit data with an fit object.

      -
      -
      Parameters:
      -
        -
      • fitrt - the run-time fit instance
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      updatePaths(self) -

      -
      source code  -
      - -

      Update the histogram and instrument file paths saved in the - project

      -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      updatePlot(self, - index=None) -

      -
      source code  -
      - -

      Update all plots based the data in the project

      -
      -
      Parameters:
      -
        -
      • index (tuple or int) - the index of the curve in the plot
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      verifyFitName(self, - fitName) -

      -
      source code  -
      - -

      Compare the fitname with existing names of refienments in the project. - A valid name will be returned.

      -
        -
      • - All the dots (.) will be replaced with underscore (_) -
      • -
      • - The same refinement names will be surfixed with numbers with brakets - such as Refinement, Refinement (1), Refinement - (2) -
      • -
      -
      -
      Parameters:
      -
        -
      • fitName (string) - refinement name to be verified
      • -
      -
      Returns:
      -
      If fitName is valid, return value will be the same as fitName; if - fitName conains invalid characters or has duplications, a valid - refinement name will be returned
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.refinement-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.refinement-module.html deleted file mode 100644 index 7c9d7aa1..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.refinement-module.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - diffpy.srrietveld.refinement - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module refinement - - - - - -
      [frames] | no frames]
      -
      - -

      Module refinement

      source code

      -

      Implementation of SrRietveld refinement class.

      - - - - - - - - - - -
      - Classes
      -   - - Refinement
      - The refinement (fit) class for SrRietveld. -
      - - - - - - - - - - - - - - - -
      - Variables
      -   - - PARAMNAMES = {'fullprof': {'Biso': 'AtomicDisplacementFactor.B... -
      -   - - __id__ = '$Id: refinement.py 6724 2011-08-25 09:31:57Z yshang $' -
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - DataFile, - DataRefinement, - Pattern, - Phase, - Profile, - StrategyFile, - UTILS, - copy, - os, - printWarning, - shutil -


      - - - - - - -
      - Variables Details
      - -
      - -
      -

      PARAMNAMES

      - -
      -
      -
      -
      Value:
      -
      -{'fullprof': {'Biso': 'AtomicDisplacementFactor.Biso',
      -              'Rp': 'Rp',
      -              'Rwp': 'Rwp',
      -              'Tmax': 'Thmin',
      -              'Tmin': 'Thmax',
      -              'Uiso': 'AtomicDisplacementFactor.Uiso',
      -              'X': 'X',
      -              'Y': 'Y',
      -...
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.refinement-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.refinement-pysrc.html deleted file mode 100644 index b8e58752..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.refinement-pysrc.html +++ /dev/null @@ -1,1007 +0,0 @@ - - - - - diffpy.srrietveld.refinement - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module refinement - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.refinement

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Yingrui Shang 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """Implementation of SrRietveld refinement class. 
      - 16  """ 
      - 17   
      - 18  __id__ = "$Id: refinement.py 6724 2011-08-25 09:31:57Z yshang $" 
      - 19   
      - 20  import os, shutil, copy 
      - 21  from diffpy.refinementdata.refinement import Refinement as DataRefinement  
      - 22  from diffpy.srrietveld.utility import printWarning 
      - 23  from diffpy.srrietveld.convert.datafile import DataFile 
      - 24  from diffpy.srrietveld.convert.strategyfile import StrategyFile 
      - 25  from diffpy.srrietveld.phase import Phase 
      - 26  from diffpy.srrietveld.pattern import Pattern 
      - 27  from diffpy.srrietveld.profile import Profile 
      - 28  import diffpy.srrietveld.utility as UTILS 
      - 29  from diffpy.srrietveld.paramnames import PARAMNAMES 
      -
      30 - 31 -class Refinement(DataRefinement): -
      32 '''The refinement (fit) class for SrRietveld. A refinement object contains - 33 information for a series of single refinement. It contains the subobjects - 34 such as the Pattern, Profile, and Contribution. ''' - 35 -
      36 - def __init__(self, owner, name=None, handle=None, shape=None): -
      37 '''constructor''' - 38 DataRefinement.__init__(self, owner, name, handle, shape) - 39 - 40 return -
      41 -
      42 - def addParamToStrategy(self, datapath, step = None): -
      43 '''Add a parameter to strategy. The included parameters will be turned on - 44 in the refinement. - 45 - 46 @type datapath: string - 47 @param datapath: the dataset signature path to be added to the strategy - 48 @type step: integer - 49 @param step: the step of the strategy to which the parameter will be added - 50 - None, the parameter will be added to all steps - 51 - step >= total number of existing steps, a new step will be - 52 added to the strategy list. The new step includes the - 53 new parameter, and all previously included parameters - 54 - 0 <= step < total number of existing steps, the new parameter - 55 will be added to the step - 56 @return: no return value - 57 ''' - 58 - 59 # NOTE: the menu list is the same in one step strategy style - 60 paramPaths = self.getParamListForStrategy(datapath) - 61 - 62 for paramPath in paramPaths: - 63 strategy = StrategyFile(self, strategy = self.strategy) - 64 stepid = strategy.getNumStep() - 65 - 66 value = "" - 67 formula = "1.0*Var_" + str(strategy.getNewVariableId()) - 68 if step >= self.numStrategySteps: # add one more step if the step number is 1 more to the max step id - 69 lastparamlist = strategy.getStepParamList(stepid) - 70 currparamlist = strategy.mergeParamList( - 71 [paramPath, value, formula], lastparamlist) - 72 method = strategy.getStepMethod(stepid) - 73 strategy.addNewStep(stepid, method, currparamlist) - 74 elif step is None: # if step is None, add to all steps - 75 for step in range(stepid): - 76 if not self.isParamTurnedOn(paramPath, step): - 77 strategy.addParam(step + 1, 0, paramPath, value, formula) - 78 - 79 else: # add to a specific step - 80 assert(step < stepid and step >= 0) - 81 if not self.isParamTurnedOn(paramPath, step): - 82 strategy.addParam(step + 1, 0, paramPath, value, formula) - 83 - 84 self.setStrategy(strategy.strategy) - 85 - 86 return -
      87 -
      88 - def dumpDataFile(self, directory, index, bankid = 0): -
      89 '''Dump the datafile for refinement in index - 90 - 91 @type directory: directory path string - 92 @param directory: the directory where the data files will be saved - 93 @type index: integer or tuple - 94 @param index: the index of the single refinement - 95 @type bankid: integer - 96 @param bankid: the bank id of the pattern to look for - 97 @return: the list of data file path saved, listed same as the bank number - 98 if the file is not found or not set, the item is None - 99 ''' -100 rv = None -101 # dump files in patterns -102 pt = self.getObject('Pattern')[bankid] -103 ds = pt.get('Datafile') -104 rv = self.dumpFileFromDataset(directory, ds, index) -105 -106 # if not found in the relative path and absolute path dataset, -107 # try to convert it from the -108 if not rv: -109 absds = pt.get('Datafile_abspath') -110 abspath = str(absds[index]) -111 basename = os.path.basename(abspath) -112 rootname, ext = os.path.splitext(basename) -113 -114 df = self.getDataFileFromPattern(index, bankid, rootname = rootname) -115 -116 if df: -117 # change the extension to .dat, since the converted file will be -118 # a two/three column file -119 basename = rootname + '.dat' -120 newpath = os.path.join(directory, basename) -121 df.write(newpath) -122 rv = newpath -123 -124 return rv -
      125 -
      126 - def dumpEngineFile(self, directory, index, basename = None): -
      127 '''dump the engine file to the directory -128 -129 @type directory: directory path string -130 @param directory: the directory where the file will be saved -131 @type index: integer or tuple -132 @param index: the data index of the engine file -133 @type basename: string -134 @param basename: the file name of the engine file -135 @return: the path of the engine file''' -136 -137 ds = self.get('enginefile') -138 if not basename: -139 basename = self.name + '.' +self.getEngineFileExt() -140 -141 newpath = os.path.join(directory, basename) -142 -143 with open(newpath, 'w') as f: -144 f.write( str(ds[index]) ) -145 -146 return -
      147 -
      148 - def dumpFiles(self, directory, index): -
      149 '''Dump the files for refinement, including all the files needed to -150 run the refinement (datafile, instrument file, incident spectrum file, engine file) -151 -152 @type directory: directory path string -153 @param directory: the directory where the files will be saved -154 @type index: integer or tuple -155 @param index: the index of the refinement to dump -156 @return: no return value -157 ''' -158 assert(os.path.isdir(directory)) -159 -160 # dump pattern files -161 patterns = self.getObject("Pattern") -162 for pt in patterns: -163 for param in ['Datafile', 'MFIL', 'Instrumentfile']: -164 ds = pt.get(param) -165 -166 # FullProf fit object does not have the MFIL data -167 if ds: -168 # try to find file from the 1) relative path; 2) absolute path -169 # 3) if the datafile, try to pull the data file from the pattern -170 relpath = str(ds[index]) -171 abspath = os.path.join(self.owner.basepath, relpath) -172 basename = os.path.basename(relpath) -173 newFilePath = os.path.join(directory, basename) -174 -175 if os.path.isfile(abspath): -176 shutil.copy(abspath, newFilePath) -177 __msg = 'The relative path of file (%s) is not valid, %s \n.' + \ -178 'Trying to use the absolute path saved in the project...' % (param, abspath) -179 -180 absds = pt.get(param + '_abspath') -181 if absds: -182 abspath = str(absds[index]) -183 -184 else: -185 __msg = 'The file (%s) in %s does not exist.' % (param, abspath) -186 printWarning(__msg) -187 -188 # export the engine file -189 ds = self.get('enginefile') -190 if not ds: -191 __msg = 'The engine file is not saved in the project' -192 printWarning(__msg) -193 else: -194 engText = str(ds[index]) -195 basename = self.name + '.' + self.getEngineFileExt() -196 filename = os.path.join(directory, basename) -197 with open(filename, 'w') as f: -198 f.write(filename) -199 -200 return -
      201 -
      202 - def dumpFileFromDataset(self, directory, ds, index, basename = None): -
      203 '''dump the files in pattern objects, such as Datafile, MFIL, and -204 Instrumentfile -205 -206 @type directory: directory path string -207 @param directory - the directory where the file will be saved -208 @type ds: a Dataset object -209 @param ds: the dataset stores the file path information -210 @type index: integer or tuple -211 @param index - the index in the dataset -212 @type basename: string -213 @param basename: if defined, will be used as the file name -214 @return - the paths of the dumped new file -215 ''' -216 -217 filepath = self.findFileFromDataset(ds, index) -218 -219 rv = None -220 -221 if filepath: -222 basename = os.path.basename(filepath) if basename is None else basename -223 newpath = os.path.join(directory, basename) -224 shutil.copy(filepath, newpath) -225 rv = newpath -226 else: -227 dname = ds.name -228 __msg = 'The file (%s) is not found.' %(dname) -229 printWarning(__msg) -230 -231 return rv -
      232 -
      233 - def dumpIncidentSpectrumFile(self, directory, index = 0, bankid = 0): -
      234 '''Dump the incident spectrum file (MFIL, only in EXP files for GSAS) -235 -236 @type directory: directory path string -237 @param directory: the directory where the file will be saved -238 @type index: integer or tuple -239 @param index: the index of the dataset -240 @type bankid: integer -241 @param bankid: the bank id of the pattern to look for -242 @return: the new path of the saved file''' -243 rv = None -244 -245 pt = self.getObject('Pattern')[bankid] -246 ds = pt.get('MFIL') -247 rv = self.dumpFileFromDataset(directory, ds, index) -248 -249 return rv -
      250 -
      251 - def dumpInstrumentFile(self, directory, index = 0, bankid = 0): -
      252 '''Dump the instrument file into a folder. Usually the instrument files -253 are the same for all data set. -254 -255 @type directory: directory path string -256 @param directory: the directory where the file will be moved to -257 @type index: integer or tuple -258 @param index: the index of the dataset, default to be the first in the list -259 @type bankid: integer -260 @param bankid: the bank id of the pattern to look for -261 @return: the new path of the instrument file''' -262 -263 rv = None -264 -265 pt = self.getObject('Pattern')[bankid] -266 ds = pt.get('Instrumentfile') -267 rv = self.dumpFileFromDataset(directory, ds, index) -268 -269 return rv -
      270 -
      271 - def findFileFromDataset(self, ds, index): -
      272 '''Try to find the file from the information in the dataset -273 -274 @type ds: a Dataset object -275 @param ds: the dataset which stores the file path information -276 @type index: integer or tuple -277 @param index: the index in the dataset -278 @return: the file absolute path if the file is found, None otherwise''' -279 -280 dname = ds.name -281 -282 relpath = str(ds[index]) -283 abspath = os.path.abspath(os.path.join(self.owner.basepath, relpath)) -284 filepath = None -285 if os.path.isfile(abspath): -286 filepath = abspath -287 else: -288 # try the _abspath -289 absds = ds.owner.get(dname + '_abspath') -290 if absds: -291 abspath = str(absds[index]) -292 if os.path.isfile(abspath): -293 filepath = abspath -294 -295 # update the filepath in case either the relative path and absolute path -296 # is not valid -297 if filepath: -298 self.saveFilePathToDataset(filepath, ds, index) -299 -300 return filepath -
      301 -
      302 - def getChi2(self): -
      303 ''' -304 Get the chi square values of the refinement -305 -306 @return: the chi square values of the refinement -307 ''' -308 return self.getByPath(PARAMNAMES[self.getEngineType()]['chi2']) -
      309 -
      310 - def getDataFileFromPattern(self, index, bankid = 0, rootname = None): -
      311 '''Get a data file object from the numpy array saved in Pattern -312 -313 @type index: integer or tuple -314 @param index: the index of the single refinement -315 @type bankid: integer -316 @param bankid: the bank id of the pattern to look for -317 @type rootname: string -318 @param rootname: the rootname of the data file, which is the file name -319 without the extension -320 @return: a Datafile object -321 ''' -322 df = None -323 pt = self.getObject("Pattern")[bankid] -324 dsx = pt.get('xobs') -325 dsy = pt.get('yobs') -326 if dsx is not None and dsy is not None: -327 xobs = dsx[index] -328 yobs = dsy[index] -329 -330 if not rootname: -331 rootname = "%s_idx%s_bid%s" %(self.name, index, bankid) -332 -333 df = DataFile(xobs = xobs, -334 yobs = yobs, -335 rootname = rootname) -336 -337 return df -
      338 -
      339 - def getEngineFileExt(self): -
      340 '''get the extension name of the engine file for this fit -341 -342 @return: string of file extension, for example "EXP" or "pcr"''' -343 engType = self.getEngineType() -344 -345 rv = None -346 if engType.lower() == 'gsas': -347 rv = 'EXP' -348 elif engType.lower() == 'fullprof': -349 rv = 'pcr' -350 -351 return rv -
      352 -
      353 - def getEngineType(self): -
      354 '''Get the engine type for this refinement -355 -356 @return: the string of the engine type, for example I{"gsas"} or I{"fullprof"}''' -357 -358 if self.getAttr('rietveldcls').count('gsas') > 0: -359 engineName = 'gsas' -360 elif self.getAttr('rietveldcls').count('fullprof') > 0: -361 engineName = 'fullprof' -362 -363 return engineName -
      364 -
      365 - def getInvolvedDatapaths(self, step = None): -
      366 '''Get the refined parameters. The datasets ever included in the strategy list -367 will be listed. The order of the datasets when they turned on is ignored -368 -369 @type step: integer -370 @param step: the strategy step, if step is a valid integer, then get -371 the datasets in that step; if none, get all the datasets -372 in all steps -373 @return: the a list of Dataset objects -374 ''' -375 datapaths = [] -376 -377 if step is None: -378 strategyStep = self.getOneStepStrategy()[0] -379 else: -380 if step < 0 or step >= len(self.strategy): -381 return [] -382 strategyStep = self.strategy[step] -383 -384 type = strategyStep.keys()[0] -385 for param in strategyStep[type]: -386 datapaths.append(param[0]) -387 -388 return datapaths -
      389 -
      390 - def getName(self): -
      391 ''' -392 Get the name of the refinement -393 -394 @return: the refinement name -395 ''' -396 return self.name -
      397 -
      398 - def getNumOfCycles(self): -
      399 ''' -400 Get the number of cycles of the refinement -401 -402 @return: the chi square values of the refinement -403 ''' -404 return self.getByPath(PARAMNAMES[self.getEngineType()]['ncycle']) -
      405 -
      406 - def getNumOfPhases(self): -
      407 '''Get number of phases in the refinement -408 -409 @return: number of phases -410 ''' -411 return len(self.listPhases()) -
      412 -
      413 - def getNumOfPatterns(self): -
      414 ''' -415 Get the number of patterns in the refinement -416 -417 @return: number of patterns -418 ''' -419 return len(self.listPatterns()) -
      420 -
      421 - def getOneStepStrategy(self, type = "Rietveld"): -
      422 '''Combine the strategy steps into one step, so the refinement can run -423 this strategy step and skep running through the steps -424 -425 @type type: string -426 @param type: the type of the refinement, default to be Rietveld. -427 Possible value can be "Rietveld" or "LeBail" -428 @return: the one step strategy list -429 ''' -430 -431 allInOneStep = [] -432 strategy = copy.deepcopy(self.strategy) -433 # delete the duplicate elements, list is unhashable type -434 for step in strategy: -435 allInOneStep.extend(step.values()[0]) -436 -437 if allInOneStep: -438 allInOneStep.sort() -439 last = allInOneStep[-1] -440 for i in range(len(allInOneStep)-2, -1, -1): -441 if last == allInOneStep[i]: -442 del allInOneStep[i] -443 else: -444 last = allInOneStep[i] -445 step = {} -446 #allInOneStep.extend(self.__oneStepStrategyParamList) -447 step[type] = allInOneStep -448 return [step] -
      449 -
      450 - def getParamListForStrategy(self, datapath): -
      451 '''Handling different mechanisms for different engines. For example, -452 for gsas, some parameters such as all background parameters have to be -453 added or removed all together. Also the lattice parameters have to be -454 combined in GSAS as well. -455 -456 @type datapath: string -457 @param datapath: the data path, which denotes the ownership tree of a -458 dataset. It reads as Pattern[0].Back[0], Phase[0].Atom[1].x, -459 or Phase[0].a -460 @return: a list of paths of the parameter data object that should be -461 combined with the passed in datapath''' -462 rv = [] -463 if self.getEngineType() == 'gsas': -464 # if the parameter is one of the lattice parameter, then turn on all -465 # the parameters. -466 -467 latticeParams = ['a', 'b', 'c', 'alpha', 'beta', 'gamma'] -468 suffix = datapath.split('.')[-1] -469 if suffix in latticeParams: -470 __msg = "In GSAS engine, the lattice parameters have to be flagged/" + \ -471 "unflagged together. This operation will be applied to other lattice" + \ -472 "parameters as well. " -473 print __msg -474 for param in latticeParams: -475 rv.append('.'.join([datapath.rsplit('.', 1)[0], param])) -476 -477 # Check if the dataset has extra index -478 if datapath.endswith(']'): -479 __msg = "In GSAS engine, the background parameters have to be " + \ -480 "flagged/unflagged together. This operation will be applied to " + \ -481 "other background parameters as well. " -482 print __msg -483 datapath = datapath.rsplit('[', 1)[0] -484 paramPath = datapath.split('.', 1)[-1] -485 ds = self.getByPath(paramPath) -486 #FIXME : suppose there is only one extra index, actually, -487 # it's not foreseeable that there will be more that one -488 extrasize = ds.shape[-1] -489 for extraidx in range(extrasize): -490 rv.append(datapath + "[%i]" % extraidx) -491 -492 else: # fullprof does not have combinatiosn -493 rv = [datapath] -494 -495 return rv -
      496 -
      497 - def getPhaseByName(self, name): -
      498 ''' -499 Get the phase object by its name -500 -501 @type name: string -502 @param name: the phase name to obtain -503 -504 @return: the phase object with the name if exists. None if no such -505 phase object. The program will emit a warning if duplicate -506 phase names exist, and the first phase obj with the same name -507 will be returned -508 ''' -509 rv = [None] -510 rv = [obj for obj in self.listPhases() if obj.getName() == name] -511 if len(rv) > 1: -512 __msg = 'Duplicate phase names, the first refinement is returned' -513 UTILS.printWarning(__msg) -514 -515 return rv[0] -
      516 -
      517 - def isParamTurnedOn(self, datapath,step = None): -
      518 '''check if the dataset is included in the strategy -519 -520 @type datapath: string -521 @param datapath: the signature path string of the data. For ordinary -522 data, just dataset.path for data with extra index, -523 its dataset.path + '[%i]' % extraindex -524 @type step: integer -525 @param step: the strategy step to be investigate. If None, return True if the -526 dataset is included in any step -527 @return: True if the dataset is included, False otherwise''' -528 rv = False -529 if step is not None: -530 sf = StrategyFile(self, strategy = self.strategy) -531 paramList = sf.getStepParamList(step + 1) -532 for param in paramList: -533 if datapath == param[0]: -534 rv = True -535 break -536 -537 else: -538 for step in range(len(self.strategy)): -539 if self.isParamTurnedOn(datapath, step): -540 rv = True -541 break -542 -543 return rv -
      544 -
      545 - def listEnvParams(self): -
      546 ''' -547 List the environment parameter objects on which the refinements are organized. -548 For example, the temperature or pressure series -549 -550 @return: a list of environment parameter objects -551 ''' -552 rv = [] -553 for name in self.labels: -554 rv.append(self.get(name)) -555 return rv -
      556 -
      557 - def listEnvParamNames(self): -
      558 ''' -559 List the environment parameter names on which the refinements are organized. -560 For example, the temperature or pressure series -561 -562 @return: the environment parameter names -563 ''' -564 return self.labels -
      565 -
      566 - def listPatterns(self): -
      567 ''' -568 List the Pattern objects in the refinement -569 -570 @return: a list of patterns -571 ''' -572 return self.listObjects(Pattern, recursively = True) -
      573 -
      574 - def listPhases(self): -
      575 ''' -576 List the Phase objects in the refinement -577 -578 @return: a list of phases -579 ''' -580 return self.listObjects(Phase, recursively = True) -
      581 -
      582 - def listPhaseNames(self): -
      583 ''' -584 Return a list of phase names in the refinement -585 -586 @return: a list of phase names -587 ''' -588 return [obj.get('Name').first() for obj in self.listPhases()] -
      589 -
      590 - def listProfiles(self): -
      591 ''' -592 Get a list of Profile objects in the refinement -593 -594 @return: a list of Profile objects -595 ''' -596 return self.listObjects(Profile, recursively = True) -
      597 -
      598 - def loadDataFile(self, datafile, index = 0, bankid = 0): -
      599 '''load the data file to the project -600 -601 @type datafile: file path string -602 @param datafile: the data file absolute path -603 @type index: integer or tuple -604 @param index: the index of the single refinement -605 @type bankid: integer -606 @param bankid: the bank id of the pattern, default to be 0 -607 @return: no return value -608 ''' -609 -610 patterns = self.getObject("Pattern") -611 pattern = patterns[bankid] -612 ds = pattern.get('Datafile') -613 -614 self.saveFilePathToDataset(datafile, ds, index) -615 -616 #TODO: save the xobs / yobs data into the pattern -617 return -
      618 -
      619 - def loadIncidentSpectrumFile(self, mfil, index = 0, bankid = 0): -
      620 '''Load the incident spectrum file path into the object -621 -622 @type mfil: file path string -623 @param mfil: the abs path of the incident spectrum file MFIL -624 @param index: integer or tuple -625 @type index: the index of the single refinement -626 @type bankid: integers -627 @param bankid: the bank id of the pattern -628 @return: no return value -629 ''' -630 patterns = self.getObject("Pattern") -631 pattern = patterns[bankid] -632 ds = pattern.get('MFIL') -633 -634 self.saveFilePathToDataset(mfil, ds, index) -635 return -
      636 -
      637 - def loadInstrumentFile(self, instrumentfile, index = 0, bankid = 0): -
      638 '''load the instrument file path to the pattern -639 instrumentfile - the abs path to the instrument file -640 -641 @type index: integer or tuple -642 @param index: the index of the single refinement -643 @type bankid: integer or tuple -644 @param bankid: the bankid of the pattern -645 @return: no return value -646 ''' -647 patterns = self.getObject("Pattern") -648 pattern = patterns[bankid] -649 ds = pattern.get('Instrumentfile') -650 -651 self.saveFilePathToDataset(instrumentfile, ds, index) -652 -653 return -
      654 -
      655 - def loadStrategyFile(self, fullpath): -
      656 '''load the strategy from a text file -657 -658 @type fullpath: file path string -659 @param fullpath: the stratey file path -660 @return: no return value -661 ''' -662 st = StrategyFile(self, fullpath) -663 self.setStrategy(st.strategy) -664 return -
      665 -666 @property -
      667 - def numStrategySteps(self): -
      668 '''Get the number of strategy steps -669 -670 @return: the total number of strategy''' -671 return len(self.strategy) -
      672 -
      673 - def removeParamFromStrategy(self, datapath, step = None): -
      674 '''remove parameter from the strategy -675 -676 @type datapath: string -677 @param datapath: the data signature path to be removed from the strategy -678 @type step: integer -679 @param step: the strategy step. -680 - None, will remove the strategy from all steps -681 - 0 <= step < total number of existing steps, the new -682 parameter will be removed from the step -683 @return: no return value -684 ''' -685 datapaths = self.getParamListForStrategy(datapath) -686 -687 for datapath in datapaths: -688 strategyList = self.strategy -689 if step is not None: -690 if step > len(strategyList) and step < 0: -691 print "Step number (%s) is out of strategy list boundary (0 - %s)" % (step, len(strategyList)) -692 return -693 else: -694 sf = StrategyFile(self,strategy = self.strategy) -695 paramList = sf.getStepParamList(step + 1) -696 for idx, param in enumerate(paramList): -697 if datapath == param[0]: -698 paramList.pop(idx) -699 -700 type = sf.getStepMethod(step) -701 -702 strategyList[step][type] = paramList -703 self.setStrategy(strategyList) -704 -705 else:# step is none, remove all occurences of this parameter in steps -706 for ss in range(len(strategyList)): -707 self.removeParamFromStrategy(datapath, ss) -708 -709 return -
      710 -
      711 - def saveEngineFile(self, enginefile, index = 0): -
      712 '''Save the engine file content to the datasets -713 @type enginefile: filepath string -714 @param enginefile: the engine file path -715 @type index: integer or tuple -716 @param index: the index of the single refinement -717 @return: no return value -718 ''' -719 ds = self.get('enginefile') -720 if ds is None: -721 self.set('enginefile', open(enginefile, 'rb').read(), -722 repeat = True, grow = True) -723 else: -724 ds[index] = open(enginefile, 'rb').read() -725 -726 return -
      727 -
      728 - def saveFilePathToDataset(self, absPath, ds, index = 0, basepath = None): -
      729 '''Save the absolute file path to the dataset -730 -731 @type ds: Dataset object -732 @param ds: the dataset to store the file path information -733 @type index: integer or tuple -734 @param index: the index of the dataset -735 @type absPath: file path string -736 @param absPath: the absolute path of the data file -737 @type basepath: directory path string -738 @param basepath: the basepath used to determine the relative path, -739 the project.basepath will be used if basepath None -740 @return: no return value -741 ''' -742 dname = ds.name -743 parent = ds.owner -744 if absPath: -745 if basepath is None: basepath = self.owner.basepath -746 relpath = os.path.relpath(absPath, basepath) -747 else: -748 relpath = "" -749 -750 ds[index] = relpath -751 -752 ds = parent.get(dname + '_abspath') -753 if ds is None: -754 parent.set(dname + '_abspath', absPath, repeat = True, grow = True) -755 else: -756 ds[index] = absPath -757 -758 return -
      759 -
      760 - def setStrategy(self, strategylist): -
      761 ''' -762 Set the strategy to refinement object -763 -764 @type strategylist: list -765 @param strategylist: a list with strategy steps -766 @return: no return value -767 ''' -768 self.setPyObj('Strategy', strategylist) -769 return -
      770 -771 @property -
      772 - def strategy(self): -
      773 '''Get the strategy list from the fit object -774 -775 @return: the strategy list -776 ''' -777 strategylist = self.getPyObj("Strategy") -778 return strategylist -
      779 -
      780 - def writeStrateyFile(self, fullpath): -
      781 '''write the strategy to a local file -782 -783 @type fullpath: file path string -784 @param fullpath: the file path to write to -785 @return: no return value -786 ''' -787 st = StrategyFile(self, strategy = self.strategy) -788 st.writeToFile(fullpath) -789 return -
      790 -791 # end class refinement -792 #------------------------------------------------------------------------------- -793 ################################################################################ -794 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.refinement.Refinement-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.refinement.Refinement-class.html deleted file mode 100644 index ad60ebe8..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.refinement.Refinement-class.html +++ /dev/null @@ -1,2028 +0,0 @@ - - - - - diffpy.srrietveld.refinement.Refinement - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module refinement :: - Class Refinement - - - - - -
      [frames] | no frames]
      -
      - -

      Class Refinement

      source code

      -
      -                       object --+            
      -                                |            
      -refinementdata.hdf5.object.Object --+        
      -                                    |        
      -   refinementdata.refinable.Refinable --+    
      -                                        |    
      -     refinementdata.refinement.Refinement --+
      -                                            |
      -                                           Refinement
      -
      - -
      -

      The refinement (fit) class for SrRietveld. A refinement object - contains information for a series of single refinement. It contains the - subobjects such as the Pattern, Profile, and Contribution.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - owner, - name=None, - handle=None, - shape=None)
      - constructor
      - source code - -
      - -
      -   - - - - - - -
      addParamToStrategy(self, - datapath, - step=None)
      - Add a parameter to strategy.
      - source code - -
      - -
      -   - - - - - - -
      dumpDataFile(self, - directory, - index, - bankid=0)
      - Dump the datafile for refinement in index
      - source code - -
      - -
      -   - - - - - - -
      dumpEngineFile(self, - directory, - index, - basename=None)
      - dump the engine file to the directory
      - source code - -
      - -
      -   - - - - - - -
      dumpFileFromDataset(self, - directory, - ds, - index, - basename=None)
      - dump the files in pattern objects, such as Datafile, MFIL, and - Instrumentfile
      - source code - -
      - -
      -   - - - - - - -
      dumpFiles(self, - directory, - index)
      - Dump the files for refinement, including all the files needed to run - the refinement (datafile, instrument file, incident spectrum file, - engine file)
      - source code - -
      - -
      -   - - - - - - -
      dumpIncidentSpectrumFile(self, - directory, - index=0, - bankid=0)
      - Dump the incident spectrum file (MFIL, only in EXP files for GSAS)
      - source code - -
      - -
      -   - - - - - - -
      dumpInstrumentFile(self, - directory, - index=0, - bankid=0)
      - Dump the instrument file into a folder.
      - source code - -
      - -
      -   - - - - - - -
      findFileFromDataset(self, - ds, - index)
      - Try to find the file from the information in the dataset
      - source code - -
      - -
      -   - - - - - - -
      getChi2(self)
      - Get the chi square values of the refinement
      - source code - -
      - -
      -   - - - - - - -
      getDataFileFromPattern(self, - index, - bankid=0, - rootname=None)
      - Get a data file object from the numpy array saved in Pattern
      - source code - -
      - -
      -   - - - - - - -
      getEngineFileExt(self)
      - get the extension name of the engine file for this fit
      - source code - -
      - -
      -   - - - - - - -
      getEngineType(self)
      - Get the engine type for this refinement
      - source code - -
      - -
      -   - - - - - - -
      getInvolvedDatapaths(self, - step=None)
      - Get the refined parameters.
      - source code - -
      - -
      -   - - - - - - -
      getName(self)
      - Get the name of the refinement
      - source code - -
      - -
      -   - - - - - - -
      getNumOfCycles(self)
      - Get the number of cycles of the refinement
      - source code - -
      - -
      -   - - - - - - -
      getNumOfPatterns(self)
      - Get the number of patterns in the refinement
      - source code - -
      - -
      -   - - - - - - -
      getNumOfPhases(self)
      - Get number of phases in the refinement
      - source code - -
      - -
      -   - - - - - - -
      getOneStepStrategy(self, - type='Rietveld')
      - Combine the strategy steps into one step, so the refinement can run - this strategy step and skep running through the steps
      - source code - -
      - -
      -   - - - - - - -
      getParamListForStrategy(self, - datapath)
      - Handling different mechanisms for different engines.
      - source code - -
      - -
      -   - - - - - - -
      getPhaseByName(self, - name)
      - Get the phase object by its name
      - source code - -
      - -
      -   - - - - - - -
      isParamTurnedOn(self, - datapath, - step=None)
      - check if the dataset is included in the strategy
      - source code - -
      - -
      -   - - - - - - -
      listEnvParamNames(self)
      - List the environment parameter names on which the refinements are - organized.
      - source code - -
      - -
      -   - - - - - - -
      listEnvParams(self)
      - List the environment parameter objects on which the refinements are - organized.
      - source code - -
      - -
      -   - - - - - - -
      listPatterns(self)
      - List the Pattern objects in the refinement
      - source code - -
      - -
      -   - - - - - - -
      listPhaseNames(self)
      - Return a list of phase names in the refinement
      - source code - -
      - -
      -   - - - - - - -
      listPhases(self)
      - List the Phase objects in the refinement
      - source code - -
      - -
      -   - - - - - - -
      listProfiles(self)
      - Get a list of Profile objects in the refinement
      - source code - -
      - -
      -   - - - - - - -
      loadDataFile(self, - datafile, - index=0, - bankid=0)
      - load the data file to the project
      - source code - -
      - -
      -   - - - - - - -
      loadIncidentSpectrumFile(self, - mfil, - index=0, - bankid=0)
      - Load the incident spectrum file path into the object
      - source code - -
      - -
      -   - - - - - - -
      loadInstrumentFile(self, - instrumentfile, - index=0, - bankid=0)
      - load the instrument file path to the pattern instrumentfile - the abs - path to the instrument file
      - source code - -
      - -
      -   - - - - - - -
      loadStrategyFile(self, - fullpath)
      - load the strategy from a text file
      - source code - -
      - -
      -   - - - - - - -
      removeParamFromStrategy(self, - datapath, - step=None)
      - remove parameter from the strategy
      - source code - -
      - -
      -   - - - - - - -
      saveEngineFile(self, - enginefile, - index=0)
      - Save the engine file content to the datasets
      - source code - -
      - -
      -   - - - - - - -
      saveFilePathToDataset(self, - absPath, - ds, - index=0, - basepath=None)
      - Save the absolute file path to the dataset
      - source code - -
      - -
      -   - - - - - - -
      setStrategy(self, - strategylist)
      - Set the strategy to refinement object
      - source code - -
      - -
      -   - - - - - - -
      writeStrateyFile(self, - fullpath)
      - write the strategy to a local file
      - source code - -
      - -
      -

      Inherited from refinementdata.refinement.Refinement: - addPattern, - addStructure, - checkStatus, - getStatus, - isFinished, - isRunning, - isSubmitted, - loadLocalData, - removePattern, - removeStructure, - resetStatus, - setStatus -

      -

      Inherited from refinementdata.refinable.Refinable: - addHistory, - addHistoryByPath, - addSigma, - addSigmaByPath, - findRefinement, - getHistory, - getHistoryByPath, - getSigma, - getSigmaByPath, - listHistories, - listRefined, - loadLocalObjects, - removeHistory, - update -

      -

      Inherited from refinementdata.hdf5.object.Object: - addObject, - copy, - copyMeta, - delete, - exportFile, - get, - getAttr, - getByPath, - getFlatIndex, - getMetaData, - getMultiDimIndex, - getObject, - getPyObj, - hasAttr, - hasMeta, - importFile, - isDescendant, - list, - listAttrs, - listNames, - listObjects, - load, - loadObject, - move, - range, - readStr, - removeObject, - rename, - repeat, - replicate, - reshape, - save, - set, - setAttr, - setByPath, - setLabels, - setPyObj, - unset, - unsetAttr, - writeStr -

      -

      Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

      -
      - - - - - - - - - -
      - Class Variables
      -

      Inherited from refinementdata.refinement.Refinement: - ERROR, - FINISHED, - NORMAL, - RUNNING, - SUBMITTED -

      -
      - - - - - - - - - - - - - - - -
      - Properties
      -   - - numStrategySteps
      - Get the number of strategy steps -
      -   - - strategy
      - Get the strategy list from the fit object -
      -

      Inherited from refinementdata.hdf5.object.Object: - labels, - name, - ndim, - path -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - Method Details
      - -
      - -
      - - -
      -

      __init__(self, - owner, - name=None, - handle=None, - shape=None) -
      (Constructor) -

      -
      source code  -
      - -

      constructor

      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      addParamToStrategy(self, - datapath, - step=None) -

      -
      source code  -
      - -

      Add a parameter to strategy. The included parameters will be turned on - in the refinement.

      -
      -
      Parameters:
      -
        -
      • datapath (string) - the dataset signature path to be added to the strategy
      • -
      • step (integer) - the step of the strategy to which the parameter will be added -
          -
        • - None, the parameter will be added to all steps -
        • -
        • - step >= total number of existing steps, a new step will be - added to the strategy list. The new step includes the new - parameter, and all previously included parameters -
        • -
        • - 0 <= step < total number of existing steps, the new - parameter will be added to the step -
        • -
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      dumpDataFile(self, - directory, - index, - bankid=0) -

      -
      source code  -
      - -

      Dump the datafile for refinement in index

      -
      -
      Parameters:
      -
        -
      • directory (directory path string) - the directory where the data files will be saved
      • -
      • index (integer or tuple) - the index of the single refinement
      • -
      • bankid (integer) - the bank id of the pattern to look for
      • -
      -
      Returns:
      -
      the list of data file path saved, listed same as the bank number - if the file is not found or not set, the item is None
      -
      -
      -
      - -
      - -
      - - -
      -

      dumpEngineFile(self, - directory, - index, - basename=None) -

      -
      source code  -
      - -

      dump the engine file to the directory

      -
      -
      Parameters:
      -
        -
      • directory (directory path string) - the directory where the file will be saved
      • -
      • index (integer or tuple) - the data index of the engine file
      • -
      • basename (string) - the file name of the engine file
      • -
      -
      Returns:
      -
      the path of the engine file
      -
      -
      -
      - -
      - -
      - - -
      -

      dumpFileFromDataset(self, - directory, - ds, - index, - basename=None) -

      -
      source code  -
      - -

      dump the files in pattern objects, such as Datafile, MFIL, and - Instrumentfile

      -
      -
      Parameters:
      -
        -
      • ds (a Dataset object) - the dataset stores the file path information
      • -
      • basename (string) - if defined, will be used as the file name @return - the paths of - the dumped new file
      • -
      • directory (directory path string @param directory - the directory where the - file will be saved)
      • -
      • index (integer or tuple @param index - the index in the dataset)
      • -
      -
      -
      -
      - -
      - -
      - - -
      -

      dumpFiles(self, - directory, - index) -

      -
      source code  -
      - -

      Dump the files for refinement, including all the files needed to run - the refinement (datafile, instrument file, incident spectrum file, engine - file)

      -
      -
      Parameters:
      -
        -
      • directory (directory path string) - the directory where the files will be saved
      • -
      • index (integer or tuple) - the index of the refinement to dump
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      dumpIncidentSpectrumFile(self, - directory, - index=0, - bankid=0) -

      -
      source code  -
      - -

      Dump the incident spectrum file (MFIL, only in EXP files for GSAS)

      -
      -
      Parameters:
      -
        -
      • directory (directory path string) - the directory where the file will be saved
      • -
      • index (integer or tuple) - the index of the dataset
      • -
      • bankid (integer) - the bank id of the pattern to look for
      • -
      -
      Returns:
      -
      the new path of the saved file
      -
      -
      -
      - -
      - -
      - - -
      -

      dumpInstrumentFile(self, - directory, - index=0, - bankid=0) -

      -
      source code  -
      - -

      Dump the instrument file into a folder. Usually the instrument files - are the same for all data set.

      -
      -
      Parameters:
      -
        -
      • directory (directory path string) - the directory where the file will be moved to
      • -
      • index (integer or tuple) - the index of the dataset, default to be the first in the list
      • -
      • bankid (integer) - the bank id of the pattern to look for
      • -
      -
      Returns:
      -
      the new path of the instrument file
      -
      -
      -
      - -
      - -
      - - -
      -

      findFileFromDataset(self, - ds, - index) -

      -
      source code  -
      - -

      Try to find the file from the information in the dataset

      -
      -
      Parameters:
      -
        -
      • ds (a Dataset object) - the dataset which stores the file path information
      • -
      • index (integer or tuple) - the index in the dataset
      • -
      -
      Returns:
      -
      the file absolute path if the file is found, None otherwise
      -
      -
      -
      - -
      - -
      - - -
      -

      getChi2(self) -

      -
      source code  -
      - -

      Get the chi square values of the refinement

      -
      -
      Returns:
      -
      the chi square values of the refinement
      -
      -
      -
      - -
      - -
      - - -
      -

      getDataFileFromPattern(self, - index, - bankid=0, - rootname=None) -

      -
      source code  -
      - -

      Get a data file object from the numpy array saved in Pattern

      -
      -
      Parameters:
      -
        -
      • index (integer or tuple) - the index of the single refinement
      • -
      • bankid (integer) - the bank id of the pattern to look for
      • -
      • rootname (string) - the rootname of the data file, which is the file name without the - extension
      • -
      -
      Returns:
      -
      a Datafile object
      -
      -
      -
      - -
      - -
      - - -
      -

      getEngineFileExt(self) -

      -
      source code  -
      - -

      get the extension name of the engine file for this fit

      -
      -
      Returns:
      -
      string of file extension, for example "EXP" or - "pcr"
      -
      -
      -
      - -
      - -
      - - -
      -

      getEngineType(self) -

      -
      source code  -
      - -

      Get the engine type for this refinement

      -
      -
      Returns:
      -
      the string of the engine type, for example - "gsas" or "fullprof"
      -
      -
      -
      - -
      - -
      - - -
      -

      getInvolvedDatapaths(self, - step=None) -

      -
      source code  -
      - -

      Get the refined parameters. The datasets ever included in the strategy - list will be listed. The order of the datasets when they turned on is - ignored

      -
      -
      Parameters:
      -
        -
      • step (integer) - the strategy step, if step is a valid integer, then get the - datasets in that step; if none, get all the datasets in all steps
      • -
      -
      Returns:
      -
      the a list of Dataset objects
      -
      -
      -
      - -
      - -
      - - -
      -

      getName(self) -

      -
      source code  -
      - -

      Get the name of the refinement

      -
      -
      Returns:
      -
      the refinement name
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumOfCycles(self) -

      -
      source code  -
      - -

      Get the number of cycles of the refinement

      -
      -
      Returns:
      -
      the chi square values of the refinement
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumOfPatterns(self) -

      -
      source code  -
      - -

      Get the number of patterns in the refinement

      -
      -
      Returns:
      -
      number of patterns
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumOfPhases(self) -

      -
      source code  -
      - -

      Get number of phases in the refinement

      -
      -
      Returns:
      -
      number of phases
      -
      -
      -
      - -
      - -
      - - -
      -

      getOneStepStrategy(self, - type='Rietveld') -

      -
      source code  -
      - -

      Combine the strategy steps into one step, so the refinement can run - this strategy step and skep running through the steps

      -
      -
      Parameters:
      -
        -
      • type (string) - the type of the refinement, default to be Rietveld. Possible - value can be "Rietveld" or "LeBail"
      • -
      -
      Returns:
      -
      the one step strategy list
      -
      -
      -
      - -
      - -
      - - -
      -

      getParamListForStrategy(self, - datapath) -

      -
      source code  -
      - -

      Handling different mechanisms for different engines. For example, for - gsas, some parameters such as all background parameters have to be added - or removed all together. Also the lattice parameters have to be combined - in GSAS as well.

      -
      -
      Parameters:
      -
        -
      • datapath (string) - the data path, which denotes the ownership tree of a dataset. It - reads as Pattern[0].Back[0], Phase[0].Atom[1].x, or Phase[0].a
      • -
      -
      Returns:
      -
      a list of paths of the parameter data object that should be - combined with the passed in datapath
      -
      -
      -
      - -
      - -
      - - -
      -

      getPhaseByName(self, - name) -

      -
      source code  -
      - -

      Get the phase object by its name

      -
      -
      Parameters:
      -
        -
      • name (string) - the phase name to obtain
      • -
      -
      Returns:
      -
      the phase object with the name if exists. None if no such phase - object. The program will emit a warning if duplicate phase names - exist, and the first phase obj with the same name will be - returned
      -
      -
      -
      - -
      - -
      - - -
      -

      isParamTurnedOn(self, - datapath, - step=None) -

      -
      source code  -
      - -

      check if the dataset is included in the strategy

      -
      -
      Parameters:
      -
        -
      • datapath (string) - the signature path string of the data. For ordinary data, just - dataset.path for data with extra index, its dataset.path + '[%i]' - % extraindex
      • -
      • step (integer) - the strategy step to be investigate. If None, return True if the - dataset is included in any step
      • -
      -
      Returns:
      -
      True if the dataset is included, False otherwise
      -
      -
      -
      - -
      - -
      - - -
      -

      listEnvParamNames(self) -

      -
      source code  -
      - -

      List the environment parameter names on which the refinements are - organized. For example, the temperature or pressure series

      -
      -
      Returns:
      -
      the environment parameter names
      -
      -
      -
      - -
      - -
      - - -
      -

      listEnvParams(self) -

      -
      source code  -
      - -

      List the environment parameter objects on which the refinements are - organized. For example, the temperature or pressure series

      -
      -
      Returns:
      -
      a list of environment parameter objects
      -
      -
      -
      - -
      - -
      - - -
      -

      listPatterns(self) -

      -
      source code  -
      - -

      List the Pattern objects in the refinement

      -
      -
      Returns:
      -
      a list of patterns
      -
      -
      -
      - -
      - -
      - - -
      -

      listPhaseNames(self) -

      -
      source code  -
      - -

      Return a list of phase names in the refinement

      -
      -
      Returns:
      -
      a list of phase names
      -
      -
      -
      - -
      - -
      - - -
      -

      listPhases(self) -

      -
      source code  -
      - -

      List the Phase objects in the refinement

      -
      -
      Returns:
      -
      a list of phases
      -
      -
      -
      - -
      - -
      - - -
      -

      listProfiles(self) -

      -
      source code  -
      - -

      Get a list of Profile objects in the refinement

      -
      -
      Returns:
      -
      a list of Profile objects
      -
      -
      -
      - -
      - -
      - - -
      -

      loadDataFile(self, - datafile, - index=0, - bankid=0) -

      -
      source code  -
      - -

      load the data file to the project

      -
      -
      Parameters:
      -
        -
      • datafile (file path string) - the data file absolute path
      • -
      • index (integer or tuple) - the index of the single refinement
      • -
      • bankid (integer) - the bank id of the pattern, default to be 0
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      loadIncidentSpectrumFile(self, - mfil, - index=0, - bankid=0) -

      -
      source code  -
      - -

      Load the incident spectrum file path into the object

      -
      -
      Parameters:
      -
        -
      • mfil (file path string) - the abs path of the incident spectrum file MFIL
      • -
      • index (the index of the single refinement) - integer or tuple
      • -
      • bankid (integers) - the bank id of the pattern
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      loadInstrumentFile(self, - instrumentfile, - index=0, - bankid=0) -

      -
      source code  -
      - -

      load the instrument file path to the pattern instrumentfile - the abs - path to the instrument file

      -
      -
      Parameters:
      -
        -
      • index (integer or tuple) - the index of the single refinement
      • -
      • bankid (integer or tuple) - the bankid of the pattern
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      loadStrategyFile(self, - fullpath) -

      -
      source code  -
      - -

      load the strategy from a text file

      -
      -
      Parameters:
      -
        -
      • fullpath (file path string) - the stratey file path
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      removeParamFromStrategy(self, - datapath, - step=None) -

      -
      source code  -
      - -

      remove parameter from the strategy

      -
      -
      Parameters:
      -
        -
      • datapath (string) - the data signature path to be removed from the strategy
      • -
      • step (integer) - the strategy step. -
          -
        • - None, will remove the strategy from all steps -
        • -
        • - 0 <= step < total number of existing steps, the new - parameter will be removed from the step -
        • -
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      saveEngineFile(self, - enginefile, - index=0) -

      -
      source code  -
      - -

      Save the engine file content to the datasets

      -
      -
      Parameters:
      -
        -
      • enginefile (filepath string) - the engine file path
      • -
      • index (integer or tuple) - the index of the single refinement
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      saveFilePathToDataset(self, - absPath, - ds, - index=0, - basepath=None) -

      -
      source code  -
      - -

      Save the absolute file path to the dataset

      -
      -
      Parameters:
      -
        -
      • ds (Dataset object) - the dataset to store the file path information
      • -
      • index (integer or tuple) - the index of the dataset
      • -
      • absPath (file path string) - the absolute path of the data file
      • -
      • basepath (directory path string) - the basepath used to determine the relative path, the - project.basepath will be used if basepath None
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      setStrategy(self, - strategylist) -

      -
      source code  -
      - -

      Set the strategy to refinement object

      -
      -
      Parameters:
      -
        -
      • strategylist (list) - a list with strategy steps
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      - -
      - -
      - - -
      -

      writeStrateyFile(self, - fullpath) -

      -
      source code  -
      - -

      write the strategy to a local file

      -
      -
      Parameters:
      -
        -
      • fullpath (file path string) - the file path to write to
      • -
      -
      Returns:
      -
      no return value
      -
      -
      -
      -
      - - - - - - -
      - Property Details
      - -
      - -
      -

      numStrategySteps

      -

      Get the number of strategy steps

      -
      -
      Get Method:
      -
      unreachable.numStrategySteps(self) - - Get the number of strategy steps -
      -
      -
      -
      - -
      - -
      -

      strategy

      -

      Get the strategy list from the fit object

      -
      -
      Get Method:
      -
      unreachable.strategy(self) - - Get the strategy list from the fit object -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.utility-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.utility-module.html deleted file mode 100644 index 05638082..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.utility-module.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - diffpy.srrietveld.utility - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module utility - - - - - -
      [frames] | no frames]
      -
      - -

      Module utility

      source code

      -

      Common shared functions that do not fit anywhere else.

      - - - - - - - - - - - - - - - - -
      - Classes
      -   - - UTF8Recoder
      - Iterator that reads an encoded stream and reencodes the input to - UTF-8 -
      -   - - UnicodeReader
      - A CSV reader which will iterate over lines in the CSV file - "f", which is encoded in the given encoding. -
      -   - - UnicodeWriter
      - A CSV writer which will write rows to CSV file "f", which - is encoded in the given encoding. -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Functions
      -   - - - - - - -
      checkFormat(filename)
      - Check the format of input file
      - source code - -
      - -
      -   - - - - - - -
      getFileid(fullpath)
      - get the md5 id of the file path fullpath - the abs path of the file - return - the file path
      - source code - -
      - -
      -   - - - - - - -
      importClass(modpath, - modname, - classname, - *args)
      - Import certain class with certain inputs
      - source code - -
      - -
      -   - - - - - - -
      parseXYToList(filename)
      - Parse XY or XYSigma data to list
      - source code - -
      - -
      -   - - - - - - -
      printDebugInfo()
      - Print the information for debug
      - source code - -
      - -
      -   - - - - - - -
      printWarning(warningMsg)
      - Print a red warning message to the std output warningMsg : the - warning message to be printed
      - source code - -
      - -
      -   - - - - - - -
      unique(seq)
      - Get unique items from a sequence while keeping its original order
      - source code - -
      - -
      - - - - - - - - - -
      - Variables
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - cStringIO, - codecs, - csv, - md5, - os, - sys, - traceback -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.utility-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.utility-pysrc.html deleted file mode 100644 index b7305208..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.utility-pysrc.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - diffpy.srrietveld.utility - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module utility - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.utility

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Peng Tian 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ################################################################################ 
      - 14   
      - 15  """Common shared functions that do not fit anywhere else. 
      - 16  """ 
      - 17   
      - 18  import os 
      - 19  import sys 
      - 20  import traceback 
      - 21  from hashlib import md5 
      - 22   
      - 23   
      -
      24 -def checkFormat(filename): -
      25 """ Check the format of input file """ - 26 filebasename = os.path.basename(filename) - 27 fileformat = os.path.splitext(filebasename)[-1][1:].lower() - 28 return fileformat -
      29 - 30 -
      31 -def importClass(modpath, modname, classname, *args): -
      32 """ Import certain class with certain inputs """ - 33 mod = __import__(modpath, globals(), locals(), [modname], -1) - 34 cls = getattr(mod, classname) - 35 return cls(*args) -
      36 -
      37 -def parseXYToList(filename): -
      38 """ Parse XY or XYSigma data to list """ - 39 # 1. read file - 40 ifile = open(filename, "r") - 41 inlines = ifile.readlines() - 42 ifile.close() - 43 - 44 # 2. parse content - 45 datalist = [] - 46 for line in inlines: - 47 terms = line.strip().split() - 48 if len(terms) > 1 and terms[0] not in ["#", ""]: - 49 datalist.append((float(terms[0]), float(terms[1]))) - 50 return datalist -
      51 - 52 - 53 # PJ FIXME: use the Python logging module instead - 54 -
      55 -def printWarning(warningMsg): -
      56 '''Print a red warning message to the std output - 57 warningMsg : the warning message to be printed - 58 ''' - 59 #print '\\033[1;31m' + 'WARNING: ' + warningMsg + '\\033[1;m' - 60 print 'WARNING: ' + warningMsg - 61 return -
      62 - 63 -
      64 -def unique(seq): -
      65 '''Get unique items from a sequence while keeping its original order''' - 66 seen = set() - 67 for item in seq: - 68 if item in seen: continue - 69 seen.add(item) - 70 yield item - 71 pass -
      72 - 73 -
      74 -def getFileid(fullpath): -
      75 '''get the md5 id of the file path - 76 fullpath - the abs path of the file - 77 return - the file path''' - 78 fid = None - 79 fid = md5(open(fullpath, 'rb').read()).hexdigest() - 80 return fid -
      81 - 82 -
      83 -def printDebugInfo(): -
      84 '''Print the information for debug''' - 85 exc_type, exc_value, exc_traceback = sys.exc_info() - 86 traceback.print_exception(exc_type, exc_value, exc_traceback, - 87 limit=100, file=sys.stdout) - 88 return -
      89 - 90 ############################################################################## - 91 # csv reader and writer for unicode data, an extra encoding parameter is added - 92 ############################################################################## - 93 - 94 import csv, codecs, cStringIO - 95 -
      96 -class UTF8Recoder: -
      97 """ - 98 Iterator that reads an encoded stream and reencodes the input to UTF-8 - 99 """ -
      100 - def __init__(self, f, encoding): -
      101 self.reader = codecs.getreader(encoding)(f) -
      102 -
      103 - def __iter__(self): -
      104 return self -
      105 -
      106 - def next(self): -
      107 return self.reader.next().encode("utf-8") -
      108 -
      109 -class UnicodeReader: -
      110 """ -111 A CSV reader which will iterate over lines in the CSV file "f", -112 which is encoded in the given encoding. -113 """ -114 -
      115 - def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds): -
      116 f = UTF8Recoder(f, encoding) -117 self.reader = csv.reader(f, dialect=dialect, **kwds) -
      118 -
      119 - def next(self): -
      120 row = self.reader.next() -121 return [unicode(s, "utf-8") for s in row] -
      122 -
      123 - def __iter__(self): -
      124 return self -
      125 -
      126 -class UnicodeWriter: -
      127 """ -128 A CSV writer which will write rows to CSV file "f", -129 which is encoded in the given encoding. -130 """ -131 -
      132 - def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds): -
      133 # Redirect output to a queue -134 self.queue = cStringIO.StringIO() -135 self.writer = csv.writer(self.queue, dialect=dialect, **kwds) -136 self.stream = f -137 self.encoder = codecs.getincrementalencoder(encoding)() -
      138 -
      139 - def writerow(self, row): -
      140 self.writer.writerow([s.encode("utf-8") for s in row]) -141 # Fetch UTF-8 output from the queue ... -142 data = self.queue.getvalue() -143 data = data.decode("utf-8") -144 # ... and reencode it into the target encoding -145 data = self.encoder.encode(data) -146 # write to the target stream -147 self.stream.write(data) -148 # empty queue -149 self.queue.truncate(0) -
      150 -
      151 - def writerows(self, rows): -
      152 for row in rows: -153 self.writerow(row) -
      154 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.utility.UTF8Recoder-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.utility.UTF8Recoder-class.html deleted file mode 100644 index 87b9b636..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.utility.UTF8Recoder-class.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - diffpy.srrietveld.utility.UTF8Recoder - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module utility :: - Class UTF8Recoder - - - - - -
      [frames] | no frames]
      -
      - -

      Class UTF8Recoder

      source code

      -

      Iterator that reads an encoded stream and reencodes the input to - UTF-8

      - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - f, - encoding) - source code - -
      - -
      -   - - - - - - -
      __iter__(self) - source code - -
      - -
      -   - - - - - - -
      next(self) - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.utility.UnicodeReader-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.utility.UnicodeReader-class.html deleted file mode 100644 index f0b6beef..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.utility.UnicodeReader-class.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - diffpy.srrietveld.utility.UnicodeReader - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module utility :: - Class UnicodeReader - - - - - -
      [frames] | no frames]
      -
      - -

      Class UnicodeReader

      source code

      -

      A CSV reader which will iterate over lines in the CSV file - "f", which is encoded in the given encoding.

      - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - f, - dialect=<class csv.excel at 0x3507598>, - encoding='utf-8', - **kwds) - source code - -
      - -
      -   - - - - - - -
      __iter__(self) - source code - -
      - -
      -   - - - - - - -
      next(self) - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.utility.UnicodeWriter-class.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.utility.UnicodeWriter-class.html deleted file mode 100644 index 700036d4..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.utility.UnicodeWriter-class.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - diffpy.srrietveld.utility.UnicodeWriter - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module utility :: - Class UnicodeWriter - - - - - -
      [frames] | no frames]
      -
      - -

      Class UnicodeWriter

      source code

      -

      A CSV writer which will write rows to CSV file "f", which is - encoded in the given encoding.

      - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self, - f, - dialect=<class csv.excel at 0x3507598>, - encoding='utf-8', - **kwds) - source code - -
      - -
      -   - - - - - - -
      writerow(self, - row) - source code - -
      - -
      -   - - - - - - -
      writerows(self, - rows) - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.version-module.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.version-module.html deleted file mode 100644 index f672aa1f..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.version-module.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - diffpy.srrietveld.version - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module version - - - - - -
      [frames] | no frames]
      -
      - -

      Module version

      source code

      -

      Definition of __version__ and __date__ for diffpy.srrietveld.

      - -
      -

      Version: - 1.0beta.dev-r6361-20110319 -

      -

      Date: - 2011-03-19 -

      -
      - - - - - - - - - - - -
      - Variables
      -   - - __id__ = '$Id: version.py 5658 2010-07-09 20:05:34Z juhas $' -
      -   - - __package__ = 'diffpy.srrietveld' -
      -

      Imports: - get_distribution -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/diffpy.srrietveld.version-pysrc.html b/static_root/doc/srrietveld/api/diffpy.srrietveld.version-pysrc.html deleted file mode 100644 index e2bc99d1..00000000 --- a/static_root/doc/srrietveld/api/diffpy.srrietveld.version-pysrc.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - diffpy.srrietveld.version - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package diffpy :: - Package srrietveld :: - Module version - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module diffpy.srrietveld.version

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2008 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Pavol Juhas 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14   
      -15  """Definition of __version__ and __date__ for diffpy.srrietveld. 
      -16  """ 
      -17   
      -18  __id__ = "$Id: version.py 5658 2010-07-09 20:05:34Z juhas $" 
      -19   
      -20  # obtain version information 
      -21  from pkg_resources import get_distribution 
      -22  __version__ = get_distribution('diffpy.srrietveld').version 
      -23   
      -24  # we assume that tag_date was used and __version__ ends in YYYYMMDD 
      -25  __date__ = __version__[-8:-4] + '-' + \ 
      -26             __version__[-4:-2] + '-' + __version__[-2:] 
      -27   
      -28  # End of file 
      -29   
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/epydoc.css b/static_root/doc/srrietveld/api/epydoc.css deleted file mode 100644 index 86d41706..00000000 --- a/static_root/doc/srrietveld/api/epydoc.css +++ /dev/null @@ -1,322 +0,0 @@ - - -/* Epydoc CSS Stylesheet - * - * This stylesheet can be used to customize the appearance of epydoc's - * HTML output. - * - */ - -/* Default Colors & Styles - * - Set the default foreground & background color with 'body'; and - * link colors with 'a:link' and 'a:visited'. - * - Use bold for decision list terms. - * - The heading styles defined here are used for headings *within* - * docstring descriptions. All headings used by epydoc itself use - * either class='epydoc' or class='toc' (CSS styles for both - * defined below). - */ -body { background: #ffffff; color: #000000; } -p { margin-top: 0.5em; margin-bottom: 0.5em; } -a:link { color: #0000ff; } -a:visited { color: #204080; } -dt { font-weight: bold; } -h1 { font-size: +140%; font-style: italic; - font-weight: bold; } -h2 { font-size: +125%; font-style: italic; - font-weight: bold; } -h3 { font-size: +110%; font-style: italic; - font-weight: normal; } -code { font-size: 100%; } -/* N.B.: class, not pseudoclass */ -a.link { font-family: monospace; } - -/* Page Header & Footer - * - The standard page header consists of a navigation bar (with - * pointers to standard pages such as 'home' and 'trees'); a - * breadcrumbs list, which can be used to navigate to containing - * classes or modules; options links, to show/hide private - * variables and to show/hide frames; and a page title (using - *

      ). The page title may be followed by a link to the - * corresponding source code (using 'span.codelink'). - * - The footer consists of a navigation bar, a timestamp, and a - * pointer to epydoc's homepage. - */ -h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } -h2.epydoc { font-size: +130%; font-weight: bold; } -h3.epydoc { font-size: +115%; font-weight: bold; - margin-top: 0.2em; } -td h3.epydoc { font-size: +115%; font-weight: bold; - margin-bottom: 0; } -table.navbar { background: #a0c0ff; color: #000000; - border: 2px groove #c0d0d0; } -table.navbar table { color: #000000; } -th.navbar-select { background: #70b0ff; - color: #000000; } -table.navbar a { text-decoration: none; } -table.navbar a:link { color: #0000ff; } -table.navbar a:visited { color: #204080; } -span.breadcrumbs { font-size: 85%; font-weight: bold; } -span.options { font-size: 70%; } -span.codelink { font-size: 85%; } -td.footer { font-size: 85%; } - -/* Table Headers - * - Each summary table and details section begins with a 'header' - * row. This row contains a section title (marked by - * 'span.table-header') as well as a show/hide private link - * (marked by 'span.options', defined above). - * - Summary tables that contain user-defined groups mark those - * groups using 'group header' rows. - */ -td.table-header { background: #70b0ff; color: #000000; - border: 1px solid #608090; } -td.table-header table { color: #000000; } -td.table-header table a:link { color: #0000ff; } -td.table-header table a:visited { color: #204080; } -span.table-header { font-size: 120%; font-weight: bold; } -th.group-header { background: #c0e0f8; color: #000000; - text-align: left; font-style: italic; - font-size: 115%; - border: 1px solid #608090; } - -/* Summary Tables (functions, variables, etc) - * - Each object is described by a single row of the table with - * two cells. The left cell gives the object's type, and is - * marked with 'code.summary-type'. The right cell gives the - * object's name and a summary description. - * - CSS styles for the table's header and group headers are - * defined above, under 'Table Headers' - */ -table.summary { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin-bottom: 0.5em; } -td.summary { border: 1px solid #608090; } -code.summary-type { font-size: 85%; } -table.summary a:link { color: #0000ff; } -table.summary a:visited { color: #204080; } - - -/* Details Tables (functions, variables, etc) - * - Each object is described in its own div. - * - A single-row summary table w/ table-header is used as - * a header for each details section (CSS style for table-header - * is defined above, under 'Table Headers'). - */ -table.details { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin: .2em 0 0 0; } -table.details table { color: #000000; } -table.details a:link { color: #0000ff; } -table.details a:visited { color: #204080; } - -/* Fields */ -dl.fields { margin-left: 2em; margin-top: 1em; - margin-bottom: 1em; } -dl.fields dd ul { margin-left: 0em; padding-left: 0em; } -dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; } -div.fields { margin-left: 2em; } -div.fields p { margin-bottom: 0.5em; } - -/* Index tables (identifier index, term index, etc) - * - link-index is used for indices containing lists of links - * (namely, the identifier index & term index). - * - index-where is used in link indices for the text indicating - * the container/source for each link. - * - metadata-index is used for indices containing metadata - * extracted from fields (namely, the bug index & todo index). - */ -table.link-index { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; } -td.link-index { border-width: 0px; } -table.link-index a:link { color: #0000ff; } -table.link-index a:visited { color: #204080; } -span.index-where { font-size: 70%; } -table.metadata-index { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin: .2em 0 0 0; } -td.metadata-index { border-width: 1px; border-style: solid; } -table.metadata-index a:link { color: #0000ff; } -table.metadata-index a:visited { color: #204080; } - -/* Function signatures - * - sig* is used for the signature in the details section. - * - .summary-sig* is used for the signature in the summary - * table, and when listing property accessor functions. - * */ -.sig-name { color: #006080; } -.sig-arg { color: #008060; } -.sig-default { color: #602000; } -.summary-sig { font-family: monospace; } -.summary-sig-name { color: #006080; font-weight: bold; } -table.summary a.summary-sig-name:link - { color: #006080; font-weight: bold; } -table.summary a.summary-sig-name:visited - { color: #006080; font-weight: bold; } -.summary-sig-arg { color: #006040; } -.summary-sig-default { color: #501800; } - -/* Subclass list - */ -ul.subclass-list { display: inline; } -ul.subclass-list li { display: inline; } - -/* To render variables, classes etc. like functions */ -table.summary .summary-name { color: #006080; font-weight: bold; - font-family: monospace; } -table.summary - a.summary-name:link { color: #006080; font-weight: bold; - font-family: monospace; } -table.summary - a.summary-name:visited { color: #006080; font-weight: bold; - font-family: monospace; } - -/* Variable values - * - In the 'variable details' sections, each varaible's value is - * listed in a 'pre.variable' box. The width of this box is - * restricted to 80 chars; if the value's repr is longer than - * this it will be wrapped, using a backslash marked with - * class 'variable-linewrap'. If the value's repr is longer - * than 3 lines, the rest will be ellided; and an ellipsis - * marker ('...' marked with 'variable-ellipsis') will be used. - * - If the value is a string, its quote marks will be marked - * with 'variable-quote'. - * - If the variable is a regexp, it is syntax-highlighted using - * the re* CSS classes. - */ -pre.variable { padding: .5em; margin: 0; - background: #dce4ec; color: #000000; - border: 1px solid #708890; } -.variable-linewrap { color: #604000; font-weight: bold; } -.variable-ellipsis { color: #604000; font-weight: bold; } -.variable-quote { color: #604000; font-weight: bold; } -.variable-group { color: #008000; font-weight: bold; } -.variable-op { color: #604000; font-weight: bold; } -.variable-string { color: #006030; } -.variable-unknown { color: #a00000; font-weight: bold; } -.re { color: #000000; } -.re-char { color: #006030; } -.re-op { color: #600000; } -.re-group { color: #003060; } -.re-ref { color: #404040; } - -/* Base tree - * - Used by class pages to display the base class hierarchy. - */ -pre.base-tree { font-size: 80%; margin: 0; } - -/* Frames-based table of contents headers - * - Consists of two frames: one for selecting modules; and - * the other listing the contents of the selected module. - * - h1.toc is used for each frame's heading - * - h2.toc is used for subheadings within each frame. - */ -h1.toc { text-align: center; font-size: 105%; - margin: 0; font-weight: bold; - padding: 0; } -h2.toc { font-size: 100%; font-weight: bold; - margin: 0.5em 0 0 -0.3em; } - -/* Syntax Highlighting for Source Code - * - doctest examples are displayed in a 'pre.py-doctest' block. - * If the example is in a details table entry, then it will use - * the colors specified by the 'table pre.py-doctest' line. - * - Source code listings are displayed in a 'pre.py-src' block. - * Each line is marked with 'span.py-line' (used to draw a line - * down the left margin, separating the code from the line - * numbers). Line numbers are displayed with 'span.py-lineno'. - * The expand/collapse block toggle button is displayed with - * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not - * modify the font size of the text.) - * - If a source code page is opened with an anchor, then the - * corresponding code block will be highlighted. The code - * block's header is highlighted with 'py-highlight-hdr'; and - * the code block's body is highlighted with 'py-highlight'. - * - The remaining py-* classes are used to perform syntax - * highlighting (py-string for string literals, py-name for names, - * etc.) - */ -pre.py-doctest { padding: .5em; margin: 1em; - background: #e8f0f8; color: #000000; - border: 1px solid #708890; } -table pre.py-doctest { background: #dce4ec; - color: #000000; } -pre.py-src { border: 2px solid #000000; - background: #f0f0f0; color: #000000; } -.py-line { border-left: 2px solid #000000; - margin-left: .2em; padding-left: .4em; } -.py-lineno { font-style: italic; font-size: 90%; - padding-left: .5em; } -a.py-toggle { text-decoration: none; } -div.py-highlight-hdr { border-top: 2px solid #000000; - border-bottom: 2px solid #000000; - background: #d8e8e8; } -div.py-highlight { border-bottom: 2px solid #000000; - background: #d0e0e0; } -.py-prompt { color: #005050; font-weight: bold;} -.py-more { color: #005050; font-weight: bold;} -.py-string { color: #006030; } -.py-comment { color: #003060; } -.py-keyword { color: #600000; } -.py-output { color: #404040; } -.py-name { color: #000050; } -.py-name:link { color: #000050 !important; } -.py-name:visited { color: #000050 !important; } -.py-number { color: #005000; } -.py-defname { color: #000060; font-weight: bold; } -.py-def-name { color: #000060; font-weight: bold; } -.py-base-class { color: #000060; } -.py-param { color: #000060; } -.py-docstring { color: #006030; } -.py-decorator { color: #804020; } -/* Use this if you don't want links to names underlined: */ -/*a.py-name { text-decoration: none; }*/ - -/* Graphs & Diagrams - * - These CSS styles are used for graphs & diagrams generated using - * Graphviz dot. 'img.graph-without-title' is used for bare - * diagrams (to remove the border created by making the image - * clickable). - */ -img.graph-without-title { border: none; } -img.graph-with-title { border: 1px solid #000000; } -span.graph-title { font-weight: bold; } -span.graph-caption { } - -/* General-purpose classes - * - 'p.indent-wrapped-lines' defines a paragraph whose first line - * is not indented, but whose subsequent lines are. - * - The 'nomargin-top' class is used to remove the top margin (e.g. - * from lists). The 'nomargin' class is used to remove both the - * top and bottom margin (but not the left or right margin -- - * for lists, that would cause the bullets to disappear.) - */ -p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em; - margin: 0; } -.nomargin-top { margin-top: 0; } -.nomargin { margin-top: 0; margin-bottom: 0; } - -/* HTML Log */ -div.log-block { padding: 0; margin: .5em 0 .5em 0; - background: #e8f0f8; color: #000000; - border: 1px solid #000000; } -div.log-error { padding: .1em .3em .1em .3em; margin: 4px; - background: #ffb0b0; color: #000000; - border: 1px solid #000000; } -div.log-warning { padding: .1em .3em .1em .3em; margin: 4px; - background: #ffffb0; color: #000000; - border: 1px solid #000000; } -div.log-info { padding: .1em .3em .1em .3em; margin: 4px; - background: #b0ffb0; color: #000000; - border: 1px solid #000000; } -h2.log-hdr { background: #70b0ff; color: #000000; - margin: 0; padding: 0em 0.5em 0em 0.5em; - border-bottom: 1px solid #000000; font-size: 110%; } -p.log { font-weight: bold; margin: .5em 0 .5em 0; } -tr.opt-changed { color: #000000; font-weight: bold; } -tr.opt-default { color: #606060; } -pre.log { margin: 0; padding: 0; padding-left: 1em; } diff --git a/static_root/doc/srrietveld/api/epydoc.js b/static_root/doc/srrietveld/api/epydoc.js deleted file mode 100644 index e787dbcf..00000000 --- a/static_root/doc/srrietveld/api/epydoc.js +++ /dev/null @@ -1,293 +0,0 @@ -function toggle_private() { - // Search for any private/public links on this page. Store - // their old text in "cmd," so we will know what action to - // take; and change their text to the opposite action. - var cmd = "?"; - var elts = document.getElementsByTagName("a"); - for(var i=0; i...
      "; - elt.innerHTML = s; - } -} - -function toggle(id) { - elt = document.getElementById(id+"-toggle"); - if (elt.innerHTML == "-") - collapse(id); - else - expand(id); - return false; -} - -function highlight(id) { - var elt = document.getElementById(id+"-def"); - if (elt) elt.className = "py-highlight-hdr"; - var elt = document.getElementById(id+"-expanded"); - if (elt) elt.className = "py-highlight"; - var elt = document.getElementById(id+"-collapsed"); - if (elt) elt.className = "py-highlight"; -} - -function num_lines(s) { - var n = 1; - var pos = s.indexOf("\n"); - while ( pos > 0) { - n += 1; - pos = s.indexOf("\n", pos+1); - } - return n; -} - -// Collapse all blocks that mave more than `min_lines` lines. -function collapse_all(min_lines) { - var elts = document.getElementsByTagName("div"); - for (var i=0; i 0) - if (elt.id.substring(split, elt.id.length) == "-expanded") - if (num_lines(elt.innerHTML) > min_lines) - collapse(elt.id.substring(0, split)); - } -} - -function expandto(href) { - var start = href.indexOf("#")+1; - if (start != 0 && start != href.length) { - if (href.substring(start, href.length) != "-") { - collapse_all(4); - pos = href.indexOf(".", start); - while (pos != -1) { - var id = href.substring(start, pos); - expand(id); - pos = href.indexOf(".", pos+1); - } - var id = href.substring(start, href.length); - expand(id); - highlight(id); - } - } -} - -function kill_doclink(id) { - var parent = document.getElementById(id); - parent.removeChild(parent.childNodes.item(0)); -} -function auto_kill_doclink(ev) { - if (!ev) var ev = window.event; - if (!this.contains(ev.toElement)) { - var parent = document.getElementById(this.parentID); - parent.removeChild(parent.childNodes.item(0)); - } -} - -function doclink(id, name, targets_id) { - var elt = document.getElementById(id); - - // If we already opened the box, then destroy it. - // (This case should never occur, but leave it in just in case.) - if (elt.childNodes.length > 1) { - elt.removeChild(elt.childNodes.item(0)); - } - else { - // The outer box: relative + inline positioning. - var box1 = document.createElement("div"); - box1.style.position = "relative"; - box1.style.display = "inline"; - box1.style.top = 0; - box1.style.left = 0; - - // A shadow for fun - var shadow = document.createElement("div"); - shadow.style.position = "absolute"; - shadow.style.left = "-1.3em"; - shadow.style.top = "-1.3em"; - shadow.style.background = "#404040"; - - // The inner box: absolute positioning. - var box2 = document.createElement("div"); - box2.style.position = "relative"; - box2.style.border = "1px solid #a0a0a0"; - box2.style.left = "-.2em"; - box2.style.top = "-.2em"; - box2.style.background = "white"; - box2.style.padding = ".3em .4em .3em .4em"; - box2.style.fontStyle = "normal"; - box2.onmouseout=auto_kill_doclink; - box2.parentID = id; - - // Get the targets - var targets_elt = document.getElementById(targets_id); - var targets = targets_elt.getAttribute("targets"); - var links = ""; - target_list = targets.split(","); - for (var i=0; i" + - target[0] + ""; - } - - // Put it all together. - elt.insertBefore(box1, elt.childNodes.item(0)); - //box1.appendChild(box2); - box1.appendChild(shadow); - shadow.appendChild(box2); - box2.innerHTML = - "Which "+name+" do you want to see documentation for?" + - ""; - } - return false; -} - -function get_anchor() { - var href = location.href; - var start = href.indexOf("#")+1; - if ((start != 0) && (start != href.length)) - return href.substring(start, href.length); - } -function redirect_url(dottedName) { - // Scan through each element of the "pages" list, and check - // if "name" matches with any of them. - for (var i=0; i-m" or "-c"; - // extract the portion & compare it to dottedName. - var pagename = pages[i].substring(0, pages[i].length-2); - if (pagename == dottedName.substring(0,pagename.length)) { - - // We've found a page that matches `dottedName`; - // construct its URL, using leftover `dottedName` - // content to form an anchor. - var pagetype = pages[i].charAt(pages[i].length-1); - var url = pagename + ((pagetype=="m")?"-module.html": - "-class.html"); - if (dottedName.length > pagename.length) - url += "#" + dottedName.substring(pagename.length+1, - dottedName.length); - return url; - } - } - } diff --git a/static_root/doc/srrietveld/api/frames.html b/static_root/doc/srrietveld/api/frames.html deleted file mode 100644 index abb3c7cd..00000000 --- a/static_root/doc/srrietveld/api/frames.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diffpy.srrietveld - - - - - - - - - diff --git a/static_root/doc/srrietveld/api/help.html b/static_root/doc/srrietveld/api/help.html deleted file mode 100644 index a3331524..00000000 --- a/static_root/doc/srrietveld/api/help.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - Help - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - - - -
      [frames] | no frames]
      -
      - -

      API Documentation

      - -

      This document contains the API (Application Programming Interface) -documentation for diffpy.srrietveld. Documentation for the Python -objects defined by the project is divided into separate pages for each -package, module, and class. The API documentation also includes two -pages containing information about the project as a whole: a trees -page, and an index page.

      - -

      Object Documentation

      - -

      Each Package Documentation page contains:

      -
        -
      • A description of the package.
      • -
      • A list of the modules and sub-packages contained by the - package.
      • -
      • A summary of the classes defined by the package.
      • -
      • A summary of the functions defined by the package.
      • -
      • A summary of the variables defined by the package.
      • -
      • A detailed description of each function defined by the - package.
      • -
      • A detailed description of each variable defined by the - package.
      • -
      - -

      Each Module Documentation page contains:

      -
        -
      • A description of the module.
      • -
      • A summary of the classes defined by the module.
      • -
      • A summary of the functions defined by the module.
      • -
      • A summary of the variables defined by the module.
      • -
      • A detailed description of each function defined by the - module.
      • -
      • A detailed description of each variable defined by the - module.
      • -
      - -

      Each Class Documentation page contains:

      -
        -
      • A class inheritance diagram.
      • -
      • A list of known subclasses.
      • -
      • A description of the class.
      • -
      • A summary of the methods defined by the class.
      • -
      • A summary of the instance variables defined by the class.
      • -
      • A summary of the class (static) variables defined by the - class.
      • -
      • A detailed description of each method defined by the - class.
      • -
      • A detailed description of each instance variable defined by the - class.
      • -
      • A detailed description of each class (static) variable defined - by the class.
      • -
      - -

      Project Documentation

      - -

      The Trees page contains the module and class hierarchies:

      -
        -
      • The module hierarchy lists every package and module, with - modules grouped into packages. At the top level, and within each - package, modules and sub-packages are listed alphabetically.
      • -
      • The class hierarchy lists every class, grouped by base - class. If a class has more than one base class, then it will be - listed under each base class. At the top level, and under each base - class, classes are listed alphabetically.
      • -
      - -

      The Index page contains indices of terms and - identifiers:

      -
        -
      • The term index lists every term indexed by any object's - documentation. For each term, the index provides links to each - place where the term is indexed.
      • -
      • The identifier index lists the (short) name of every package, - module, class, method, function, variable, and parameter. For each - identifier, the index provides a short description, and a link to - its documentation.
      • -
      - -

      The Table of Contents

      - -

      The table of contents occupies the two frames on the left side of -the window. The upper-left frame displays the project -contents, and the lower-left frame displays the module -contents:

      - - - - - - - - - -
      - Project
      Contents
      ...
      - API
      Documentation
      Frame


      -
      - Module
      Contents
       
      ...
        -

      - -

      The project contents frame contains a list of all packages -and modules that are defined by the project. Clicking on an entry -will display its contents in the module contents frame. Clicking on a -special entry, labeled "Everything," will display the contents of -the entire project.

      - -

      The module contents frame contains a list of every -submodule, class, type, exception, function, and variable defined by a -module or package. Clicking on an entry will display its -documentation in the API documentation frame. Clicking on the name of -the module, at the top of the frame, will display the documentation -for the module itself.

      - -

      The "frames" and "no frames" buttons below the top -navigation bar can be used to control whether the table of contents is -displayed or not.

      - -

      The Navigation Bar

      - -

      A navigation bar is located at the top and bottom of every page. -It indicates what type of page you are currently viewing, and allows -you to go to related pages. The following table describes the labels -on the navigation bar. Note that not some labels (such as -[Parent]) are not displayed on all pages.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      LabelHighlighted when...Links to...
      [Parent](never highlighted) the parent of the current package
      [Package]viewing a packagethe package containing the current object -
      [Module]viewing a modulethe module containing the current object -
      [Class]viewing a class the class containing the current object
      [Trees]viewing the trees page the trees page
      [Index]viewing the index page the index page
      [Help]viewing the help page the help page
      - -

      The "show private" and "hide private" buttons below -the top navigation bar can be used to control whether documentation -for private objects is displayed. Private objects are usually defined -as objects whose (short) names begin with a single underscore, but do -not end with an underscore. For example, "_x", -"__pprint", and "epydoc.epytext._tokenize" -are private objects; but "re.sub", -"__init__", and "type_" are not. However, -if a module defines the "__all__" variable, then its -contents are used to decide which objects are private.

      - -

      A timestamp below the bottom navigation bar indicates when each -page was last updated.

      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/identifier-index.html b/static_root/doc/srrietveld/api/identifier-index.html deleted file mode 100644 index 776906e2..00000000 --- a/static_root/doc/srrietveld/api/identifier-index.html +++ /dev/null @@ -1,1388 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - - - -
      [frames] | no frames]
      -
      - -
      -

      Identifier Index

      -
      -[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      A

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      B

      - - - - - - - - - - - - - - - - - -

      C

      - - - - - - - - - - - - - - - - - - - - - - -

      D

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      E

      - - - - - - - - - - - - - - - - - - - - - - -

      F

      - - - - - - - - - - - - - - - - - -

      G

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      H

      - - - - - - - - -

      I

      - - - - - - - - - - - - - - - - - - - - - - -

      L

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      M

      - - - - - - - - - - - - -

      N

      - - - - - - - - - - - - -

      O

      - - - - - - - - -

      P

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      R

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      S

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      T

      - - - - - - - - -

      U

      - - - - - - - - - - - - - - - - - -

      V

      - - - - - - - - -

      W

      - - - - - - - - - - - - - - - - - -

      X

      - - - - - - - - - - - - -

      _

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -

      - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/index.html b/static_root/doc/srrietveld/api/index.html deleted file mode 100644 index abb3c7cd..00000000 --- a/static_root/doc/srrietveld/api/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diffpy.srrietveld - - - - - - - - - diff --git a/static_root/doc/srrietveld/api/module-tree.html b/static_root/doc/srrietveld/api/module-tree.html deleted file mode 100644 index 3f5ae358..00000000 --- a/static_root/doc/srrietveld/api/module-tree.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - Module Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - - - -
      [frames] | no frames]
      -
      -
      - [ Module Hierarchy - | Class Hierarchy ] -

      -

      Module Hierarchy

      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/redirect.html b/static_root/doc/srrietveld/api/redirect.html deleted file mode 100644 index 89792e18..00000000 --- a/static_root/doc/srrietveld/api/redirect.html +++ /dev/null @@ -1,38 +0,0 @@ -Epydoc Redirect Page - - - - - - - - -

      Epydoc Auto-redirect page

      - -

      When javascript is enabled, this page will redirect URLs of -the form redirect.html#dotted.name to the -documentation for the object with the given fully-qualified -dotted name.

      -

       

      - - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld-module.html deleted file mode 100644 index 470c3cdb..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld-module.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - srrietveld - - - - - -

      Module srrietveld

      -
      -

      Variables

      - __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon-module.html deleted file mode 100644 index 7b5e776b..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon-module.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - addon - - - - - -

      Module addon

      -
      -

      Variables

      - __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.datafile-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.datafile-module.html deleted file mode 100644 index 9274074a..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.datafile-module.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - datafile - - - - - -

      Module datafile

      -
      -

      Classes

      - DataFileConverter

      Functions

      - createDataDict
      readFileList

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.debyefitting-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.debyefitting-module.html deleted file mode 100644 index cb638c2e..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.debyefitting-module.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - debyefitting - - - - - -

      Module debyefitting

      -
      -

      Classes

      - DebyeFitting

      Functions

      - adps
      debye

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.mcsampling-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.mcsampling-module.html deleted file mode 100644 index d649b760..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.mcsampling-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - mcsampling - - - - - -

      Module mcsampling

      -
      -

      Classes

      - MonteCarloSampling

      Functions

      - importFromGSASstd
      importFromGSAStimemap

      Variables

      - __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.structurefile-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.structurefile-module.html deleted file mode 100644 index 66783cec..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.addon.structurefile-module.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - structurefile - - - - - -

      Module structurefile

      -
      -

      Classes

      - StructureFileConverter

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.applications-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.applications-module.html deleted file mode 100644 index b62417f4..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.applications-module.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - applications - - - - - -

      Module applications

      -
      -

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.applications.srhelp-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.applications.srhelp-module.html deleted file mode 100644 index 3332fc8b..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.applications.srhelp-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - srhelp - - - - - -

      Module srhelp

      -
      -

      Functions

      - getHelp

      Variables

      - __id__
      __package__
      helpstring

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.atom-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.atom-module.html deleted file mode 100644 index 1aafd80c..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.atom-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - atom - - - - - -

      Module atom

      -
      -

      Classes

      - Atom

      Variables

      - PARAMNAMES
      __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.bugreport-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.bugreport-module.html deleted file mode 100644 index 198e6dbd..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.bugreport-module.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - bugreport - - - - - -

      Module bugreport

      -
      -

      Functions

      - getFormData
      submitBugReport

      Variables

      - FORM_ENCPW
      FORM_REALM
      FORM_URL
      FORM_USER
      ROOT_URL
      __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.buildfit-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.buildfit-module.html deleted file mode 100644 index edf82eba..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.buildfit-module.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - buildfit - - - - - -

      Module buildfit

      -
      -

      Classes

      - BuildFit

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert-module.html deleted file mode 100644 index 3c95838e..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert-module.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - convert - - - - - -

      Module convert

      -
      -

      Variables

      - __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.datafile-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.datafile-module.html deleted file mode 100644 index 43ce49ec..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.datafile-module.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - datafile - - - - - -

      Module datafile

      -
      -

      Classes

      - DataFile

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.gsasinstparser-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.gsasinstparser-module.html deleted file mode 100644 index dbd17559..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.gsasinstparser-module.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - gsasinstparser - - - - - -

      Module gsasinstparser

      -
      -

      Classes

      - GSASInstFile

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.listfilereader-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.listfilereader-module.html deleted file mode 100644 index b546c9b9..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.listfilereader-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - listfilereader - - - - - -

      Module listfilereader

      -
      -

      Classes

      - CSVListFileReader
      ListFileReader

      Functions

      - readListFile
      resolveColumnLabel

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.strategyfile-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.strategyfile-module.html deleted file mode 100644 index 50c730a6..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.strategyfile-module.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - strategyfile - - - - - -

      Module strategyfile

      -
      -

      Classes

      - StrategyFile

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.xmlparser-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.xmlparser-module.html deleted file mode 100644 index d0952aae..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.convert.xmlparser-module.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - xmlparser - - - - - -

      Module xmlparser

      -
      -

      Classes

      - BackgroundXML
      ExcludedRegionXML
      InstrumentXML
      StrategyXML
      StructureXML
      XMLFile

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.exceptions-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.exceptions-module.html deleted file mode 100644 index 7479ef94..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.exceptions-module.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - exceptions - - - - - -

      Module exceptions

      -
      -

      Classes

      - SrrConfigError
      SrrError
      SrrFileError
      SrrIOError
      SrrInputError
      SrrRunTimeError
      SrrValueError

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.export-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.export-module.html deleted file mode 100644 index 6e354075..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.export-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - export - - - - - -

      Module export

      -
      -

      Functions

      - exportCifFile
      exportDISAGLFile
      exportEngineFile

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.fitrt-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.fitrt-module.html deleted file mode 100644 index 7d77bd14..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.fitrt-module.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - fitrt - - - - - -

      Module fitrt

      -
      -

      Classes

      - FitRT

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.objectinfo-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.objectinfo-module.html deleted file mode 100644 index 49253c03..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.objectinfo-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - objectinfo - - - - - -

      Module objectinfo

      -
      -

      Classes

      - ObjectInfo

      Functions

      - setObjectInfo

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.paramnames-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.paramnames-module.html deleted file mode 100644 index c5e5b1e5..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.paramnames-module.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - paramnames - - - - - -

      Module paramnames

      -
      -

      Variables

      - PARAMNAMES
      __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.pattern-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.pattern-module.html deleted file mode 100644 index f0bb0159..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.pattern-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - pattern - - - - - -

      Module pattern

      -
      -

      Classes

      - ExcludedRegion
      Pattern

      Variables

      - PARAMNAMES
      __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.phase-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.phase-module.html deleted file mode 100644 index 15a761d1..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.phase-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - phase - - - - - -

      Module phase

      -
      -

      Classes

      - Phase

      Variables

      - PARAMNAMES
      __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.profile-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.profile-module.html deleted file mode 100644 index 651aa244..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.profile-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - profile - - - - - -

      Module profile

      -
      -

      Classes

      - Profile

      Variables

      - PARAMNAMES
      __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.project-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.project-module.html deleted file mode 100644 index f957c44d..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.project-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - project - - - - - -

      Module project

      -
      -

      Classes

      - Project

      Functions

      - copyObjectData
      exportEngineObject
      importEngineObject

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.refinement-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.refinement-module.html deleted file mode 100644 index da96b8d3..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.refinement-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - refinement - - - - - -

      Module refinement

      -
      -

      Classes

      - Refinement

      Variables

      - PARAMNAMES
      __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.utility-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.utility-module.html deleted file mode 100644 index b5757faa..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.utility-module.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - utility - - - - - -

      Module utility

      -
      -

      Classes

      - UTF8Recoder
      UnicodeReader
      UnicodeWriter

      Functions

      - checkFormat
      getFileid
      importClass
      parseXYToList
      printDebugInfo
      printWarning
      unique

      Variables

      - __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.version-module.html b/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.version-module.html deleted file mode 100644 index 9c57d174..00000000 --- a/static_root/doc/srrietveld/api/toc-diffpy.srrietveld.version-module.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - version - - - - - -

      Module version

      -
      -

      Variables

      - __id__
      __package__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-everything.html b/static_root/doc/srrietveld/api/toc-everything.html deleted file mode 100644 index 733e1f4f..00000000 --- a/static_root/doc/srrietveld/api/toc-everything.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - Everything - - - - - -

      Everything

      -
      -

      All Classes

      - diffpy.srrietveld.addon.datafile.DataFileConverter
      diffpy.srrietveld.addon.debyefitting.DebyeFitting
      diffpy.srrietveld.addon.mcsampling.MonteCarloSampling
      diffpy.srrietveld.addon.structurefile.StructureFileConverter
      diffpy.srrietveld.atom.Atom
      diffpy.srrietveld.buildfit.BuildFit
      diffpy.srrietveld.convert.datafile.DataFile
      diffpy.srrietveld.convert.gsasinstparser.GSASInstFile
      diffpy.srrietveld.convert.listfilereader.CSVListFileReader
      diffpy.srrietveld.convert.listfilereader.ListFileReader
      diffpy.srrietveld.convert.strategyfile.StrategyFile
      diffpy.srrietveld.convert.xmlparser.BackgroundXML
      diffpy.srrietveld.convert.xmlparser.ExcludedRegionXML
      diffpy.srrietveld.convert.xmlparser.InstrumentXML
      diffpy.srrietveld.convert.xmlparser.StrategyXML
      diffpy.srrietveld.convert.xmlparser.StructureXML
      diffpy.srrietveld.convert.xmlparser.XMLFile
      diffpy.srrietveld.exceptions.SrrConfigError
      diffpy.srrietveld.exceptions.SrrError
      diffpy.srrietveld.exceptions.SrrFileError
      diffpy.srrietveld.exceptions.SrrIOError
      diffpy.srrietveld.exceptions.SrrInputError
      diffpy.srrietveld.exceptions.SrrRunTimeError
      diffpy.srrietveld.exceptions.SrrValueError
      diffpy.srrietveld.fitrt.FitRT
      diffpy.srrietveld.objectinfo.ObjectInfo
      diffpy.srrietveld.pattern.ExcludedRegion
      diffpy.srrietveld.pattern.Pattern
      diffpy.srrietveld.phase.Phase
      diffpy.srrietveld.profile.Profile
      diffpy.srrietveld.project.Project
      diffpy.srrietveld.refinement.Refinement
      diffpy.srrietveld.utility.UTF8Recoder
      diffpy.srrietveld.utility.UnicodeReader
      diffpy.srrietveld.utility.UnicodeWriter
      trunk.diffpy.srrietveld.applications.refine.ReadInput

      All Functions

      - diffpy.srrietveld.addon.datafile.createDataDict
      diffpy.srrietveld.addon.datafile.readFileList
      diffpy.srrietveld.addon.debyefitting.adps
      diffpy.srrietveld.addon.debyefitting.debye
      diffpy.srrietveld.addon.mcsampling.importFromGSASstd
      diffpy.srrietveld.addon.mcsampling.importFromGSAStimemap
      diffpy.srrietveld.applications.srhelp.getHelp
      diffpy.srrietveld.bugreport.getFormData
      diffpy.srrietveld.bugreport.submitBugReport
      diffpy.srrietveld.convert.listfilereader.readListFile
      diffpy.srrietveld.convert.listfilereader.resolveColumnLabel
      diffpy.srrietveld.export.exportCifFile
      diffpy.srrietveld.export.exportDISAGLFile
      diffpy.srrietveld.export.exportEngineFile
      diffpy.srrietveld.objectinfo.setObjectInfo
      diffpy.srrietveld.project.copyObjectData
      diffpy.srrietveld.project.exportEngineObject
      diffpy.srrietveld.project.importEngineObject
      diffpy.srrietveld.utility.checkFormat
      diffpy.srrietveld.utility.getFileid
      diffpy.srrietveld.utility.importClass
      diffpy.srrietveld.utility.parseXYToList
      diffpy.srrietveld.utility.printDebugInfo
      diffpy.srrietveld.utility.printWarning
      diffpy.srrietveld.utility.unique
      trunk.diffpy.srrietveld.applications.refine.applydata
      trunk.diffpy.srrietveld.applications.refine.main

      All Variables

      - diffpy.srrietveld.__package__
      diffpy.srrietveld.addon.__package__
      diffpy.srrietveld.addon.datafile.__id__
      diffpy.srrietveld.addon.datafile.__package__
      diffpy.srrietveld.addon.debyefitting.__id__
      diffpy.srrietveld.addon.debyefitting.__package__
      diffpy.srrietveld.addon.mcsampling.__package__
      diffpy.srrietveld.addon.structurefile.__id__
      diffpy.srrietveld.addon.structurefile.__package__
      diffpy.srrietveld.applications.__id__
      diffpy.srrietveld.applications.__package__
      diffpy.srrietveld.applications.srhelp.__id__
      diffpy.srrietveld.applications.srhelp.__package__
      diffpy.srrietveld.applications.srhelp.helpstring
      diffpy.srrietveld.atom.PARAMNAMES
      diffpy.srrietveld.atom.__id__
      diffpy.srrietveld.atom.__package__
      diffpy.srrietveld.bugreport.FORM_ENCPW
      diffpy.srrietveld.bugreport.FORM_REALM
      diffpy.srrietveld.bugreport.FORM_URL
      diffpy.srrietveld.bugreport.FORM_USER
      diffpy.srrietveld.bugreport.ROOT_URL
      diffpy.srrietveld.bugreport.__id__
      diffpy.srrietveld.bugreport.__package__
      diffpy.srrietveld.buildfit.__id__
      diffpy.srrietveld.buildfit.__package__
      diffpy.srrietveld.convert.__package__
      diffpy.srrietveld.convert.datafile.__id__
      diffpy.srrietveld.convert.datafile.__package__
      diffpy.srrietveld.convert.gsasinstparser.__id__
      diffpy.srrietveld.convert.gsasinstparser.__package__
      diffpy.srrietveld.convert.listfilereader.__id__
      diffpy.srrietveld.convert.listfilereader.__package__
      diffpy.srrietveld.convert.strategyfile.__id__
      diffpy.srrietveld.convert.strategyfile.__package__
      diffpy.srrietveld.convert.xmlparser.__id__
      diffpy.srrietveld.convert.xmlparser.__package__
      diffpy.srrietveld.exceptions.__id__
      diffpy.srrietveld.exceptions.__package__
      diffpy.srrietveld.export.__id__
      diffpy.srrietveld.export.__package__
      diffpy.srrietveld.fitrt.__id__
      diffpy.srrietveld.fitrt.__package__
      diffpy.srrietveld.objectinfo.__id__
      diffpy.srrietveld.objectinfo.__package__
      diffpy.srrietveld.paramnames.PARAMNAMES
      diffpy.srrietveld.paramnames.__id__
      diffpy.srrietveld.paramnames.__package__
      diffpy.srrietveld.pattern.PARAMNAMES
      diffpy.srrietveld.pattern.__id__
      diffpy.srrietveld.pattern.__package__
      diffpy.srrietveld.phase.PARAMNAMES
      diffpy.srrietveld.phase.__id__
      diffpy.srrietveld.phase.__package__
      diffpy.srrietveld.profile.PARAMNAMES
      diffpy.srrietveld.profile.__id__
      diffpy.srrietveld.profile.__package__
      diffpy.srrietveld.project.__id__
      diffpy.srrietveld.project.__package__
      diffpy.srrietveld.refinement.PARAMNAMES
      diffpy.srrietveld.refinement.__id__
      diffpy.srrietveld.refinement.__package__
      diffpy.srrietveld.utility.__package__
      diffpy.srrietveld.version.__id__
      diffpy.srrietveld.version.__package__
      trunk.diffpy.srrietveld.applications.refine.__id__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc-trunk.diffpy.srrietveld.applications.refine-module.html b/static_root/doc/srrietveld/api/toc-trunk.diffpy.srrietveld.applications.refine-module.html deleted file mode 100644 index 208a9f0b..00000000 --- a/static_root/doc/srrietveld/api/toc-trunk.diffpy.srrietveld.applications.refine-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - refine - - - - - -

      Module refine

      -
      -

      Classes

      - ReadInput

      Functions

      - applydata
      main

      Variables

      - __id__

      - - - - diff --git a/static_root/doc/srrietveld/api/toc.html b/static_root/doc/srrietveld/api/toc.html deleted file mode 100644 index 8c5385e8..00000000 --- a/static_root/doc/srrietveld/api/toc.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - Table of Contents - - - - - -

      Table of Contents

      -
      - Everything -
      -

      Modules

      - diffpy.srrietveld
      diffpy.srrietveld.addon
      diffpy.srrietveld.addon.datafile
      diffpy.srrietveld.addon.debyefitting
      diffpy.srrietveld.addon.mcsampling
      diffpy.srrietveld.addon.structurefile
      diffpy.srrietveld.applications
      diffpy.srrietveld.applications.srhelp
      diffpy.srrietveld.atom
      diffpy.srrietveld.bugreport
      diffpy.srrietveld.buildfit
      diffpy.srrietveld.convert
      diffpy.srrietveld.convert.datafile
      diffpy.srrietveld.convert.gsasinstparser
      diffpy.srrietveld.convert.listfilereader
      diffpy.srrietveld.convert.strategyfile
      diffpy.srrietveld.convert.xmlparser
      diffpy.srrietveld.exceptions
      diffpy.srrietveld.export
      diffpy.srrietveld.fitrt
      diffpy.srrietveld.objectinfo
      diffpy.srrietveld.paramnames
      diffpy.srrietveld.pattern
      diffpy.srrietveld.phase
      diffpy.srrietveld.profile
      diffpy.srrietveld.project
      diffpy.srrietveld.refinement
      diffpy.srrietveld.utility
      diffpy.srrietveld.version
      trunk.diffpy.srrietveld.applications.refine

      - - - - diff --git a/static_root/doc/srrietveld/api/trunk.diffpy.srrietveld.applications.refine-module.html b/static_root/doc/srrietveld/api/trunk.diffpy.srrietveld.applications.refine-module.html deleted file mode 100644 index b1b8fbf9..00000000 --- a/static_root/doc/srrietveld/api/trunk.diffpy.srrietveld.applications.refine-module.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - trunk.diffpy.srrietveld.applications.refine - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package trunk :: - Package diffpy :: - Package srrietveld :: - Package applications :: - Module refine - - - - - -
      [frames] | no frames]
      -
      - -

      Module refine

      source code

      -

      Launch Rietveld refinement and control the refinement.

      - - - - - - - - - - -
      - Classes
      -   - - ReadInput
      - Parse input options and read xml files -
      - - - - - - - - - - - - -
      - Functions
      -   - - - - - - -
      applydata(fit, - datadict)
      - Expand fit to a fit array, with different data set
      - source code - -
      - -
      -   - - - - - - -
      main() - source code - -
      - -
      - - - - - - - - - -
      - Variables
      -   - - __id__ = "$Id: refine.py 5658 2010-07-09 20:05:34Z juhas $" -
      -

      Imports: - Project, - Manager, - SeqManager, - FitRT -


      - - - - - - -
      - Function Details
      - -
      - -
      - - -
      -

      applydata(fit, - datadict) -

      -
      source code  -
      - -

      Expand fit to a fit array, with different data set

      -

      fit -- a project fit object datadict -- a dictionary of data files

      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/trunk.diffpy.srrietveld.applications.refine-pysrc.html b/static_root/doc/srrietveld/api/trunk.diffpy.srrietveld.applications.refine-pysrc.html deleted file mode 100644 index d6f04162..00000000 --- a/static_root/doc/srrietveld/api/trunk.diffpy.srrietveld.applications.refine-pysrc.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - trunk.diffpy.srrietveld.applications.refine - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package trunk :: - Package diffpy :: - Package srrietveld :: - Package applications :: - Module refine - - - - - -
      [frames] | no frames]
      -
      -

      Source Code for Module trunk.diffpy.srrietveld.applications.refine

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2009 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Peng Tian 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ Launch Rietveld refinement and control the refinement. """ 
      - 15  __id__ = "$Id: refine.py 5658 2010-07-09 20:05:34Z juhas $" 
      - 16   
      - 17  from diffpy.srrietveld.convert.xmlparser import * 
      - 18  from diffpy.srrietveld.project import Project 
      - 19  from diffpy.srrietveld.manager import Manager, SeqManager 
      - 20  from diffpy.srrietveld.fitrt import FitRT 
      - 21   
      -
      22 -class ReadInput: -
      23 """ Parse input options and read xml files """ -
      24 - def __init__(self): -
      25 """ Initialization """ - 26 import sys - 27 - 28 argv = sys.argv - 29 if len(argv) < 2: - 30 msg = "Automatic Launched Refinement On Rietveld Refinement\n" - 31 msg += "\n%-10s -h For Help"% (argv[0].split("/")[-1]) - 32 print msg - 33 sys.exit(1) - 34 - 35 self.parseOptions() - 36 self.processInputs() - 37 self.run() - 38 return -
      39 -
      40 - def parseOptions(self): -
      41 """ Parse the input options """ - 42 from optparse import OptionParser - 43 import diffpy.srrietveld.applications.srhelp as srhelp - 44 # init - 45 optparser = OptionParser() - 46 - 47 # define the input options, will be removed to a common place - 48 optparser.add_option("-i", "--instrument", dest="instrument", - 49 help = srhelp.helpstring["instrument"]) - 50 optparser.add_option("-s", "--structure" , dest="structure", - 51 help = srhelp.helpstring["structure"]) - 52 optparser.add_option("-d", "--data", dest="datafile", - 53 help = srhelp.helpstring["data"]) - 54 optparser.add_option("-r", "--strategy", dest="strategyfile", - 55 help = srhelp.helpstring["strategy"], default="calibrated") - 56 optparser.add_option("--bank", dest="banks", - 57 help = srhelp.helpstring["bank"], default = "1") - 58 optparser.add_option("-b", "--background", dest="backgroundfile", - 59 help = srhelp.helpstring["background"]) - 60 optparser.add_option("-e", "--engine", dest="engine", - 61 help = srhelp.helpstring["engine"], default="fullprof") - 62 optparser.add_option("--excludedregion", dest = "excludedregionfile", - 63 help = srhelp.helpstring["excludedregion"]) - 64 optparser.add_option("--infofile", dest="infofile", - 65 help="Information file. Information file contains 2 columns for" + - 66 "datafile and value of environment quantity (e.g. temperature)") - 67 optparser.add_option("--datadirectory", dest="datadirectory", - 68 help="Directory of source data file") - 69 - 70 (options, args) = optparser.parse_args() - 71 self.options = options - 72 return -
      73 -
      74 - def processInputs(self): -
      75 """ Process input files and pass into dictionaries. """ - 76 from diffpy.srrietveld.utility import checkFormat, parseXYToList - 77 from diffpy.srrietveld.convert.gsasinstparser import GSASInstFile - 78 from diffpy.srrietveld.addon.datafile import DataFileConverter, createDataDict - 79 from diffpy.srrietveld.addon.strategyfile import StrategyFileParser - 80 from diffpy.srrietveld.addon.structurefile import StructureFileConverter - 81 - 82 # Set engine and banklist - 83 self.engine = self.options.engine.lower() - 84 try: - 85 self.banklist = self.options.banks.split(",") - 86 except: - 87 self.banklist = self.options.banks - 88 - 89 # Instrument info process - 90 instrumentfile = self.options.instrument - 91 instfileformat = checkFormat(instrumentfile) - 92 if instfileformat == "xml": - 93 instxml = InstrumentXML(instrumentfile) - 94 self.instdict = instxml.parseInstrumentXML() - 95 elif instfileformat in ["iparm", "prm"]: - 96 gsasinst = GSASInstFile(instrumentfile, self.banklist, self.engine) - 97 self.instdict = gsasinst.parseInstInfo() - 98 else: - 99 raise NotImplementedError -100 -101 # Structure info process -102 structurefile = self.options.structure -103 strufileformat = checkFormat(structurefile) -104 if strufileformat == "xml": -105 struxml = StructureXML(structurefile) -106 self.strudict = struxml.parseStructureXML() -107 elif strufileformat == "cif": -108 strufile = StructureFileConverter(structurefile) -109 self.strudict = strufile.cifToDict() -110 else: -111 raise NotImplementedError -112 -113 # Data file process -114 datafile = self.options.datafile -115 infofile = self.options.infofile -116 if datafile != None: -117 # single dataset refinement -118 self.datadict = {1:{"Name": datafile}} -119 elif infofile != None: -120 # multiple datasets refinement -121 datadirectory = self.options.datadirectory -122 self.datadict = createDataDict(infofile, datadirectory) -123 else: -124 raise NotImplementedError -125 -126 for key, value in self.datadict.items(): -127 datafilename = value["Name"] -128 dataformat = checkFormat(datafilename) -129 datafileconverter = DataFileConverter(datafilename, instrumentfile, self.banklist) -130 for bankid in self.banklist: -131 if self.engine == "gsas" and dataformat in ["dat", "chi"]: -132 gsasfile = datafilename.split(dataformat)[0] + "gsa" -133 datafileconverter.toGSASFile(datafilename, gsasfile, int(bankid)) -134 elif self.engine == "gsas" and dataformat in ["gsa", "gda", "raw"]: -135 datafileconverter.readGSASFile(datafilename, int(bankid)) -136 elif self.engine == "fullprof" and dataformat in ["xye", "chi", "gsa", "gda", "raw"]: -137 fullproffile = datafilename.split(dataformat)[0] + "dat" -138 datafileconverter.toFPFile(datafilename, fullproffile, int(bankid)) -139 else: -140 raise NotImplementedError -141 self.datadict[key] = datafileconverter.datadict -142 -143 # Refine Strategy file process -144 strategyfile = self.options.strategyfile -145 strategyfileformat = checkFormat(strategyfile) -146 if strategyfileformat == "txt": -147 strategytxt = StrategyFileParser(strategyfile) -148 self.strategy = strategytxt.parseTXTFormat() -149 else: -150 raise NotImplementedError -151 -152 # Optional files: background and excludedregion: -153 backgroundfile = self.options.backgroundfile -154 if backgroundfile != None: -155 bkgdformat = checkFormat(backgroundfile) -156 if bkgdformat == "xml": -157 bkgd = BackgroundXML(backgroundfile) -158 bkgd.addToInstDict(self.instdict) -159 elif bkgdformat == "dat": -160 self.bkgdlist = parseXYToList(backgroundfile) -161 else: -162 raise NotImplementedError -163 excludedregionfile = self.options.excludedregionfile -164 if self.options.excludedregionfile != None: -165 exre = ExcludedRegionXML(excludedregionfile) -166 self.exredict = exre.xmlToDict(exre.exrexml) -167 return -
      168 -
      169 - def run(self): -
      170 """ Main controller of the refinement """ -171 from diffpy.srrietveld.buildfit import BuildFit -172 from diffpy.refinementdata.plot import backend -173 -174 backend.use('wx') -175 -176 # 1. Build Fit Object -177 sortedkeys = sorted(self.datadict.keys()) -178 buildfit = BuildFit(self.engine, self.strudict, self.instdict, -179 self.datadict[sortedkeys[0]]) -180 srrfit = buildfit.buildFit() -181 -182 # 2. Add optional background and excludedregion -183 if hasattr(self, "bkgdlist"): -184 buildfit.addBkgdPoints(srrfit, self.bkgdlist) -185 if hasattr(self, "exredict"): -186 buildfit.addExre(srrfit, self.exredict) -187 -188 # 3. check whether fit is ready -189 srrfit.validate() -190 -191 # force to rewrite everytime -192 project = Project('temp.srr','w') -193 -194 # Also create a fitlist to build a manager -195 fitlist = [] -196 -197 # 4. Refine -198 datafilenum = len(self.datadict.keys()) -199 if datafilenum > 1: -200 datalist = [] -201 fit = project.importEngineFit(srrfit, 'f1', shape = (datafilenum, )) -202 fitlist.append(fit) -203 datalist.append(self.datadict[sortedkeys[0]]) -204 i = 1 -205 for v in sortedkeys[1:]: -206 patterns = fit.fitdata.getObject("Pattern") -207 pattern = patterns.getObject(0) -208 text = pattern.get('Datafile') -209 text[i] = self.datadict[v][1]["Name"] -210 # also update: -211 fitlist.append(FitRT(project, fit.fitdata, i)) -212 i += 1 -213 datalist.append(self.datadict[v]) -214 -215 project.plot(fit.fitdata, 0) -216 # Now create a manager to run the refinement. -217 manager = SeqManager(fitlist, datalist, self.strategy) -218 else: -219 fitrt = project.importEngineFit(srrfit, 'f1') -220 fitlist.append(fitrt) -221 #project.plot(fitrt.fit) -222 manager = Manager(fitlist, self.strategy) -223 project.managers.append(manager) -224 # run fit -225 project.start() -226 backend.show() -227 # save project -228 project.close() -229 return -
      230 -231 -
      232 -def applydata(fit, datadict): -
      233 '''Expand fit to a fit array, with different data set -234 -235 fit -- a project fit object -236 datadict -- a dictionary of data files -237 ''' -238 pass -
      239 -
      240 -def main(): -
      241 ReadInput() -242 return -
      243 -
      -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/api/trunk.diffpy.srrietveld.applications.refine.ReadInput-class.html b/static_root/doc/srrietveld/api/trunk.diffpy.srrietveld.applications.refine.ReadInput-class.html deleted file mode 100644 index d3b5b4d0..00000000 --- a/static_root/doc/srrietveld/api/trunk.diffpy.srrietveld.applications.refine.ReadInput-class.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - trunk.diffpy.srrietveld.applications.refine.ReadInput - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package trunk :: - Package diffpy :: - Package srrietveld :: - Package applications :: - Module refine :: - Class ReadInput - - - - - -
      [frames] | no frames]
      -
      - -

      Class ReadInput

      source code

      -

      Parse input options and read xml files

      - - - - - - - - - - - - - - - - - - - -
      - Instance Methods
      -   - - - - - - -
      __init__(self)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      parseOptions(self)
      - Parse the input options
      - source code - -
      - -
      -   - - - - - - -
      processInputs(self)
      - Process input files and pass into dictionaries.
      - source code - -
      - -
      -   - - - - - - -
      run(self)
      - Main controller of the refinement
      - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - diff --git a/static_root/doc/srrietveld/default.html b/static_root/doc/srrietveld/default.html deleted file mode 100644 index df4f22fe..00000000 --- a/static_root/doc/srrietveld/default.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - Welcome to SrRietveld’s documentation! — SrRietveld v1.0 documentation - - - - - - - - - -
      -
      -

      Table Of Contents

      - - -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Welcome to SrRietveld’s documentation!

      -

      Welcome to the SrRietveld documentation!

      -
      -

      Disclamer

      -

      Copyright @copyright 2009, Trustees of Columbia University in the City of New -York, all rights reserved.

      -

      The program is distributed under the BSD License.

      -
        -
      • 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:

        -
        -

        1. Wenduo Zhou, Peng Tian, Yingrui Shang, Christopher L. Farrow, P. Juhas and S. J. L. Billinge, -To be published.

        -
        -

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

        -
      • -
      • Current version of SrRietveld makes use of the FullProf and GSAS Rietveld refinement engine. If you use this program, as well as citing the paper above, please kindly acknowledge use of FullProf and/or GSAS by citing the following to instruction paper FullProf and/or GSAS:

        -
        -

        1. J. Rodriguez-Carvajal, Recent advances in magnetic structure determination by neutron -powder diffraction, Physica B, 192, 55-69 (1993). -#. Larson A C and von Dreele R B 2000 General structure analysis system(GSAS) -Los Alamos National Laboratory Report No. LAUR 87-748 unpublished

        -
        -
      • -
      -
      -

      Redistribution

      -

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

      -

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

      -

      Redistributions 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.

      -

      Neither the names of COLUMBIA UNIVERSITY, MICHIGAN STATE UNIVERSITY nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.

      -
      - -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/developers/api-objects.txt b/static_root/doc/srrietveld/developers/api-objects.txt deleted file mode 100644 index 03a06f52..00000000 --- a/static_root/doc/srrietveld/developers/api-objects.txt +++ /dev/null @@ -1,1406 +0,0 @@ -srrietveld srrietveld-module.html -srrietveld.myEngine srrietveld-module.html#myEngine -srrietveld.setBackend srrietveld-module.html#setBackend -srrietveld.__id__ srrietveld-module.html#__id__ -srrietveld.atominfo srrietveld.atominfo-module.html -srrietveld.atominfo.getAtomNumberByName srrietveld.atominfo-module.html#getAtomNumberByName -srrietveld.atominfo.__id__ srrietveld.atominfo-module.html#__id__ -srrietveld.autobackgroundselect srrietveld.autobackgroundselect-module.html -srrietveld.autobackgroundselect.filterBackgroundPoints srrietveld.autobackgroundselect-module.html#filterBackgroundPoints -srrietveld.autobackgroundselect.autoBackgroundSelection srrietveld.autobackgroundselect-module.html#autoBackgroundSelection -srrietveld.autobackgroundselect.__id__ srrietveld.autobackgroundselect-module.html#__id__ -srrietveld.auxiliary srrietveld.auxiliary-module.html -srrietveld.auxiliary.testmain srrietveld.auxiliary-module.html#testmain -srrietveld.auxiliary.getValueIndex srrietveld.auxiliary-module.html#getValueIndex -srrietveld.auxiliary.searchdict srrietveld.auxiliary-module.html#searchdict -srrietveld.auxiliary.optionToString srrietveld.auxiliary-module.html#optionToString -srrietveld.auxiliary.readOption srrietveld.auxiliary-module.html#readOption -srrietveld.auxiliary._DEBUGMODE srrietveld.auxiliary-module.html#_DEBUGMODE -srrietveld.auxiliary.getHomeValueIndex srrietveld.auxiliary-module.html#getHomeValueIndex -srrietveld.auxiliary.__id__ srrietveld.auxiliary-module.html#__id__ -srrietveld.datafileconverter srrietveld.datafileconverter-module.html -srrietveld.datafileconverter.dataFileFormat srrietveld.datafileconverter-module.html#dataFileFormat -srrietveld.datafileconverter.convertXYSigmaToChi srrietveld.datafileconverter-module.html#convertXYSigmaToChi -srrietveld.datafileconverter.convertChiToXYSigma srrietveld.datafileconverter-module.html#convertChiToXYSigma -srrietveld.datafileconverter.__id__ srrietveld.datafileconverter-module.html#__id__ -srrietveld.datafileconverter.convertChiToGSAS srrietveld.datafileconverter-module.html#convertChiToGSAS -srrietveld.datamanager srrietveld.datamanager-module.html -srrietveld.datamanager.searchClosestValue srrietveld.datamanager-module.html#searchClosestValue -srrietveld.datamanager.duplicateModel srrietveld.datamanager-module.html#duplicateModel -srrietveld.datamanager.MAXRP srrietveld.datamanager-module.html#MAXRP -srrietveld.datamanager.__id__ srrietveld.datamanager-module.html#__id__ -srrietveld.datamanager.loadFit srrietveld.datamanager-module.html#loadFit -srrietveld.datamanager.isGoodFit srrietveld.datamanager-module.html#isGoodFit -srrietveld.dataprocessnpdf srrietveld.dataprocessnpdf-module.html -srrietveld.dataprocessnpdf.__id__ srrietveld.dataprocessnpdf-module.html#__id__ -srrietveld.dataprocessnpdf.exportRawGSA srrietveld.dataprocessnpdf-module.html#exportRawGSA -srrietveld.enduserscripts srrietveld.enduserscripts-module.html -srrietveld.enduserscripts.ETA srrietveld.enduserscripts-module.html#ETA -srrietveld.enduserscripts.fracCoords srrietveld.enduserscripts-module.html#fracCoords -srrietveld.enduserscripts.scale srrietveld.enduserscripts-module.html#scale -srrietveld.enduserscripts.__id__ srrietveld.enduserscripts-module.html#__id__ -srrietveld.enduserscripts.simpleFit srrietveld.enduserscripts-module.html#simpleFit -srrietveld.enduserscripts.latParms srrietveld.enduserscripts-module.html#latParms -srrietveld.enduserscripts.plot2D srrietveld.enduserscripts-module.html#plot2D -srrietveld.enduserscripts.zeroShift srrietveld.enduserscripts-module.html#zeroShift -srrietveld.enduserscripts.All srrietveld.enduserscripts-module.html#All -srrietveld.enduserscripts.refineByScript srrietveld.enduserscripts-module.html#refineByScript -srrietveld.gsasfileparser srrietveld.gsasfileparser-module.html -srrietveld.gsasfileparser.parseGSASiparm srrietveld.gsasfileparser-module.html#parseGSASiparm -srrietveld.gsasfileparser.MapKey srrietveld.gsasfileparser-module.html#MapKey -srrietveld.gsasfileparser.genTOFInstrument srrietveld.gsasfileparser-module.html#genTOFInstrument -srrietveld.gsasfileparser.__id__ srrietveld.gsasfileparser-module.html#__id__ -srrietveld.gsasfileparser.importFromGSASexp srrietveld.gsasfileparser-module.html#importFromGSASexp -srrietveld.instrument srrietveld.instrument-module.html -srrietveld.instrument.isPatternOneBank srrietveld.instrument-module.html#isPatternOneBank -srrietveld.instrument.getInstrument srrietveld.instrument-module.html#getInstrument -srrietveld.instrument.myEngine srrietveld.instrument-module.html#myEngine -srrietveld.instrument.__id__ srrietveld.instrument-module.html#__id__ -srrietveld.io srrietveld.io-module.html -srrietveld.io.listFileNamesInDirectory srrietveld.io-module.html#listFileNamesInDirectory -srrietveld.io.writeToColumnFile srrietveld.io-module.html#writeToColumnFile -srrietveld.io.__id__ srrietveld.io-module.html#__id__ -srrietveld.io.getDataFromColumnFile srrietveld.io-module.html#getDataFromColumnFile -srrietveld.mar_utilities srrietveld.mar_utilities-module.html -srrietveld.mar_utilities.getSpecMarExposures srrietveld.mar_utilities-module.html#getSpecMarExposures -srrietveld.mar_utilities.defineMarSetup srrietveld.mar_utilities-module.html#defineMarSetup -srrietveld.mar_utilities._spec_mar_exposures srrietveld.mar_utilities-module.html#_spec_mar_exposures -srrietveld.mar_utilities.__id__ srrietveld.mar_utilities-module.html#__id__ -srrietveld.measurements srrietveld.measurements-module.html -srrietveld.measurements.__id__ srrietveld.measurements-module.html#__id__ -srrietveld.midscript srrietveld.midscript-module.html -srrietveld.midscript.initProfileTCHPseudoVoigt srrietveld.midscript-module.html#initProfileTCHPseudoVoigt -srrietveld.midscript.initProfilePseudoVoigt srrietveld.midscript-module.html#initProfilePseudoVoigt -srrietveld.midscript.addComponent srrietveld.midscript-module.html#addComponent -srrietveld.midscript.myEngine srrietveld.midscript-module.html#myEngine -srrietveld.midscript.initThermalExponentialDecay srrietveld.midscript-module.html#initThermalExponentialDecay -srrietveld.midscript.initCylindricalAbsorptionCorrection srrietveld.midscript-module.html#initCylindricalAbsorptionCorrection -srrietveld.midscript.getPatterns srrietveld.midscript-module.html#getPatterns -srrietveld.midscript.initBackground srrietveld.midscript-module.html#initBackground -srrietveld.midscript.setPattern srrietveld.midscript-module.html#setPattern -srrietveld.midscript.genLattice srrietveld.midscript-module.html#genLattice -srrietveld.midscript.initPseudoVoigtExp srrietveld.midscript-module.html#initPseudoVoigtExp -srrietveld.midscript.Cubic srrietveld.midscript-module.html#Cubic -srrietveld.midscript.checkMust srrietveld.midscript-module.html#checkMust -srrietveld.midscript.__id__ srrietveld.midscript-module.html#__id__ -srrietveld.midscript.initExponentialDecay srrietveld.midscript-module.html#initExponentialDecay -srrietveld.midscript.reloadData srrietveld.midscript-module.html#reloadData -srrietveld.midscript.initProfilePseudoVoigtIkedaCarpenter srrietveld.midscript-module.html#initProfilePseudoVoigtIkedaCarpenter -srrietveld.midscript.initPolynomialBackground srrietveld.midscript-module.html#initPolynomialBackground -srrietveld.midscript.initCWNeutronPattern srrietveld.midscript-module.html#initCWNeutronPattern -srrietveld.midscript.replaceStructureModel srrietveld.midscript-module.html#replaceStructureModel -srrietveld.midscript.genFit srrietveld.midscript-module.html#genFit -srrietveld.midscript.initPseudoVoigtExpDSpacing srrietveld.midscript-module.html#initPseudoVoigtExpDSpacing -srrietveld.midscript.initProfileGaussian srrietveld.midscript-module.html#initProfileGaussian -srrietveld.midscript.addAtom srrietveld.midscript-module.html#addAtom -srrietveld.midscript.setExcludedRegion srrietveld.midscript-module.html#setExcludedRegion -srrietveld.midscript.mapStructure srrietveld.midscript-module.html#mapStructure -srrietveld.midscript.initThermalTOFPattern srrietveld.midscript-module.html#initThermalTOFPattern -srrietveld.midscript.initCrystalPhase srrietveld.midscript-module.html#initCrystalPhase -srrietveld.midscript.setRefineRegion srrietveld.midscript-module.html#setRefineRegion -srrietveld.midscript.initCWXrayPattern srrietveld.midscript-module.html#initCWXrayPattern -srrietveld.midscript.set2ThetaSymmetricPeakProfile srrietveld.midscript-module.html#set2ThetaSymmetricPeakProfile -srrietveld.midscript.initProfileSplitPseudoVoigt srrietveld.midscript-module.html#initProfileSplitPseudoVoigt -srrietveld.midscript.genPeakProfile srrietveld.midscript-module.html#genPeakProfile -srrietveld.midscript.initTOFPattern srrietveld.midscript-module.html#initTOFPattern -srrietveld.midscript.initInterpolatedBackground srrietveld.midscript-module.html#initInterpolatedBackground -srrietveld.midscript.setCWPattern srrietveld.midscript-module.html#setCWPattern -srrietveld.midscript.locateRefinableParameter srrietveld.midscript-module.html#locateRefinableParameter -srrietveld.mixedphaseanalyzer srrietveld.mixedphaseanalyzer-module.html -srrietveld.mixedphaseanalyzer.__id__ srrietveld.mixedphaseanalyzer-module.html#__id__ -srrietveld.mixedphaseanalyzer.searchPeaks srrietveld.mixedphaseanalyzer-module.html#searchPeaks -srrietveld.modelrw srrietveld.modelrw-module.html -srrietveld.modelrw.importCIF srrietveld.modelrw-module.html#importCIF -srrietveld.modelrw.__id__ srrietveld.modelrw-module.html#__id__ -srrietveld.monitormem srrietveld.monitormem-module.html -srrietveld.monitormem.garbageCheck srrietveld.monitormem-module.html#garbageCheck -srrietveld.monitormem.__id__ srrietveld.monitormem-module.html#__id__ -srrietveld.parallelrefinecontrol srrietveld.parallelrefinecontrol-module.html -srrietveld.parallelrefinecontrol._SCREENOUTPUT srrietveld.parallelrefinecontrol-module.html#_SCREENOUTPUT -srrietveld.parallelrefinecontrol.__id__ srrietveld.parallelrefinecontrol-module.html#__id__ -srrietveld.phasescript srrietveld.phasescript-module.html -srrietveld.phasescript.genPhaseCIF srrietveld.phasescript-module.html#genPhaseCIF -srrietveld.phasescript.genPhaseDict srrietveld.phasescript-module.html#genPhaseDict -srrietveld.phasescript.__id__ srrietveld.phasescript-module.html#__id__ -srrietveld.phasescript.getTuple srrietveld.phasescript-module.html#getTuple -srrietveld.plot2d srrietveld.plot2d-module.html -srrietveld.plot2d.plot2D srrietveld.plot2d-module.html#plot2D -srrietveld.plot2d.removeRegion srrietveld.plot2d-module.html#removeRegion -srrietveld.plot2d._isIntList srrietveld.plot2d-module.html#_isIntList -srrietveld.plot2d.plotFit srrietveld.plot2d-module.html#plotFit -srrietveld.plot2d._rebinArray srrietveld.plot2d-module.html#_rebinArray -srrietveld.plot2d._isFloatList srrietveld.plot2d-module.html#_isFloatList -srrietveld.plot2d._isInt srrietveld.plot2d-module.html#_isInt -srrietveld.plot2d._offsetMultiplier srrietveld.plot2d-module.html#_offsetMultiplier -srrietveld.plot2d._isFloat srrietveld.plot2d-module.html#_isFloat -srrietveld.plot2d.plotPattern srrietveld.plot2d-module.html#plotPattern -srrietveld.plot2d._plotPattern srrietveld.plot2d-module.html#_plotPattern -srrietveld.plot2d.plotObservedPattern srrietveld.plot2d-module.html#plotObservedPattern -srrietveld.plot2d.__id__ srrietveld.plot2d-module.html#__id__ -srrietveld.qbackgrounds srrietveld.qbackgrounds-module.html -srrietveld.qbackgrounds.__id__ srrietveld.qbackgrounds-module.html#__id__ -srrietveld.qbackgrounds.Qbackground srrietveld.qbackgrounds-module.html#Qbackground -srrietveld.refinebackend srrietveld.refinebackend-module.html -srrietveld.refinebackend.__id__ srrietveld.refinebackend-module.html#__id__ -srrietveld.refineguides srrietveld.refineguides-module.html -srrietveld.refineguides._DEBUG srrietveld.refineguides-module.html#_DEBUG -srrietveld.refineguides.ETA srrietveld.refineguides-module.html#ETA -srrietveld.refineguides.__id__ srrietveld.refineguides-module.html#__id__ -srrietveld.refinehistory srrietveld.refinehistory-module.html -srrietveld.refinehistory.__id__ srrietveld.refinehistory-module.html#__id__ -srrietveld.refinemanager srrietveld.refinemanager-module.html -srrietveld.refinemanager.isSinglePatternType srrietveld.refinemanager-module.html#isSinglePatternType -srrietveld.refinemanager.myEngine srrietveld.refinemanager-module.html#myEngine -srrietveld.refinemanager._MEMCHECK srrietveld.refinemanager-module.html#_MEMCHECK -srrietveld.refinemanager.loadMultiStepRefinements srrietveld.refinemanager-module.html#loadMultiStepRefinements -srrietveld.refinemanager._DEBUG srrietveld.refinemanager-module.html#_DEBUG -srrietveld.refinemanager._DEBUG01 srrietveld.refinemanager-module.html#_DEBUG01 -srrietveld.refinemanager.__id__ srrietveld.refinemanager-module.html#__id__ -srrietveld.refinemanager.getProcessID srrietveld.refinemanager-module.html#getProcessID -srrietveld.refinemanager._DBOUTPUT srrietveld.refinemanager-module.html#_DBOUTPUT -srrietveld.refinemanager._SCREENOUTPUT srrietveld.refinemanager-module.html#_SCREENOUTPUT -srrietveld.refinesetup srrietveld.refinesetup-module.html -srrietveld.refinesetup._DEBUG srrietveld.refinesetup-module.html#_DEBUG -srrietveld.refinesetup.__id__ srrietveld.refinesetup-module.html#__id__ -srrietveld.refinesetup._DEBUG_ARG srrietveld.refinesetup-module.html#_DEBUG_ARG -srrietveld.refinestrategy srrietveld.refinestrategy-module.html -srrietveld.refinestrategy.__id__ srrietveld.refinestrategy-module.html#__id__ -srrietveld.sequentialrefinecontrol srrietveld.sequentialrefinecontrol-module.html -srrietveld.sequentialrefinecontrol._MEMCHECK srrietveld.sequentialrefinecontrol-module.html#_MEMCHECK -srrietveld.sequentialrefinecontrol._SCREENOUTPUT srrietveld.sequentialrefinecontrol-module.html#_SCREENOUTPUT -srrietveld.sequentialrefinecontrol._OUTPUT srrietveld.sequentialrefinecontrol-module.html#_OUTPUT -srrietveld.sequentialrefinecontrol.__id__ srrietveld.sequentialrefinecontrol-module.html#__id__ -srrietveld.sequentialrefinecontrol.myEngine srrietveld.sequentialrefinecontrol-module.html#myEngine -srrietveld.spacegroupinfo srrietveld.spacegroupinfo-module.html -srrietveld.spacegroupinfo.SpacegroupNameDict srrietveld.spacegroupinfo-module.html#SpacegroupNameDict -srrietveld.spacegroupinfo.getCrystalSystemFromSpaceGroup srrietveld.spacegroupinfo-module.html#getCrystalSystemFromSpaceGroup -srrietveld.spacegroupinfo.SpacegroupIDDict srrietveld.spacegroupinfo-module.html#SpacegroupIDDict -srrietveld.spacegroupinfo.__id__ srrietveld.spacegroupinfo-module.html#__id__ -srrietveld.spacegroupinfo.CystalStructureNameDict srrietveld.spacegroupinfo-module.html#CystalStructureNameDict -srrietveld.srrietveldconfiguration srrietveld.srrietveldconfiguration-module.html -srrietveld.srrietveldconfiguration.__id__ srrietveld.srrietveldconfiguration-module.html#__id__ -srrietveld.srrietveldconfiguration.__main__ srrietveld.srrietveldconfiguration-module.html#__main__ -srrietveld.stringutilfunction srrietveld.stringutilfunction-module.html -srrietveld.stringutilfunction.__id__ srrietveld.stringutilfunction-module.html#__id__ -srrietveld.stringutilfunction.startWith srrietveld.stringutilfunction-module.html#startWith -srrietveld.uisupport srrietveld.uisupport-module.html -srrietveld.uisupport.getRefinementStrategy srrietveld.uisupport-module.html#getRefinementStrategy -srrietveld.uisupport.genFileListFromInfoFile srrietveld.uisupport-module.html#genFileListFromInfoFile -srrietveld.uisupport.convertCHIDataFileFormatFullProf srrietveld.uisupport-module.html#convertCHIDataFileFormatFullProf -srrietveld.uisupport.convertDataFilesFormat srrietveld.uisupport-module.html#convertDataFilesFormat -srrietveld.uisupport._MEMCHECK srrietveld.uisupport-module.html#_MEMCHECK -srrietveld.uisupport.convertDataFormat srrietveld.uisupport-module.html#convertDataFormat -srrietveld.uisupport.readRAPDFXML srrietveld.uisupport-module.html#readRAPDFXML -srrietveld.uisupport.sequentialFit srrietveld.uisupport-module.html#sequentialFit -srrietveld.uisupport.convertCHIDataFileFormatGSAS srrietveld.uisupport-module.html#convertCHIDataFileFormatGSAS -srrietveld.uisupport.__id__ srrietveld.uisupport-module.html#__id__ -srrietveld.uisupport.singleRaPDFFit srrietveld.uisupport-module.html#singleRaPDFFit -srrietveld.uisupport.isOfTemplate srrietveld.uisupport-module.html#isOfTemplate -srrietveld.uisupport.mapDataFileToStructure srrietveld.uisupport-module.html#mapDataFileToStructure -srrietveld.uisupport.independentFit srrietveld.uisupport-module.html#independentFit -srrietveld.uisupport.genRAPDFXMLTemplate srrietveld.uisupport-module.html#genRAPDFXMLTemplate -srrietveld.uisupport.genFileListFromTemplate srrietveld.uisupport-module.html#genFileListFromTemplate -srrietveld.utilbackground srrietveld.utilbackground-module.html -srrietveld.utilbackground.genBackground srrietveld.utilbackground-module.html#genBackground -srrietveld.utilbackground.replaceInterpolatedBackground srrietveld.utilbackground-module.html#replaceInterpolatedBackground -srrietveld.utilbackground.__id__ srrietveld.utilbackground-module.html#__id__ -srrietveld.utilbackground.genStandardBackground srrietveld.utilbackground-module.html#genStandardBackground -srrietveld.utilbackground.convertQbackground srrietveld.utilbackground-module.html#convertQbackground -srrietveld.utilinstrument srrietveld.utilinstrument-module.html -srrietveld.utilinstrument.genXMLGenerator srrietveld.utilinstrument-module.html#genXMLGenerator -srrietveld.utilinstrument.genInstrument srrietveld.utilinstrument-module.html#genInstrument -srrietveld.utilinstrument.__id__ srrietveld.utilinstrument-module.html#__id__ -srrietveld.utilplot srrietveld.utilplot-module.html -srrietveld.utilplot.exportColumnFiles srrietveld.utilplot-module.html#exportColumnFiles -srrietveld.utilplot.__id__ srrietveld.utilplot-module.html#__id__ -srrietveld.utilplot.caldDiff srrietveld.utilplot-module.html#caldDiff -srrietveld.utilrapdf srrietveld.utilrapdf-module.html -srrietveld.utilrapdf.__id__ srrietveld.utilrapdf-module.html#__id__ -srrietveld.utilrapdf.getRAPDFInstrument srrietveld.utilrapdf-module.html#getRAPDFInstrument -srrietveld.utilrefineguide srrietveld.utilrefineguide-module.html -srrietveld.utilrefineguide.getLatticeInGroup srrietveld.utilrefineguide-module.html#getLatticeInGroup -srrietveld.utilrefineguide.genTOFExpDecayRefinement srrietveld.utilrefineguide-module.html#genTOFExpDecayRefinement -srrietveld.utilrefineguide.genVarName srrietveld.utilrefineguide-module.html#genVarName -srrietveld.utilrefineguide.genWavelengthRefineSetup srrietveld.utilrefineguide-module.html#genWavelengthRefineSetup -srrietveld.utilrefineguide.sortByAtomTag srrietveld.utilrefineguide-module.html#sortByAtomTag -srrietveld.utilrefineguide.genADPRefineSetup srrietveld.utilrefineguide-module.html#genADPRefineSetup -srrietveld.utilrefineguide.genScaleRefineSetup srrietveld.utilrefineguide-module.html#genScaleRefineSetup -srrietveld.utilrefineguide.genAbsorptionCorrectionRefineSetup srrietveld.utilrefineguide-module.html#genAbsorptionCorrectionRefineSetup -srrietveld.utilrefineguide.locateSharingSite srrietveld.utilrefineguide-module.html#locateSharingSite -srrietveld.utilrefineguide._DEBUGOUTPUT srrietveld.utilrefineguide-module.html#_DEBUGOUTPUT -srrietveld.utilrefineguide.activeVariable srrietveld.utilrefineguide-module.html#activeVariable -srrietveld.utilrefineguide.__id__ srrietveld.utilrefineguide-module.html#__id__ -srrietveld.utilrefineguide.genAtomFractionalPositionSetup srrietveld.utilrefineguide-module.html#genAtomFractionalPositionSetup -srrietveld.utilrefineguide.sortByAtomNumber srrietveld.utilrefineguide-module.html#sortByAtomNumber -srrietveld.utilrefineguide.genBackgroundRefineSetup srrietveld.utilrefineguide-module.html#genBackgroundRefineSetup -srrietveld.utilrefineguide.genZeroRefineSetup srrietveld.utilrefineguide-module.html#genZeroRefineSetup -srrietveld.utilrefineguide.genPeakShapeRefineSetup srrietveld.utilrefineguide-module.html#genPeakShapeRefineSetup -srrietveld.utilrefineguide.genLatticeRefineSetup srrietveld.utilrefineguide-module.html#genLatticeRefineSetup -srrietveld.utilsequentialrefine srrietveld.utilsequentialrefine-module.html -srrietveld.utilsequentialrefine.loadSeqRefineController srrietveld.utilsequentialrefine-module.html#loadSeqRefineController -srrietveld.utilsequentialrefine.parseStructureSeqXML srrietveld.utilsequentialrefine-module.html#parseStructureSeqXML -srrietveld.utilsequentialrefine.getSolutionSeqXML srrietveld.utilsequentialrefine-module.html#getSolutionSeqXML -srrietveld.utilsequentialrefine.__id__ srrietveld.utilsequentialrefine-module.html#__id__ -srrietveld.utilunits srrietveld.utilunits-module.html -srrietveld.utilunits.convertDtoTOF srrietveld.utilunits-module.html#convertDtoTOF -srrietveld.utilunits.CONST_ARCDEGREE srrietveld.utilunits-module.html#CONST_ARCDEGREE -srrietveld.utilunits.convertTOFtoD srrietveld.utilunits-module.html#convertTOFtoD -srrietveld.utilunits.convertDto2THETA srrietveld.utilunits-module.html#convertDto2THETA -srrietveld.utilunits.convert2THETAtoD srrietveld.utilunits-module.html#convert2THETAtoD -srrietveld.utilunits.CONST_DEGREEARC srrietveld.utilunits-module.html#CONST_DEGREEARC -srrietveld.utilunits.__id__ srrietveld.utilunits-module.html#__id__ -srrietveld.viewer3d srrietveld.viewer3d-module.html -srrietveld.viewer3d.checkExternalPackage srrietveld.viewer3d-module.html#checkExternalPackage -srrietveld.viewer3d.startPyMol srrietveld.viewer3d-module.html#startPyMol -srrietveld.viewer3d.viewer3D srrietveld.viewer3d-module.html#viewer3D -srrietveld.viewer3d.GetSpaceGroup srrietveld.viewer3d-module.html#GetSpaceGroup -srrietveld.viewer3d._viewers srrietveld.viewer3d-module.html#_viewers -srrietveld.viewer3d.__id__ srrietveld.viewer3d-module.html#__id__ -srrietveld.viewer3d.plotPhase srrietveld.viewer3d-module.html#plotPhase -srrietveld.viewer3d._viewer srrietveld.viewer3d-module.html#_viewer -srrietveld.viewer3d.set3DViewer srrietveld.viewer3d-module.html#set3DViewer -srrietveld.viewer3d.startVMD srrietveld.viewer3d-module.html#startVMD -srrietveld.viserrors srrietveld.viserrors-module.html -srrietveld.viserrors.__id__ srrietveld.viserrors-module.html#__id__ -srrietveld.xmlconvertor srrietveld.xmlconvertor-module.html -srrietveld.xmlgenerator srrietveld.xmlgenerator-module.html -srrietveld.xmlgenerator.__id__ srrietveld.xmlgenerator-module.html#__id__ -srrietveld.xmlinterface srrietveld.xmlinterface-module.html -srrietveld.xmlinterface.importXML srrietveld.xmlinterface-module.html#importXML -srrietveld.xmlinterface.parseRange srrietveld.xmlinterface-module.html#parseRange -srrietveld.xmlinterface.xmlFilter srrietveld.xmlinterface-module.html#xmlFilter -srrietveld.xmlinterface.importExcludedRegionFile srrietveld.xmlinterface-module.html#importExcludedRegionFile -srrietveld.xmlinterface.parseBackground srrietveld.xmlinterface-module.html#parseBackground -srrietveld.xmlinterface.parseExcludedRegion srrietveld.xmlinterface-module.html#parseExcludedRegion -srrietveld.xmlinterface.xmlToDict srrietveld.xmlinterface-module.html#xmlToDict -srrietveld.xmlinterface.xmlToString srrietveld.xmlinterface-module.html#xmlToString -srrietveld.xmlinterface.__id__ srrietveld.xmlinterface-module.html#__id__ -srrietveld.xmlinterface.getAttributeValue srrietveld.xmlinterface-module.html#getAttributeValue -srrietveld.xmlinterface.getXMLNodeAttributes srrietveld.xmlinterface-module.html#getXMLNodeAttributes -srrietveld.xmlinterface.getStructureInformation srrietveld.xmlinterface-module.html#getStructureInformation -srrietveld.xmlinterface.getInstrumentInformation srrietveld.xmlinterface-module.html#getInstrumentInformation -srrietveld.atominfo.AtomDicts srrietveld.atominfo.AtomDicts-class.html -srrietveld.atominfo.AtomDicts.AtomNumberDict srrietveld.atominfo.AtomDicts-class.html#AtomNumberDict -srrietveld.atominfo.AtomDicts.AtomNameDict srrietveld.atominfo.AtomDicts-class.html#AtomNameDict -srrietveld.datafileconverter.DataFileParser srrietveld.datafileconverter.DataFileParser-class.html -srrietveld.datafileconverter.DataFileParser.writeToFile srrietveld.datafileconverter.DataFileParser-class.html#writeToFile -srrietveld.datafileconverter.DataFileParser.setInputFileName srrietveld.datafileconverter.DataFileParser-class.html#setInputFileName -srrietveld.datafileconverter.DataFileParser.__init__ srrietveld.datafileconverter.DataFileParser-class.html#__init__ -srrietveld.datafileconverter.DataFileParser.exportData srrietveld.datafileconverter.DataFileParser-class.html#exportData -srrietveld.datafileconverter.DataFileParser._parse srrietveld.datafileconverter.DataFileParser-class.html#_parse -srrietveld.datafileconverter.DataFileParser.parseDataFile srrietveld.datafileconverter.DataFileParser-class.html#parseDataFile -srrietveld.datafileconverter.DataFileParser.importData srrietveld.datafileconverter.DataFileParser-class.html#importData -srrietveld.datafileconverter.FullProfFreeFormatParser srrietveld.datafileconverter.FullProfFreeFormatParser-class.html -srrietveld.datafileconverter.DataFileParser.writeToFile srrietveld.datafileconverter.DataFileParser-class.html#writeToFile -srrietveld.datafileconverter.DataFileParser.setInputFileName srrietveld.datafileconverter.DataFileParser-class.html#setInputFileName -srrietveld.datafileconverter.FullProfFreeFormatParser.__init__ srrietveld.datafileconverter.FullProfFreeFormatParser-class.html#__init__ -srrietveld.datafileconverter.DataFileParser.exportData srrietveld.datafileconverter.DataFileParser-class.html#exportData -srrietveld.datafileconverter.FullProfFreeFormatParser._parse srrietveld.datafileconverter.FullProfFreeFormatParser-class.html#_parse -srrietveld.datafileconverter.DataFileParser.parseDataFile srrietveld.datafileconverter.DataFileParser-class.html#parseDataFile -srrietveld.datafileconverter.DataFileParser.importData srrietveld.datafileconverter.DataFileParser-class.html#importData -srrietveld.datafileconverter.GEMDataParser srrietveld.datafileconverter.GEMDataParser-class.html -srrietveld.datafileconverter.DataFileParser.writeToFile srrietveld.datafileconverter.DataFileParser-class.html#writeToFile -srrietveld.datafileconverter.DataFileParser.setInputFileName srrietveld.datafileconverter.DataFileParser-class.html#setInputFileName -srrietveld.datafileconverter.GEMDataParser.__init__ srrietveld.datafileconverter.GEMDataParser-class.html#__init__ -srrietveld.datafileconverter.DataFileParser.exportData srrietveld.datafileconverter.DataFileParser-class.html#exportData -srrietveld.datafileconverter.GEMDataParser._parse srrietveld.datafileconverter.GEMDataParser-class.html#_parse -srrietveld.datafileconverter.DataFileParser.parseDataFile srrietveld.datafileconverter.DataFileParser-class.html#parseDataFile -srrietveld.datafileconverter.DataFileParser.importData srrietveld.datafileconverter.DataFileParser-class.html#importData -srrietveld.datafileconverter.NPDFDataParser srrietveld.datafileconverter.NPDFDataParser-class.html -srrietveld.datafileconverter.XYSigmaFileParser.writeToFile srrietveld.datafileconverter.XYSigmaFileParser-class.html#writeToFile -srrietveld.datafileconverter.DataFileParser.setInputFileName srrietveld.datafileconverter.DataFileParser-class.html#setInputFileName -srrietveld.datafileconverter.NPDFDataParser.__init__ srrietveld.datafileconverter.NPDFDataParser-class.html#__init__ -srrietveld.datafileconverter.DataFileParser.exportData srrietveld.datafileconverter.DataFileParser-class.html#exportData -srrietveld.datafileconverter.XYSigmaFileParser._parse srrietveld.datafileconverter.XYSigmaFileParser-class.html#_parse -srrietveld.datafileconverter.DataFileParser.parseDataFile srrietveld.datafileconverter.DataFileParser-class.html#parseDataFile -srrietveld.datafileconverter.DataFileParser.importData srrietveld.datafileconverter.DataFileParser-class.html#importData -srrietveld.datafileconverter.RAPDFDataParser srrietveld.datafileconverter.RAPDFDataParser-class.html -srrietveld.datafileconverter.XYSigmaFileParser.writeToFile srrietveld.datafileconverter.XYSigmaFileParser-class.html#writeToFile -srrietveld.datafileconverter.DataFileParser.setInputFileName srrietveld.datafileconverter.DataFileParser-class.html#setInputFileName -srrietveld.datafileconverter.RAPDFDataParser.__init__ srrietveld.datafileconverter.RAPDFDataParser-class.html#__init__ -srrietveld.datafileconverter.DataFileParser.exportData srrietveld.datafileconverter.DataFileParser-class.html#exportData -srrietveld.datafileconverter.XYSigmaFileParser._parse srrietveld.datafileconverter.XYSigmaFileParser-class.html#_parse -srrietveld.datafileconverter.DataFileParser.parseDataFile srrietveld.datafileconverter.DataFileParser-class.html#parseDataFile -srrietveld.datafileconverter.DataFileParser.importData srrietveld.datafileconverter.DataFileParser-class.html#importData -srrietveld.datafileconverter.XYSigmaFileParser srrietveld.datafileconverter.XYSigmaFileParser-class.html -srrietveld.datafileconverter.XYSigmaFileParser.writeToFile srrietveld.datafileconverter.XYSigmaFileParser-class.html#writeToFile -srrietveld.datafileconverter.DataFileParser.setInputFileName srrietveld.datafileconverter.DataFileParser-class.html#setInputFileName -srrietveld.datafileconverter.XYSigmaFileParser.__init__ srrietveld.datafileconverter.XYSigmaFileParser-class.html#__init__ -srrietveld.datafileconverter.DataFileParser.exportData srrietveld.datafileconverter.DataFileParser-class.html#exportData -srrietveld.datafileconverter.XYSigmaFileParser._parse srrietveld.datafileconverter.XYSigmaFileParser-class.html#_parse -srrietveld.datafileconverter.DataFileParser.parseDataFile srrietveld.datafileconverter.DataFileParser-class.html#parseDataFile -srrietveld.datafileconverter.DataFileParser.importData srrietveld.datafileconverter.DataFileParser-class.html#importData -srrietveld.datamanager.DataManager srrietveld.datamanager.DataManager-class.html -srrietveld.datamanager.DataManager.syncData srrietveld.datamanager.DataManager-class.html#syncData -srrietveld.datamanager.DataManager.continueUponBreak srrietveld.datamanager.DataManager-class.html#continueUponBreak -srrietveld.datamanager.DataManager.getDataFilesList srrietveld.datamanager.DataManager-class.html#getDataFilesList -srrietveld.datamanager.DataManager.refine_all srrietveld.datamanager.DataManager-class.html#refine_all -srrietveld.datamanager.DataManager.readXMLProjectFile srrietveld.datamanager.DataManager-class.html#readXMLProjectFile -srrietveld.datamanager.DataManager.save srrietveld.datamanager.DataManager-class.html#save -srrietveld.datamanager.DataManager.__init__ srrietveld.datamanager.DataManager-class.html#__init__ -srrietveld.dataprocessnpdf.NPDFData srrietveld.dataprocessnpdf.NPDFData-class.html -srrietveld.dataprocessnpdf.NPDFData.normalize srrietveld.dataprocessnpdf.NPDFData-class.html#normalize -srrietveld.dataprocessnpdf.NPDFData.__init__ srrietveld.dataprocessnpdf.NPDFData-class.html#__init__ -srrietveld.dataprocessnpdf.NPDFData.importNPDFData srrietveld.dataprocessnpdf.NPDFData-class.html#importNPDFData -srrietveld.dataprocessnpdf.NPDFData.exportFullprof srrietveld.dataprocessnpdf.NPDFData-class.html#exportFullprof -srrietveld.dataprocessnpdf.NPDFData.NumBanks srrietveld.dataprocessnpdf.NPDFData-class.html#NumBanks -srrietveld.instrument.ConstWavelengthInstrument srrietveld.instrument.ConstWavelengthInstrument-class.html -srrietveld.instrument.Instrument.getBackgroundType srrietveld.instrument.Instrument-class.html#getBackgroundType -srrietveld.instrument.Instrument.setPeakProfileInfo srrietveld.instrument.Instrument-class.html#setPeakProfileInfo -srrietveld.instrument.ConstWavelengthInstrument.getExcludedRegions srrietveld.instrument.ConstWavelengthInstrument-class.html#getExcludedRegions -srrietveld.instrument.ConstWavelengthInstrument.setZero srrietveld.instrument.ConstWavelengthInstrument-class.html#setZero -srrietveld.instrument.ConstWavelengthInstrument.getWaveLength srrietveld.instrument.ConstWavelengthInstrument-class.html#getWaveLength -srrietveld.instrument.Instrument.getType srrietveld.instrument.Instrument-class.html#getType -srrietveld.instrument.Instrument.genMeasurement srrietveld.instrument.Instrument-class.html#genMeasurement -srrietveld.instrument.Instrument.importRietveldObject srrietveld.instrument.Instrument-class.html#importRietveldObject -srrietveld.instrument.ConstWavelengthInstrument.importFromFit srrietveld.instrument.ConstWavelengthInstrument-class.html#importFromFit -srrietveld.instrument.ConstWavelengthInstrument.__str__ srrietveld.instrument.ConstWavelengthInstrument-class.html#__str__ -srrietveld.instrument.ConstWavelengthInstrument.genRietveldComponent srrietveld.instrument.ConstWavelengthInstrument-class.html#genRietveldComponent -srrietveld.instrument.Instrument.getName srrietveld.instrument.Instrument-class.html#getName -srrietveld.instrument.ConstWavelengthInstrument.addExcludedRegion srrietveld.instrument.ConstWavelengthInstrument-class.html#addExcludedRegion -srrietveld.instrument.ConstWavelengthInstrument.__init__ srrietveld.instrument.ConstWavelengthInstrument-class.html#__init__ -srrietveld.instrument.Instrument.setPhase srrietveld.instrument.Instrument-class.html#setPhase -srrietveld.instrument.Instrument srrietveld.instrument.Instrument-class.html -srrietveld.instrument.Instrument.setPeakProfileInfo srrietveld.instrument.Instrument-class.html#setPeakProfileInfo -srrietveld.instrument.Instrument.getBackgroundType srrietveld.instrument.Instrument-class.html#getBackgroundType -srrietveld.instrument.Instrument.__str__ srrietveld.instrument.Instrument-class.html#__str__ -srrietveld.instrument.Instrument.getType srrietveld.instrument.Instrument-class.html#getType -srrietveld.instrument.Instrument.genMeasurement srrietveld.instrument.Instrument-class.html#genMeasurement -srrietveld.instrument.Instrument.setZero srrietveld.instrument.Instrument-class.html#setZero -srrietveld.instrument.Instrument.__init__ srrietveld.instrument.Instrument-class.html#__init__ -srrietveld.instrument.Instrument.getName srrietveld.instrument.Instrument-class.html#getName -srrietveld.instrument.Instrument.importFromFit srrietveld.instrument.Instrument-class.html#importFromFit -srrietveld.instrument.Instrument.importRietveldObject srrietveld.instrument.Instrument-class.html#importRietveldObject -srrietveld.instrument.Instrument.genRietveldComponent srrietveld.instrument.Instrument-class.html#genRietveldComponent -srrietveld.instrument.Instrument.setPhase srrietveld.instrument.Instrument-class.html#setPhase -srrietveld.instrument.NeutronCWInstrument srrietveld.instrument.NeutronCWInstrument-class.html -srrietveld.instrument.Instrument.getBackgroundType srrietveld.instrument.Instrument-class.html#getBackgroundType -srrietveld.instrument.Instrument.setPeakProfileInfo srrietveld.instrument.Instrument-class.html#setPeakProfileInfo -srrietveld.instrument.ConstWavelengthInstrument.getExcludedRegions srrietveld.instrument.ConstWavelengthInstrument-class.html#getExcludedRegions -srrietveld.instrument.ConstWavelengthInstrument.importFromFit srrietveld.instrument.ConstWavelengthInstrument-class.html#importFromFit -srrietveld.instrument.NeutronCWInstrument.__str__ srrietveld.instrument.NeutronCWInstrument-class.html#__str__ -srrietveld.instrument.Instrument.getType srrietveld.instrument.Instrument-class.html#getType -srrietveld.instrument.NeutronCWInstrument.genMeasurement srrietveld.instrument.NeutronCWInstrument-class.html#genMeasurement -srrietveld.instrument.Instrument.importRietveldObject srrietveld.instrument.Instrument-class.html#importRietveldObject -srrietveld.instrument.ConstWavelengthInstrument.setZero srrietveld.instrument.ConstWavelengthInstrument-class.html#setZero -srrietveld.instrument.NeutronCWInstrument.__init__ srrietveld.instrument.NeutronCWInstrument-class.html#__init__ -srrietveld.instrument.ConstWavelengthInstrument.addExcludedRegion srrietveld.instrument.ConstWavelengthInstrument-class.html#addExcludedRegion -srrietveld.instrument.Instrument.getName srrietveld.instrument.Instrument-class.html#getName -srrietveld.instrument.ConstWavelengthInstrument.getWaveLength srrietveld.instrument.ConstWavelengthInstrument-class.html#getWaveLength -srrietveld.instrument.NeutronCWInstrument.genRietveldComponent srrietveld.instrument.NeutronCWInstrument-class.html#genRietveldComponent -srrietveld.instrument.Instrument.setPhase srrietveld.instrument.Instrument-class.html#setPhase -srrietveld.instrument.TOFInstrument srrietveld.instrument.TOFInstrument-class.html -srrietveld.instrument.Instrument.getBackgroundType srrietveld.instrument.Instrument-class.html#getBackgroundType -srrietveld.instrument.TOFInstrument.setBankInfo srrietveld.instrument.TOFInstrument-class.html#setBankInfo -srrietveld.instrument.Instrument.setPeakProfileInfo srrietveld.instrument.Instrument-class.html#setPeakProfileInfo -srrietveld.instrument.TOFInstrument.getExcludedRegions srrietveld.instrument.TOFInstrument-class.html#getExcludedRegions -srrietveld.instrument.TOFInstrument.genFileParser srrietveld.instrument.TOFInstrument-class.html#genFileParser -srrietveld.instrument.TOFInstrument.setZero srrietveld.instrument.TOFInstrument-class.html#setZero -srrietveld.instrument.TOFInstrument.__str__ srrietveld.instrument.TOFInstrument-class.html#__str__ -srrietveld.instrument.Instrument.getType srrietveld.instrument.Instrument-class.html#getType -srrietveld.instrument.TOFInstrument.genMeasurement srrietveld.instrument.TOFInstrument-class.html#genMeasurement -srrietveld.instrument.Instrument.importRietveldObject srrietveld.instrument.Instrument-class.html#importRietveldObject -srrietveld.instrument.TOFInstrument.importFromFit srrietveld.instrument.TOFInstrument-class.html#importFromFit -srrietveld.instrument.TOFInstrument.__init__ srrietveld.instrument.TOFInstrument-class.html#__init__ -srrietveld.instrument.TOFInstrument.getBankInfoDict srrietveld.instrument.TOFInstrument-class.html#getBankInfoDict -srrietveld.instrument.TOFInstrument.getBankNumbersList srrietveld.instrument.TOFInstrument-class.html#getBankNumbersList -srrietveld.instrument.Instrument.getName srrietveld.instrument.Instrument-class.html#getName -srrietveld.instrument.TOFInstrument.genRietveldComponent srrietveld.instrument.TOFInstrument-class.html#genRietveldComponent -srrietveld.instrument.Instrument.setPhase srrietveld.instrument.Instrument-class.html#setPhase -srrietveld.instrument.ThermalNeutronTOFInstrument srrietveld.instrument.ThermalNeutronTOFInstrument-class.html -srrietveld.instrument.Instrument.getBackgroundType srrietveld.instrument.Instrument-class.html#getBackgroundType -srrietveld.instrument.ThermalNeutronTOFInstrument.setBankInfo srrietveld.instrument.ThermalNeutronTOFInstrument-class.html#setBankInfo -srrietveld.instrument.Instrument.setPeakProfileInfo srrietveld.instrument.Instrument-class.html#setPeakProfileInfo -srrietveld.instrument.ThermalNeutronTOFInstrument.importFromFit srrietveld.instrument.ThermalNeutronTOFInstrument-class.html#importFromFit -srrietveld.instrument.Instrument.__str__ srrietveld.instrument.Instrument-class.html#__str__ -srrietveld.instrument.Instrument.getType srrietveld.instrument.Instrument-class.html#getType -srrietveld.instrument.ThermalNeutronTOFInstrument.genMeasurement srrietveld.instrument.ThermalNeutronTOFInstrument-class.html#genMeasurement -srrietveld.instrument.Instrument.importRietveldObject srrietveld.instrument.Instrument-class.html#importRietveldObject -srrietveld.instrument.ThermalNeutronTOFInstrument.setZero srrietveld.instrument.ThermalNeutronTOFInstrument-class.html#setZero -srrietveld.instrument.ThermalNeutronTOFInstrument.__init__ srrietveld.instrument.ThermalNeutronTOFInstrument-class.html#__init__ -srrietveld.instrument.ThermalNeutronTOFInstrument.getBankInfoDict srrietveld.instrument.ThermalNeutronTOFInstrument-class.html#getBankInfoDict -srrietveld.instrument.ThermalNeutronTOFInstrument.getBankNumbersList srrietveld.instrument.ThermalNeutronTOFInstrument-class.html#getBankNumbersList -srrietveld.instrument.Instrument.getName srrietveld.instrument.Instrument-class.html#getName -srrietveld.instrument.ThermalNeutronTOFInstrument.genRietveldComponent srrietveld.instrument.ThermalNeutronTOFInstrument-class.html#genRietveldComponent -srrietveld.instrument.Instrument.setPhase srrietveld.instrument.Instrument-class.html#setPhase -srrietveld.instrument.XrayInstrument srrietveld.instrument.XrayInstrument-class.html -srrietveld.instrument.Instrument.getBackgroundType srrietveld.instrument.Instrument-class.html#getBackgroundType -srrietveld.instrument.Instrument.setPeakProfileInfo srrietveld.instrument.Instrument-class.html#setPeakProfileInfo -srrietveld.instrument.ConstWavelengthInstrument.getExcludedRegions srrietveld.instrument.ConstWavelengthInstrument-class.html#getExcludedRegions -srrietveld.instrument.ConstWavelengthInstrument.importFromFit srrietveld.instrument.ConstWavelengthInstrument-class.html#importFromFit -srrietveld.instrument.XrayInstrument.__str__ srrietveld.instrument.XrayInstrument-class.html#__str__ -srrietveld.instrument.Instrument.getType srrietveld.instrument.Instrument-class.html#getType -srrietveld.instrument.XrayInstrument.genMeasurement srrietveld.instrument.XrayInstrument-class.html#genMeasurement -srrietveld.instrument.Instrument.importRietveldObject srrietveld.instrument.Instrument-class.html#importRietveldObject -srrietveld.instrument.ConstWavelengthInstrument.setZero srrietveld.instrument.ConstWavelengthInstrument-class.html#setZero -srrietveld.instrument.XrayInstrument.__init__ srrietveld.instrument.XrayInstrument-class.html#__init__ -srrietveld.instrument.ConstWavelengthInstrument.addExcludedRegion srrietveld.instrument.ConstWavelengthInstrument-class.html#addExcludedRegion -srrietveld.instrument.Instrument.getName srrietveld.instrument.Instrument-class.html#getName -srrietveld.instrument.ConstWavelengthInstrument.getWaveLength srrietveld.instrument.ConstWavelengthInstrument-class.html#getWaveLength -srrietveld.instrument.XrayInstrument.genRietveldComponent srrietveld.instrument.XrayInstrument-class.html#genRietveldComponent -srrietveld.instrument.Instrument.setPhase srrietveld.instrument.Instrument-class.html#setPhase -srrietveld.mar_utilities.ChiFile srrietveld.mar_utilities.ChiFile-class.html -srrietveld.mar_utilities.ChiFile._get_spec_record srrietveld.mar_utilities.ChiFile-class.html#_get_spec_record -srrietveld.mar_utilities.ChiFile.writeStr srrietveld.mar_utilities.ChiFile-class.html#writeStr -srrietveld.mar_utilities.ChiFile.__init__ srrietveld.mar_utilities.ChiFile-class.html#__init__ -srrietveld.mar_utilities.ChiFile.write srrietveld.mar_utilities.ChiFile-class.html#write -srrietveld.mar_utilities.ChiFile.writeGSAS srrietveld.mar_utilities.ChiFile-class.html#writeGSAS -srrietveld.mar_utilities.ChiFile.__readFit2dChiStr srrietveld.mar_utilities.ChiFile-class.html#__readFit2dChiStr -srrietveld.mar_utilities.ChiFile.writeGSASStr srrietveld.mar_utilities.ChiFile-class.html#writeGSASStr -srrietveld.mar_utilities.ChiFile.__readMarUtilitiesStr srrietveld.mar_utilities.ChiFile-class.html#__readMarUtilitiesStr -srrietveld.mar_utilities.ChiFile._get_mar_setup srrietveld.mar_utilities.ChiFile-class.html#_get_mar_setup -srrietveld.mar_utilities.ChiFile._set_spec_record srrietveld.mar_utilities.ChiFile-class.html#_set_spec_record -srrietveld.mar_utilities.ChiFile.read srrietveld.mar_utilities.ChiFile-class.html#read -srrietveld.mar_utilities.ChiFile.monitor_scale srrietveld.mar_utilities.ChiFile-class.html#monitor_scale -srrietveld.mar_utilities.ChiFile.mar_setup srrietveld.mar_utilities.ChiFile-class.html#mar_setup -srrietveld.mar_utilities.ChiFile._updateQ srrietveld.mar_utilities.ChiFile-class.html#_updateQ -srrietveld.mar_utilities.ChiFile._updateInor srrietveld.mar_utilities.ChiFile-class.html#_updateInor -srrietveld.mar_utilities.ChiFile._set_mar_setup srrietveld.mar_utilities.ChiFile-class.html#_set_mar_setup -srrietveld.mar_utilities.ChiFile.spec_record srrietveld.mar_utilities.ChiFile-class.html#spec_record -srrietveld.mar_utilities.MarImage srrietveld.mar_utilities.MarImage-class.html -srrietveld.mar_utilities.MarImage._get_spec_record srrietveld.mar_utilities.MarImage-class.html#_get_spec_record -srrietveld.mar_utilities.MarImage.spec_file srrietveld.mar_utilities.MarImage-class.html#spec_file -srrietveld.mar_utilities.MarImage._get_monitor srrietveld.mar_utilities.MarImage-class.html#_get_monitor -srrietveld.mar_utilities.MarImage.writeChiFile srrietveld.mar_utilities.MarImage-class.html#writeChiFile -srrietveld.mar_utilities.MarImage.__init__ srrietveld.mar_utilities.MarImage-class.html#__init__ -srrietveld.mar_utilities.MarImage._get_spec_file srrietveld.mar_utilities.MarImage-class.html#_get_spec_file -srrietveld.mar_utilities.MarImage.monitor srrietveld.mar_utilities.MarImage-class.html#monitor -srrietveld.mar_utilities.MarImage.writeGSASFile srrietveld.mar_utilities.MarImage-class.html#writeGSASFile -srrietveld.mar_utilities.MarImage.integrate srrietveld.mar_utilities.MarImage-class.html#integrate -srrietveld.mar_utilities.MarImage._get_spec_stuff srrietveld.mar_utilities.MarImage-class.html#_get_spec_stuff -srrietveld.mar_utilities.MarImage._readMarFile srrietveld.mar_utilities.MarImage-class.html#_readMarFile -srrietveld.mar_utilities.MarImage._get_mar_setup srrietveld.mar_utilities.MarImage-class.html#_get_mar_setup -srrietveld.mar_utilities.MarImage.mar_setup srrietveld.mar_utilities.MarImage-class.html#mar_setup -srrietveld.mar_utilities.MarImage._set_mar_setup srrietveld.mar_utilities.MarImage-class.html#_set_mar_setup -srrietveld.mar_utilities.MarImage.spec_record srrietveld.mar_utilities.MarImage-class.html#spec_record -srrietveld.mar_utilities.MarSetup srrietveld.mar_utilities.MarSetup-class.html -srrietveld.mar_utilities.MarSetup.undefAll srrietveld.mar_utilities.MarSetup-class.html#undefAll -srrietveld.mar_utilities.MarSetup.undef srrietveld.mar_utilities.MarSetup-class.html#undef -srrietveld.mar_utilities.MarSetup.all_setups srrietveld.mar_utilities.MarSetup-class.html#all_setups -srrietveld.mar_utilities.MarSetup.__str__ srrietveld.mar_utilities.MarSetup-class.html#__str__ -srrietveld.mar_utilities.MarSetup.getEffectiveSetup srrietveld.mar_utilities.MarSetup-class.html#getEffectiveSetup -srrietveld.mar_utilities.MarSetup.fromConfigFileObject srrietveld.mar_utilities.MarSetup-class.html#fromConfigFileObject -srrietveld.mar_utilities.MarSetup.fromConfigStr srrietveld.mar_utilities.MarSetup-class.html#fromConfigStr -srrietveld.mar_utilities.MarSetup.__processArgs srrietveld.mar_utilities.MarSetup-class.html#__processArgs -srrietveld.mar_utilities.MarSetup.fit2dIntegrateMacro srrietveld.mar_utilities.MarSetup-class.html#fit2dIntegrateMacro -srrietveld.mar_utilities.MarSetup.__eq__ srrietveld.mar_utilities.MarSetup-class.html#__eq__ -srrietveld.mar_utilities.MarSetup.__init__ srrietveld.mar_utilities.MarSetup-class.html#__init__ -srrietveld.mar_utilities.MarSetup.define srrietveld.mar_utilities.MarSetup-class.html#define -srrietveld.mar_utilities.SpecMarExposure srrietveld.mar_utilities.SpecMarExposure-class.html -srrietveld.mar_utilities.SpecMarExposure.monitor srrietveld.mar_utilities.SpecMarExposure-class.html#monitor -srrietveld.mar_utilities.SpecMarExposure._set_file srrietveld.mar_utilities.SpecMarExposure-class.html#_set_file -srrietveld.mar_utilities.SpecMarExposure.__str__ srrietveld.mar_utilities.SpecMarExposure-class.html#__str__ -srrietveld.mar_utilities.SpecMarExposure._get_monitor srrietveld.mar_utilities.SpecMarExposure-class.html#_get_monitor -srrietveld.mar_utilities.SpecMarExposure.file srrietveld.mar_utilities.SpecMarExposure-class.html#file -srrietveld.mar_utilities.SpecMarExposure.__Lidx_monitor srrietveld.mar_utilities.SpecMarExposure-class.html#__Lidx_monitor -srrietveld.mar_utilities.SpecMarExposure._get_file srrietveld.mar_utilities.SpecMarExposure-class.html#_get_file -srrietveld.mar_utilities.SpecMarExposure._set_monitor srrietveld.mar_utilities.SpecMarExposure-class.html#_set_monitor -srrietveld.mar_utilities.SpecMarExposure.__init__ srrietveld.mar_utilities.SpecMarExposure-class.html#__init__ -srrietveld.measurements.Measurement srrietveld.measurements.Measurement-class.html -srrietveld.measurements.Measurement.setMeasureRange srrietveld.measurements.Measurement-class.html#setMeasureRange -srrietveld.measurements.Measurement.getBackgroundType srrietveld.measurements.Measurement-class.html#getBackgroundType -srrietveld.measurements.Measurement.__init__ srrietveld.measurements.Measurement-class.html#__init__ -srrietveld.measurements.Measurement.addExcludedRegion srrietveld.measurements.Measurement-class.html#addExcludedRegion -srrietveld.measurements.Measurement.setBackground srrietveld.measurements.Measurement-class.html#setBackground -srrietveld.measurements.Measurement.setBankNumber srrietveld.measurements.Measurement-class.html#setBankNumber -srrietveld.measurements.Measurement.getExcludedRegions srrietveld.measurements.Measurement-class.html#getExcludedRegions -srrietveld.measurements.Measurement.getBankNumber srrietveld.measurements.Measurement-class.html#getBankNumber -srrietveld.measurements.Measurement.getDataFileName srrietveld.measurements.Measurement-class.html#getDataFileName -srrietveld.measurements.Measurement.getMeasureRange srrietveld.measurements.Measurement-class.html#getMeasureRange -srrietveld.measurements.Measurement.setDataFileName srrietveld.measurements.Measurement-class.html#setDataFileName -srrietveld.measurements.Measurement.getBackgroundDictionary srrietveld.measurements.Measurement-class.html#getBackgroundDictionary -srrietveld.modelrw.CifRW srrietveld.modelrw.CifRW-class.html -srrietveld.modelrw.ModelRW.exportModel srrietveld.modelrw.ModelRW-class.html#exportModel -srrietveld.modelrw.CifRW.__init__ srrietveld.modelrw.CifRW-class.html#__init__ -srrietveld.modelrw.ModelRW srrietveld.modelrw.ModelRW-class.html -srrietveld.modelrw.ModelRW.exportModel srrietveld.modelrw.ModelRW-class.html#exportModel -srrietveld.modelrw.ModelRW.__init__ srrietveld.modelrw.ModelRW-class.html#__init__ -srrietveld.monitormem.MemoryMonitor srrietveld.monitormem.MemoryMonitor-class.html -srrietveld.monitormem.MemoryMonitor.reset srrietveld.monitormem.MemoryMonitor-class.html#reset -srrietveld.monitormem.MemoryMonitor.index srrietveld.monitormem.MemoryMonitor-class.html#index -srrietveld.monitormem.MemoryMonitor.refholder srrietveld.monitormem.MemoryMonitor-class.html#refholder -srrietveld.monitormem.MemoryMonitor.register srrietveld.monitormem.MemoryMonitor-class.html#register -srrietveld.monitormem.MemoryMonitor.report srrietveld.monitormem.MemoryMonitor-class.html#report -srrietveld.monitormem.MemoryMonitor.logfilename srrietveld.monitormem.MemoryMonitor-class.html#logfilename -srrietveld.monitormem.MemoryMonitor.record srrietveld.monitormem.MemoryMonitor-class.html#record -srrietveld.monitormem.MemoryMonitor.initmem srrietveld.monitormem.MemoryMonitor-class.html#initmem -srrietveld.monitormem.MemoryMonitor.usage srrietveld.monitormem.MemoryMonitor-class.html#usage -srrietveld.monitormem.MemoryMonitor.__init__ srrietveld.monitormem.MemoryMonitor-class.html#__init__ -srrietveld.parallelrefinecontrol.ParallelRefinementControl srrietveld.parallelrefinecontrol.ParallelRefinementControl-class.html -srrietveld.parallelrefinecontrol.ParallelRefinementControl.setRefineStrategy srrietveld.parallelrefinecontrol.ParallelRefinementControl-class.html#setRefineStrategy -srrietveld.parallelrefinecontrol.ParallelRefinementControl.save srrietveld.parallelrefinecontrol.ParallelRefinementControl-class.html#save -srrietveld.parallelrefinecontrol.ParallelRefinementControl.refine srrietveld.parallelrefinecontrol.ParallelRefinementControl-class.html#refine -srrietveld.parallelrefinecontrol.ParallelRefinementControl.__init__ srrietveld.parallelrefinecontrol.ParallelRefinementControl-class.html#__init__ -srrietveld.plot2d.Plot2D srrietveld.plot2d.Plot2D-class.html -srrietveld.plot2d.Plot2D.plot srrietveld.plot2d.Plot2D-class.html#plot -srrietveld.plot2d.Plot2D.setLine srrietveld.plot2d.Plot2D-class.html#setLine -srrietveld.plot2d.Plot2D.__init__ srrietveld.plot2d.Plot2D-class.html#__init__ -srrietveld.plot2d.PlotInfo2D srrietveld.plot2d.PlotInfo2D-class.html -srrietveld.plot2d.PlotInfo2D.setLabel srrietveld.plot2d.PlotInfo2D-class.html#setLabel -srrietveld.plot2d.PlotInfo2D.LineStyleList srrietveld.plot2d.PlotInfo2D-class.html#LineStyleList -srrietveld.plot2d.PlotInfo2D.getY srrietveld.plot2d.PlotInfo2D-class.html#getY -srrietveld.plot2d.PlotInfo2D.getLabel srrietveld.plot2d.PlotInfo2D-class.html#getLabel -srrietveld.plot2d.PlotInfo2D.setLineStyle srrietveld.plot2d.PlotInfo2D-class.html#setLineStyle -srrietveld.plot2d.PlotInfo2D.__init__ srrietveld.plot2d.PlotInfo2D-class.html#__init__ -srrietveld.plot2d.PlotInfo2D.getMarkStyle srrietveld.plot2d.PlotInfo2D-class.html#getMarkStyle -srrietveld.plot2d.PlotInfo2D.setMarkStyle srrietveld.plot2d.PlotInfo2D-class.html#setMarkStyle -srrietveld.plot2d.PlotInfo2D.ColorList srrietveld.plot2d.PlotInfo2D-class.html#ColorList -srrietveld.plot2d.PlotInfo2D.getColor srrietveld.plot2d.PlotInfo2D-class.html#getColor -srrietveld.plot2d.PlotInfo2D.setX srrietveld.plot2d.PlotInfo2D-class.html#setX -srrietveld.plot2d.PlotInfo2D.setY srrietveld.plot2d.PlotInfo2D-class.html#setY -srrietveld.plot2d.PlotInfo2D.getX srrietveld.plot2d.PlotInfo2D-class.html#getX -srrietveld.plot2d.PlotInfo2D.setColor srrietveld.plot2d.PlotInfo2D-class.html#setColor -srrietveld.plot2d.PlotInfo2D.MarkStyleList srrietveld.plot2d.PlotInfo2D-class.html#MarkStyleList -srrietveld.plot2d.PlotInfo2D.getLineStyle srrietveld.plot2d.PlotInfo2D-class.html#getLineStyle -srrietveld.plot2d.PlotMatLib srrietveld.plot2d.PlotMatLib-class.html -srrietveld.plot2d.PlotMatLib.MarkStyleTable srrietveld.plot2d.PlotMatLib-class.html#MarkStyleTable -srrietveld.plot2d.PlotMatLib.LineStyleTable srrietveld.plot2d.PlotMatLib-class.html#LineStyleTable -srrietveld.plot2d.PlotMatLib.ColorTable srrietveld.plot2d.PlotMatLib-class.html#ColorTable -srrietveld.plot2d.PlotMatLib.__init__ srrietveld.plot2d.PlotMatLib-class.html#__init__ -srrietveld.plot2d.PlotMatLib.plot2D srrietveld.plot2d.PlotMatLib-class.html#plot2D -srrietveld.refinebackend.RietveldEngine srrietveld.refinebackend.RietveldEngine-class.html -srrietveld.refinebackend.RietveldEngine.getRietveldEngineModule srrietveld.refinebackend.RietveldEngine-class.html#getRietveldEngineModule -srrietveld.refinebackend.RietveldEngine.setRietveldEngine srrietveld.refinebackend.RietveldEngine-class.html#setRietveldEngine -srrietveld.refinebackend.RietveldEngine.__init__ srrietveld.refinebackend.RietveldEngine-class.html#__init__ -srrietveld.refineguides.ADPGuide srrietveld.refineguides.ADPGuide-class.html -srrietveld.refineguides.AtomGuide.getGuideConfig srrietveld.refineguides.AtomGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.AtomGuide.getRefineAllConfig srrietveld.refineguides.AtomGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.ADPGuide.getRietveldObjects srrietveld.refineguides.ADPGuide-class.html#getRietveldObjects -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.ADPGuide.generateRefineSetup srrietveld.refineguides.ADPGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.AbsorptionCorrectionGuide srrietveld.refineguides.AbsorptionCorrectionGuide-class.html -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.getGuideConfig srrietveld.refineguides.RefineGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.RefineGuide.getRefineAllConfig srrietveld.refineguides.RefineGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.AbsorptionCorrectionGuide.getRietveldObjects srrietveld.refineguides.AbsorptionCorrectionGuide-class.html#getRietveldObjects -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.AbsorptionCorrectionGuide.generateRefineSetup srrietveld.refineguides.AbsorptionCorrectionGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.AtomGuide srrietveld.refineguides.AtomGuide-class.html -srrietveld.refineguides.AtomGuide.getGuideConfig srrietveld.refineguides.AtomGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.AtomGuide.getRefineAllConfig srrietveld.refineguides.AtomGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.RefineGuide.generateRefineSetup srrietveld.refineguides.RefineGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.BackgroundGuide srrietveld.refineguides.BackgroundGuide-class.html -srrietveld.refineguides.MeasurementGuide.getGuideConfig srrietveld.refineguides.MeasurementGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.MeasurementGuide.getRefineAllConfig srrietveld.refineguides.MeasurementGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.BackgroundGuide.getRietveldObjects srrietveld.refineguides.BackgroundGuide-class.html#getRietveldObjects -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.BackgroundGuide.generateRefineSetup srrietveld.refineguides.BackgroundGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.ExpDecayGuide srrietveld.refineguides.ExpDecayGuide-class.html -srrietveld.refineguides.InstrumentGuide.getGuideConfig srrietveld.refineguides.InstrumentGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.InstrumentGuide.getRefineAllConfig srrietveld.refineguides.InstrumentGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.ExpDecayGuide.getRietveldObjects srrietveld.refineguides.ExpDecayGuide-class.html#getRietveldObjects -srrietveld.refineguides.InstrumentGuide.getComponents srrietveld.refineguides.InstrumentGuide-class.html#getComponents -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.ExpDecayGuide.generateRefineSetup srrietveld.refineguides.ExpDecayGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.FractionalCoordinateGuide srrietveld.refineguides.FractionalCoordinateGuide-class.html -srrietveld.refineguides.AtomGuide.getGuideConfig srrietveld.refineguides.AtomGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.AtomGuide.getRefineAllConfig srrietveld.refineguides.AtomGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.FractionalCoordinateGuide.getRietveldObjects srrietveld.refineguides.FractionalCoordinateGuide-class.html#getRietveldObjects -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.FractionalCoordinateGuide.generateRefineSetup srrietveld.refineguides.FractionalCoordinateGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.InstrumentGuide srrietveld.refineguides.InstrumentGuide-class.html -srrietveld.refineguides.InstrumentGuide.getGuideConfig srrietveld.refineguides.InstrumentGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.InstrumentGuide.getRefineAllConfig srrietveld.refineguides.InstrumentGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.InstrumentGuide.getComponents srrietveld.refineguides.InstrumentGuide-class.html#getComponents -srrietveld.refineguides.RefineGuide.generateRefineSetup srrietveld.refineguides.RefineGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.LatticeGuide srrietveld.refineguides.LatticeGuide-class.html -srrietveld.refineguides.LatticeGuide.getGuideConfig srrietveld.refineguides.LatticeGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.LatticeGuide.getRefineAllConfig srrietveld.refineguides.LatticeGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.RefineGuide.generateRefineSetup srrietveld.refineguides.RefineGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.MeasurementGuide srrietveld.refineguides.MeasurementGuide-class.html -srrietveld.refineguides.MeasurementGuide.getGuideConfig srrietveld.refineguides.MeasurementGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.MeasurementGuide.getRefineAllConfig srrietveld.refineguides.MeasurementGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.MeasurementGuide.getRietveldObjects srrietveld.refineguides.MeasurementGuide-class.html#getRietveldObjects -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.RefineGuide.generateRefineSetup srrietveld.refineguides.RefineGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.OccupancyGuide srrietveld.refineguides.OccupancyGuide-class.html -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.getGuideConfig srrietveld.refineguides.RefineGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.RefineGuide.getRefineAllConfig srrietveld.refineguides.RefineGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.OccupancyGuide.getRietveldObjects srrietveld.refineguides.OccupancyGuide-class.html#getRietveldObjects -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.OccupancyGuide.generateRefineSetup srrietveld.refineguides.OccupancyGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.PeakShapeGuide srrietveld.refineguides.PeakShapeGuide-class.html -srrietveld.refineguides.InstrumentGuide.getGuideConfig srrietveld.refineguides.InstrumentGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.InstrumentGuide.getRefineAllConfig srrietveld.refineguides.InstrumentGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.PeakShapeGuide.getRietveldObjects srrietveld.refineguides.PeakShapeGuide-class.html#getRietveldObjects -srrietveld.refineguides.InstrumentGuide.getComponents srrietveld.refineguides.InstrumentGuide-class.html#getComponents -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.PeakShapeGuide.generateRefineSetup srrietveld.refineguides.PeakShapeGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.RefineGuide srrietveld.refineguides.RefineGuide-class.html -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.getGuideConfig srrietveld.refineguides.RefineGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.RefineGuide.getRefineAllConfig srrietveld.refineguides.RefineGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.RefineGuide.generateRefineSetup srrietveld.refineguides.RefineGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.SampleGuide srrietveld.refineguides.SampleGuide-class.html -srrietveld.refineguides.SampleGuide.getGuideConfig srrietveld.refineguides.SampleGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.SampleGuide.getRefineAllConfig srrietveld.refineguides.SampleGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.RefineGuide.generateRefineSetup srrietveld.refineguides.RefineGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.ScaleGuide srrietveld.refineguides.ScaleGuide-class.html -srrietveld.refineguides.InstrumentGuide.getGuideConfig srrietveld.refineguides.InstrumentGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.InstrumentGuide.getRefineAllConfig srrietveld.refineguides.InstrumentGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.ScaleGuide.getRietveldObjects srrietveld.refineguides.ScaleGuide-class.html#getRietveldObjects -srrietveld.refineguides.ScaleGuide.getComponents srrietveld.refineguides.ScaleGuide-class.html#getComponents -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.ScaleGuide.generateRefineSetup srrietveld.refineguides.ScaleGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.WavelengthGuide srrietveld.refineguides.WavelengthGuide-class.html -srrietveld.refineguides.InstrumentGuide.getGuideConfig srrietveld.refineguides.InstrumentGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.InstrumentGuide.getRefineAllConfig srrietveld.refineguides.InstrumentGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.WavelengthGuide.getRietveldObjects srrietveld.refineguides.WavelengthGuide-class.html#getRietveldObjects -srrietveld.refineguides.InstrumentGuide.getComponents srrietveld.refineguides.InstrumentGuide-class.html#getComponents -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.WavelengthGuide.generateRefineSetup srrietveld.refineguides.WavelengthGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refineguides.ZeroGuide srrietveld.refineguides.ZeroGuide-class.html -srrietveld.refineguides.InstrumentGuide.getGuideConfig srrietveld.refineguides.InstrumentGuide-class.html#getGuideConfig -srrietveld.refineguides.RefineGuide.reset srrietveld.refineguides.RefineGuide-class.html#reset -srrietveld.refineguides.RefineGuide.setGuideStep srrietveld.refineguides.RefineGuide-class.html#setGuideStep -srrietveld.refineguides.RefineGuide.getRefinedVariablesList srrietveld.refineguides.RefineGuide-class.html#getRefinedVariablesList -srrietveld.refineguides.InstrumentGuide.getRefineAllConfig srrietveld.refineguides.InstrumentGuide-class.html#getRefineAllConfig -srrietveld.refineguides.RefineGuide.guideDescription srrietveld.refineguides.RefineGuide-class.html#guideDescription -srrietveld.refineguides.RefineGuide.__str__ srrietveld.refineguides.RefineGuide-class.html#__str__ -srrietveld.refineguides.RefineGuide.generateRefineSetupDictionary srrietveld.refineguides.RefineGuide-class.html#generateRefineSetupDictionary -srrietveld.refineguides.RefineGuide.resetVisitRecord srrietveld.refineguides.RefineGuide-class.html#resetVisitRecord -srrietveld.refineguides.ZeroGuide.getRietveldObjects srrietveld.refineguides.ZeroGuide-class.html#getRietveldObjects -srrietveld.refineguides.InstrumentGuide.getComponents srrietveld.refineguides.InstrumentGuide-class.html#getComponents -srrietveld.refineguides.RefineGuide.turnOff srrietveld.refineguides.RefineGuide-class.html#turnOff -srrietveld.refineguides.ZeroGuide.generateRefineSetup srrietveld.refineguides.ZeroGuide-class.html#generateRefineSetup -srrietveld.refineguides.RefineGuide.getNumRefineSteps srrietveld.refineguides.RefineGuide-class.html#getNumRefineSteps -srrietveld.refineguides.RefineGuide.__init__ srrietveld.refineguides.RefineGuide-class.html#__init__ -srrietveld.refineguides.RefineGuide.getNumStages srrietveld.refineguides.RefineGuide-class.html#getNumStages -srrietveld.refinehistory.RefineHistory srrietveld.refinehistory.RefineHistory-class.html -srrietveld.refinehistory.RefineHistory.getResidueValues srrietveld.refinehistory.RefineHistory-class.html#getResidueValues -srrietveld.refinehistory.RefineHistory.__str__ srrietveld.refinehistory.RefineHistory-class.html#__str__ -srrietveld.refinehistory.RefineHistory.addInfoOfStep srrietveld.refinehistory.RefineHistory-class.html#addInfoOfStep -srrietveld.refinehistory.RefineHistory.getNewVariablesList srrietveld.refinehistory.RefineHistory-class.html#getNewVariablesList -srrietveld.refinehistory.RefineHistory.__init__ srrietveld.refinehistory.RefineHistory-class.html#__init__ -srrietveld.refinehistory.RefineHistory.addSkipStep srrietveld.refinehistory.RefineHistory-class.html#addSkipStep -srrietveld.refinemanager.MultiStepRefineManager srrietveld.refinemanager.MultiStepRefineManager-class.html -srrietveld.refinemanager.MultiStepRefineManager.getFitOfStep srrietveld.refinemanager.MultiStepRefineManager-class.html#getFitOfStep -srrietveld.refinemanager.MultiStepRefineManager.leapBack srrietveld.refinemanager.MultiStepRefineManager-class.html#leapBack -srrietveld.refinemanager.MultiStepRefineManager.getRefineStrategy srrietveld.refinemanager.MultiStepRefineManager-class.html#getRefineStrategy -srrietveld.refinemanager.MultiStepRefineManager.getHistory srrietveld.refinemanager.MultiStepRefineManager-class.html#getHistory -srrietveld.refinemanager.MultiStepRefineManager.getCurrentFit srrietveld.refinemanager.MultiStepRefineManager-class.html#getCurrentFit -srrietveld.refinemanager.MultiStepRefineManager.__init__ srrietveld.refinemanager.MultiStepRefineManager-class.html#__init__ -srrietveld.refinemanager.MultiStepRefineManager.getBestStep srrietveld.refinemanager.MultiStepRefineManager-class.html#getBestStep -srrietveld.refinemanager.MultiStepRefineManager.recordSolution srrietveld.refinemanager.MultiStepRefineManager-class.html#recordSolution -srrietveld.refinemanager.MultiStepRefineManager.saveV2 srrietveld.refinemanager.MultiStepRefineManager-class.html#saveV2 -srrietveld.refinemanager.MultiStepRefineManager.getNumSteps srrietveld.refinemanager.MultiStepRefineManager-class.html#getNumSteps -srrietveld.refinemanager.MultiStepRefineManager.getFitDetailOfStep srrietveld.refinemanager.MultiStepRefineManager-class.html#getFitDetailOfStep -srrietveld.refinemanager.MultiStepRefineManager.save srrietveld.refinemanager.MultiStepRefineManager-class.html#save -srrietveld.refinemanager.MultiStepRefineManager.getPrevStepRefinedVariables srrietveld.refinemanager.MultiStepRefineManager-class.html#getPrevStepRefinedVariables -srrietveld.refinemanager.MultiStepRefineManager.refine srrietveld.refinemanager.MultiStepRefineManager-class.html#refine -srrietveld.refinesetup.AbsorptionCorrectionRefineSetup srrietveld.refinesetup.AbsorptionCorrectionRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.AbsorptionCorrectionRefineSetup.VarSetupDict srrietveld.refinesetup.AbsorptionCorrectionRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.AnisotropicADPRefineSetup srrietveld.refinesetup.AnisotropicADPRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.AnisotropicADPRefineSetup.VarSetupDict srrietveld.refinesetup.AnisotropicADPRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.AtomFractionalCoordinateRefineSetup srrietveld.refinesetup.AtomFractionalCoordinateRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.AtomFractionalCoordinateRefineSetup.VarSetupDict srrietveld.refinesetup.AtomFractionalCoordinateRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.ConstantWaveSymmetricPeakShapeRefineSetup srrietveld.refinesetup.ConstantWaveSymmetricPeakShapeRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.ConstantWaveSymmetricPeakShapeRefineSetup.VarSetupDict srrietveld.refinesetup.ConstantWaveSymmetricPeakShapeRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.CubicRefineSetup srrietveld.refinesetup.CubicRefineSetup-class.html -srrietveld.refinesetup.CubicRefineSetup._NumSteps srrietveld.refinesetup.CubicRefineSetup-class.html#_NumSteps -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.CubicRefineSetup.VarSetupDict srrietveld.refinesetup.CubicRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.CubicRefineSetup._NumPar srrietveld.refinesetup.CubicRefineSetup-class.html#_NumPar -srrietveld.refinesetup.LatticeRefineSetup.getNumRefineSteps srrietveld.refinesetup.LatticeRefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.LatticeRefineSetup.__init__ srrietveld.refinesetup.LatticeRefineSetup-class.html#__init__ -srrietveld.refinesetup.HexagonalRefineSetup srrietveld.refinesetup.HexagonalRefineSetup-class.html -srrietveld.refinesetup.HexagonalRefineSetup._NumSteps srrietveld.refinesetup.HexagonalRefineSetup-class.html#_NumSteps -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.HexagonalRefineSetup.VarSetupDict srrietveld.refinesetup.HexagonalRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.HexagonalRefineSetup._NumPar srrietveld.refinesetup.HexagonalRefineSetup-class.html#_NumPar -srrietveld.refinesetup.LatticeRefineSetup.getNumRefineSteps srrietveld.refinesetup.LatticeRefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.LatticeRefineSetup.__init__ srrietveld.refinesetup.LatticeRefineSetup-class.html#__init__ -srrietveld.refinesetup.InterpolatedBackgroundRefineSetup srrietveld.refinesetup.InterpolatedBackgroundRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.InterpolatedBackgroundRefineSetup._NumStages srrietveld.refinesetup.InterpolatedBackgroundRefineSetup-class.html#_NumStages -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.InterpolatedBackgroundRefineSetup.__init__ srrietveld.refinesetup.InterpolatedBackgroundRefineSetup-class.html#__init__ -srrietveld.refinesetup.IsotropicADPRefineSetup srrietveld.refinesetup.IsotropicADPRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.IsotropicADPRefineSetup.VarSetupDict srrietveld.refinesetup.IsotropicADPRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.LatticeRefineSetup srrietveld.refinesetup.LatticeRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.LatticeRefineSetup.getNumRefineSteps srrietveld.refinesetup.LatticeRefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.LatticeRefineSetup.__init__ srrietveld.refinesetup.LatticeRefineSetup-class.html#__init__ -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.MonoclinicRefineSetup srrietveld.refinesetup.MonoclinicRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.MonoclinicRefineSetup.VarSetupDict srrietveld.refinesetup.MonoclinicRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.MonoclinicRefineSetup._NumPar srrietveld.refinesetup.MonoclinicRefineSetup-class.html#_NumPar -srrietveld.refinesetup.LatticeRefineSetup.getNumRefineSteps srrietveld.refinesetup.LatticeRefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.LatticeRefineSetup.__init__ srrietveld.refinesetup.LatticeRefineSetup-class.html#__init__ -srrietveld.refinesetup.OccRefineSetup srrietveld.refinesetup.OccRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.OccRefineSetup.__init__ srrietveld.refinesetup.OccRefineSetup-class.html#__init__ -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.OrthorhombicRefineSetup srrietveld.refinesetup.OrthorhombicRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.OrthorhombicRefineSetup.VarSetupDict srrietveld.refinesetup.OrthorhombicRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.OrthorhombicRefineSetup._NumPar srrietveld.refinesetup.OrthorhombicRefineSetup-class.html#_NumPar -srrietveld.refinesetup.OrthorhombicRefineSetup._NumStep srrietveld.refinesetup.OrthorhombicRefineSetup-class.html#_NumStep -srrietveld.refinesetup.LatticeRefineSetup.getNumRefineSteps srrietveld.refinesetup.LatticeRefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.LatticeRefineSetup.__init__ srrietveld.refinesetup.LatticeRefineSetup-class.html#__init__ -srrietveld.refinesetup.PolynomialBackgroundRefineSetup srrietveld.refinesetup.PolynomialBackgroundRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.PolynomialBackgroundRefineSetup._NumStages srrietveld.refinesetup.PolynomialBackgroundRefineSetup-class.html#_NumStages -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.PolynomialBackgroundRefineSetup._MaxOrder srrietveld.refinesetup.PolynomialBackgroundRefineSetup-class.html#_MaxOrder -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.PolynomialBackgroundRefineSetup.__init__ srrietveld.refinesetup.PolynomialBackgroundRefineSetup-class.html#__init__ -srrietveld.refinesetup.PseudoVoigtExpDSpacingRefineSetup srrietveld.refinesetup.PseudoVoigtExpDSpacingRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.PseudoVoigtExpDSpacingRefineSetup.VarSetupDict srrietveld.refinesetup.PseudoVoigtExpDSpacingRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.RefineSetup srrietveld.refinesetup.RefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RegularPseudoVoigtRefineSetup srrietveld.refinesetup.RegularPseudoVoigtRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.RegularPseudoVoigtRefineSetup.VarSetupDict srrietveld.refinesetup.RegularPseudoVoigtRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.ScaleFactorRefineSetup srrietveld.refinesetup.ScaleFactorRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.ScaleFactorRefineSetup.VarSetupDict srrietveld.refinesetup.ScaleFactorRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.SplitPseudoVoigRefineSetup srrietveld.refinesetup.SplitPseudoVoigRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.SplitPseudoVoigRefineSetup.VarSetupDict srrietveld.refinesetup.SplitPseudoVoigRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.TCHPseudoVoigtRefineSetup srrietveld.refinesetup.TCHPseudoVoigtRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.TCHPseudoVoigtRefineSetup.VarSetupDict srrietveld.refinesetup.TCHPseudoVoigtRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.TOFExpDecayRefineSetup srrietveld.refinesetup.TOFExpDecayRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.TOFExpDecayRefineSetup.VarSetupDict srrietveld.refinesetup.TOFExpDecayRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.TOFPseudoVoigtRefinement srrietveld.refinesetup.TOFPseudoVoigtRefinement-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.TOFPseudoVoigtRefinement.VarSetupDict srrietveld.refinesetup.TOFPseudoVoigtRefinement-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.TetragonalRefineSetup srrietveld.refinesetup.TetragonalRefineSetup-class.html -srrietveld.refinesetup.TetragonalRefineSetup._NumSteps srrietveld.refinesetup.TetragonalRefineSetup-class.html#_NumSteps -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.TetragonalRefineSetup.VarSetupDict srrietveld.refinesetup.TetragonalRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.TetragonalRefineSetup._NumPar srrietveld.refinesetup.TetragonalRefineSetup-class.html#_NumPar -srrietveld.refinesetup.LatticeRefineSetup.getNumRefineSteps srrietveld.refinesetup.LatticeRefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.LatticeRefineSetup.__init__ srrietveld.refinesetup.LatticeRefineSetup-class.html#__init__ -srrietveld.refinesetup.TrigonalRefineSetup srrietveld.refinesetup.TrigonalRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.TrigonalRefineSetup.VarSetupDict srrietveld.refinesetup.TrigonalRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.TrigonalRefineSetup._NumPar srrietveld.refinesetup.TrigonalRefineSetup-class.html#_NumPar -srrietveld.refinesetup.LatticeRefineSetup.getNumRefineSteps srrietveld.refinesetup.LatticeRefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.LatticeRefineSetup.__init__ srrietveld.refinesetup.LatticeRefineSetup-class.html#__init__ -srrietveld.refinesetup.WavelengthRefineSetup srrietveld.refinesetup.WavelengthRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.WavelengthRefineSetup.VarSetupDict srrietveld.refinesetup.WavelengthRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.ZeroShiftRefineSetup srrietveld.refinesetup.ZeroShiftRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.ZeroShiftRefineSetup.VarSetupDict srrietveld.refinesetup.ZeroShiftRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinesetup.ZeroShiftThermoRefineSetup srrietveld.refinesetup.ZeroShiftThermoRefineSetup-class.html -srrietveld.refinesetup.RefineSetup.getRefineInfo srrietveld.refinesetup.RefineSetup-class.html#getRefineInfo -srrietveld.refinesetup.ZeroShiftThermoRefineSetup.VarSetupDict srrietveld.refinesetup.ZeroShiftThermoRefineSetup-class.html#VarSetupDict -srrietveld.refinesetup.RefineSetup.setToRefine srrietveld.refinesetup.RefineSetup-class.html#setToRefine -srrietveld.refinesetup.RefineSetup.getNumParameters srrietveld.refinesetup.RefineSetup-class.html#getNumParameters -srrietveld.refinesetup.RefineSetup.getNumRefineSteps srrietveld.refinesetup.RefineSetup-class.html#getNumRefineSteps -srrietveld.refinesetup.RefineSetup.__init__ srrietveld.refinesetup.RefineSetup-class.html#__init__ -srrietveld.refinestrategy.CalibratedLebailRefineStrategy srrietveld.refinestrategy.CalibratedLebailRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibratedLebailRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibratedLebailRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibratedLebailRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibratedLebailRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibratedLebailRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibratedLebailRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibratedLebailRefineStrategy.__init__ srrietveld.refinestrategy.CalibratedLebailRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CalibratedRietveldRefineStrategy srrietveld.refinestrategy.CalibratedRietveldRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibratedRietveldRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibratedRietveldRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibratedRietveldRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibratedRietveldRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibratedRietveldRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibratedRietveldRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibratedRietveldRefineStrategy.__init__ srrietveld.refinestrategy.CalibratedRietveldRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CalibratedTOFRietveldRefineStrategy srrietveld.refinestrategy.CalibratedTOFRietveldRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibratedRietveldRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibratedRietveldRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibratedRietveldRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibratedRietveldRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibratedRietveldRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibratedRietveldRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibratedTOFRietveldRefineStrategy.__init__ srrietveld.refinestrategy.CalibratedTOFRietveldRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CalibratedXrayFullProfRefineStrategy srrietveld.refinestrategy.CalibratedXrayFullProfRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibratedXrayFullProfRefineStrategy.__init__ srrietveld.refinestrategy.CalibratedXrayFullProfRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy.__init__ srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy.__init__ srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CalibrationTOFFullProfRefineStrategy srrietveld.refinestrategy.CalibrationTOFFullProfRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibrationTOFFullProfRefineStrategy.__init__ srrietveld.refinestrategy.CalibrationTOFFullProfRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CalibrationTOFGSASRefineStrategy srrietveld.refinestrategy.CalibrationTOFGSASRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibrationTOFGSASRefineStrategy.__init__ srrietveld.refinestrategy.CalibrationTOFGSASRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy.__init__ srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CalibrationXrayFullProfRefineStrategy srrietveld.refinestrategy.CalibrationXrayFullProfRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibrationXrayFullProfRefineStrategy.__init__ srrietveld.refinestrategy.CalibrationXrayFullProfRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CalibrationXrayGSASRefineStrategy srrietveld.refinestrategy.CalibrationXrayGSASRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibrationXrayGSASRefineStrategy.__init__ srrietveld.refinestrategy.CalibrationXrayGSASRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy.__init__ srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.CloseRietveldRefineStrategy srrietveld.refinestrategy.CloseRietveldRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.CloseRietveldRefineStrategy._setUpGuideDict srrietveld.refinestrategy.CloseRietveldRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.CloseRietveldRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.CloseRietveldRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.CloseRietveldRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.CloseRietveldRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.CloseRietveldRefineStrategy.__init__ srrietveld.refinestrategy.CloseRietveldRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.RefineStrategy srrietveld.refinestrategy.RefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.RefineStrategy._setUpGuideDict srrietveld.refinestrategy.RefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.RefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.RefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.RefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.RefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.RefineStrategy.__init__ srrietveld.refinestrategy.RefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.SctrachLebailRefineStrategy srrietveld.refinestrategy.SctrachLebailRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.SctrachLebailRefineStrategy._setUpGuideDict srrietveld.refinestrategy.SctrachLebailRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.RefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.SctrachLebailRefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.SctrachLebailRefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.SctrachLebailRefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.SctrachLebailRefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.SctrachLebailRefineStrategy.__init__ srrietveld.refinestrategy.SctrachLebailRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.refinestrategy.UserDefinedRefineStrategy srrietveld.refinestrategy.UserDefinedRefineStrategy-class.html -srrietveld.refinestrategy.RefineStrategy.setReplaceBackground srrietveld.refinestrategy.RefineStrategy-class.html#setReplaceBackground -srrietveld.refinestrategy.UserDefinedRefineStrategy._setUpGuideDict srrietveld.refinestrategy.UserDefinedRefineStrategy-class.html#_setUpGuideDict -srrietveld.refinestrategy.UserDefinedRefineStrategy.mapNameRefineGuide srrietveld.refinestrategy.UserDefinedRefineStrategy-class.html#mapNameRefineGuide -srrietveld.refinestrategy.UserDefinedRefineStrategy.getRefineTypeOfStep srrietveld.refinestrategy.UserDefinedRefineStrategy-class.html#getRefineTypeOfStep -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesRemovedOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesRemovedOfStep -srrietveld.refinestrategy.RefineStrategy.StepFisrtRietveld srrietveld.refinestrategy.RefineStrategy-class.html#StepFisrtRietveld -srrietveld.refinestrategy.RefineStrategy.__str__ srrietveld.refinestrategy.RefineStrategy-class.html#__str__ -srrietveld.refinestrategy.RefineStrategy.getRefineGuidesOfStep srrietveld.refinestrategy.RefineStrategy-class.html#getRefineGuidesOfStep -srrietveld.refinestrategy.RefineStrategy.removeGuideAtStep srrietveld.refinestrategy.RefineStrategy-class.html#removeGuideAtStep -srrietveld.refinestrategy.RefineStrategy.MaxNumRefineGuidesStep srrietveld.refinestrategy.RefineStrategy-class.html#MaxNumRefineGuidesStep -srrietveld.refinestrategy.RefineStrategy.getNumRefineGuideSteps srrietveld.refinestrategy.RefineStrategy-class.html#getNumRefineGuideSteps -srrietveld.refinestrategy.UserDefinedRefineStrategy.__init__ srrietveld.refinestrategy.UserDefinedRefineStrategy-class.html#__init__ -srrietveld.refinestrategy.RefineStrategy.offRefinementProcess srrietveld.refinestrategy.RefineStrategy-class.html#offRefinementProcess -srrietveld.sequentialrefinecontrol.SeqRefineController srrietveld.sequentialrefinecontrol.SeqRefineController-class.html -srrietveld.sequentialrefinecontrol.SeqRefineController.reset srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#reset -srrietveld.sequentialrefinecontrol.SeqRefineController.getEnvironParameterValues srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#getEnvironParameterValues -srrietveld.sequentialrefinecontrol.SeqRefineController.getEnvironParameterName srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#getEnvironParameterName -srrietveld.sequentialrefinecontrol.SeqRefineController.getInfoTupleFromParValue srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#getInfoTupleFromParValue -srrietveld.sequentialrefinecontrol.SeqRefineController.resetStructureModel srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#resetStructureModel -srrietveld.sequentialrefinecontrol.SeqRefineController.resetInstrument srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#resetInstrument -srrietveld.sequentialrefinecontrol.SeqRefineController.__str__ srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#__str__ -srrietveld.sequentialrefinecontrol.SeqRefineController.getFit srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#getFit -srrietveld.sequentialrefinecontrol.SeqRefineController.setRefineRange srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#setRefineRange -srrietveld.sequentialrefinecontrol.SeqRefineController.getParameter srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#getParameter -srrietveld.sequentialrefinecontrol.SeqRefineController.update srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#update -srrietveld.sequentialrefinecontrol.SeqRefineController.genStartFit srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#genStartFit -srrietveld.sequentialrefinecontrol.SeqRefineController.setBackground srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#setBackground -srrietveld.sequentialrefinecontrol.SeqRefineController.setExcludedRegion srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#setExcludedRegion -srrietveld.sequentialrefinecontrol.SeqRefineController.refine srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#refine -srrietveld.sequentialrefinecontrol.SeqRefineController.setRefineControl srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#setRefineControl -srrietveld.sequentialrefinecontrol.SeqRefineController.setBankToRefine srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#setBankToRefine -srrietveld.sequentialrefinecontrol.SeqRefineController.setRefineStrategy srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#setRefineStrategy -srrietveld.sequentialrefinecontrol.SeqRefineController.save srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#save -srrietveld.sequentialrefinecontrol.SeqRefineController.__init__ srrietveld.sequentialrefinecontrol.SeqRefineController-class.html#__init__ -srrietveld.utilbackground.BackgroundProcess srrietveld.utilbackground.BackgroundProcess-class.html -srrietveld.utilbackground.BackgroundProcess.__init__ srrietveld.utilbackground.BackgroundProcess-class.html#__init__ -srrietveld.utilbackground.XrayBackgroundProcess srrietveld.utilbackground.XrayBackgroundProcess-class.html -srrietveld.utilbackground.XrayBackgroundProcess.__init__ srrietveld.utilbackground.XrayBackgroundProcess-class.html#__init__ -srrietveld.utilbackground.XrayBackgroundProcess.selectBackgroundPoints srrietveld.utilbackground.XrayBackgroundProcess-class.html#selectBackgroundPoints -srrietveld.viserrors.VisualizationError srrietveld.viserrors.VisualizationError-class.html -srrietveld.viserrors.VisualizationError.__init__ srrietveld.viserrors.VisualizationError-class.html#__init__ -srrietveld.xmlconvertor.cifToxml srrietveld.xmlconvertor.cifToxml-class.html -srrietveld.xmlconvertor.cifToxml.__init__ srrietveld.xmlconvertor.cifToxml-class.html#__init__ -srrietveld.xmlconvertor.cifToxml.generateXML srrietveld.xmlconvertor.cifToxml-class.html#generateXML -srrietveld.xmlgenerator.ExcludedRegionXMLGenerator srrietveld.xmlgenerator.ExcludedRegionXMLGenerator-class.html -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.ExcludedRegionXMLGenerator.__init__ srrietveld.xmlgenerator.ExcludedRegionXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.ExcludedRegionXMLGenerator.generateXML srrietveld.xmlgenerator.ExcludedRegionXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.GEMMeasurementXMLGenerator srrietveld.xmlgenerator.GEMMeasurementXMLGenerator-class.html -srrietveld.xmlgenerator.GEMMeasurementXMLGenerator._parseDataFile srrietveld.xmlgenerator.GEMMeasurementXMLGenerator-class.html#_parseDataFile -srrietveld.xmlgenerator.TOFMeasurementXMLGenerator.addExcludedRegion srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html#addExcludedRegion -srrietveld.xmlgenerator.TOFMeasurementXMLGenerator.generateXML srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.TOFMeasurementXMLGenerator.setBank srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html#setBank -srrietveld.xmlgenerator.GEMMeasurementXMLGenerator.__init__ srrietveld.xmlgenerator.GEMMeasurementXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.InstrumentXMLGenerator srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html -srrietveld.xmlgenerator.InstrumentXMLGenerator.genDataProperty srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html#genDataProperty -srrietveld.xmlgenerator.InstrumentXMLGenerator.generateXML srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.InstrumentXMLGenerator.genExcludedRegion srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html#genExcludedRegion -srrietveld.xmlgenerator.InstrumentXMLGenerator.__init__ srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.MeasurementXMLGenerator srrietveld.xmlgenerator.MeasurementXMLGenerator-class.html -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.MeasurementXMLGenerator.__init__ srrietveld.xmlgenerator.MeasurementXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.MeasurementXMLGenerator.generateXML srrietveld.xmlgenerator.MeasurementXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.ModelXMLGenerator srrietveld.xmlgenerator.ModelXMLGenerator-class.html -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.ModelXMLGenerator.__init__ srrietveld.xmlgenerator.ModelXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.ModelXMLGenerator.generateXML srrietveld.xmlgenerator.ModelXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator-class.html -srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator._parseDataFile srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator-class.html#_parseDataFile -srrietveld.xmlgenerator.TOFMeasurementXMLGenerator.addExcludedRegion srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html#addExcludedRegion -srrietveld.xmlgenerator.TOFMeasurementXMLGenerator.generateXML srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator.setBank srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator-class.html#setBank -srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator.__init__ srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator-class.html -srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator._parseDataFile srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator-class.html#_parseDataFile -srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator.setInstrumentInformation srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator-class.html#setInstrumentInformation -srrietveld.xmlgenerator.MeasurementXMLGenerator.generateXML srrietveld.xmlgenerator.MeasurementXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator.setBackground srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator-class.html#setBackground -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator.__init__ srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator-class.html -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator.setBank srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator-class.html#setBank -srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator.__init__ srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator.generateXML srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.RAPDFMeasurementXMLGenerator srrietveld.xmlgenerator.RAPDFMeasurementXMLGenerator-class.html -srrietveld.xmlgenerator.RAPDFMeasurementXMLGenerator._parseDataFile srrietveld.xmlgenerator.RAPDFMeasurementXMLGenerator-class.html#_parseDataFile -srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator.setInstrumentInformation srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator-class.html#setInstrumentInformation -srrietveld.xmlgenerator.MeasurementXMLGenerator.generateXML srrietveld.xmlgenerator.MeasurementXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator.setBackground srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator-class.html#setBackground -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator.__init__ srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.RefineStrategyXMLGenerator srrietveld.xmlgenerator.RefineStrategyXMLGenerator-class.html -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.RefineStrategyXMLGenerator.__init__ srrietveld.xmlgenerator.RefineStrategyXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.RefineStrategyXMLGenerator.generateXML srrietveld.xmlgenerator.RefineStrategyXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.SeqFitRecordXMLGenerator srrietveld.xmlgenerator.SeqFitRecordXMLGenerator-class.html -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.SeqFitRecordXMLGenerator.__init__ srrietveld.xmlgenerator.SeqFitRecordXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.SeqFitRecordXMLGenerator.generateXML srrietveld.xmlgenerator.SeqFitRecordXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.TOFMeasurementXMLGenerator srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html -srrietveld.xmlgenerator.TOFMeasurementXMLGenerator.addExcludedRegion srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html#addExcludedRegion -srrietveld.xmlgenerator.TOFMeasurementXMLGenerator.generateXML srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.TOFMeasurementXMLGenerator.setBank srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html#setBank -srrietveld.xmlgenerator.TOFMeasurementXMLGenerator.__init__ srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.TOFXMLGenerator srrietveld.xmlgenerator.TOFXMLGenerator-class.html -srrietveld.xmlgenerator.InstrumentXMLGenerator.genDataProperty srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html#genDataProperty -srrietveld.xmlgenerator.TOFXMLGenerator.generateXML srrietveld.xmlgenerator.TOFXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.InstrumentXMLGenerator.genExcludedRegion srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html#genExcludedRegion -srrietveld.xmlgenerator.TOFXMLGenerator.__init__ srrietveld.xmlgenerator.TOFXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.ThermalNeutronTOFXMLGenerator srrietveld.xmlgenerator.ThermalNeutronTOFXMLGenerator-class.html -srrietveld.xmlgenerator.InstrumentXMLGenerator.genDataProperty srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html#genDataProperty -srrietveld.xmlgenerator.ThermalNeutronTOFXMLGenerator.generateXML srrietveld.xmlgenerator.ThermalNeutronTOFXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.InstrumentXMLGenerator.genExcludedRegion srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html#genExcludedRegion -srrietveld.xmlgenerator.ThermalNeutronTOFXMLGenerator.__init__ srrietveld.xmlgenerator.ThermalNeutronTOFXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.XMLGenerator srrietveld.xmlgenerator.XMLGenerator-class.html -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.XMLGenerator.__init__ srrietveld.xmlgenerator.XMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.XMLGenerator.generateXML srrietveld.xmlgenerator.XMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator-class.html -srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator._parseDataFile srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator-class.html#_parseDataFile -srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator.setInstrumentInformation srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator-class.html#setInstrumentInformation -srrietveld.xmlgenerator.MeasurementXMLGenerator.generateXML srrietveld.xmlgenerator.MeasurementXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator.setBackground srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator-class.html#setBackground -srrietveld.xmlgenerator.XMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator.__init__ srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator-class.html#__init__ -srrietveld.xmlgenerator.XrayInstrumentXMLGenerator srrietveld.xmlgenerator.XrayInstrumentXMLGenerator-class.html -srrietveld.xmlgenerator.InstrumentXMLGenerator.genDataProperty srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html#genDataProperty -srrietveld.xmlgenerator.XrayInstrumentXMLGenerator.generateXML srrietveld.xmlgenerator.XrayInstrumentXMLGenerator-class.html#generateXML -srrietveld.xmlgenerator.XMLGenerator.exportXML srrietveld.xmlgenerator.XMLGenerator-class.html#exportXML -srrietveld.xmlgenerator.XrayInstrumentXMLGenerator.setNodeFromDict srrietveld.xmlgenerator.XrayInstrumentXMLGenerator-class.html#setNodeFromDict -srrietveld.xmlgenerator.XrayInstrumentXMLGenerator.XMLInstrumentMapDict srrietveld.xmlgenerator.XrayInstrumentXMLGenerator-class.html#XMLInstrumentMapDict -srrietveld.xmlgenerator.InstrumentXMLGenerator.genExcludedRegion srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html#genExcludedRegion -srrietveld.xmlgenerator.XrayInstrumentXMLGenerator.__init__ srrietveld.xmlgenerator.XrayInstrumentXMLGenerator-class.html#__init__ -srrietveld.xmlinterface.InstrumentXMLParser srrietveld.xmlinterface.InstrumentXMLParser-class.html -srrietveld.xmlinterface.InstrumentXMLParser.parseXMLInstrument srrietveld.xmlinterface.InstrumentXMLParser-class.html#parseXMLInstrument -srrietveld.xmlinterface.InstrumentXMLParser.parsePeakProfile srrietveld.xmlinterface.InstrumentXMLParser-class.html#parsePeakProfile -srrietveld.xmlinterface.InstrumentXMLParser.parsePattern srrietveld.xmlinterface.InstrumentXMLParser-class.html#parsePattern -srrietveld.xmlinterface.InstrumentXMLParser.parseInstrumentNode srrietveld.xmlinterface.InstrumentXMLParser-class.html#parseInstrumentNode -srrietveld.xmlinterface.InstrumentXMLParser.getInstrument srrietveld.xmlinterface.InstrumentXMLParser-class.html#getInstrument -srrietveld.xmlinterface.InstrumentXMLParser.__init__ srrietveld.xmlinterface.InstrumentXMLParser-class.html#__init__ -srrietveld.xmlinterface.MeasurementXMLParser srrietveld.xmlinterface.MeasurementXMLParser-class.html -srrietveld.xmlinterface.MeasurementXMLParser.parseMeasurementNode srrietveld.xmlinterface.MeasurementXMLParser-class.html#parseMeasurementNode -srrietveld.xmlinterface.MeasurementXMLParser.parseXMLMeasurement srrietveld.xmlinterface.MeasurementXMLParser-class.html#parseXMLMeasurement -srrietveld.xmlinterface.MeasurementXMLParser.getMeasurements srrietveld.xmlinterface.MeasurementXMLParser-class.html#getMeasurements -srrietveld.xmlinterface.MeasurementXMLParser.__init__ srrietveld.xmlinterface.MeasurementXMLParser-class.html#__init__ -srrietveld.xmlinterface.RefineStrategyXMLParser srrietveld.xmlinterface.RefineStrategyXMLParser-class.html -srrietveld.xmlinterface.RefineStrategyXMLParser.parseXML srrietveld.xmlinterface.RefineStrategyXMLParser-class.html#parseXML -srrietveld.xmlinterface.RefineStrategyXMLParser.__init__ srrietveld.xmlinterface.RefineStrategyXMLParser-class.html#__init__ -srrietveld.xmlinterface.RefineStrategyXMLParser.exportStdDictionary srrietveld.xmlinterface.RefineStrategyXMLParser-class.html#exportStdDictionary -srrietveld.xmlinterface.StructureXMLParser srrietveld.xmlinterface.StructureXMLParser-class.html -srrietveld.xmlinterface.StructureXMLParser.getStructure srrietveld.xmlinterface.StructureXMLParser-class.html#getStructure -srrietveld.xmlinterface.StructureXMLParser.parsePhaseNode srrietveld.xmlinterface.StructureXMLParser-class.html#parsePhaseNode -srrietveld.xmlinterface.StructureXMLParser.parseXMLModel srrietveld.xmlinterface.StructureXMLParser-class.html#parseXMLModel -srrietveld.xmlinterface.StructureXMLParser.__init__ srrietveld.xmlinterface.StructureXMLParser-class.html#__init__ diff --git a/static_root/doc/srrietveld/developers/class-tree.html b/static_root/doc/srrietveld/developers/class-tree.html deleted file mode 100644 index 09e053a1..00000000 --- a/static_root/doc/srrietveld/developers/class-tree.html +++ /dev/null @@ -1,585 +0,0 @@ - - - - - Class Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - - - - -
      [hide private]
      [frames] | no frames]
      -
      -
      - [ Module Hierarchy - | Class Hierarchy ] -

      -

      Class Hierarchy

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/crarr.png b/static_root/doc/srrietveld/developers/crarr.png deleted file mode 100644 index 26b43c52..00000000 Binary files a/static_root/doc/srrietveld/developers/crarr.png and /dev/null differ diff --git a/static_root/doc/srrietveld/developers/epydoc.css b/static_root/doc/srrietveld/developers/epydoc.css deleted file mode 100644 index 01250e69..00000000 --- a/static_root/doc/srrietveld/developers/epydoc.css +++ /dev/null @@ -1,312 +0,0 @@ - - -/* Epydoc CSS Stylesheet - * - * This stylesheet can be used to customize the appearance of epydoc's - * HTML output. - * - */ - -/* Default Colors & Styles - * - Set the default foreground & background color with 'body'; and - * link colors with 'a:link' and 'a:visited'. - * - Use bold for decision list terms. - * - The heading styles defined here are used for headings *within* - * docstring descriptions. All headings used by epydoc itself use - * either class='epydoc' or class='toc' (CSS styles for both - * defined below). - */ -body { background: #ffffff; color: #000000; } -a:link { color: #0000ff; } -a:visited { color: #204080; } -dt { font-weight: bold; } -h1 { font-size: +140%; font-style: italic; - font-weight: bold; } -h2 { font-size: +125%; font-style: italic; - font-weight: bold; } -h3 { font-size: +110%; font-style: italic; - font-weight: normal; } -code { font-size: 100%; } - -/* Page Header & Footer - * - The standard page header consists of a navigation bar (with - * pointers to standard pages such as 'home' and 'trees'); a - * breadcrumbs list, which can be used to navigate to containing - * classes or modules; options links, to show/hide private - * variables and to show/hide frames; and a page title (using - *

      ). The page title may be followed by a link to the - * corresponding source code (using 'span.codelink'). - * - The footer consists of a navigation bar, a timestamp, and a - * pointer to epydoc's homepage. - */ -h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } -h2.epydoc { font-size: +130%; font-weight: bold; } -h3.epydoc { font-size: +115%; font-weight: bold; } -td h3.epydoc { font-size: +115%; font-weight: bold; - margin-bottom: 0; } -table.navbar { background: #a0c0ff; color: #000000; - border: 2px groove #c0d0d0; } -table.navbar table { color: #000000; } -th.navbar-select { background: #70b0ff; - color: #000000; } -table.navbar a { text-decoration: none; } -table.navbar a:link { color: #0000ff; } -table.navbar a:visited { color: #204080; } -span.breadcrumbs { font-size: 85%; font-weight: bold; } -span.options { font-size: 70%; } -span.codelink { font-size: 85%; } -td.footer { font-size: 85%; } - -/* Table Headers - * - Each summary table and details section begins with a 'header' - * row. This row contains a section title (marked by - * 'span.table-header') as well as a show/hide private link - * (marked by 'span.options', defined above). - * - Summary tables that contain user-defined groups mark those - * groups using 'group header' rows. - */ -td.table-header { background: #70b0ff; color: #000000; - border: 1px solid #608090; } -td.table-header table { color: #000000; } -td.table-header table a:link { color: #0000ff; } -td.table-header table a:visited { color: #204080; } -span.table-header { font-size: 120%; font-weight: bold; } -th.group-header { background: #c0e0f8; color: #000000; - text-align: left; font-style: italic; - font-size: 115%; - border: 1px solid #608090; } - -/* Summary Tables (functions, variables, etc) - * - Each object is described by a single row of the table with - * two cells. The left cell gives the object's type, and is - * marked with 'code.summary-type'. The right cell gives the - * object's name and a summary description. - * - CSS styles for the table's header and group headers are - * defined above, under 'Table Headers' - */ -table.summary { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin-bottom: 0.5em; } -td.summary { border: 1px solid #608090; } -code.summary-type { font-size: 85%; } -table.summary a:link { color: #0000ff; } -table.summary a:visited { color: #204080; } - - -/* Details Tables (functions, variables, etc) - * - Each object is described in its own div. - * - A single-row summary table w/ table-header is used as - * a header for each details section (CSS style for table-header - * is defined above, under 'Table Headers'). - */ -table.details { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin: .2em 0 0 0; } -table.details table { color: #000000; } -table.details a:link { color: #0000ff; } -table.details a:visited { color: #204080; } - -/* Fields */ -dl.fields { margin-left: 2em; margin-top: 1em; - margin-bottom: 1em; } -dl.fields dd ul { margin-left: 0em; padding-left: 0em; } -div.fields { margin-left: 2em; } -div.fields p { margin-bottom: 0.5em; } - -/* Index tables (identifier index, term index, etc) - * - link-index is used for indices containing lists of links - * (namely, the identifier index & term index). - * - index-where is used in link indices for the text indicating - * the container/source for each link. - * - metadata-index is used for indices containing metadata - * extracted from fields (namely, the bug index & todo index). - */ -table.link-index { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; } -td.link-index { border-width: 0px; } -table.link-index a:link { color: #0000ff; } -table.link-index a:visited { color: #204080; } -span.index-where { font-size: 70%; } -table.metadata-index { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin: .2em 0 0 0; } -td.metadata-index { border-width: 1px; border-style: solid; } -table.metadata-index a:link { color: #0000ff; } -table.metadata-index a:visited { color: #204080; } - -/* Function signatures - * - sig* is used for the signature in the details section. - * - .summary-sig* is used for the signature in the summary - * table, and when listing property accessor functions. - * */ -.sig-name { color: #006080; } -.sig-arg { color: #008060; } -.sig-default { color: #602000; } -.summary-sig { font-family: monospace; } -.summary-sig-name { color: #006080; font-weight: bold; } -table.summary a.summary-sig-name:link - { color: #006080; font-weight: bold; } -table.summary a.summary-sig-name:visited - { color: #006080; font-weight: bold; } -.summary-sig-arg { color: #006040; } -.summary-sig-default { color: #501800; } - -/* To render variables, classes etc. like functions */ -table.summary .summary-name { color: #006080; font-weight: bold; - font-family: monospace; } -table.summary - a.summary-name:link { color: #006080; font-weight: bold; - font-family: monospace; } -table.summary - a.summary-name:visited { color: #006080; font-weight: bold; - font-family: monospace; } - -/* Variable values - * - In the 'variable details' sections, each varaible's value is - * listed in a 'pre.variable' box. The width of this box is - * restricted to 80 chars; if the value's repr is longer than - * this it will be wrapped, using a backslash marked with - * class 'variable-linewrap'. If the value's repr is longer - * than 3 lines, the rest will be ellided; and an ellipsis - * marker ('...' marked with 'variable-ellipsis') will be used. - * - If the value is a string, its quote marks will be marked - * with 'variable-quote'. - * - If the variable is a regexp, it is syntax-highlighted using - * the re* CSS classes. - */ -pre.variable { padding: .5em; margin: 0; - background: #dce4ec; color: #000000; - border: 1px solid #708890; } -.variable-linewrap { color: #604000; font-weight: bold; } -.variable-ellipsis { color: #604000; font-weight: bold; } -.variable-quote { color: #604000; font-weight: bold; } -.variable-group { color: #008000; font-weight: bold; } -.variable-op { color: #604000; font-weight: bold; } -.variable-string { color: #006030; } -.variable-unknown { color: #a00000; font-weight: bold; } -.re { color: #000000; } -.re-char { color: #006030; } -.re-op { color: #600000; } -.re-group { color: #003060; } -.re-ref { color: #404040; } - -/* Base tree - * - Used by class pages to display the base class hierarchy. - */ -pre.base-tree { font-size: 80%; margin: 0; } - -/* Frames-based table of contents headers - * - Consists of two frames: one for selecting modules; and - * the other listing the contents of the selected module. - * - h1.toc is used for each frame's heading - * - h2.toc is used for subheadings within each frame. - */ -h1.toc { text-align: center; font-size: 105%; - margin: 0; font-weight: bold; - padding: 0; } -h2.toc { font-size: 100%; font-weight: bold; - margin: 0.5em 0 0 -0.3em; } - -/* Syntax Highlighting for Source Code - * - doctest examples are displayed in a 'pre.py-doctest' block. - * If the example is in a details table entry, then it will use - * the colors specified by the 'table pre.py-doctest' line. - * - Source code listings are displayed in a 'pre.py-src' block. - * Each line is marked with 'span.py-line' (used to draw a line - * down the left margin, separating the code from the line - * numbers). Line numbers are displayed with 'span.py-lineno'. - * The expand/collapse block toggle button is displayed with - * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not - * modify the font size of the text.) - * - If a source code page is opened with an anchor, then the - * corresponding code block will be highlighted. The code - * block's header is highlighted with 'py-highlight-hdr'; and - * the code block's body is highlighted with 'py-highlight'. - * - The remaining py-* classes are used to perform syntax - * highlighting (py-string for string literals, py-name for names, - * etc.) - */ -pre.py-doctest { padding: .5em; margin: 1em; - background: #e8f0f8; color: #000000; - border: 1px solid #708890; } -table pre.py-doctest { background: #dce4ec; - color: #000000; } -pre.py-src { border: 2px solid #000000; - background: #f0f0f0; color: #000000; } -.py-line { border-left: 2px solid #000000; - margin-left: .2em; padding-left: .4em; } -.py-lineno { font-style: italic; font-size: 90%; - padding-left: .5em; } -a.py-toggle { text-decoration: none; } -div.py-highlight-hdr { border-top: 2px solid #000000; - border-bottom: 2px solid #000000; - background: #d8e8e8; } -div.py-highlight { border-bottom: 2px solid #000000; - background: #d0e0e0; } -.py-prompt { color: #005050; font-weight: bold;} -.py-more { color: #005050; font-weight: bold;} -.py-string { color: #006030; } -.py-comment { color: #003060; } -.py-keyword { color: #600000; } -.py-output { color: #404040; } -.py-name { color: #000050; } -.py-name:link { color: #000050 !important; } -.py-name:visited { color: #000050 !important; } -.py-number { color: #005000; } -.py-defname { color: #000060; font-weight: bold; } -.py-def-name { color: #000060; font-weight: bold; } -.py-base-class { color: #000060; } -.py-param { color: #000060; } -.py-docstring { color: #006030; } -.py-decorator { color: #804020; } -/* Use this if you don't want links to names underlined: */ -/*a.py-name { text-decoration: none; }*/ - -/* Graphs & Diagrams - * - These CSS styles are used for graphs & diagrams generated using - * Graphviz dot. 'img.graph-without-title' is used for bare - * diagrams (to remove the border created by making the image - * clickable). - */ -img.graph-without-title { border: none; } -img.graph-with-title { border: 1px solid #000000; } -span.graph-title { font-weight: bold; } -span.graph-caption { } - -/* General-purpose classes - * - 'p.indent-wrapped-lines' defines a paragraph whose first line - * is not indented, but whose subsequent lines are. - * - The 'nomargin-top' class is used to remove the top margin (e.g. - * from lists). The 'nomargin' class is used to remove both the - * top and bottom margin (but not the left or right margin -- - * for lists, that would cause the bullets to disappear.) - */ -p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em; - margin: 0; } -.nomargin-top { margin-top: 0; } -.nomargin { margin-top: 0; margin-bottom: 0; } - -/* HTML Log */ -div.log-block { padding: 0; margin: .5em 0 .5em 0; - background: #e8f0f8; color: #000000; - border: 1px solid #000000; } -div.log-error { padding: .1em .3em .1em .3em; margin: 4px; - background: #ffb0b0; color: #000000; - border: 1px solid #000000; } -div.log-warning { padding: .1em .3em .1em .3em; margin: 4px; - background: #ffffb0; color: #000000; - border: 1px solid #000000; } -div.log-info { padding: .1em .3em .1em .3em; margin: 4px; - background: #b0ffb0; color: #000000; - border: 1px solid #000000; } -h2.log-hdr { background: #70b0ff; color: #000000; - margin: 0; padding: 0em 0.5em 0em 0.5em; - border-bottom: 1px solid #000000; font-size: 110%; } -p.log { font-weight: bold; margin: .5em 0 .5em 0; } -tr.opt-changed { color: #000000; font-weight: bold; } -tr.opt-default { color: #606060; } -pre.log { margin: 0; padding: 0; padding-left: 1em; } diff --git a/static_root/doc/srrietveld/developers/epydoc.js b/static_root/doc/srrietveld/developers/epydoc.js deleted file mode 100644 index 08ffb9fb..00000000 --- a/static_root/doc/srrietveld/developers/epydoc.js +++ /dev/null @@ -1,280 +0,0 @@ -function toggle_private() { - // Search for any private/public links on this page. Store - // their old text in "cmd," so we will know what action to - // take; and change their text to the opposite action. - var cmd = "?"; - var elts = document.getElementsByTagName("a"); - for(var i=0; i...
      "; - elt.innerHTML = s; - } -} - -function toggle(id) { - elt = document.getElementById(id+"-toggle"); - if (elt.innerHTML == "-") - collapse(id); - else - expand(id); - return false; -} - -function highlight(id) { - var elt = document.getElementById(id+"-def"); - if (elt) elt.className = "py-highlight-hdr"; - var elt = document.getElementById(id+"-expanded"); - if (elt) elt.className = "py-highlight"; - var elt = document.getElementById(id+"-collapsed"); - if (elt) elt.className = "py-highlight"; -} - -function num_lines(s) { - var n = 1; - var pos = s.indexOf("\n"); - while ( pos > 0) { - n += 1; - pos = s.indexOf("\n", pos+1); - } - return n; -} - -// Collapse all blocks that mave more than `min_lines` lines. -function collapse_all(min_lines) { - var elts = document.getElementsByTagName("div"); - for (var i=0; i 0) - if (elt.id.substring(split, elt.id.length) == "-expanded") - if (num_lines(elt.innerHTML) > min_lines) - collapse(elt.id.substring(0, split)); - } -} - -function expandto(href) { - var start = href.indexOf("#")+1; - if (start != 0 && start != href.length) { - if (href.substring(start, href.length) != "-") { - collapse_all(4); - pos = href.indexOf(".", start); - while (pos != -1) { - var id = href.substring(start, pos); - expand(id); - pos = href.indexOf(".", pos+1); - } - var id = href.substring(start, href.length); - expand(id); - highlight(id); - } - } -} - -function kill_doclink(id) { - var parent = document.getElementById(id); - parent.removeChild(parent.childNodes.item(0)); -} -function auto_kill_doclink(ev) { - if (!ev) var ev = window.event; - if (!this.contains(ev.toElement)) { - var parent = document.getElementById(this.parentID); - parent.removeChild(parent.childNodes.item(0)); - } -} - -function doclink(id, name, targets_id) { - var elt = document.getElementById(id); - - // If we already opened the box, then destroy it. - // (This case should never occur, but leave it in just in case.) - if (elt.childNodes.length > 1) { - elt.removeChild(elt.childNodes.item(0)); - } - else { - // The outer box: relative + inline positioning. - var box1 = document.createElement("div"); - box1.style.position = "relative"; - box1.style.display = "inline"; - box1.style.top = 0; - box1.style.left = 0; - - // A shadow for fun - var shadow = document.createElement("div"); - shadow.style.position = "absolute"; - shadow.style.left = "-1.3em"; - shadow.style.top = "-1.3em"; - shadow.style.background = "#404040"; - - // The inner box: absolute positioning. - var box2 = document.createElement("div"); - box2.style.position = "relative"; - box2.style.border = "1px solid #a0a0a0"; - box2.style.left = "-.2em"; - box2.style.top = "-.2em"; - box2.style.background = "white"; - box2.style.padding = ".3em .4em .3em .4em"; - box2.style.fontStyle = "normal"; - box2.onmouseout=auto_kill_doclink; - box2.parentID = id; - - // Get the targets - var targets_elt = document.getElementById(targets_id); - var targets = targets_elt.getAttribute("targets"); - var links = ""; - target_list = targets.split(","); - for (var i=0; i" + - target[0] + ""; - } - - // Put it all together. - elt.insertBefore(box1, elt.childNodes.item(0)); - //box1.appendChild(box2); - box1.appendChild(shadow); - shadow.appendChild(box2); - box2.innerHTML = - "Which "+name+" do you want to see documentation for?" + - ""; - } - return false; -} - -function get_anchor() { - var href = location.href; - var start = href.indexOf("#")+1; - if ((start != 0) && (start != href.length)) - return href.substring(start, href.length); - } -function redirect_url(dottedName) { - // Scan through each element of the "pages" list, and check - // if "name" matches with any of them. - for (var i=0; i-m" or "-c"; - // extract the portion & compare it to dottedName. - var pagename = pages[i].substring(0, pages[i].length-2); - if (pagename == dottedName.substring(0,pagename.length)) { - - // We've found a page that matches `dottedName`; - // construct its URL, using leftover `dottedName` - // content to form an anchor. - var pagetype = pages[i].charAt(pages[i].length-1); - var url = pagename + ((pagetype=="m")?"-module.html": - "-class.html"); - if (dottedName.length > pagename.length) - url += "#" + dottedName.substring(pagename.length+1, - dottedName.length); - return url; - } - } - } diff --git a/static_root/doc/srrietveld/developers/frames.html b/static_root/doc/srrietveld/developers/frames.html deleted file mode 100644 index 0a3b35ff..00000000 --- a/static_root/doc/srrietveld/developers/frames.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - API Documentation - - - - - - - - - diff --git a/static_root/doc/srrietveld/developers/help.html b/static_root/doc/srrietveld/developers/help.html deleted file mode 100644 index da0eacb8..00000000 --- a/static_root/doc/srrietveld/developers/help.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - Help - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      API Documentation

      - -

      This document contains the API (Application Programming Interface) -documentation for this project. Documentation for the Python -objects defined by the project is divided into separate pages for each -package, module, and class. The API documentation also includes two -pages containing information about the project as a whole: a trees -page, and an index page.

      - -

      Object Documentation

      - -

      Each Package Documentation page contains:

      -
        -
      • A description of the package.
      • -
      • A list of the modules and sub-packages contained by the - package.
      • -
      • A summary of the classes defined by the package.
      • -
      • A summary of the functions defined by the package.
      • -
      • A summary of the variables defined by the package.
      • -
      • A detailed description of each function defined by the - package.
      • -
      • A detailed description of each variable defined by the - package.
      • -
      - -

      Each Module Documentation page contains:

      -
        -
      • A description of the module.
      • -
      • A summary of the classes defined by the module.
      • -
      • A summary of the functions defined by the module.
      • -
      • A summary of the variables defined by the module.
      • -
      • A detailed description of each function defined by the - module.
      • -
      • A detailed description of each variable defined by the - module.
      • -
      - -

      Each Class Documentation page contains:

      -
        -
      • A class inheritance diagram.
      • -
      • A list of known subclasses.
      • -
      • A description of the class.
      • -
      • A summary of the methods defined by the class.
      • -
      • A summary of the instance variables defined by the class.
      • -
      • A summary of the class (static) variables defined by the - class.
      • -
      • A detailed description of each method defined by the - class.
      • -
      • A detailed description of each instance variable defined by the - class.
      • -
      • A detailed description of each class (static) variable defined - by the class.
      • -
      - -

      Project Documentation

      - -

      The Trees page contains the module and class hierarchies:

      -
        -
      • The module hierarchy lists every package and module, with - modules grouped into packages. At the top level, and within each - package, modules and sub-packages are listed alphabetically.
      • -
      • The class hierarchy lists every class, grouped by base - class. If a class has more than one base class, then it will be - listed under each base class. At the top level, and under each base - class, classes are listed alphabetically.
      • -
      - -

      The Index page contains indices of terms and - identifiers:

      -
        -
      • The term index lists every term indexed by any object's - documentation. For each term, the index provides links to each - place where the term is indexed.
      • -
      • The identifier index lists the (short) name of every package, - module, class, method, function, variable, and parameter. For each - identifier, the index provides a short description, and a link to - its documentation.
      • -
      - -

      The Table of Contents

      - -

      The table of contents occupies the two frames on the left side of -the window. The upper-left frame displays the project -contents, and the lower-left frame displays the module -contents:

      - - - - - - - - - -
      - Project
      Contents
      ...
      - API
      Documentation
      Frame


      -
      - Module
      Contents
       
      ...
        -

      - -

      The project contents frame contains a list of all packages -and modules that are defined by the project. Clicking on an entry -will display its contents in the module contents frame. Clicking on a -special entry, labeled "Everything," will display the contents of -the entire project.

      - -

      The module contents frame contains a list of every -submodule, class, type, exception, function, and variable defined by a -module or package. Clicking on an entry will display its -documentation in the API documentation frame. Clicking on the name of -the module, at the top of the frame, will display the documentation -for the module itself.

      - -

      The "frames" and "no frames" buttons below the top -navigation bar can be used to control whether the table of contents is -displayed or not.

      - -

      The Navigation Bar

      - -

      A navigation bar is located at the top and bottom of every page. -It indicates what type of page you are currently viewing, and allows -you to go to related pages. The following table describes the labels -on the navigation bar. Note that not some labels (such as -[Parent]) are not displayed on all pages.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      LabelHighlighted when...Links to...
      [Parent](never highlighted) the parent of the current package
      [Package]viewing a packagethe package containing the current object -
      [Module]viewing a modulethe module containing the current object -
      [Class]viewing a class the class containing the current object
      [Trees]viewing the trees page the trees page
      [Index]viewing the index page the index page
      [Help]viewing the help page the help page
      - -

      The "show private" and "hide private" buttons below -the top navigation bar can be used to control whether documentation -for private objects is displayed. Private objects are usually defined -as objects whose (short) names begin with a single underscore, but do -not end with an underscore. For example, "_x", -"__pprint", and "epydoc.epytext._tokenize" -are private objects; but "re.sub", -"__init__", and "type_" are not. However, -if a module defines the "__all__" variable, then its -contents are used to decide which objects are private.

      - -

      A timestamp below the bottom navigation bar indicates when each -page was last updated.

      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/identifier-index.html b/static_root/doc/srrietveld/developers/identifier-index.html deleted file mode 100644 index b49143a5..00000000 --- a/static_root/doc/srrietveld/developers/identifier-index.html +++ /dev/null @@ -1,2531 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -
      -

      Identifier Index

      -
      -[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      A

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      B

      - - - - - - - - -

      C

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      D

      - - - - - - - - - - - - - - - - - -

      E

      - - - - - - - - - - - - - - - - - - - - - - -

      F

      - - - - - - - - - - - - - - - - - -

      G

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      H

      - - - - - - - - -

      I

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      L

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      M

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      N

      - - - - - - - - - - - - - - - - - -

      O

      - - - - - - - - - - - - -

      P

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      Q

      - - - - - - - - -

      R

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      S

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      T

      - - - - - - - - - - - - - - - - - - - - - - -

      U

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      V

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      W

      - - - - - - - - - - - - - - - - - - - - - - -

      X

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      Z

      - - - - - - - - - - - - -

      _

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -

      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/index.html b/static_root/doc/srrietveld/developers/index.html deleted file mode 100644 index 0a3b35ff..00000000 --- a/static_root/doc/srrietveld/developers/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - API Documentation - - - - - - - - - diff --git a/static_root/doc/srrietveld/developers/module-tree.html b/static_root/doc/srrietveld/developers/module-tree.html deleted file mode 100644 index d8458be3..00000000 --- a/static_root/doc/srrietveld/developers/module-tree.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - Module Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - - - - -
      [hide private]
      [frames] | no frames]
      -
      -
      - [ Module Hierarchy - | Class Hierarchy ] -

      -

      Module Hierarchy

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/redirect.html b/static_root/doc/srrietveld/developers/redirect.html deleted file mode 100644 index e75bca94..00000000 --- a/static_root/doc/srrietveld/developers/redirect.html +++ /dev/null @@ -1,38 +0,0 @@ -Epydoc Redirect Page - - - - - - - - -

      Epydoc Auto-redirect page

      - -

      When javascript is enabled, this page will redirect URLs of -the form redirect.html#dotted.name to the -documentation for the object with the given fully-qualified -dotted name.

      -

       

      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld-module.html b/static_root/doc/srrietveld/developers/srrietveld-module.html deleted file mode 100644 index 4d9d8c31..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld-module.html +++ /dev/null @@ -1,381 +0,0 @@ - - - - - srrietveld - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Package srrietveld

      source code

      -

      The package contains classes and methods for Rietveld fitting.

      - If the you have any suggestions about this package, please email us at - diffpy-dev@googlegroups.com

      - - - - - - - - -
      - - - - - -
      Submodules[hide private]
      -
      -
      - -
      - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      setBackend(namespace, - package="SrRietUI.diffpy.rietveldapi")
      - Set the engine.
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: __init__.py 2792 2009-03-02 15:56:43Z wdzhou $' -
      -   - - myEngine = <srrietveld.refinebackend.RietveldEngine instance a... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      setBackend(namespace, - package="SrRietUI.diffpy.rietveldapi") -

      -
      source code  -
      - -
      -Set the engine.
      -
      -namespace   --  namespace dictionary of the controller. usually globals()
      -package     --  The name of the package containing the diffpy.rietveldapi
      -                implementation (default "SrRietUI.diffpy.rietveldapi").
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      myEngine

      - -
      -
      -
      -
      Value:
      -
      -SRBE.RietveldEngine()
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld-pysrc.html deleted file mode 100644 index fcd153d2..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld-pysrc.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - srrietveld - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Package srrietveld

      -
      - 1  #!/usr/bin/env python 
      - 2   
      - 3  ############################################################################## 
      - 4  # 
      - 5  # diffpy.__init__   by DANSE Diffraction group 
      - 6  #                   Simon J. L. Billinge 
      - 7  #                   (c) 2008 Trustees of the Columbia University 
      - 8  #                   in the City of New York.  All rights reserved. 
      - 9  # 
      -10  # File coded by:    Wenduo Zhou 
      -11  # 
      -12  # See AUTHORS.txt for a list of people who contributed. 
      -13  # See LICENSE.txt for license information. 
      -14  # 
      -15  ############################################################################## 
      -16   
      -17  """The package contains classes and methods for Rietveld fitting. 
      -18   
      -19  If the you have any suggestions about this package, please email us at 
      -20  diffpy-dev@googlegroups.com 
      -21  """ 
      -22   
      -23  __id__ = "$Id: __init__.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      -24   
      -25  import refinebackend as SRBE 
      -26   
      -27  myEngine = SRBE.RietveldEngine() 
      -28   
      -29  if 0: 
      -30      from plot2d import plotPattern, plotFit 
      -31      from viewer3d import plotPhase, set3DViewer 
      -32      from diffpy.pyfullprof import * 
      -33       
      -
      34 - def setBackend(namespace, package = "SrRietUI.diffpy.rietveldapi"): -
      35 """Set the engine. -36 -37 namespace -- namespace dictionary of the controller. usually globals() -38 package -- The name of the package containing the diffpy.rietveldapi -39 implementation (default "SrRietUI.diffpy.rietveldapi"). -40 """ -41 API = __import__(package, globals(), locals(), ["*"]) -42 # Check to see if SrRietveld is loaded. If not, then assume a globbed -43 # import (from SrRietveld import *). -44 if "diffpy.srrietveld" in namespace: -45 mdict = namespace["diffpy.srrietveld"].__dict__ -46 else: -47 mdict = namespace -48 mdict.update(API.__dict__) -49 return -
      50 -51 #setBackend(globals()) -52 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.atominfo-module.html b/static_root/doc/srrietveld/developers/srrietveld.atominfo-module.html deleted file mode 100644 index 10f1ab3c..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.atominfo-module.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - srrietveld.atominfo - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module atominfo - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module atominfo

      source code

      - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - AtomDicts
      - Class to hold some static dictionaries, including (1) - AtomNumberDict (2) AtomNameDict -
      - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      getAtomNumberByName(atomname)
      - get an atom's atom number according to its name - -Argument: - atomname : string, name of an atom - -Return : integer, this aotm's number - -Exception: -1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: atominfo.py 2792 2009-03-02 15:56:43Z wdzhou $' -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      getAtomNumberByName(atomname) -

      -
      source code  -
      - -
      -get an atom's atom number according to its name
      -
      -Argument:
      -  atomname  :   string, name of an atom
      -
      -Return      :   integer, this aotm's number
      -
      -Exception:  
      -1. atomname is not a valid atom's name
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.atominfo-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.atominfo-pysrc.html deleted file mode 100644 index 299b439a..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.atominfo-pysrc.html +++ /dev/null @@ -1,425 +0,0 @@ - - - - - srrietveld.atominfo - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module atominfo - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.atominfo

      -
      -  1  ################################################################################ 
      -  2  # 
      -  3  #   This is a module containing a lot of data base and methods related to atom 
      -  4  # 
      -  5  #   Created On: 2008.06.30 
      -  6  #           By: W. Zhou 
      -  7  # 
      -  8  ################################################################################ 
      -  9  __id__ = "$Id: atominfo.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      - 10   
      -
      11 -class AtomDicts: -
      12 """ Class to hold some static dictionaries, including - 13 (1) AtomNumberDict - 14 (2) AtomNameDict - 15 """ - 16 AtomNumberDict = { - 17 1 : ("H" , 1.00794 ), - 18 2 : ("He" , 4.0026 ), - 19 3 : ("Li" , 6.941 ), - 20 4 : ("Be" , 9.01218 ), - 21 5 : ("B" , 10.811 ), - 22 6 : ("C" , 12.011 ), - 23 7 : ("N" , 14.0067 ), - 24 8 : ("O" , 15.9994 ), - 25 9 : ("F" , 18.9984 ), - 26 10 : ("Ne" , 20.1797 ), - 27 11 : ("Na" , 22.98977 ), - 28 12 : ("Mg" , 24.305 ), - 29 13 : ("Al" , 26.98154 ), - 30 14 : ("Si" , 28.0855 ), - 31 15 : ("P" , 30.97376 ), - 32 16 : ("S" , 32.066 ), - 33 17 : ("Cl" , 35.4527 ), - 34 18 : ("Ar" , 39.948 ), - 35 19 : ("K" , 39.0983 ), - 36 20 : ("Ca" , 40.078 ), - 37 21 : ("Sc" , 44.9559 ), - 38 22 : ("Ti" , 47.88 ), - 39 23 : ("V" , 50.9415 ), - 40 24 : ("Cr" , 51.996 ), - 41 25 : ("Mn" , 54.938 ), - 42 26 : ("Fe" , 55.847 ), - 43 27 : ("Co" , 58.9332 ), - 44 28 : ("Ni" , 58.6934 ), - 45 29 : ("Cu" , 63.546 ), - 46 30 : ("Zn" , 65.39 ), - 47 31 : ("Ga" , 69.723 ), - 48 32 : ("Ge" , 72.61 ), - 49 33 : ("As" , 74.9216 ), - 50 34 : ("Se" , 78.96 ), - 51 35 : ("Br" , 79.904 ), - 52 36 : ("Kr" , 83.8 ), - 53 37 : ("Rb" , 85.4678 ), - 54 38 : ("Sr" , 87.62 ), - 55 39 : ("Y" , 88.9059 ), - 56 40 : ("Zr" , 91.224 ), - 57 41 : ("Nb" , 92.9064 ), - 58 42 : ("Mo" , 95.94 ), - 59 43 : ("Tc" , None ), - 60 44 : ("Ru" , 101.07 ), - 61 45 : ("Rh" , 102.9055 ), - 62 46 : ("Pd" , 106.42 ), - 63 47 : ("Ag" , 107.868 ), - 64 48 : ("Cd" , 112.41 ), - 65 49 : ("In" , 114.82 ), - 66 50 : ("Sn" , 118.71 ), - 67 51 : ("Sb" , 121.757 ), - 68 52 : ("Te" , 127.6 ), - 69 53 : ("I" , 126.9045 ), - 70 54 : ("Xe" , 131.29 ), - 71 55 : ("Cs" , 132.9054 ), - 72 56 : ("Ba" , 137.33 ), - 73 57 : ("La" , 138.9055 ), - 74 58 : ("Ce" , 140.12 ), - 75 59 : ("Pr" , 140.9077 ), - 76 60 : ("Nd" , 144.24 ), - 77 61 : ("Pm" , None ), - 78 62 : ("Sm" , 150.36 ), - 79 63 : ("Eu" , 151.965 ), - 80 64 : ("Gd" , 157.25 ), - 81 65 : ("Tb" , 158.9253 ), - 82 66 : ("Dy" , 162.5 ), - 83 67 : ("Ho" , 164.9303 ), - 84 68 : ("Er" , 167.26 ), - 85 69 : ("Tm" , 168.9342 ), - 86 70 : ("Yb" , 173.04 ), - 87 71 : ("Lu" , 174.967 ), - 88 72 : ("Hf" , 178.49 ), - 89 73 : ("Ta" , 180.9479 ), - 90 74 : ("W" , 183.85 ), - 91 75 : ("Re" , 186.207 ), - 92 76 : ("Os" , 190.2 ), - 93 77 : ("Ir" , 192.22 ), - 94 78 : ("Pt" , 195.08 ), - 95 79 : ("Au" , 196.9665 ), - 96 80 : ("Hg" , 200.59 ), - 97 81 : ("Tl" , 204.383 ), - 98 82 : ("Pb" , 207.2 ), - 99 83 : ("Bi" , 208.9804 ), -100 84 : ("Po" , None ), -101 85 : ("At" , None ), -102 86 : ("Rn" , None ), -103 87 : ("Fr" , None ), -104 88 : ("Ra" , 226.0254 ), -105 89 : ("Ac" , None ), -106 90 : ("Th" , 232.0381 ), -107 91 : ("Pa" , 231.0359 ), -108 92 : ("U" , 238.029 ), -109 93 : ("Np" , 237.0482 ), -110 94 : ("Pu" , None ), -111 95 : ("Am" , None ), -112 96 : ("Cm" , None ), -113 97 : ("Bk" , None ), -114 98 : ("Cf" , None ), -115 99 : ("Es" , None ), -116 100: ("Fm" , None ), -117 101: ("Md" , None ), -118 102: ("No" , None ), -119 103: ("Lw" , None ), -120 } -121 -122 AtomNameDict = { -123 "H" : 1 , -124 "He" : 2 , -125 "Li" : 3 , -126 "Be" : 4 , -127 "B" : 5 , -128 "C" : 6 , -129 "N" : 7 , -130 "O" : 8 , -131 "F" : 9 , -132 "Ne" : 10 , -133 "Na" : 11 , -134 "Mg" : 12 , -135 "Al" : 13 , -136 "Si" : 14 , -137 "P" : 15 , -138 "S" : 16 , -139 "Cl" : 17 , -140 "Ar" : 18 , -141 "K" : 19 , -142 "Ca" : 20 , -143 "Sc" : 21 , -144 "Ti" : 22 , -145 "V" : 23 , -146 "Cr" : 24 , -147 "Mn" : 25 , -148 "Fe" : 26 , -149 "Co" : 27 , -150 "Ni" : 28 , -151 "Cu" : 29 , -152 "Zn" : 30 , -153 "Ga" : 31 , -154 "Ge" : 32 , -155 "As" : 33 , -156 "Se" : 34 , -157 "Br" : 35 , -158 "Kr" : 36 , -159 "Rb" : 37 , -160 "Sr" : 38 , -161 "Y" : 39 , -162 "Zr" : 40 , -163 "Nb" : 41 , -164 "Mo" : 42 , -165 "Tc" : 43 , -166 "Ru" : 44 , -167 "Rh" : 45 , -168 "Pd" : 46 , -169 "Ag" : 47 , -170 "Cd" : 48 , -171 "In" : 49 , -172 "Sn" : 50 , -173 "Sb" : 51 , -174 "Te" : 52 , -175 "I" : 53 , -176 "Xe" : 54 , -177 "Cs" : 55 , -178 "Ba" : 56 , -179 "La" : 57 , -180 "Ce" : 58 , -181 "Pr" : 59 , -182 "Nd" : 60 , -183 "Pm" : 61 , -184 "Sm" : 62 , -185 "Eu" : 63 , -186 "Gd" : 64 , -187 "Tb" : 65 , -188 "Dy" : 66 , -189 "Ho" : 67 , -190 "Er" : 68 , -191 "Tm" : 69 , -192 "Yb" : 70 , -193 "Lu" : 71 , -194 "Hf" : 72 , -195 "Ta" : 73 , -196 "W" : 74 , -197 "Re" : 75 , -198 "Os" : 76 , -199 "Ir" : 77 , -200 "Pt" : 78 , -201 "Au" : 79 , -202 "Hg" : 80 , -203 "Tl" : 81 , -204 "Pb" : 82 , -205 "Bi" : 83 , -206 "Po" : 84 , -207 "At" : 85 , -208 "Rn" : 86 , -209 "Fr" : 87 , -210 "Ra" : 88 , -211 "Ac" : 89 , -212 "Th" : 90 , -213 "Pa" : 91 , -214 "U" : 92 , -215 "Np" : 93 , -216 "Pu" : 94 , -217 "Am" : 95 , -218 "Cm" : 96 , -219 "Bk" : 97 , -220 "Cf" : 98 , -221 "Es" : 99 , -222 "Fm" : 100, -223 "Md" : 101, -224 "No" : 102, -225 "Lw" : 103, -226 } -
      227 -228 # END CLASS --AtomDicts: -229 -230 # External Functions -
      231 -def getAtomNumberByName(atomname): -
      232 """ get an atom's atom number according to its name -233 -234 Argument: -235 atomname : string, name of an atom -236 -237 Return : integer, this aotm's number -238 -239 Exception: -240 1. atomname is not a valid atom's name -241 """ -242 if not isinstance(atomname, str): -243 errmsg = "Input atomname is not string, but %-20s"% (type(atomname)) -244 raise TypeError(errmsg) -245 -246 # 1. clean name -247 cleanname = atomname.strip() -248 if len(cleanname) == 1: -249 if not cleanname.isupper(): -250 cleanname = cleanname.upper() -251 elif len(cleanname) == 2: -252 s1 = cleanname[0] -253 s2 = cleanname[1] -254 recombine = False -255 if not s1.isupper(): -256 s1 = s1.upper() -257 recombine = True -258 if not s2.islower(): -259 s2 = s2.lower() -260 recombine = True -261 if recombine is True: -262 cleanname = s1+s2 -263 -264 # 2. find atom -265 try: -266 atomnumber = AtomDicts.AtomNameDict[cleanname] -267 return atomnumber -268 except KeyError, err: -269 errmsg = "Atom Name %-5s Is Not Recoganized"% (cleanname) -270 raise KeyError(errmsg) -271 -272 return -
      273 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.atominfo.AtomDicts-class.html b/static_root/doc/srrietveld/developers/srrietveld.atominfo.AtomDicts-class.html deleted file mode 100644 index 3c10e26b..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.atominfo.AtomDicts-class.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - srrietveld.atominfo.AtomDicts - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module atominfo :: - Class AtomDicts - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class AtomDicts

      source code

      -Class to hold some static dictionaries, including (1) AtomNumberDict - (2) AtomNameDict

      - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - AtomNumberDict = {1: ('H', 1.00794), 2: ('He', 4.0026), 3: ('L... -
      -   - - AtomNameDict = {'Ac': 89, 'Ag': 47, 'Al': 13, 'Am': 95, 'Ar': ... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      AtomNumberDict

      - -
      -
      -
      -
      Value:
      -
      -{1: ('H', 1.00794),
      - 2: ('He', 4.0026),
      - 3: ('Li', 6.941),
      - 4: ('Be', 9.01218),
      - 5: ('B', 10.811),
      - 6: ('C', 12.011),
      - 7: ('N', 14.0067),
      - 8: ('O', 15.9994),
      -...
      -
      -
      -
      -
      -
      - -
      - -
      -

      AtomNameDict

      - -
      -
      -
      -
      Value:
      -
      -{'Ac': 89,
      - 'Ag': 47,
      - 'Al': 13,
      - 'Am': 95,
      - 'Ar': 18,
      - 'As': 33,
      - 'At': 85,
      - 'Au': 79,
      -...
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.autobackgroundselect-module.html b/static_root/doc/srrietveld/developers/srrietveld.autobackgroundselect-module.html deleted file mode 100644 index 68af0c11..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.autobackgroundselect-module.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - srrietveld.autobackgroundselect - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module autobackgroundselect - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module autobackgroundselect

      source code

      -

      Automatic background selection is essential for automatic launched - refinement because in Lebail, polynomail background is not allowed to - refine; while a good simulation of background can help the automatic - refinement

      - Created on 2008.08.16

      - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      autoBackgroundSelection(xobs, - yobs, - peakpositionslist, - stepsize)
      - Function: Select background points automatically from an input pattern - -Notice that Lebail only works with single-phase model at this time! - -Status: the algorithm is in protype status - -Algorithm 1: -1.
      - source code - -
      - -
      -   - - - - - - -
      filterBackgroundPoints(bkgdlist, - excludedregionslist, - maxnumpoints=20)
      - Filter out the background points which - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: autobackgroundselect.py 2792 2009-03-02 15:56:4... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      autoBackgroundSelection(xobs, - yobs, - peakpositionslist, - stepsize) -

      -
      source code  -
      - -
      -Function: Select background points automatically from an input pattern
      -
      -Notice that Lebail only works with single-phase model at this time!
      -
      -Status: the algorithm is in protype status
      -
      -Algorithm 1:
      -1. use hkl to estimate number of peaks inside range
      -2. label peaks... no peak can be next to the other with 5*steps
      -3. get the intensity of the smallest peaks as the maximum value of background --->  this can be problematic! 
      -                                                                                    it won't work with nano particle
      -4. get the smallest value between any 2 peaks
      -
      -Argument:
      -  xobs              :   array of float, x (2theta or TOF)
      -  yobs              :   array of float, y (intensity)
      -  peakpositionslist :   list of float, peak positions (x)
      -  step              :   float, resolution
      -
      -Return              :   2D array or list of 2-tuples for background selected
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      filterBackgroundPoints(bkgdlist, - excludedregionslist, - maxnumpoints=20) -

      -
      source code  -
      - -
      -
      -Filter out the background points which
      -  1. inside excluded region
      -  2. too many background
      -
      -Argument:
      -  bkgdlist  :   list of 2-tuples as backgrounds point
      -  excludedregionslist:  list of 2-tuples as excluded region
      -  maxnumpoints :   int, number of background points remained
      -
      -Return      :   list of 2-tuples as selected background point
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: autobackgroundselect.py 2792 2009-03-02 15:56:43Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.autobackgroundselect-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.autobackgroundselect-pysrc.html deleted file mode 100644 index 5279d9a9..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.autobackgroundselect-pysrc.html +++ /dev/null @@ -1,514 +0,0 @@ - - - - - srrietveld.autobackgroundselect - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module autobackgroundselect - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.autobackgroundselect

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ 
      - 16  Automatic background selection is essential for automatic launched refinement 
      - 17  because in Lebail, polynomail background is not allowed to refine; 
      - 18  while a good simulation of background can help the automatic refinement 
      - 19   
      - 20  Created on  2008.08.16 
      - 21  """ 
      - 22  __id__ = "$Id: autobackgroundselect.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      - 23   
      -
      24 -def autoBackgroundSelection(xobs, yobs, peakpositionslist, stepsize): -
      25 """ Function: Select background points automatically from an input pattern - 26 - 27 Notice that Lebail only works with single-phase model at this time! - 28 - 29 Status: the algorithm is in protype status - 30 - 31 Algorithm 1: - 32 1. use hkl to estimate number of peaks inside range - 33 2. label peaks... no peak can be next to the other with 5*steps - 34 3. get the intensity of the smallest peaks as the maximum value of background ---> this can be problematic! - 35 it won't work with nano particle - 36 4. get the smallest value between any 2 peaks - 37 - 38 Argument: - 39 xobs : array of float, x (2theta or TOF) - 40 yobs : array of float, y (intensity) - 41 peakpositionslist : list of float, peak positions (x) - 42 step : float, resolution - 43 - 44 Return : 2D array or list of 2-tuples for background selected - 45 """ - 46 def findPositionIndex(xobs, peakpos): - 47 """ - 48 Find a position (discrete) nearest to peakpos - 49 - 50 Argument: - 51 - 52 Return : integer, index - 53 """ - 54 - 55 x0 = xobs[0] - 56 xf = xobs[-1] - 57 dx = xobs[1]-xobs[0] - 58 startindex = int( (peakpos-x0)/dx ) - 59 - 60 if 0: # debug - 61 print "findpeakposition(): x0 = %-10s xf = %-10s dx = %-10s start = %-5s"% (x0, xf, dx, startindex) - 62 - 63 found = False - 64 leftindex = startindex - 65 rightindex = startindex - 66 hitleft = False - 67 hitright = False - 68 while found is False: - 69 # left: - 70 try: - 71 ld1 = xobs[leftindex]-peakpos - 72 ld2 = peakpos-xobs[leftindex-1] - 73 if ld1 >= 0 and ld2 >= 0: - 74 if ld1 < ld2: - 75 return leftindex - 76 else: - 77 return leftindex-1 - 78 - 79 if 0: - 80 print "Left: d1 = %-10s d2 = %-10s for (%-10s, %-10s) finding %-10s init = %-10s"% \ - 81 (ld1, ld2, xobs[leftindex-1], xobs[leftindex+1], peakpos, xobs[startindex]) - 82 - 83 except IndexError, err: - 84 hitleft = True - 85 if 0: - 86 errmsg = "index = (%-5s, %-5s) between (%-10s, out)"% (leftindex, leftindex-1, xobs[leftindex]) - 87 print errmsg - 88 raise IndexError, err - 89 return leftindex - 90 - 91 # right: - 92 try: - 93 rd1 = peakpos-xobs[rightindex] - 94 rd2 = xobs[rightindex+1]-peakpos - 95 if rd1 >= 0 and rd2 >= 0: - 96 if rd1 < rd2: - 97 return rightindex - 98 else: - 99 return rightindex+1 -100 -101 if 0: -102 print "right: d1 = %-10s d2 = %-10s for (%-10s, %-10s) finding %-10s"% \ -103 (rd1, rd2, xobs[rightindex], xobs[rightindex+1], peakpos) -104 -105 except IndexError, err: -106 hitright= True -107 if 0: -108 errmsg = "index = (%-5s, %-5s) between (%-10s, out)"% (rightindex, rightindex+1, xobs[rightindex]) -109 print errmsg -110 raise IndexError, err -111 return rightindex -112 -113 leftindex = leftindex-1 -114 rightindex += 1 -115 -116 if hitright is True and hitleft is True: -117 raise NotImplementedError("Now... Something Wrong") -
      118 -119 # END FUNCTION: def findPositionIndex() -120 -121 -122 def searchMax(xobs, yobs, peakpos, searchrange): -123 """ -124 Search Max. value around a given peak position within a certain of search range -125 -126 Argument: -127 - xobs : array of float -128 - yobs : array of float -129 - peakpos : float -130 - searchrange : float -131 -132 Return : integer, as index in xobs/yobs -133 """ -134 startindex = findPositionIndex(xobs, peakpos) -135 continueSearch = True -136 maxY = yobs[startindex] -137 peakindex = startindex -138 leftindex = startindex-1 -139 rightindex = startindex+1 -140 -141 if 0: -142 print "starting from %-10s with height = %-10s"% (xobs[startindex], yobs[startindex]) -143 -144 while continueSearch is True: -145 # 1. take care of out-of-bound -146 if leftindex >= 0: -147 leftY = yobs[leftindex] -148 else: -149 leftY = 0.0 -150 if rightindex < len(yobs): -151 rightY = yobs[rightindex] -152 else: -153 rightY = 0.0 -154 -155 # 2. select -156 if leftY > maxY and leftY > rightY: -157 maxY = leftY -158 peakindex = leftindex -159 elif rightY > maxY and rightY > leftY: -160 maxY = rightY -161 peakindex = rightindex -162 -163 leftindex -= 1 -164 rightindex += 1 -165 -166 if leftindex < 0 and rightindex >= len(yobs): -167 continueSearch = False -168 elif abs(xobs[leftindex]-peakpos) >= searchrange: -169 continueSearch = False -170 -171 if 0: # debug -172 print "searchMax(): peakpos = %-10s, searchrange = %-10s => peak @ %-10s, with height %-10s"% \ -173 (peakpos, searchrange, xobs[peakindex], yobs[peakindex]) -174 -175 return peakindex -176 # END FUNCTION: searchMax() -177 -178 def searchMin(xobs, yobs, leftbound, rightbound): -179 """ -180 Search for the minimum value between two spots -181 -182 Arguments: -183 - xobs : array, float -184 - yobs : array, float -185 - leftbound : integer, -186 - rightbound: integer -187 -188 Return : integer, index of lowest point -189 """ -190 minindex = leftbound -191 minY = yobs[leftbound] -192 for xindex in xrange(leftbound+1, rightbound+1): -193 if yobs[xindex] < minY: -194 minY = yobs[xindex] -195 minindex = xindex -196 -197 if 0: # debug -198 print "In Range (%-10s, %-10s) Find Min @ %-10s with Height %-10s"% \ -199 (xobs[leftbound], xobs[rightbound], xobs[minindex], yobs[minindex]) -200 -201 return minindex -202 # END FUNCTION: searchMin(xobs, yobs, leftbound, rightbound) -203 -204 Eta = 0 -205 pos_start = 5 -206 -207 numpeaks = len(peakpositionslist) -208 -209 -210 # 1. search peak -211 # 1.1 find the distance between peaks -212 peakdistanceslist = [] -213 thmin = xobs[0] -214 thmax = xobs[-1] -215 mindist = -1.0 -216 for n in xrange(numpeaks+1): -217 if n == 0: -218 dist = peakpositionslist[n]-thmin -219 elif n == numpeaks: -220 dist = thmax-peakpositionslist[n-1] -221 else: -222 dist = peakpositionslist[n]-peakpositionslist[n-1] -223 if dist < mindist or mindist < 0: -224 mindist = dist -225 # LOOP-OVER: for n in xrange(numpeaks+1): -226 -227 # 1.2 search for peak -228 searchrange = mindist/2.1 -229 realpeaks = [] -230 for peakpos in peakpositionslist: -231 peakposindex = searchMax(xobs, yobs, peakpos, searchrange) -232 realpeaks.append(peakposindex) -233 -234 if 0: # debug -235 for realpeak in realpeaks: -236 print "%-10s %-10s"% (xobs[realpeak], yobs[realpeak]) -237 -238 # 2. search background -239 bkgdposindexlist = [] -240 for n in xrange(numpeaks+1): -241 if n == 0: -242 leftbound = 0 -243 rightbound = realpeaks[n] -244 elif n == numpeaks: -245 leftbound = realpeaks[n-1] -246 rightbound = len(xobs)-1 -247 else: -248 leftbound = realpeaks[n-1] -249 rightbound = realpeaks[n] -250 bkgdindex = searchMin(xobs, yobs, leftbound, rightbound) -251 bkgdposindexlist.append(bkgdindex) -252 -253 if 0: # debug -254 for bkgdindex in bkgdposindexlist: -255 print "%-10s %-10s"% (xobs[bkgdindex], yobs[bkgdindex]) -256 -257 # 3. filter out twin peaks... -258 # FIXME it will fail for triple peaks -259 selbackgroundslist = [] -260 -261 for n in xrange(0, numpeaks+1): -262 curindex = bkgdposindexlist[n] -263 x = xobs[curindex] -264 y = yobs[curindex] -265 -266 goodbackground = True -267 if n > 0 and n < numpeaks: -268 # filter -269 leftbkgd = yobs[ bkgdposindexlist[n-1] ] -270 rightbkgd = yobs[ bkgdposindexlist[n+1] ] -271 currbkgd = yobs[ bkgdposindexlist[n] ] -272 -273 leftpeak = yobs[ realpeaks[n-1] ] -274 rightpeak = yobs[ realpeaks[n] ] -275 -276 if leftpeak < rightpeak: -277 currheight = leftpeak-y -278 else: -279 currheight = rightpeak-y -280 leftheight = leftpeak-leftbkgd -281 rightheight = rightpeak-rightbkgd -282 if rightheight < leftheight: -283 stdheight = rightheight -284 else: -285 stdheight = leftheight -286 -287 if currheight <= 0: -288 goodbackground = False -289 -290 elif currheight < stdheight * 0.50: -291 goodbackground = False -292 -293 if currbkgd > leftbkgd and currbkgd > rightbkgd: -294 goodbackground = False -295 else: -296 # the first and last points are selected always -297 pass -298 -299 # END IF: selection -300 if goodbackground is True: -301 selbackgroundslist.append( (x, y) ) -302 # print "Select x = %-15s %-15s"% (x, y) -303 else: -304 # print "Neglect x = %-15s %-15s"% (x, y) -305 pass -306 -307 # LOOP-OVER for n in xrange(0, numpeaks+1) -308 -309 if 0: -310 # Debug stop -311 errmsg = "# of Background Points = %-10s"% (len(selbackgroundslist)) -312 raise NotImplementedError(errmsg) -313 -314 return selbackgroundslist -315 -316 -317 -
      318 -def filterBackgroundPoints(bkgdlist, excludedregionslist, maxnumpoints=20): -
      319 """ -320 Filter out the background points which -321 1. inside excluded region -322 2. too many background -323 -324 Argument: -325 bkgdlist : list of 2-tuples as backgrounds point -326 excludedregionslist: list of 2-tuples as excluded region -327 maxnumpoints : int, number of background points remained -328 -329 Return : list of 2-tuples as selected background point -330 """ -331 # 1. Excluded region -332 # FIXME This is not good algorithm. Need to figure out a good one -333 bkgdpoints1 = [] -334 for bkgd in bkgdlist: -335 x = bkgd[0] -336 notexcluded = True -337 for region in excludedregionslist: -338 begin = region[0] -339 end = region[1] -340 if x > begin and x < end: -341 notexcluded = False -342 if notexcluded is True: -343 bkgdpoints1.append(bkgd) -344 -345 # 2. Filter out the high points -346 # FIXME Need more experiement to get a good algorithm of this step -347 -348 # 3. Filter out the extra points -349 bkgdpoints2 = [] -350 curnumpoints = len(bkgdpoints1) -351 lap = curnumpoints/maxnumpoints -352 if lap >= 2: -353 for i in xrange(maxnumpoints): -354 index = i*lap -355 if index < curnumpoints: -356 bkgdpoints2.append(bkgdpoints1[index]) -357 -358 else: -359 bkgdpoints2 = bkgdpoints1 -360 -361 return bkgdpoints2 -
      362 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.auxiliary-module.html b/static_root/doc/srrietveld/developers/srrietveld.auxiliary-module.html deleted file mode 100644 index 68dfa26f..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.auxiliary-module.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - srrietveld.auxiliary - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module auxiliary - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module auxiliary

      source code

      -
      -Auxiliary functions for 
      -  1. string processing
      -  2. searching/sorting
      -
      -Methods List:
      -  I. String
      -    *  optionToString(options)
      -    *  readOption(options, argv)
      -
      -  II. Searching/Sorting
      -    *  getValueIndex(datalist, value):
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      optionToString(options)
      - convert an option-dictionary to string for neat output
      - source code - -
      - -
      -   - - - - - - -
      readOption(options, - argv)
      - this is a general-purposed function to parse the input - arguments
      - source code - -
      - -
      -   - - - - - - -
      getValueIndex(datalist, - value)
      - Get the index of value in a list closest to given value...
      - source code - -
      - -
      -   - - - - - - -
      getHomeValueIndex(datalist, - value, - begin=0, - end=None)
      - Get the index of value in a list closest to given value...
      - source code - -
      - -
      -   - - - - - - -
      searchdict(infodict, - key)
      - Search a key value in a multiple-level dictionary...
      - source code - -
      - -
      -   - - - - - - -
      testmain()
      - test main
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: auxiliary.py 2899 2009-03-16 19:10:09Z wdzhou $' -
      -   - - _DEBUGMODE = True -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      optionToString(options) -

      -
      source code  -
      - -

      convert an option-dictionary to string for neat output

      -

      options : dictionary, standard option dictionary value - list or - tuple as: explanation, variable name in client function (recommended), - and number of element following this option number of elements following - the option = 0, boolean * number of elements following the option = 1, - string **

      - Return -- String -
      -
      -
      -
      - -
      - -
      - - -
      -

      readOption(options, - argv) -

      -
      source code  -
      - -

      this is a general-purposed function to parse the input arguments

      -

      Arguments: options : dictionary, must conformed to some stardards as - explained in note 1 argv : list of strings

      -

      Return - list of strings (*) or boolean value (**) in the ascending - order of parameter-name

      - Note 1: the format of each element in dictionary options must be of - this format key - option name value - list or tuple as: - explanation, variable name in client function (recommended), and number - of element following this option number of elements following the option - = 0, boolean * number of elements following the option = 1, string - ** -
      -
      -
      -
      - -
      - -
      - - -
      -

      getValueIndex(datalist, - value) -

      -
      source code  -
      - -
      -Get the index of value in a list closest to given value
      -
      -Argument:
      -  datalist  :   list/array
      -  value     :   any vale
      -
      -Return      :   int
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getHomeValueIndex(datalist, - value, - begin=0, - end=None) -

      -
      source code  -
      - -
      -Get the index of value in a list closest to given value
      -
      -Argument:
      -  datalist  :   list/array
      -  value     :   any vale
      -  begine    :   int
      -  end       :   end
      -
      -Return      :   int
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      searchdict(infodict, - key) -

      -
      source code  -
      - -
      -
      -Search a key value in a multiple-level dictionary
      -
      -Argument:
      -  key   :   str
      -
      -Return  :   list of tuple (parname, parvalue)
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.auxiliary-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.auxiliary-pysrc.html deleted file mode 100644 index 4d78b033..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.auxiliary-pysrc.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - srrietveld.auxiliary - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module auxiliary - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.auxiliary

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ Auxiliary functions for  
      - 15    1. string processing 
      - 16    2. searching/sorting 
      - 17   
      - 18  Methods List: 
      - 19    I. String 
      - 20      *  optionToString(options) 
      - 21      *  readOption(options, argv) 
      - 22   
      - 23    II. Searching/Sorting 
      - 24      *  getValueIndex(datalist, value): 
      - 25  """ 
      - 26  __id__ = "$Id: auxiliary.py 2899 2009-03-16 19:10:09Z wdzhou $" 
      - 27   
      - 28  _DEBUGMODE = True 
      - 29   
      - 30  # I  String Processing 
      -
      31 -def optionToString(options): -
      32 """ - 33 convert an option-dictionary to string for neat output - 34 - 35 options : dictionary, standard option dictionary - 36 value - list or tuple as: explanation, variable name in client function (recommended), and number of element following this option - 37 number of elements following the option = 0, boolean * - 38 number of elements following the option = 1, string ** - 39 - 40 Return -- String - 41 """ - 42 rstring = "" - 43 for optkey in sorted(options.keys())[:]: - 44 explan, name, more = options[optkey] - 45 tempstr = "%-10s%-10s: %-30s, Number of Arguments Followed %-5s\n"% (optkey, "", explan, more) - 46 rstring += tempstr - 47 - 48 return rstring -
      49 - 50 -
      51 -def readOption(options, argv): -
      52 """ - 53 this is a general-purposed function to parse the input arguments - 54 - 55 Arguments: - 56 options : dictionary, must conformed to some stardards as explained in note 1 - 57 argv : list of strings - 58 - 59 Return - list of strings (*) or boolean value (**) in the ascending order of parameter-name - 60 - 61 Note 1: the format of each element in dictionary options must be of this format - 62 key - option name - 63 value - list or tuple as: explanation, variable name in client function (recommended), and number of element following this option - 64 number of elements following the option = 0, boolean * - 65 number of elements following the option = 1, string ** - 66 """ - 67 - 68 # Step 1: Initialization - 69 resultdict = {} - 70 for option in options.keys(): - 71 explan, name, more = options[option] - 72 if more == 0: - 73 resultdict[name] = False - 74 elif more == 1: - 75 resultdict[name] = None - 76 else: - 77 resultdict[name] = [] - 78 - 79 # Step 2: Read the arguments - 80 argindex = 1 - 81 while argindex < len(argv): - 82 - 83 # 1. get (and check) the valid options - 84 try: - 85 option = argv[argindex] - 86 explan, name, more = options[option] - 87 except KeyError, err: - 88 errmsg = "Option %-10s Is Not Allowed"% (options[argindex]) - 89 raise NotImplementedError(errmsg) - 90 - 91 # 2. set up the value - 92 if more == 0: - 93 # case for Bool - 94 resultdict[name] = True - 95 - 96 elif more == 1: - 97 # case for 1 - 98 argindex += 1 - 99 try: -100 resultdict[name] = argv[argindex] -101 except IndexError, err: -102 errmsg = "Option %-10s Must Be Followed By 1 Additional Input Argument"% (options[argindex-1]) -103 -104 elif more > 1: -105 # case for > 1 -106 try: -107 for m in xrange(more): -108 argindex += 1 -109 resultdict[name].append( argv[argindex] ) -110 -111 except IndexError, err: -112 errmsg = "Option %-10s Must Be Followed By 1 Additional Input Argument"% (options[argindex-1]) -113 -114 # 3. control variable -115 argindex += 1 -116 -117 # END LOOP -- while argindex < len(argv): -118 -119 # Step 3: Sort and write -120 sortedkeys = sorted(resultdict.keys()) -121 rlist = [] -122 for key in sortedkeys: -123 rlist.append(resultdict[key]) -124 -125 return rlist -
      126 -127 -128 # II List Processing -129 -
      130 -def getValueIndex(datalist, value): -
      131 """ Get the index of value in a list closest to given value -132 -133 Argument: -134 datalist : list/array -135 value : any vale -136 -137 Return : int -138 """ -139 import bisect -140 -141 if _DEBUGMODE is True: -142 for dindex in xrange(1, len(datalist)): -143 if datalist[dindex] < datalist[dindex-1]: -144 print "Error! %-5s %-10s %-10s"% (dindex, datalist[dindex], datalist[dindex]) -145 raise NotImplementedError("...Here Error!...") -146 -147 index = bisect.bisect_left(datalist, value) -148 if index < len(datalist) and index > 0: -149 if datalist[index]-value < value-datalist[index-1]: -150 pass -151 else: -152 index = index-1 -153 # END-IF -154 # END-IF -155 -156 return index -
      157 -158 -
      159 -def getHomeValueIndex(datalist, value, begin=0, end=None): -
      160 """ Get the index of value in a list closest to given value -161 -162 Argument: -163 datalist : list/array -164 value : any vale -165 begine : int -166 end : end -167 -168 Return : int -169 """ -170 if end is None: -171 end = len(datalist)-1 -172 -173 for dindex in xrange(1, len(datalist)): -174 print datalist[dindex] -175 -176 if begin < end-1: -177 mid = (begin+end)/2 -178 # print "begin = %-10s end = %-10s mid = %-10s (%-10s %-10s %-10s) value = %-10s"% \ -179 # (begin, end, mid, datalist[begin], datalist[mid], datalist[end], value) -180 -181 try: -182 if value < datalist[mid]: -183 rindex = getValueIndex(datalist, value, begin, mid) -184 elif value > datalist[mid]: -185 rindex = getValueIndex(datalist, value, mid, end) -186 else: -187 rindex = mid -188 except ValueError, err: -189 print value -190 print mid -191 raise ValueError() -192 else: -193 if value-datalist[begin] < datalist[end]-value: -194 rindex = begin -195 else: -196 rindex = end -197 -198 return rindex -
      199 -200 -
      201 -def searchdict(infodict, key): -
      202 """ -203 Search a key value in a multiple-level dictionary -204 -205 Argument: -206 key : str -207 -208 Return : list of tuple (parname, parvalue) -209 """ -210 resultlist = [] -211 for keyname in infodict.keys(): -212 if isinstance(infodict[keyname], list): -213 for item in infodict[keyname]: -214 thelist = searchdict(item, key) -215 resultlist.extend(thelist) -216 elif isinstance(infodict[keyname], dict): -217 thelist = searchdict(infodict[keyname], key) -218 resultlist.extend(thelist) -219 else: -220 if keyname.lower() == key.lower(): -221 resultlist.append( (infodict, keyname) ) -222 # END-IF-ELSE -223 # LOOP-OVER -224 -225 return resultlist -
      226 -227 -
      228 -def testmain(): -
      229 """ -230 test main -231 """ -232 l = [1, 2, 3, 4, 5, 6, 7] -233 -234 v = 0.9 -235 index = getValueIndex(l, v) -236 print "%-10s l[%-5s] = %-10s"% (v, index, l[index]) -237 v = 1.9 -238 index = getValueIndex(l, v) -239 print "%-10s l[%-5s] = %-10s"% (v, index, l[index]) -240 v = 2.0 -241 index = getValueIndex(l, v) -242 print "%-10s l[%-5s] = %-10s"% (v, index, l[index]) -243 v = 2.2 -244 index = getValueIndex(l, v) -245 print "%-10s l[%-5s] = %-10s"% (v, index, l[index]) -246 v = 3.4 -247 index = getValueIndex(l, v) -248 print "%-10s l[%-5s] = %-10s"% (v, index, l[index]) -249 v = 7.0 -250 index = getValueIndex(l, v) -251 print "%-10s l[%-5s] = %-10s"% (v, index, l[index]) -252 v = 9.0 -253 index = getValueIndex(l, v) -254 print "%-10s l[%-5s] = %-10s"% (v, index, l[index]) -255 -256 return -
      257 -258 -259 if __name__=="__main__": -260 testmain() -261 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter-module.html b/static_root/doc/srrietveld/developers/srrietveld.datafileconverter-module.html deleted file mode 100644 index 60c0fad4..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter-module.html +++ /dev/null @@ -1,484 +0,0 @@ - - - - - srrietveld.datafileconverter - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module datafileconverter - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module datafileconverter

      source code

      -
      -Data file parser classified by instrument
      -
      -Level 1:      DataFileParser
      -  |             - __init__(self, datafilename)
      -  |             - parseDataFile(self)
      -  |             - _parse(self)
      -  |             - getData(self)
      -  |
      -  |- Leve 2:    RAPDFParser
      -  |
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - DataFileParser
      - Virtual base class of Parer of data file... -
      -   - - GEMDataParser
      - Data file parser for GEM data... -
      -   - - XYSigmaFileParser
      - Data file parser for X-Y-Sigma format -
      -   - - RAPDFDataParser
      - Data file parser for RaPDF data... -
      -   - - NPDFDataParser
      - Data file parser for RaPDF data... -
      -   - - FullProfFreeFormatParser
      - Data file parser for Fullprof free format data file -
      - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      dataFileFormat(datafilename)
      - Judge the format of the data file - -Argument: -- datafilename : str - -Return : str, such as "CHI", "DAT", ...
      - source code - -
      - -
      -   - - - - - - -
      convertChiToGSAS(datafilename, - targetfullname=None)
      - Convert CHI file to specific data format related to refinement engine...
      - source code - -
      - -
      -   - - - - - - -
      convertChiToXYSigma(origfullname, - targetfullname=None, - filenameroot=None, - newdir='')
      - Convert the 2 column chi file to 3-column XYSigma File ...
      - source code - -
      - -
      -   - - - - - - -
      convertXYSigmaToChi(datafilename)
      - Convert the 3-column XYSigma file to 2-column Chi File ...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: datafileconverter.py 2920 2009-03-19 23:49:26Z ... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      dataFileFormat(datafilename) -

      -
      source code  -
      - -
      -
      -Judge the format of the data file
      -
      -Argument:
      -- datafilename  :   str
      -
      -Return          :   str, such as "CHI", "DAT", ...
      -                    - DAT:  Fullprof readable
      -                    - GSA:  GSAS readable
      -                    - CHI:  RAPDF Chi File
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      convertChiToGSAS(datafilename, - targetfullname=None) -

      -
      source code  -
      - -
      -
      -Convert CHI file to specific data format related to refinement engine
      -
      -Argument:
      -- datafilename
      -
      -Return  :   str, new file name
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      convertChiToXYSigma(origfullname, - targetfullname=None, - filenameroot=None, - newdir='') -

      -
      source code  -
      - -
      -
      -Convert the 2 column chi file to 3-column XYSigma File 
      -Complied to Fullprof format
      -
      -Argument:
      -- origfullname  :   str, full name with path
      -- targetfullname:   str, full name with path
      -- filenameroot  :   str
      -- newdir        :   str
      -
      -Return          :   str, new file name
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      convertXYSigmaToChi(datafilename) -

      -
      source code  -
      - -
      -
      -Convert the 3-column XYSigma file to 2-column Chi File 
      -Transfer FullProf format to GSAS format
      -
      -Argument:
      -- datafilename
      -
      -Return          :   str, chi file name
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: datafileconverter.py 2920 2009-03-19 23:49:26Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.datafileconverter-pysrc.html deleted file mode 100644 index 10615782..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter-pysrc.html +++ /dev/null @@ -1,1238 +0,0 @@ - - - - - srrietveld.datafileconverter - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module datafileconverter - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.datafileconverter

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ Data file parser classified by instrument 
      - 16   
      - 17    Level 1:      DataFileParser 
      - 18      |             - __init__(self, datafilename) 
      - 19      |             - parseDataFile(self) 
      - 20      |             - _parse(self) 
      - 21      |             - getData(self) 
      - 22      | 
      - 23      |- Leve 2:    RAPDFParser 
      - 24      | 
      - 25  """ 
      - 26   
      - 27  __id__ = "$Id: datafileconverter.py 2920 2009-03-19 23:49:26Z wdzhou $" 
      - 28   
      - 29  import os 
      - 30  import math 
      - 31   
      -
      32 -class DataFileParser: -
      33 """ Virtual base class of Parer of data file - 34 - 35 Instantiation: - 36 DataFileParser(datafilename) - 37 """ -
      38 - def __init__(self, datafilename = None): -
      39 """ Initialization of DataFileParser - 40 - 41 Argument: - 42 datafilename : str, data file name - 43 - 44 Return : None - 45 """ - 46 # 1. virtual base class and input validation - 47 selfclassname = self.__class__.__name__ - 48 if selfclassname == "DataFileParser": - 49 errmsg = "Virtual class %-10s Cannot be Initialized"% \ - 50 (selfclassname) - 51 raise NotImplementedError(errmsg) - 52 # END-IF - 53 - 54 # 2. Import data file if file name is given - 55 if datafilename is not None: - 56 self.setInputFileName(datafilename) - 57 # END-IF - 58 - 59 return -
      60 - 61 -
      62 - def setInputFileName(self, datafilename): -
      63 """ Set the input data file name to parse - 64 and parse it! - 65 - 66 Argument: - 67 datafilename : str - 68 - 69 Return : None - 70 """ - 71 # 1 Check input valid or not - 72 if not isinstance(datafilename, str): - 73 errmsg = "DataFileParser(datafilename): datafilename must be str. " + \ - 74 "Input is of type %-10s" % (datafilename.__class__.__name__) - 75 raise NotImplementedError, errmsg - 76 else: - 77 self._dfname = datafilename - 78 - 79 # 2 import and parse file - 80 self.parseDataFile() - 81 - 82 return -
      83 -
      84 - def parseDataFile(self): -
      85 """ - 86 Parse the data file - 87 - 88 General base class method - 89 - 90 Return : None - 91 """ - 92 # 1. read file - 93 if self._dfname.lower().count(".dat") != 1: - 94 datafilename = self._dfname.split(".")[0]+".dat" - 95 errmsg = "Warning! 1134 File %-30s Is Not Attempted To Open"% (self._dfname) - 96 print errmsg - 97 else: - 98 datafilename = self._dfname - 99 dfile = open(datafilename, "r") -100 self._lines = dfile.readlines() -101 dfile.close() -102 -103 # 2. parse data file -104 self._parse() -105 -106 return -
      107 -108 -
      109 - def _parse(self): -
      110 """ -111 Virtual method to parse the data from a list of lines -112 -113 Return : None -114 """ -115 errmsg = "Method _parse() of class %-10s is Virtual"% \ -116 (self.__class__.__name__) -117 raise NotImplementedError(errmsg) -
      118 -119 -
      120 - def importData(self, xs, ys, ss): -
      121 """ Import the array (x, y, sigma) to self -122 -123 Argument: -124 xs : dict. key = int, (bank) value = array -125 ys : dict. key = int, (bank) value = array -126 ss : dict. key = int, (bank) value = array -127 -128 Return : None -129 """ -130 self._xs = xs -131 self._ys = ys -132 self._ss = ss -133 -134 return -
      135 -136 -
      137 - def exportData(self): -
      138 """ Export the data -139 -140 Return : list of 3-tuples as (x, y, sigma) -141 """ -142 return (self._xs, self._ys, self._ss) -
      143 -144 -
      145 - def writeToFile(self, filename): -
      146 """ Write the data to a file in the specific format -147 -148 Argument: -149 filename : str -150 -151 Return : None -152 """ -153 errmsg = "DataFileParser.writeToFile() is virtual. " + \ -154 "Implement %-20s's writeToFile() to override" % \ -155 (self.__class__.__name__) -156 raise NotImplementedError, errmsg -
      157 -158 # END-DEF Class -159 -160 -
      161 -class GEMDataParser(DataFileParser): -
      162 """ Data file parser for GEM data -163 -164 RaPDF data format is defined as -165 X-Y-Sigma -166 -167 Class Variable: -168 * _xs -169 * _ys -170 * _ss -171 -172 """ -
      173 - def __init__(self, datafilename = None): -
      174 """ Initialization of GEMDataParser -175 -176 Argument: -177 datafilename : str, data file name -178 -179 Return : None -180 """ -181 # 1. Init data structure -182 self._xs = {} -183 self._ys = {} -184 self._ss = {} -185 -186 # 2. Call base class init -187 DataFileParser.__init__(self, datafilename) -188 -189 return -
      190 -191 -
      192 - def _parse(self): -
      193 """ -194 Method to parse the GEM data from a list of lines -195 -196 Return : None -197 """ -198 # 1. Split all lines to banks -199 bankstart = {} -200 bankend = {} -201 numlines = len(self._lines) -202 bankindex = 0 -203 for lindex in xrange(1, numlines): -204 if self._lines[lindex][0] == "B": -205 bankend[bankindex] = lindex-1 -206 bankindex += 1 -207 bankstart[bankindex] = lindex -208 -209 bankend[bankindex] = numlines-1 -210 self._numbanks = bankindex -211 -212 if 0: -213 for bindex in xrange(1, self._numbanks+1): -214 print "(%-10s, %-10s)"% (bankstart[bindex], bankend[bindex]) -215 -216 # 2. Intepret bank -217 self._info = self._lines[0] -218 -219 for bindex in xrange(1, self._numbanks+1): -220 # 2.1 Init all array -221 self._xs[bindex] = [] -222 self._ys[bindex] = [] -223 self._ss[bindex] = [] -224 -225 # 2.2 Intepret all lines -226 infoline = self._lines[bankstart[bindex]] -227 for lindex in xrange(bankstart[bindex]+1, bankend[bindex]+1): -228 terms = self._lines[lindex].split() -229 x = float(terms[0]) -230 y = float(terms[1]) -231 s = float(terms[2]) -232 self._xs[bindex].append(x) -233 self._ys[bindex].append(y) -234 self._ss[bindex].append(s) -235 # LOOP-OVER: for lindex in xrange(bankstart[bindex]+1, bankend[bindex]+1): -236 -237 if infoline.count("RALF") == 1: -238 for i in xrange(1, len(self._xs[bindex])): -239 self._ys[bindex][i] = self._ys[bindex][i]/(self._xs[bindex][i]-self._xs[bindex][i-1]) -240 self._ss[bindex][i] = self._ys[bindex][i]/(self._xs[bindex][i]-self._xs[bindex][i-1]) -241 -242 if 1: # debug output -243 print "1132: Debug output bank?.dat in GEM" -244 fname = "bank"+str(bindex)+".dat" -245 outputs = "" -246 for i in xrange(len(self._xs[bindex])): -247 outputs += "%-15s %-15s %-15s\n"% \ -248 (self._xs[bindex][i], self._ys[bindex][i], self._ss[bindex][i]) -249 ofile = open(fname, "w") -250 ofile.write(outputs) -251 ofile.close() -252 -253 return -
      254 -255 # END-DEF Class GEMDataParser -256 -257 -
      258 -class XYSigmaFileParser(DataFileParser): -
      259 """ Data file parser for X-Y-Sigma format -260 """ -
      261 - def __init__(self, datafilename = None): -
      262 """ Initialization of XYSigmaFileParser -263 -264 Argument: -265 - datafilename : str, data file name -266 -267 Return : None -268 """ -269 self._xs = {} -270 self._ys = {} -271 self._ss = {} -272 -273 self._banklist = [0] -274 -275 for bankid in self._banklist: -276 self._xs[bankid] = [] -277 self._ys[bankid] = [] -278 self._ss[bankid] = [] -279 -280 # 2. Call base class init -281 DataFileParser.__init__(self, datafilename) -282 -283 return -
      284 -285 -
      286 - def _parse(self): -
      287 """ -288 Virtual method to parse the data from a list of lines -289 -290 Return : None -291 """ -292 for line in self._lines: -293 cline = line.split("\n")[0] -294 if len(cline) > 0: -295 if cline[0] != "#": -296 terms = cline.split() -297 x = float(terms[0]) -298 y = float(terms[1]) -299 s = float(terms[2]) -300 -301 self._xs[0].append(x) -302 self._ys[0].append(y) -303 self._ss[0].append(s) -304 # LOOP-OVER: for line in self._lines -305 -306 return -
      307 -308 -
      309 - def writeToFile(self, filename, comments = None): -
      310 """ Write the data to a file in the specific format -311 -312 Argument: -313 - filename : str -314 - comments : list, of string for put comments to data file -315 -316 Return : None -317 """ -318 wbuf = "" -319 -320 # 1. comment line -321 if comments is None: -322 comments = [] -323 for i in range(6): -324 wbuf += "#" -325 try: -326 wbuf += "%-30s\n" % (comments[i]) -327 except IndexError, err: -328 wbuf += "\n" -329 # LOOP-OVER -330 -331 # 2. data line -332 lendata = min(len(self._xs[0]), len(self._ys[0]), len(self._ss[0])) -333 for i in range(lendata): -334 wbuf += "%-15s %-15s %-15s\n" % (self._xs[0][i], -335 self._ys[0][i], self._ss[0][i]) -336 # LOOP-OVER -337 -338 # 3. write to file -339 ofile = open(filename, "w") -340 ofile.write(wbuf) -341 ofile.close() -342 -343 return -
      344 -345 # END-CLASS-DEF XYSigmaFileParser -346 -347 -
      348 -class RAPDFDataParser(XYSigmaFileParser): -
      349 """ -350 Data file parser for RaPDF data -351 -352 RaPDF data format is defined as -353 X-Y-Sigma -354 -355 Class Variable: -356 - _xs -357 - _ys -358 - _ss -359 -360 """ -
      361 - def __init__(self, datafilename = None): -
      362 """ -363 Initialization -364 -365 Argument: -366 - datafilename : str, data file name -367 -368 Return : None -369 """ -370 XYSigmaFileParser.__init__(self, datafilename) -371 -372 return -
      373 -374 -
      375 -class NPDFDataParser(XYSigmaFileParser): -
      376 """ -377 Data file parser for RaPDF data -378 -379 RaPDF data format is defined as -380 X-Y-Sigma -381 -382 Class Variable: -383 - _xs -384 - _ys -385 - _ss -386 -387 """ -
      388 - def __init__(self, datafilename = None): -
      389 """ Initialization -390 -391 Argument: -392 datafilename : str, data file name -393 -394 Return : None -395 """ -396 XYSigmaFileParser.__init__(self, datafilename) -397 -398 return -
      399 -400 -
      401 -class FullProfFreeFormatParser(DataFileParser): -
      402 """ Data file parser for Fullprof free format data file -403 """ -
      404 - def __init__(self, datafilename = None): -
      405 """ Initialization of FullProfFreeFormatParser -406 """ -407 self._xs = {} -408 self._ys = {} -409 self._ss = {} -410 -411 self._banklist = [0] -412 -413 for bankid in self._banklist: -414 self._xs[bankid] = [] -415 self._ys[bankid] = [] -416 self._ss[bankid] = [] -417 -418 # 2. Call base class init -419 DataFileParser.__init__(self, datafilename) -420 -421 return -
      422 -423 -
      424 - def _parse(self): -
      425 """ -426 Parse the data from a list of lines and store the result to -427 _xs, _ys, _ss -428 Override parents method -429 -430 Return : None -431 """ -432 # 1. Filter out all digit -433 allterms = [] -434 for line in self._lines: -435 cline = line.split("\n")[0] -436 partterms = cline.split() -437 allterms.extend(partterms) -438 # LOOP-OVER -439 -440 # 2. Digit only -441 digitterms = [] -442 for term in allterms: -443 try: -444 digitterms.append(term) -445 except ValueError, err: -446 print term -447 # LOOP-OVER -448 -449 # 3. Convert -450 x0 = float(digitterms[0]) -451 xf = float(digitterms[2]) -452 stepsize = float(digitterms[1]) -453 numsteps = int((xf-x0)/stepsize) -454 -455 if 1: -456 print "5:13 numstep - num-points = %-5s" % (len(digitterms)-3-numsteps) -457 print "5:13 %-5s %-5s " % (len(digitterms), numsteps) -458 -459 # 4. Generate -460 for i in xrange(3, len(digitterms)): -461 # a) get data value -462 y = float(digitterms[i]) -463 x = x0 + stepsize * (i-3) -464 s = math.sqrt(y) -465 # b) store values -466 self._xs[0].append(x) -467 self._ys[0].append(y) -468 self._ss[0].append(s) -469 # LOOP-OVER -470 -471 return -
      472 -473 -474 """ -475 External Methods -476 """ -
      477 -def dataFileFormat(datafilename): -
      478 """ -479 Judge the format of the data file -480 -481 Argument: -482 - datafilename : str -483 -484 Return : str, such as "CHI", "DAT", ... -485 - DAT: Fullprof readable -486 - GSA: GSAS readable -487 - CHI: RAPDF Chi File -488 """ -489 lowname = datafilename.lower() -490 terms = lowname.split(".") -491 -492 if terms[-1] == "chi": -493 rstr = "CHI" -494 elif terms[-1] == "dat": -495 rstr = "DAT" -496 elif terms[-1] == "gss": -497 rstr = "DAT" -498 elif terms[-1] == "gsa": -499 rstr = "GSA" -500 else: -501 errmsg = "Unrecognizable Data Format: %-20s Of Data File %-20s " % \ -502 (terms[-1], datafilename) -503 raise NotImplementedError(errmsg) -504 # END-IF-ELSE -505 -506 return rstr -
      507 -508 -
      509 -def convertChiToGSAS(datafilename, targetfullname = None): -
      510 """ -511 Convert CHI file to specific data format related to refinement engine -512 -513 Argument: -514 - datafilename -515 -516 Return : str, new file name -517 """ -518 from mar_utilities import ChiFile -519 -520 cf = ChiFile(datafilename) -521 if not cf.mar_file: -522 cf.mar_file = datafilename -523 if targetfullname == None: -524 targetfullname = datafilename.split(".")[0] + ".gsa" -525 -526 if not os.path.isfile(targetfullname): -527 cf.writeGSAS(targetfullname) -528 else: -529 pass -530 -531 return targetfullname -
      532 -533 -
      534 -def convertChiToXYSigma(origfullname, targetfullname = None, -535 filenameroot = None, newdir = ""): -
      536 """ -537 Convert the 2 column chi file to 3-column XYSigma File -538 Complied to Fullprof format -539 -540 Argument: -541 - origfullname : str, full name with path -542 - targetfullname: str, full name with path -543 - filenameroot : str -544 - newdir : str -545 -546 Return : str, new file name -547 """ -548 import math -549 -550 # 1. Read File -551 try: -552 ofile = open(origfullname, "r") -553 lines = ofile.readlines() -554 ofile.close() -555 except IOError, err: -556 print "Fatal Error: Cannot Open File %-20s"% (origfullname) -557 raise IOError, err -558 -559 # 2. Get new file name -560 if targetfullname is not None: -561 newfullname = targetfullname -562 elif filenameroot is not None: -563 if newdir != "" and newdir[-1] != "/": -564 newdir = newdir + "/" -565 newfullname = newdir + filenameroot + ".dat" -566 else: -567 newfullname = origfullname.split(".")[0]+".dat" -568 -569 # 3. Convert file if the target file does not exist -570 if not os.path.isfile(newfullname): -571 -572 datalist = [] -573 infolist = [] -574 # 3.1 Line separation -575 for line in lines: -576 cline = line.strip() -577 if cline != "": -578 terms = cline.split() -579 isinfo = False -580 # a. interpret line -581 if len(terms) == 2: -582 try: -583 x = float(terms[0]) -584 y = float(terms[1]) -585 s = math.sqrt(y) -586 except ValueError, err: -587 isinfo = True -588 else: -589 isinfo = True -590 -591 # b. process -592 if isinfo is True: -593 infolist.append(cline) -594 else: -595 datalist.append( (x, y, s) ) -596 else: -597 # Empty line -598 pass -599 # END-IF cline != "" -600 # LOOP-OVER: line in lines -601 -602 # 3.2 Output -603 ostring = "" -604 # (a) Information Line -605 maxinfoindex = len(infolist)-1 -606 for i in xrange(6): -607 if i <= maxinfoindex: -608 line = "# %-30s\n"% (infolist[i]) -609 else: -610 line = "# \n" -611 ostring += line -612 -613 # (b) Data line -614 for tup in datalist: -615 x, y, s = tup -616 line = "%-15s %-15s %-15s\n"% (x, y, s) -617 ostring += line -618 -619 # (c) write out -620 ofile = open(newfullname, "w") -621 ofile.write(ostring) -622 ofile.close() -623 -624 else: -625 msg = "Target file %-20s Exists. No need to convert!" % (newfullname) -626 print msg -627 # END-IF -628 -629 return newfullname -
      630 -631 -
      632 -def convertXYSigmaToChi(datafilename): -
      633 """ -634 Convert the 3-column XYSigma file to 2-column Chi File -635 Transfer FullProf format to GSAS format -636 -637 Argument: -638 - datafilename -639 -640 Return : str, chi file name -641 """ -642 # 1. Read File -643 try: -644 ofile = open(datafilename, "r") -645 lines = ofile.readlines() -646 ofile.close() -647 except IOError, err: -648 print "Fatal Error: Cannot Open File %-20s"% (datafilename) -649 raise IOError, err -650 -651 datalist = [] -652 infolist = [] -653 -654 # 2. New file name -655 chifilename = datafilename.split(".")[0]+".chi" -656 -657 # 3. -658 -659 # 2. Line separation -660 for line in lines: -661 cline = line.strip() -662 if cline != "": -663 terms = cline.split() -664 isinfo = False -665 # a. interpret line -666 if len(terms) == 3: -667 try: -668 x = float(terms[0]) -669 y = float(terms[1]) -670 except ValueError, err: -671 isinfo = True -672 else: -673 isinfo = True -674 -675 # b. process -676 if isinfo is True: -677 infolist.append(cline) -678 else: -679 datalist.append( (x, y) ) -680 else: -681 # Empty line -682 pass -683 # END-IF cline != "" -684 # LOOP-OVER: line in lines -685 -686 # 3. Output -687 ostring = "" -688 -689 # 3.1 Information Line -690 maxinfoindex = len(infolist)-1 -691 for i in xrange(12): -692 if i <= maxinfoindex: -693 line = "# %-30s\n"% (infolist[i]) -694 else: -695 line = "# \n" -696 ostring += line -697 -698 for tup in datalist: -699 x, y= tup -700 line = "%-15s %-15s \n"% (x, y) -701 ostring += line -702 -703 ofile = open(chifilename, "w") -704 ofile.write(ostring) -705 ofile.close() -706 -707 return chifilename -
      708 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.DataFileParser-class.html b/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.DataFileParser-class.html deleted file mode 100644 index 1e3fd4a6..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.DataFileParser-class.html +++ /dev/null @@ -1,465 +0,0 @@ - - - - - srrietveld.datafileconverter.DataFileParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module datafileconverter :: - Class DataFileParser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class DataFileParser

      source code

      -
      Known Subclasses:
      -
      - FullProfFreeFormatParser, - GEMDataParser, - XYSigmaFileParser -
      - -
      -
      -Virtual base class of Parer of data file
      -
      -Instantiation: 
      -  DataFileParser(datafilename)
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename=None)
      - Initialization of DataFileParser...
      - source code - -
      - -
      -   - - - - - - -
      setInputFileName(self, - datafilename)
      - Set the input data file name to parse...
      - source code - -
      - -
      -   - - - - - - -
      parseDataFile(self)
      - Parse the data file
      - source code - -
      - -
      -   - - - - - - -
      _parse(self)
      - Virtual method to parse the data from a list of lines
      - source code - -
      - -
      -   - - - - - - -
      importData(self, - xs, - ys, - ss)
      - Import the array (x, y, sigma) to self - -Argument: - xs : dict.
      - source code - -
      - -
      -   - - - - - - -
      exportData(self)
      - Export the data
      - source code - -
      - -
      -   - - - - - - -
      writeToFile(self, - filename)
      - Write the data to a file in the specific format...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename=None) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization of DataFileParser
      -
      -Argument:
      -  datafilename  :   str, data file name
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setInputFileName(self, - datafilename) -

      -
      source code  -
      - -
      -Set the input data file name to parse
      -and parse it!
      -
      -Argument:
      -  datafilename  :   str
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseDataFile(self) -

      -
      source code  -
      - -

      Parse the data file

      -

      General base class method

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      _parse(self) -

      -
      source code  -
      - -

      Virtual method to parse the data from a list of lines

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      importData(self, - xs, - ys, - ss) -

      -
      source code  -
      - -
      -Import the array (x, y, sigma) to self
      -
      -Argument:
      -  xs    :   dict.  key = int, (bank)  value = array
      -  ys    :   dict.  key = int, (bank)  value = array
      -  ss    :   dict.  key = int, (bank)  value = array
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      exportData(self) -

      -
      source code  -
      - -

      Export the data

      - Return : list of 3-tuples as (x, y, sigma) -
      -
      -
      -
      - -
      - -
      - - -
      -

      writeToFile(self, - filename) -

      -
      source code  -
      - -
      -Write the data to a file in the specific format
      -
      -Argument:
      -  filename  :   str
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.FullProfFreeFormatParser-class.html b/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.FullProfFreeFormatParser-class.html deleted file mode 100644 index 3ba1244a..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.FullProfFreeFormatParser-class.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - srrietveld.datafileconverter.FullProfFreeFormatParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module datafileconverter :: - Class FullProfFreeFormatParser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class FullProfFreeFormatParser

      source code

      -
      -DataFileParser --+
      -                 |
      -                FullProfFreeFormatParser
      -
      - -
      -Data file parser for Fullprof free format data file

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename=None)
      - Initialization of FullProfFreeFormatParser
      - source code - -
      - -
      -   - - - - - - -
      _parse(self)
      - Parse the data from a list of lines and store the result to _xs, - _ys, _ss Override parents method
      - source code - -
      - -
          Inherited from DataFileParser
      -   - - - - - - -
      exportData(self)
      - Export the data
      - source code - -
      - -
      -   - - - - - - -
      importData(self, - xs, - ys, - ss)
      - Import the array (x, y, sigma) to self - -Argument: - xs : dict.
      - source code - -
      - -
      -   - - - - - - -
      parseDataFile(self)
      - Parse the data file
      - source code - -
      - -
      -   - - - - - - -
      setInputFileName(self, - datafilename)
      - Set the input data file name to parse...
      - source code - -
      - -
      -   - - - - - - -
      writeToFile(self, - filename)
      - Write the data to a file in the specific format...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization of FullProfFreeFormatParser -
      -
      Overrides: - DataFileParser.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _parse(self) -

      -
      source code  -
      - -

      Parse the data from a list of lines and store the result to _xs, _ys, - _ss Override parents method

      - Return : None -
      -
      Overrides: - DataFileParser._parse -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.GEMDataParser-class.html b/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.GEMDataParser-class.html deleted file mode 100644 index ad47ae6e..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.GEMDataParser-class.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - srrietveld.datafileconverter.GEMDataParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module datafileconverter :: - Class GEMDataParser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class GEMDataParser

      source code

      -
      -DataFileParser --+
      -                 |
      -                GEMDataParser
      -
      - -
      -
      -Data file parser for GEM data
      -
      -RaPDF data format is defined as
      -X-Y-Sigma
      -
      -Class Variable:
      -  *  _xs 
      -  *  _ys 
      -  *  _ss 
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename=None)
      - Initialization of GEMDataParser...
      - source code - -
      - -
      -   - - - - - - -
      _parse(self)
      - Method to parse the GEM data from a list of lines
      - source code - -
      - -
          Inherited from DataFileParser
      -   - - - - - - -
      exportData(self)
      - Export the data
      - source code - -
      - -
      -   - - - - - - -
      importData(self, - xs, - ys, - ss)
      - Import the array (x, y, sigma) to self - -Argument: - xs : dict.
      - source code - -
      - -
      -   - - - - - - -
      parseDataFile(self)
      - Parse the data file
      - source code - -
      - -
      -   - - - - - - -
      setInputFileName(self, - datafilename)
      - Set the input data file name to parse...
      - source code - -
      - -
      -   - - - - - - -
      writeToFile(self, - filename)
      - Write the data to a file in the specific format...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename=None) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization of GEMDataParser
      -
      -Argument:
      -  datafilename  :   str, data file name
      -
      -Return          :   None
      -
      -
      -
      -
      Overrides: - DataFileParser.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _parse(self) -

      -
      source code  -
      - -

      Method to parse the GEM data from a list of lines

      - Return : None -
      -
      Overrides: - DataFileParser._parse -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.NPDFDataParser-class.html b/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.NPDFDataParser-class.html deleted file mode 100644 index f7a19363..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.NPDFDataParser-class.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - srrietveld.datafileconverter.NPDFDataParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module datafileconverter :: - Class NPDFDataParser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class NPDFDataParser

      source code

      -
      -DataFileParser --+    
      -                 |    
      - XYSigmaFileParser --+
      -                     |
      -                    NPDFDataParser
      -
      - -
      -
      -
      -Data file parser for RaPDF data
      -
      -RaPDF data format is defined as
      -X-Y-Sigma
      -
      -Class Variable:
      --  _xs 
      --  _ys 
      --  _ss 
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename=None)
      - Initialization...
      - source code - -
      - -
          Inherited from XYSigmaFileParser
      -   - - - - - - -
      _parse(self)
      - Virtual method to parse the data from a list of lines
      - source code - -
      - -
      -   - - - - - - -
      writeToFile(self, - filename, - comments=None)
      - Write the data to a file in the specific format...
      - source code - -
      - -
          Inherited from DataFileParser
      -   - - - - - - -
      exportData(self)
      - Export the data
      - source code - -
      - -
      -   - - - - - - -
      importData(self, - xs, - ys, - ss)
      - Import the array (x, y, sigma) to self - -Argument: - xs : dict.
      - source code - -
      - -
      -   - - - - - - -
      parseDataFile(self)
      - Parse the data file
      - source code - -
      - -
      -   - - - - - - -
      setInputFileName(self, - datafilename)
      - Set the input data file name to parse...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename=None) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization
      -
      -Argument:
      -  datafilename  :   str, data file name
      -
      -Return          :   None
      -
      -
      -
      -
      Overrides: - XYSigmaFileParser.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.RAPDFDataParser-class.html b/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.RAPDFDataParser-class.html deleted file mode 100644 index 371c2b8b..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.RAPDFDataParser-class.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - srrietveld.datafileconverter.RAPDFDataParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module datafileconverter :: - Class RAPDFDataParser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class RAPDFDataParser

      source code

      -
      -DataFileParser --+    
      -                 |    
      - XYSigmaFileParser --+
      -                     |
      -                    RAPDFDataParser
      -
      - -
      -
      -
      -Data file parser for RaPDF data
      -
      -RaPDF data format is defined as
      -X-Y-Sigma
      -
      -Class Variable:
      --  _xs 
      --  _ys 
      --  _ss 
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename=None)
      - Initialization...
      - source code - -
      - -
          Inherited from XYSigmaFileParser
      -   - - - - - - -
      _parse(self)
      - Virtual method to parse the data from a list of lines
      - source code - -
      - -
      -   - - - - - - -
      writeToFile(self, - filename, - comments=None)
      - Write the data to a file in the specific format...
      - source code - -
      - -
          Inherited from DataFileParser
      -   - - - - - - -
      exportData(self)
      - Export the data
      - source code - -
      - -
      -   - - - - - - -
      importData(self, - xs, - ys, - ss)
      - Import the array (x, y, sigma) to self - -Argument: - xs : dict.
      - source code - -
      - -
      -   - - - - - - -
      parseDataFile(self)
      - Parse the data file
      - source code - -
      - -
      -   - - - - - - -
      setInputFileName(self, - datafilename)
      - Set the input data file name to parse...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename=None) -
      (Constructor) -

      -
      source code  -
      - -
      -
      -Initialization
      -
      -Argument:
      -- datafilename  :   str, data file name
      -
      -Return          :   None
      -
      -
      -
      -
      Overrides: - XYSigmaFileParser.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.XYSigmaFileParser-class.html b/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.XYSigmaFileParser-class.html deleted file mode 100644 index 11850412..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.datafileconverter.XYSigmaFileParser-class.html +++ /dev/null @@ -1,377 +0,0 @@ - - - - - srrietveld.datafileconverter.XYSigmaFileParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module datafileconverter :: - Class XYSigmaFileParser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class XYSigmaFileParser

      source code

      -
      -DataFileParser --+
      -                 |
      -                XYSigmaFileParser
      -
      - -
      Known Subclasses:
      -
      - NPDFDataParser, - RAPDFDataParser -
      - -
      -Data file parser for X-Y-Sigma format

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename=None)
      - Initialization of XYSigmaFileParser...
      - source code - -
      - -
      -   - - - - - - -
      _parse(self)
      - Virtual method to parse the data from a list of lines
      - source code - -
      - -
      -   - - - - - - -
      writeToFile(self, - filename, - comments=None)
      - Write the data to a file in the specific format...
      - source code - -
      - -
          Inherited from DataFileParser
      -   - - - - - - -
      exportData(self)
      - Export the data
      - source code - -
      - -
      -   - - - - - - -
      importData(self, - xs, - ys, - ss)
      - Import the array (x, y, sigma) to self - -Argument: - xs : dict.
      - source code - -
      - -
      -   - - - - - - -
      parseDataFile(self)
      - Parse the data file
      - source code - -
      - -
      -   - - - - - - -
      setInputFileName(self, - datafilename)
      - Set the input data file name to parse...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename=None) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization of XYSigmaFileParser
      -
      -Argument:
      -- datafilename  :   str, data file name
      -
      -Return          :   None
      -
      -
      -
      -
      Overrides: - DataFileParser.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _parse(self) -

      -
      source code  -
      - -

      Virtual method to parse the data from a list of lines

      - Return : None -
      -
      Overrides: - DataFileParser._parse -
      -
      -
      -
      - -
      - -
      - - -
      -

      writeToFile(self, - filename, - comments=None) -

      -
      source code  -
      - -
      -Write the data to a file in the specific format
      -
      -Argument:
      -- filename  :   str
      -- comments  :   list, of string for put comments to data file
      -
      -Return      :   None
      -
      -
      -
      -
      Overrides: - DataFileParser.writeToFile -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.datamanager-module.html b/static_root/doc/srrietveld/developers/srrietveld.datamanager-module.html deleted file mode 100644 index 8d62d1f1..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.datamanager-module.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - srrietveld.datamanager - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module datamanager - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module datamanager

      source code

      -
      -Management of data file and related refinement 
      -
      -Created On  2008.09.23
      -
      -Class DataManager Functions List:
      -  * Constructor
      -     __init__(self, projfname, workdir, tempfit)
      -
      -  * Information Retrieval
      -    refine_all(self)
      -
      -  * Internal usage
      -    getDataFilesList(self)
      -    readXMLProjectFile(self)
      -    syncData(self)
      -
      -


      - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - DataManager
      - Data-Manager -
      - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      duplicateModel(thefit)
      - Assume that there is only one structure model in a Fit - -duplicate the model (including one or a few phases) - -Argument: -- thefit : Fit instance - -Return : list of 2-tuples - 1.
      - source code - -
      - -
      -   - - - - - - -
      searchClosestValue(dataset, - invalue, - begin, - end)
      - Search the closest value in a sorted data set to an input value...
      - source code - -
      - -
      -   - - - - - - -
      isGoodFit(refinedetail)
      - Judge whether a Fit is good enough from the Refine Detail...
      - source code - -
      - -
      -   - - - - - - -
      loadFit(prjfname)
      - Load the fit from a multiple step project file, i.e., the current Fit...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: datamanager.py 2792 2009-03-02 15:56:43Z wdzhou $' -
      -   - - MAXRP = 50.0 -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      duplicateModel(thefit) -

      -
      source code  -
      - -
      -
      -Assume that there is only one structure model in a Fit 
      -
      -duplicate the model (including one or a few phases)
      -
      -Argument:
      -- thefit    :   Fit instance
      -
      -Return      :   list of 2-tuples
      -                1. Lattice instance
      -                2. List of Atom instances
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      searchClosestValue(dataset, - invalue, - begin, - end) -

      -
      source code  -
      - -
      -
      -Search the closest value in a sorted data set to an input value
      -
      -Argument:
      -- dataset   :   list, array
      -- invalue   :   input value
      -- begin     :   int, begining index
      -- end       :   int, ending index
      -
      -Return      :   object in data set
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      isGoodFit(refinedetail) -

      -
      source code  -
      - -
      -
      -Judge whether a Fit is good enough from the Refine Detail
      -
      -Argument:
      -- refinedetail  :   RefineDetail instance
      -
      -Return          :   Boolean 
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      loadFit(prjfname) -

      -
      source code  -
      - -
      -
      -Load the fit from a multiple step project file, i.e., the current Fit
      -
      -Argument:
      -- prjfname  :   str, project file name
      -
      -Return      :   Fit object
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.datamanager-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.datamanager-pysrc.html deleted file mode 100644 index 7b01bf94..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.datamanager-pysrc.html +++ /dev/null @@ -1,704 +0,0 @@ - - - - - srrietveld.datamanager - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module datamanager - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.datamanager

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ Management of data file and related refinement  
      - 15   
      - 16    Created On  2008.09.23 
      - 17   
      - 18    Class DataManager Functions List: 
      - 19      * Constructor 
      - 20         __init__(self, projfname, workdir, tempfit) 
      - 21   
      - 22      * Information Retrieval 
      - 23        refine_all(self) 
      - 24   
      - 25      * Internal usage 
      - 26        getDataFilesList(self) 
      - 27        readXMLProjectFile(self) 
      - 28        syncData(self) 
      - 29  """ 
      - 30  __id__ = "$Id: datamanager.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      - 31   
      - 32  MAXRP = 50.00 
      - 33   
      -
      34 -class DataManager(object): -
      35 """ - 36 Data-Manager - 37 - 38 """ -
      39 - def __init__(self, projfname, workdir, tempfit): -
      40 """ - 41 initialization - 42 - 43 Argument: - 44 - projfname : - 45 - workdir : - 46 - tempfit : - 47 """ - 48 # 1. input - 49 self._projectfilename = projfname - 50 self._workingdir = workdir - 51 self._templatefit = tempfit - 52 - 53 # 2. init data structure - 54 self._lebailRp = {} - 55 self._rietveldRp = {} - 56 self._projectFileName = {} - 57 self._refinedFit = {} # key = lattice.a, value = file name/fit instance - 58 - 59 # 3. phase model - 60 self._origmodel = duplicateModel(tempfit) - 61 self._lowerboundmodel = None - 62 self._upperboundmodel = None - 63 - 64 # 4. synchronization - 65 self.syncData() - 66 - 67 return -
      68 - 69 -
      70 - def syncData(self): -
      71 """ - 72 Synchronize data sets in the working directory with the given project - 73 - 74 Return : None - 75 """ - 76 # 1. Input data file - 77 self.readXMLProjectFile() - 78 - 79 # 2. List the current data file - 80 datafilelist = self.getDataFilesList() - 81 - 82 # 3. Synchronize - 83 for datafilename in datafilelist: - 84 if not self._rietveldRp.has_key(datafilename): - 85 self._lebailRp[datafilename] = None - 86 self._rietveldRp[datafilename] = None - 87 - 88 return -
      89 - 90 -
      91 - def readXMLProjectFile(self): -
      92 """ - 93 Read input project file in XML format - 94 - 95 Return : None - 96 """ - 97 import xmlinterface as XMLIN - 98 import refinemanager as RM - 99 -100 maxlat_a = None -101 minlat_a = None -102 -103 # 1. Parse Information From XML File -104 try: -105 # 1.1 Import XML file -106 fullfilename = self._projectfilename -107 myxml = XMLIN.importXML(fullfilename) -108 -109 # 1.2 Import for -110 refnode = None -111 for childnode in myxml.childNodes: -112 if childnode.localName == "REFINEALL": -113 refnode = childnode -114 break -115 # LOOP-OVER: for childnode in myxml.childNodes -116 -117 if refnode is None: -118 errmsg = "XML File is Not Correct" -119 raise NotImplementedError(errmsg) -120 -121 for childnode in refnode.childNodes: -122 -123 if childnode.localName == "DATASET": -124 # 2.1 Parse -125 filename = str(XMLIN.getAttributeValue(childnode, "Name")) -126 lebailrp = str(XMLIN.getAttributeValue(childnode, "Lebail-Rp")) -127 rietvlrp = str(XMLIN.getAttributeValue(childnode, "Rietveld-Rp")) -128 # 2.2 Read -129 try: -130 if lebailrp.lower() != "nan": -131 lebailrp = float(lebailrp) -132 except ValueError, err: -133 pass -134 try: -135 if rietvlrp.lower() != "nan": -136 rietvlrp = float(rietvlrp) -137 except ValueError, err: -138 pass -139 # 2.3 Store -140 self._lebailRp[filename] = lebailrp -141 self._rietveldRp[filename] = rietvlrp -142 -143 elif childnode.localName == "MODELINFO": -144 # Parse -145 lattice_a = float(XMLIN.getAttributeValue(childnode, "Lattice-a")) -146 projname = str(XMLIN.getAttributeValue(childnode, "Project-Name")) -147 # Store -148 self._refinedFit[lattice_a] = projname -149 -150 # LOOP-OVER: for childnode in myxml.childNodes -151 except IOError, err: -152 msg = "Application File %-10s Does Not Exist; This is a new set of data"% \ -153 (fullfilename) -154 print msg -155 -156 return -
      157 -158 -
      159 - def getDataFilesList(self): -
      160 """ -161 Get the list of data file names (no path) -162 -163 Return : list of str, file names -164 """ -165 raise NotImplementedError("Unit Test Required!") -166 import os -167 -168 # 1. List directory -169 try: -170 rawfilenameslist = os.listdir(self._workingdir) -171 except OSError, err: -172 errmsg = "Directory %-20s Is Not Found"% (self._workingdir) -173 raise FitConfigurationError(errmsg) -174 raise NotImplementedError("Use good os.listfile() to replace") -175 -176 # 2. Find file names, no path, including ".dat" as a data file -177 datafilenameslist = [] -178 for filename in rawfilenameslist: -179 filename = line.split("\n")[0].split("/")[-1] -180 if filename.lower().count(".dat") == 1: -181 datafilenameslist.append(filename) -182 -183 return datafilefilenameslist -
      184 -185 -
      186 - def refine_all(self): -
      187 """ -188 Refine all the data file that -189 -190 Return : None -191 """ -192 import midscript as MS -193 import copy -194 import refinemanager as RM -195 import refinestrategy as RS -196 -197 # 1. Initialization -198 Stop = False -199 neverrefined = [] -200 toberefined = {} -201 -202 # 2. FIXME Continue on an interrupted break point -203 self.continueUponBreak() -204 -205 # 3. Select the unrefined file according to Rietveld-Rp -206 for filename in self._rietveldRp.keys(): -207 rp = self._rietveldRp[filename] -208 if 0: # 1440 -209 print "1440: File Name = %-20s Rp = %-20s with type %-20s"% (filename, rp, type(rp)) -210 if rp == "nan" or rp is None or rp > MAXRP: -211 neverrefined.append(filename) -212 -213 if 0: # debug 1216 -214 print "1216 List of Data File: (Debug exit)" -215 for fn in neverrefined: -216 print fn -217 exit(0) -218 -219 # 4. Loop and solve the problem -220 while not Stop: -221 -222 # 4.1 Le-Bail select for refinable-data set -223 for filename in neverrefined[:]: -224 fitresults = [] -225 # 4.1.1 Fit for 3 models in Le-Bail -226 for model in [self._origmodel, self._lowerboundmodel, self._upperboundmodel]: -227 if model is not None: -228 dryfit = copy.deepcopy(self._templatefit) -229 if self._workingdir == "": -230 ffanme = filename -231 else: -232 ffname = self._workingdir+"/"+filename -233 MS.reloadData(dryfit, ffname) -234 MS.replaceStructureModel(dryfit, model) -235 refinedetail_dry = dryfit.refine(srtype="lebail") -236 if 1: # 1600 -237 print "1600...Dry Lebail. Rp = %-15s"% (refinedetail_dry.getResidueValue(cycle=-1, residname="rp")) -238 fitresults.append( (dryfit, refinedetail_dry) ) -239 else: -240 fitresults.append(None) -241 -242 # 4.1.2 Select the best fit -243 leastrpval = "NAN" -244 leastrpidx = -1 -245 findex = 0 -246 for tup in fitresults: -247 if tup is not None: -248 dryfit, refinedetail_dry = tup -249 rp = refinedetail_dry.getResidueValue(cycle=-1, residname="rp") -250 if rp != "NAN": -251 if leastrpval=="NAN" or rp < leastrpval: -252 leastrpval = rp -253 leastrpidx = findex -254 # END-IF rp != "NAN" -255 findex += 1 -256 # LOOP-OVER -257 -258 if 1: # 1558 -259 print "1558: Data File = %-15s Least Rp = %-15s @ %-5s"% \ -260 (filename, leastrpval, leastrpidx) -261 -262 # 4.1.3 judge whether to add: index=0, 1, 2 for orig, low, upper -263 if leastrpval != "NAN" and leastrpval < MAXRP: -264 dryfit, refinedetail_dry = fitresults[leastrpidx] -265 toberefined[leastrpval] = (filename, leastrpidx) -266 self._lebailRp[filename] = refinedetail_dry.getResidueValue(cycle=-1, residname="rp") -267 neverrefined.remove(filename) -268 -269 # LOOP-OVER: for filename in neverrefined -270 -271 # 4.2 Flag whether the loop should be quit -272 if len(toberefined) == 0: -273 Stop = True -274 refineorderlist = [] -275 else: -276 numbefore = len(toberefined) -277 refineorderlist = sorted(toberefined.keys()) -278 -279 if 1: # 1111 -280 print "-------------------- 1111 --------------------" -281 print "To Fit Data:" -282 for name in toberefined: -283 print name -284 print "Cannot Refine:" -285 for name in neverrefined: -286 print name -287 print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" -288 # END-DEBUG -289 -290 # 4.3 Structure refine -291 for rp in refineorderlist: -292 # 4.3.1 Get Data File -293 datafname, findex = toberefined[rp] -294 if 1: # 1114 -295 print "1114: Name = %-10s"% (datafname) -296 -297 # 4.3.2 Construct (model and data), Multi-step Lebail, Save -298 lebfit = copy.deepcopy(self._templatefit) -299 -300 if findex == 0: -301 startmodel = copy.deepcopy(self._origmodel) -302 elif findex == 1: -303 startmodel = copy.deepcopy(self._lowerboundmodel) -304 else: -305 startmodel = copy.deepcopy(self._upperboundmodel) -306 MS.replaceStructureModel(lebfit, startmodel) -307 -308 if self._workingdir == "": -309 ffname = datafname -310 else: -311 ffname=self._workingdir+"/"+datafname -312 MS.reloadData(lebfit, ffname) -313 -314 msrefmanager = RM.MultiStepRefineManager(lebfit) -315 thestrategy = RS.CalibratedLebailRefineStrategy() -316 refinedetail_leb, processid = msrefmanager.refine(thestrategy) -317 -318 if self._workingdir == "": -319 projectfname = datafname.split(".")[0]+"_lebail.proj" -320 else: -321 projectfname = self._workingdir+"/"+datafname.split(".")[0]+"_lebail.proj" -322 msrefmanager.save(projectfname) -323 -324 # 4.3.3 Select the nearest lattice model, replace the data, do Rietveld -325 lat_a = lebfit.getComponent(0).getPhase(0).getLattice().geta() -326 numrefinedfit = len(self._refinedFit) -327 if numrefinedfit > 0: -328 # a. using the closest -329 # a.1 find the closest Fit -330 ref_a = searchClosestValue(sorted(self._refinedFit.keys()), lat_a, 0, numrefinedfit-1) -331 if self._workingdir == "": -332 fullprojname = self._refinedFit[ref_a] -333 else: -334 fullprojname = self._workingdir+"/"+self._refinedFit[ref_a] -335 rietfit = copy.deepcopy(loadFit(fullprojname)) -336 # a.2 reload the data -337 MS.reloadData(rietfit, ffname) -338 else: -339 # b. start case. use the original fit -340 rietfit = lebfit -341 -342 if 0: # 1121 -343 print "1121:" -344 print rietfit._srfit -345 print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" -346 -347 msrefmanager = RM.MultiStepRefineManager(rietfit) -348 thestrategy = RS.CalibratedRietveldRefineStrategy() -349 refinedetail_rie, processid = msrefmanager.refine(thestrategy) -350 -351 # 4.2.3 record -352 if isGoodFit(refinedetail_rie) is True: -353 lat_a = rietfit.getComponent(0).getPhase(0).getLattice().geta() -354 saveprojfilename = ffname.split(".")[0]+".proj" -355 msrefmanager.save(saveprojfilename) -356 -357 self._rietveldRp[datafname] = refinedetail_rie.getResidueValue(cycle=-1, residname="rp") -358 self._projectFileName[datafname] = saveprojfilename.split("/")[-1] -359 self._refinedFit[lat_a] = self._projectFileName[datafname] -360 -361 del toberefined[rp] -362 else: -363 self._rietveldRp[datafname] = "NAN" -364 -365 # LOOP-OVER: for rp in refineorderlist -366 -367 # 4.4 Check again: If no good refinement added in, stop! -368 if Stop is False: -369 numafter = len(toberefined) -370 if numbefore == numafter: -371 Stop = True -372 -373 # END-WHILE -374 -375 return -
      376 -377 -
      378 - def save(self): -
      379 """ -380 Save the refinement to the project XML file. -381 -382 Return : None -383 """ -384 import xml.dom.minidom -385 import time -386 -387 currtime = time.time() -388 -389 myxml = xml.dom.minidom.Document() -390 # 1. root node -391 infonode = myxml.createElement("REFINEALL") -392 infonode.setAttribute("Name", str(currtime)) -393 myxml.appendChild(infonode) -394 -395 # 2. data file node -396 for datafname in self._rietveldRp.keys(): -397 lebailrp = self._lebailRp[datafname] -398 rietvdrp = self._rietveldRp[datafname] -399 filenode = myxml.createElement("DATASET") -400 filenode.setAttribute("Name" , datafname) -401 filenode.setAttribute("Lebail-Rp" , str(lebailrp)) -402 filenode.setAttribute("Rietveld-Rp" , str(rietvdrp)) -403 infonode.appendChild(filenode) -404 -405 # 3. lattice node -406 for lata in self._refinedFit.keys(): -407 projfname = self._refinedFit[lata] -408 projnode = myxml.createElement("MODELINFO") -409 projnode.setAttribute("Lattice-a" , str(lata)) -410 projnode.setAttribute("Project-Name" , projfname) -411 infonode.appendChild(projnode) -412 -413 # 4. save -414 ofile = open(self._projectfilename, "w") -415 xml.dom.ext.PrettyPrint(myxml, ofile) -416 ofile.close() -417 -418 return -
      419 -420 -
      421 - def continueUponBreak(self): -
      422 """ -423 Continue the unfinished refinement from an interruption -424 -425 Return : None -426 """ -427 # FIXME will be developed later -428 wmsg = "Warning: Develop DataManager.continueUponBreak() Soon" -429 print wmsg -430 -431 return -
      432 -433 -
      434 -def duplicateModel(thefit): -
      435 """ -436 Assume that there is only one structure model in a Fit -437 -438 duplicate the model (including one or a few phases) -439 -440 Argument: -441 - thefit : Fit instance -442 -443 Return : list of 2-tuples -444 1. Lattice instance -445 2. List of Atom instances -446 """ -447 model = [] -448 numphases = thefit.getComponent(0).getNumPhases() -449 -450 for pidx in xrange(numphases): -451 phase = thefit.getComponent(0).getPhase(pidx) -452 spacegroup = phase.getSpaceGroup() -453 lattice = phase.getLattice().duplicate() -454 numatoms = phase.getNumAtoms() -455 atomslist = [] -456 for aindex in xrange(numatoms): -457 atom = phase.getAtom(aindex).duplicate() -458 atomslist.append(atom) -459 copyphase = (lattice, atomslist, spacegroup) -460 model.append(copyphase) -461 -462 return model -
      463 -464 -
      465 -def searchClosestValue(dataset, invalue, begin, end): -
      466 """ -467 Search the closest value in a sorted data set to an input value -468 -469 Argument: -470 - dataset : list, array -471 - invalue : input value -472 - begin : int, begining index -473 - end : int, ending index -474 -475 Return : object in data set -476 """ -477 # using binary search -478 if invalue < dataset[begin]: -479 return dataset[begin] -480 elif invalue > dataset[end]: -481 return dataset[end] -482 elif end-begin==1: -483 if invalue-dataset[begin] < dataset[end]-invalue: -484 return dataset[begin] -485 else: -486 return dataset[end] -487 else: -488 mid = (begin+end)/2 -489 if invalue < dataset[mid]: -490 return searchClosestValue(dataset, invalue, begin, mid) -491 else: -492 return searchClosestValue(dataset, invalue, mid, end) -493 -494 return -
      495 -496 -
      497 -def isGoodFit(refinedetail): -
      498 """ -499 Judge whether a Fit is good enough from the Refine Detail -500 -501 Argument: -502 - refinedetail : RefineDetail instance -503 -504 Return : Boolean -505 """ -506 _STD_RP = 50.0 -507 MINCHI2 = 1.00 -508 -509 therp = refinedetail.getResidueValue(cycle=-1, residname="rp") -510 chi2 = refinedetail.getResidueValue(cycle=-1, residname="chi2") -511 -512 if therp < _STD_RP and chi2 > MINCHI2: -513 rval = True -514 else: -515 rval = False -516 -517 return rval -
      518 -519 -
      520 -def loadFit(prjfname): -
      521 """ -522 Load the fit from a multiple step project file, i.e., the current Fit -523 -524 Argument: -525 - prjfname : str, project file name -526 -527 Return : Fit object -528 """ -529 import refinemanager as RM -530 -531 msrefmanager = RM.loadMultiStepRefinements(prjfname) -532 -533 if not isinstance(msrefmanager, RM.MultiStepRefineManager): -534 errmsg = "datamanager.loadFit(): Input File is Not MultiStepRefineManager Pickel File" -535 raise NotImplementedError(errmsg) -536 -537 retfit = msrefmanager.getCurrentFit() -538 -539 return retfit -
      540 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.datamanager.DataManager-class.html b/static_root/doc/srrietveld/developers/srrietveld.datamanager.DataManager-class.html deleted file mode 100644 index 777872ae..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.datamanager.DataManager-class.html +++ /dev/null @@ -1,470 +0,0 @@ - - - - - srrietveld.datamanager.DataManager - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module datamanager :: - Class DataManager - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class DataManager

      source code

      -
      -object --+
      -         |
      -        DataManager
      -
      - -
      -Data-Manager

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - projfname, - workdir, - tempfit)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      syncData(self)
      - Synchronize data sets in the working directory with the given - project
      - source code - -
      - -
      -   - - - - - - -
      readXMLProjectFile(self)
      - Read input project file in XML format
      - source code - -
      - -
      -   - - - - - - -
      getDataFilesList(self)
      - Get the list of data file names (no path)
      - source code - -
      - -
      -   - - - - - - -
      refine_all(self)
      - Refine all the data file that
      - source code - -
      - -
      -   - - - - - - -
      save(self)
      - Save the refinement to the project XML file.
      - source code - -
      - -
      -   - - - - - - -
      continueUponBreak(self)
      - Continue the unfinished refinement from an interruption
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __str__ -

      -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - projfname, - workdir, - tempfit) -
      (Constructor) -

      -
      source code  -
      - -
      -
      -initialization
      -
      -Argument:
      -- projfname :
      -- workdir   :
      -- tempfit   :
      -
      -
      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      syncData(self) -

      -
      source code  -
      - -

      Synchronize data sets in the working directory with the given - project

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      readXMLProjectFile(self) -

      -
      source code  -
      - -

      Read input project file in XML format

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      getDataFilesList(self) -

      -
      source code  -
      - -

      Get the list of data file names (no path)

      - Return : list of str, file names -
      -
      -
      -
      - -
      - -
      - - -
      -

      refine_all(self) -

      -
      source code  -
      - -

      Refine all the data file that

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      save(self) -

      -
      source code  -
      - -

      Save the refinement to the project XML file.

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      continueUponBreak(self) -

      -
      source code  -
      - -

      Continue the unfinished refinement from an interruption

      - Return : None -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.dataprocessnpdf-module.html b/static_root/doc/srrietveld/developers/srrietveld.dataprocessnpdf-module.html deleted file mode 100644 index aba78bf9..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.dataprocessnpdf-module.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - srrietveld.dataprocessnpdf - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module dataprocessnpdf - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module dataprocessnpdf

      source code

      -
      -
      -Processing NPDF data
      -class NPDFData:
      -    def __init__(self):
      -    def importNPDFData(self)
      -    def exportFullprof(self, ofilename="bankdata.dat"):
      -
      -


      - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - NPDFData
      - NPDF data processing class... -
      - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      exportRawGSA(gsafname, - iparmfname, - bankid, - expfname)
      - Using rawplot to export diffraction pattern from raw GSAS file...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: dataprocessnpdf.py 2918 2009-03-18 19:26:39Z wd... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      exportRawGSA(gsafname, - iparmfname, - bankid, - expfname) -

      -
      source code  -
      - -
      -
      -Using rawplot to export diffraction pattern from raw GSAS file
      -
      -Argument:
      -- gsafname  :   str, GSA file name
      -- iparmfname:   str, iparm (GSAS) parameter file
      -- bankid    :   int, bank ID
      -- expfname  :   str, exported file name
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: dataprocessnpdf.py 2918 2009-03-18 19:26:39Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.dataprocessnpdf-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.dataprocessnpdf-pysrc.html deleted file mode 100644 index 976079ef..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.dataprocessnpdf-pysrc.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - srrietveld.dataprocessnpdf - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module dataprocessnpdf - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.dataprocessnpdf

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15  Processing NPDF data 
      - 16  class NPDFData: 
      - 17      def __init__(self): 
      - 18      def importNPDFData(self) 
      - 19      def exportFullprof(self, ofilename="bankdata.dat"): 
      - 20  """ 
      - 21   
      - 22  __id__ = "$Id: dataprocessnpdf.py 2918 2009-03-18 19:26:39Z wdzhou $" 
      - 23   
      - 24  import os 
      - 25  import math 
      - 26   
      -
      27 -class NPDFData: -
      28 """ - 29 NPDF data processing class - 30 - 31 Class Variables: - 32 - 33 - _nx : normalized X - 34 - _ny : normalized Y - 35 - _ns : normalized sigma - 36 """ - 37 NumBanks = 4 - 38 -
      39 - def __init__(self, rawgsafname, iparmfname): -
      40 """ - 41 Initialization & import data - 42 - 43 Argument: - 44 - rawgsafname : str, GSAS data file - 45 - iparmfname : GSAS parameter file - 46 """ - 47 self._gsafname = rawgsafname - 48 self._iparmfname = iparmfname - 49 - 50 self._nx = {} - 51 self._ny = {} - 52 self._ns = {} - 53 - 54 for bid in xrange(1, 4+1): - 55 self._nx[bid] = [] - 56 self._ny[bid] = [] - 57 self._ns[bid] = [] - 58 - 59 return -
      60 - 61 -
      62 - def importNPDFData(self, bankid): -
      63 """ Import Non-normalized NPDF data from a file - 64 File format is assumed to be in TOF-Intensity-IncidentSpectral format - 65 - 66 Argument: - 67 - bankid : int - 68 - 69 Return : None - 70 """ - 71 # 1. Convert GSA data to X-Y data - 72 expfname = "gsatemp"+str(bankid)+".dat" - 73 exportRawGSA(self._gsafname, self._iparmfname, bankid, expfname) - 74 - 75 # 2. Import converted GSAS data file - 76 ifile = open(expfname, "r") - 77 lines = ifile.readlines() - 78 ifile.close() - 79 rmcmd = "rm %-15s"% (expfname) - 80 os.system(rmcmd) - 81 - 82 xs = [] - 83 ys = [] - 84 ss = [] - 85 Is = [] - 86 - 87 for lindex in xrange(1, len(lines)): - 88 cline = lines[lindex].strip() - 89 terms = cline.split() - 90 x = float(terms[0]) - 91 y = float(terms[1]) - 92 i = float(terms[2]) - 93 s = math.sqrt(y) - 94 - 95 xs.append(x) - 96 ys.append(y) - 97 ss.append(s) - 98 Is.append(i) - 99 -100 # 3. Normalize -101 self.normalize(bankid, xs, ys, ss, Is) -102 -103 return -
      104 -105 -
      106 - def normalize(self, bankid, xs, ys, ss, Is): -
      107 """ Normalize the input data -108 1. normalize the data from a certain bank -109 2. put the normalized data to instance data structure -110 -111 Argument: -112 - bankid : int, bank ID -113 - xs : list -114 - ys : list -115 - ss : list -116 - Is : list -117 -118 Return : None -119 """ -120 for index in xrange(len(xs)): -121 # 1. norm -122 nx = xs[index]*1000 -123 ny = ys[index]/Is[index] -124 ns = ny*(ss[index]/ys[index]) -125 -126 # 2. store -127 self._nx[bankid].append(nx) -128 self._ny[bankid].append(ny) -129 self._ns[bankid].append(ns) -130 # LOOP-OVER: for index in xrange(len(self._xs)) -131 -132 return -
      133 -134 -
      135 - def exportFullprof(self, bankid, ofilenameroot="bankdata", newdir = ""): -
      136 """ -137 Export normalized data to Fullprof readable format -138 -139 Argument: -140 - bankid : int -141 - ofilenameroot : str -142 - newdir : str -143 -144 Return : str, File Name -145 """ -146 # 1. output file name -147 if newdir != "" and newdir[-1] != "/": -148 newdir = newdir + "/" -149 ofilename = newdir + ofilenameroot+str(bankid)+".dat" -150 -151 # 2. write out if file does not exist -152 if not os.path.isfile(ofilename): -153 # 2.1 Import the bank data -154 self.importNPDFData(bankid) -155 fstring = "" -156 -157 # 2.2. 6 Information Line -158 for l in xrange(6): -159 fstring += "#\n" -160 -161 # 2.3 Data line -162 for index in xrange(len(self._nx[bankid])): -163 fstring += "%-15s %-15s %-15s\n"% \ -164 (self._nx[bankid][index], self._ny[bankid][index], self._ns[bankid][index]) -165 -166 # 2.4 Write file -167 ofile = open(ofilename, "w") -168 ofile.write(fstring) -169 ofile.close() -170 -171 # END-IF -172 -173 return ofilename -
      174 -175 # END-CLASS -176 -177 -
      178 -def exportRawGSA(gsafname, iparmfname, bankid, expfname): -
      179 """ -180 Using rawplot to export diffraction pattern from raw GSAS file -181 -182 Argument: -183 - gsafname : str, GSA file name -184 - iparmfname: str, iparm (GSAS) parameter file -185 - bankid : int, bank ID -186 - expfname : str, exported file name -187 -188 Return : None -189 """ -190 # 1. create input file -191 cmdchain = "A\nN\n%-15s\nY\n%-15s\n%-5s\nI\nT\nO\n%-15s\nX\n"% \ -192 (gsafname, iparmfname, bankid, expfname) -193 ofname = "inparameter.txt" -194 ofile = open(ofname, "w") -195 ofile.write(cmdchain) -196 ofile.close() -197 -198 # 2. output -199 cmd = "rawplot < %-20s"% (ofname) -200 os.system(cmd) -201 -202 return -
      203 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.dataprocessnpdf.NPDFData-class.html b/static_root/doc/srrietveld/developers/srrietveld.dataprocessnpdf.NPDFData-class.html deleted file mode 100644 index 446acf06..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.dataprocessnpdf.NPDFData-class.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - srrietveld.dataprocessnpdf.NPDFData - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module dataprocessnpdf :: - Class NPDFData - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class NPDFData

      source code

      -
      -
      -NPDF data processing class
      -
      -Class Variables:
      -
      -- _nx   :   normalized X
      -- _ny   :   normalized Y
      -- _ns   :   normalized sigma
      -
      -


      - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - rawgsafname, - iparmfname)
      - Initialization & import data...
      - source code - -
      - -
      -   - - - - - - -
      importNPDFData(self, - bankid)
      - Import Non-normalized NPDF data from a file...
      - source code - -
      - -
      -   - - - - - - -
      normalize(self, - bankid, - xs, - ys, - ss, - Is)
      - Normalize the input data -1.
      - source code - -
      - -
      -   - - - - - - -
      exportFullprof(self, - bankid, - ofilenameroot='bankdata', - newdir='')
      - Export normalized data to Fullprof readable format...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - NumBanks = 4 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - rawgsafname, - iparmfname) -
      (Constructor) -

      -
      source code  -
      - -
      -
      -Initialization & import data
      -
      -Argument:
      -- rawgsafname   :   str, GSAS data file
      -- iparmfname    :   GSAS parameter file
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      importNPDFData(self, - bankid) -

      -
      source code  -
      - -
      -Import Non-normalized NPDF data from a file
      -File format is assumed to be in TOF-Intensity-IncidentSpectral format
      -
      -Argument:
      -- bankid    :   int
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      normalize(self, - bankid, - xs, - ys, - ss, - Is) -

      -
      source code  -
      - -
      -Normalize the input data
      -1. normalize the data from a certain bank
      -2. put the normalized data to instance data structure
      -
      -Argument:
      -- bankid    :   int, bank ID
      -- xs        :   list 
      -- ys        :   list
      -- ss        :   list
      -- Is        :   list
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      exportFullprof(self, - bankid, - ofilenameroot='bankdata', - newdir='') -

      -
      source code  -
      - -
      -
      -Export normalized data to Fullprof readable format
      -
      -Argument:
      -- bankid        :   int
      -- ofilenameroot :   str
      -- newdir        :   str
      -
      -Return          :   str, File Name
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.enduserscripts-module.html b/static_root/doc/srrietveld/developers/srrietveld.enduserscripts-module.html deleted file mode 100644 index 8eb3c083..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.enduserscripts-module.html +++ /dev/null @@ -1,473 +0,0 @@ - - - - - srrietveld.enduserscripts - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module enduserscripts - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module enduserscripts

      source code

      -
      -
      -End-user scripts/commands to set up a refinement
      -
      -Providing a set of functions/methods for power users/developers to 
      -generate a simple script based on RietveldAPI to do structure refinement.
      -
      -Warning!  On 2008.10.02 NO OTHER diffpy.srrietveld Script is Using Any Method In This Script Now!
      -
      -Created on  2008.05.07
      -
      -Methods List:
      -* simpleFit(Data, bgData, Instrument, Model)
      -* refineByScript(fit, scriptsfname)
      -* plot2D(fit)
      -
      -Example 1:
      -> fit = simpleFit(Data = "mydata.dat", bgData = "mybackground.dat",
      -         Instrument = "GEM", Model = ["structure1.cif", structure2.cif"])
      -> fit.refine( all )   
      -> plot( fit )
      -> visualizeStructure( fit )
      -
      -Example 2: some extra configurability to give the user more control.
      -> fit.setFitRange([(begin, end, bankNo),(begin, end, bankNo)...])
      -> fit.setExcludedRegion([(begin, end, bankNo),(begin, end, bankNo)...])
      -> varList=[latParms, scale]  
      -> fit.refine(varList)
      -> varList=varList.append([fracCoords])
      -> fit.refine(varList)
      -
      -Example 3:  prints out all the contents of latParms object
      -> fit.showLatParms()  
      -
      -


      - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      simpleFit(Data, - bgData, - Instrument, - Model)
      - generate a Fit instance in a simple setup
      - source code - -
      - -
      -   - - - - - - -
      refineByScript(fit, - scriptsfname)
      - do a series of refien by scripts...
      - source code - -
      - -
      -   - - - - - - -
      plot2D(fit)
      - plotting the result of pattern ...
      - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: enduserscripts.py 2792 2009-03-02 15:56:43Z wdz... -
      -   - - All = None -
      -   - - zeroShift = <diffpy.srrietveld.refineguides.ZeroGuide instance... -
      -   - - fracCoords = None -
      -   - - latParms = <diffpy.srrietveld.refineguides.LatticeGuide instan... -
      -   - - scale = <diffpy.srrietveld.refineguides.ScaleGuide instance at... -
      -   - - ETA = 1e-06 -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      simpleFit(Data, - bgData, - Instrument, - Model) -

      -
      source code  -
      - -

      generate a Fit instance in a simple setup

      -

      Arguements: Data : string, data file name bgData : string, - background data file name (interpolated background) Instrument: string, - instrument name Model : list of string, list of structure file - name

      - Return : Fit instance -
      -
      -
      -
      - -
      - -
      - - -
      -

      refineByScript(fit, - scriptsfname) -

      -
      source code  -
      - -
      -
      -do a series of refien by scripts
      -
      -Arguement:
      -- fit           :   diffpy.rietveldapi.Fit
      -- scriptsfname  :   string, script file name
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      plot2D(fit) -

      -
      source code  -
      - -
      -
      -plotting the result of pattern 
      -
      -Arguement
      -- fit   :   Fit instance
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: enduserscripts.py 2792 2009-03-02 15:56:43Z wdzhou $'
      -
      -
      -
      -
      -
      - -
      - -
      -

      zeroShift

      - -
      -
      -
      -
      Value:
      -
      -ZeroGuide()
      -
      -
      -
      -
      -
      - -
      - -
      -

      latParms

      - -
      -
      -
      -
      Value:
      -
      -LatticeGuide()
      -
      -
      -
      -
      -
      - -
      - -
      -

      scale

      - -
      -
      -
      -
      Value:
      -
      -ScaleGuide()
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.enduserscripts-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.enduserscripts-pysrc.html deleted file mode 100644 index 3a8c6625..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.enduserscripts-pysrc.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - srrietveld.enduserscripts - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module enduserscripts - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.enduserscripts

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15    End-user scripts/commands to set up a refinement 
      - 16   
      - 17    Providing a set of functions/methods for power users/developers to  
      - 18    generate a simple script based on RietveldAPI to do structure refinement. 
      - 19   
      - 20    Warning!  On 2008.10.02 NO OTHER diffpy.srrietveld Script is Using Any Method In This Script Now! 
      - 21    
      - 22    Created on  2008.05.07 
      - 23   
      - 24    Methods List: 
      - 25    * simpleFit(Data, bgData, Instrument, Model) 
      - 26    * refineByScript(fit, scriptsfname) 
      - 27    * plot2D(fit) 
      - 28   
      - 29    Example 1: 
      - 30    > fit = simpleFit(Data = "mydata.dat", bgData = "mybackground.dat", 
      - 31             Instrument = "GEM", Model = ["structure1.cif", structure2.cif"]) 
      - 32    > fit.refine( all )    
      - 33    > plot( fit ) 
      - 34    > visualizeStructure( fit ) 
      - 35     
      - 36    Example 2: some extra configurability to give the user more control. 
      - 37    > fit.setFitRange([(begin, end, bankNo),(begin, end, bankNo)...]) 
      - 38    > fit.setExcludedRegion([(begin, end, bankNo),(begin, end, bankNo)...]) 
      - 39    > varList=[latParms, scale]   
      - 40    > fit.refine(varList) 
      - 41    > varList=varList.append([fracCoords]) 
      - 42    > fit.refine(varList) 
      - 43     
      - 44    Example 3:  prints out all the contents of latParms object 
      - 45    > fit.showLatParms()   
      - 46  """ 
      - 47  __id__ = "$Id: enduserscripts.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      - 48   
      - 49  import diffpy.rietveldapi.Fit as SUFit 
      - 50  import diffpy.srrietveld.instrument as IT 
      - 51  import modelrw as MRW 
      - 52  import midscript as MS 
      - 53  from diffpy.srrietveld.refineguides import * 
      - 54   
      - 55  # Initialize Globle Information about Refinement 
      - 56  All         = None 
      - 57  zeroShift   = ZeroGuide() 
      - 58  fracCoords  = None 
      - 59  latParms    = LatticeGuide() 
      - 60  scale       = ScaleGuide() 
      - 61   
      -
      62 -def simpleFit(Data, bgData, Instrument, Model): -
      63 """ - 64 generate a Fit instance in a simple setup - 65 - 66 Arguements: - 67 Data : string, data file name - 68 bgData : string, background data file name (interpolated background) - 69 Instrument: string, instrument name - 70 Model : list of string, list of structure file name - 71 - 72 Return : Fit instance - 73 """ - 74 # 1. initialize Fit() - 75 fit = SUFit() - 76 - 77 # 2. get Instrument - 78 thisInstrument = IT.getInstrument(Instrument) - 79 - 80 # 3. set up structure - 81 # FIXME Need to implement a wrapper on CIF reader - 82 phases = [] - 83 for ciffname in Model: - 84 lattice, spacegroup, atoms = MRW.importCIF(ciffname) - 85 phase = MS.initCrystalPhase(lattice, spacegroup, phasename=ciffname) - 86 for atom in atoms: - 87 MS.addAtom(phase, atom["type"], atom["fraccoordinate"], atom["occ"], atom["biso"]) - 88 phases.append(phase) - 89 - 90 # 4. set up RietveldComponent and data, including default excluded region/fit range - 91 thisInstrument.setRietveldComponents(fit, Data, bgData, phases) - 92 - 93 return fit -
      94 - 95 -
      96 -def refineByScript(fit, scriptsfname): -
      97 """ - 98 do a series of refien by scripts - 99 -100 Arguement: -101 - fit : diffpy.rietveldapi.Fit -102 - scriptsfname : string, script file name -103 -104 Return : None -105 """ -106 def getRefineGuideByName(refineguidename): -107 """ -108 """ -109 if refineguidename == "zeroShift": -110 return ZeroGuide() -111 elif refineguidename == "latParms": -112 return LatticeGuide() -113 elif refineguidename == "scale": -114 return ScaleGuide() -115 else: -116 wstring = "getRefineGuideByName: Name %-10s has not been implemented" -117 raise NotImplementedError(wstring) -
      118 -119 -120 # 1. get the refine sequennce list -121 sfile = open(scriptsfname, "r") -122 lines = sfile.readlines() -123 sfile.close() -124 -125 step = 0 -126 refinedict = {} -127 refinelist = [] -128 for line in lines: -129 lines = line.split("\n")[0].strip() -130 if lines[0] == '+' or lines[0] == '-': -131 terms = lines.split() -132 rlist = refinelist[:] -133 -134 if lines[0] == "+": -135 for gindex in xrange(1, len(terms)): -136 rguide = getRefineGuideByName(terms[gindex]) -137 rlist.append(rguide) -138 else: -139 raise NotImplementedError("for - case") -140 -141 refinedict[step] = rlist -142 refinelist = rlist[:] -143 step += 1 -144 -145 totsteps = step -146 -147 # 2. do in steps -148 for step in xrange(totsteps): -149 refinelist = refinedict[step] -150 fit.refine(refinelist) -151 -152 return -153 -154 -
      155 -def plot2D(fit): -
      156 """ -157 plotting the result of pattern -158 -159 Arguement -160 - fit : Fit instance -161 """ -162 import diffpy.srrietveld.plot2d as P2D -163 -164 P2D.plotFit(fit) -165 -166 # compnum = fit.getNumComponents() -167 # for cindex in xrange(compnum): -168 # comp = fit.getComponent(cindex) -169 # pat = comp.getPattern() -170 # P2D.plotPattern(pat) -171 -172 return -
      173 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.gsasfileparser-module.html b/static_root/doc/srrietveld/developers/srrietveld.gsasfileparser-module.html deleted file mode 100644 index c6021c88..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.gsasfileparser-module.html +++ /dev/null @@ -1,411 +0,0 @@ - - - - - srrietveld.gsasfileparser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module gsasfileparser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module gsasfileparser

      source code

      -

      GSASinstparser.py is to parse the instrument info in .exp/iparm file - to get instrument instance for FullProf and GSAS.

      -

      Created by Peng Tian on 2008-12-19

      - Functionalities: -
        -
      1. - read .exp/.iparm file and fine instrument info -
      2. -
      3. - generate the instrument instance -
      4. -
      -
        -
      • -

        parseGSASiparm(instfilename, bankidlist)

        - genTOFInstrument(infilename, bankidlist): -
      • -


      - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      importFromGSASexp(expfilename, - bankid)
      - Import a GSAS .exp file for instrument parameters
      - source code - -
      - -
      -   - - - - - - -
      parseGSASiparm(instfilename, - bankidlist)
      - Import a GSAS instrument file to give data for this instrument object - -Arguments: -- instfilename : full-path name of instrument file; -- bankidlist : list of the number of bank to generate instrument instance.
      - source code - -
      - -
      -   - - - - - - -
      MapKey(contents, - key)
      - find the line that includes the key in lines...
      - source code - -
      - -
      -   - - - - - - -
      genTOFInstrument(infilename, - bankidlist)
      - Import Exp/iparm file of a certain banks to an Instrument file...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: gsasfileparser.py 2792 2009-03-02 15:56:43Z wdz... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      importFromGSASexp(expfilename, - bankid) -

      -
      source code  -
      - -

      Import a GSAS .exp file for instrument parameters

      -

      Arguments: a. expfilename : full-path name of .exp file; b. bankid - : the number of bank to generate instrument instance.

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseGSASiparm(instfilename, - bankidlist) -

      -
      source code  -
      - -
      -
      -Import a GSAS instrument file to give data for this instrument object
      -
      -Arguments:
      -- instfilename  :   full-path name of instrument file;
      -- bankidlist    :   list of the number of bank to generate instrument instance.
      -
      -Return         :    3-tuple: dict (geometry), dict (profile), dict (absorption)
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      MapKey(contents, - key) -

      -
      source code  -
      - -
      -
      -find the line that includes the key in lines
      -
      -Argument:
      -- contents  :   list of str
      -- key       :   key value
      -
      -Return      :   Line 
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genTOFInstrument(infilename, - bankidlist) -

      -
      source code  -
      - -
      -
      -Import Exp/iparm file of a certain banks to an Instrument file
      -
      -Argument:
      -- infilename    :   str, Exp/iparm file name
      -- bankidlist    :   list of integer
      -
      -Return          :   TOFInstrument
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: gsasfileparser.py 2792 2009-03-02 15:56:43Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.gsasfileparser-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.gsasfileparser-pysrc.html deleted file mode 100644 index 13364880..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.gsasfileparser-pysrc.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - srrietveld.gsasfileparser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module gsasfileparser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.gsasfileparser

      -
      -  1  #!/usr/bin/env python 
      -  2  ############################################################################## 
      -  3  # 
      -  4  # diffpy.srrietveld by DANSE Diffraction group 
      -  5  #                   Simon J. L. Billinge 
      -  6  #                   (c) 2008 Trustees of the Columbia University 
      -  7  #                   in the City of New York.  All rights reserved. 
      -  8  # 
      -  9  # File coded by:    Wenduo Zhou 
      - 10  # 
      - 11  # See AUTHORS.txt for a list of people who contributed. 
      - 12  # See LICENSE.txt for license information. 
      - 13  # 
      - 14  ############################################################################## 
      - 15  """ 
      - 16   GSASinstparser.py is to parse the instrument info in .exp/iparm file 
      - 17   to get instrument instance for FullProf and GSAS. 
      - 18   
      - 19   Created by Peng Tian on 2008-12-19 
      - 20   
      - 21   Functionalities: 
      - 22          1. read .exp/.iparm file and fine instrument info 
      - 23          2. generate the instrument instance 
      - 24          -  parseGSASiparm(instfilename, bankidlist) 
      - 25   
      - 26          genTOFInstrument(infilename, bankidlist): 
      - 27  """ 
      - 28  __id__ = "$Id: gsasfileparser.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      - 29   
      -
      30 -def importFromGSASexp(expfilename, bankid): -
      31 """ - 32 Import a GSAS .exp file for instrument parameters - 33 - 34 Arguments: - 35 a. expfilename : full-path name of .exp file; - 36 b. bankid : the number of bank to generate instrument instance. - 37 - 38 Return : None - 39 """ - 40 try: - 41 efile = open(expfilename, "r") - 42 self._content= efile.readlines() - 43 efile.close() - 44 except IOError, err: - 45 print "Fatal Error: Cannot Open File %-20s"% (expfilename) - 46 raise IOError, err - 47 - 48 line = self.MapKey(contents, "BANK") - 49 if int(line[3]) == bankid: - 50 pattern_no = int(line[1]) - 51 term ="HST %i ICONR"% (pattern_no) - 52 line = self.MapKey(term) - 53 if line != "": - 54 self._geometryparamdict["DIFC/Dtt1"] = float(line[3]) - 55 self._geometryparamdict["DIFA/Dtt2"] = float(line[4]) - 56 else: - 57 print "Incompleted exp file!" - 58 term = "HST %iBNKPAR"% (pattern_no) - 59 line = self.MapKey(term) - 60 if line != "": - 61 self._geometryparamdict["TTheta"] = float(line[3]) - 62 else: - 63 print "No two-theta info in exp file!" - 64 - 65 term = "HST %iPRCF"% (pattern_no) - 66 line = self.MapKey(term) - 67 if line != "": - 68 ptyp = int(line[2]) - 69 ncof = int(line[3]) - 70 self._profileparamdict["Type"] = ptyp - 71 self._profileparamdict["Ncof"] = ncof - 72 - 73 term = "HST %iPRCF%i1"%(pattern_no, ptyp) - 74 line = self.MapKey(term) - 75 if ptyp == 1: - 76 self._profileparamdict["Alph0"] = float(line[2]) - 77 self._profileparamdict["Alph1"] = float(line[3]) - 78 self._profileparamdict["Alph2"] = float(line[3]) - 79 self._profileparamdict["Beta0"] = float(line[4]) - 80 self._profileparamdict["Beta1"] = float(line[5]) - 81 self._profileparamdict["Beta2"] = float(line[5]) - 82 term = "HST %iPRCF12"%(pattern_no) - 83 line = self.MapKey(term) - 84 if line != "": - 85 self._profileparamdict["Sig0"] = float(line[2]) - 86 self._profileparamdict["Sig1"] = float(line[3]) - 87 self._profileparamdict["Sig2"] = float(line[4]) - 88 - 89 else: - 90 print "No profile information in exp file!" - 91 - 92 return -
      93 - 94 -
      95 -def parseGSASiparm(instfilename, bankidlist): -
      96 """ - 97 Import a GSAS instrument file to give data for this instrument object - 98 - 99 Arguments: -100 - instfilename : full-path name of instrument file; -101 - bankidlist : list of the number of bank to generate instrument instance. -102 -103 Return : 3-tuple: dict (geometry), dict (profile), dict (absorption) -104 """ -105 # 1. Import iparm file -106 try: -107 ifile = open(instfilename, "r") -108 contents= ifile.readlines() -109 ifile.close() -110 except IOError, err: -111 print "Fatal Error: Cannot Open File %-20s"% (instfilename) -112 raise IOError, err -113 -114 # 2. Init -115 geometryparameter = {} -116 profileparameter = {} -117 expdecayparameter = {} -118 -119 # 3. Import -120 for bankid in bankidlist: -121 # 3.1 Init -122 geometryparameter[bankid] = {} -123 profileparameter[bankid] = {} -124 expdecayparameter[bankid] = {} -125 -126 # 3.2 Find geometry Dtt1/Dtt2 -127 term = "INS %i ICONS"% (bankid) -128 line = MapKey(contents, term) -129 terms = line.split() -130 if line is not None: -131 geometryparameter[bankid]["DIFC/Dtt1"] = float(terms[3]) -132 geometryparameter[bankid]["DIFA/Dtt2"] = float(terms[4]) -133 else: -134 errmsg = "Incompleted instrument file!" -135 raise NotImplementedError(errmsg) -136 -137 # 3.3 2-theta -138 term = "INS %iBNKPAR"% (bankid) -139 line = MapKey(contents, term) -140 terms = line.split() -141 if line is not None: -142 geometryparameter[bankid]["TTheta"] = float(terms[3]) -143 else: -144 errmsg = "No two-theta info in instrument file!" -145 raise NotImplementedError(errmsg) -146 -147 # 3.4 Profile & Decay -148 term = "INS %iPRCF"% (bankid) -149 line = MapKey(contents, term) -150 if line is not None: -151 terms = line.split() -152 ptyp = int(terms[2]) -153 ncof = int(terms[3]) -154 profileparameter[bankid]["Ncof"] = ncof -155 -156 term1 = "INS %iPRCF%i1"%(bankid, ptyp) -157 line1 = MapKey(contents, term1) -158 if ptyp == 1: -159 # Exp Decay -160 terms = line1.split() -161 profileparameter[bankid]["Type"] = "PseudoVoigtExp" -162 expdecayparameter[bankid]["alpha0"] = float(terms[2]) -163 expdecayparameter[bankid]["alpha1"] = float(terms[3]) -164 expdecayparameter[bankid]["beta0"] = float(terms[4]) -165 expdecayparameter[bankid]["beta1"] = float(terms[5]) -166 term2 = "INS %iPRCF12"%(bankid) -167 line2 = MapKey(contents, term2) -168 if line is not None: -169 terms = line2.split() -170 profileparameter[bankid]["sigma0"] = float(terms[2]) -171 profileparameter[bankid]["sigma1"] = float(terms[3]) -172 profileparameter[bankid]["sigma2"] = float(terms[4]) -173 else: -174 errmsg = "No profile information in instrument file!" -175 raise NotImplementedError(errmsg) -176 -177 # LOOP-OVER: for bankid in bankidlist: -178 -179 return geometryparameter, profileparameter, expdecayparameter -
      180 -181 # END-FUNCTION-DEF -182 -183 -
      184 -def MapKey(contents, key): -
      185 """ -186 find the line that includes the key in lines -187 -188 Argument: -189 - contents : list of str -190 - key : key value -191 -192 Return : Line -193 """ -194 rline = None -195 -196 for line in contents: -197 if line.count(key) == 1: -198 rline = line -199 break -200 -201 return rline -
      202 -203 -
      204 -def genTOFInstrument(infilename, bankidlist): -
      205 """ -206 Import Exp/iparm file of a certain banks to an Instrument file -207 -208 Argument: -209 - infilename : str, Exp/iparm file name -210 - bankidlist : list of integer -211 -212 Return : TOFInstrument -213 """ -214 import diffpy.srrietveld.instrument as INS -215 # 1. Figure out file type -216 posfix = infilename.split(".")[1].lower() -217 filetype = posfix -218 -219 # 2. Import file -220 if filetype == "exp": -221 raise NotImplementedError("Modify parseGSASExp()") -222 -223 elif filetype == "iparm": -224 geometrydict, peakprofiledict, expdecaydict = parseGSASiparm(infilename, bankidlist) -225 -226 # 3. Generate TOF instrument -227 instrument = INS.TOFInstrument() -228 -229 for bankid in bankidlist: -230 dtt1 = geometrydict[bankid]["DIFC/Dtt1"] -231 dtt2 = geometrydict[bankid]["DIFA/Dtt2"] -232 tthe = geometrydict[bankid]["TTheta"] -233 xcross = 1.0 -234 width = 1.0 -235 range = (4000.00, 44985.00, 2.00) -236 instrument.setBankInfo(bankid, dtt1, dtt2, tthe, xcross, width, range=range, \ -237 peakprofile=peakprofiledict[bankid], expdecay=expdecaydict[bankid]) -238 -239 return instrument -
      240 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.instrument-module.html b/static_root/doc/srrietveld/developers/srrietveld.instrument-module.html deleted file mode 100644 index 232aab85..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.instrument-module.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - srrietveld.instrument - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module instrument - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module instrument

      source code

      -
      -Classes for Instrument-Specified Refinement Setup
      -
      -  Created On  :   2008.05.08
      -
      -List of Classes
      -  * Instrument
      -  |       -  __init__(self, name="Instrument")
      -  |       -  getName()
      -  |       -  getType()
      -  |       -  getBackgroundType()
      -  |       -  genMeasurement(self, datafilename="fakedata.dat")
      -  |
      -  |       -  genRietveldComponents(self, fit, Data, bgData):
      -  |       -  setPhase(self, fit, lattice, atomlist)
      -  |       -  setPeakProfileInfo(self, parameterdict)
      -  |       -  setZero(self, zshift=None)
      -  |
      -  |       -  importFromFit(self, myfit)
      -  |       -  importRietveldObject(self, rietobj)
      -  |
      -  |-- ThermalNeutronTOFInstrument
      -  |       - getBankNumbersList(self)
      -  |       - getBankInfoDict(self, bankno)
      -  |
      -  |-- ConstWavelengthInstrument
      -    |
      -    |-- XrayInstrument
      -        - addExcludedRegion(self, begin, end)
      -        - getExcludedRegions(self)
      -    |-- NeutronCWInstrument
      -  
      -
      -External Methods List:
      -  * getInstrument(instrumentName)
      -  * isPatternOneBank(thefit, thepat)
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - Instrument
      - base class for all Instrument-Specified refinement setup - classes -
      -   - - ConstWavelengthInstrument
      - constant wavelength diffractometer, will be extended to -(1) Xray -(2) CWNeutron - -The infodict should be in the structure as: -Instrument: Name, Type, - | - |--- ENERGY: Lambda, Lambda1, ... -
      -   - - XrayInstrument
      - Constrant wave X-ray diffractometer -
      -   - - NeutronCWInstrument
      - Constrant wave X-ray diffractometer -
      -   - - TOFInstrument
      - General Time-of-flight (TOF) instrument -
      -   - - ThermalNeutronTOFInstrument
      - General Thermal Neutron TOF instrument -
      - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      getInstrument(instrumentName)
      - initialize an extended Instrument instance by instrumentName
      - source code - -
      - -
      -   - - - - - - -
      isPatternOneBank(thefit, - thepat)
      - Judge whether the given pattern is one of the banks in a multiple-bank ...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: instrument.py 2918 2009-03-18 19:26:39Z wdzhou $' -
      -   - - myEngine = <diffpy.srrietveld.refinebackend.RietveldEngine ins... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      getInstrument(instrumentName) -

      -
      source code  -
      - -

      initialize an extended Instrument instance by instrumentName

      -

      Arguement: instrumentName : string, name of an instrument

      - Return : Instrument instance -
      -
      -
      -
      - -
      - -
      - - -
      -

      isPatternOneBank(thefit, - thepat) -

      -
      source code  -
      - -
      -
      -Judge whether the given pattern is one of the banks in a multiple-bank 
      -diffractometer
      -
      -Justification:  Diffraction data coming from the same instrument but different time
      -will correspond to different Instrument instance in initial configuration
      -
      -Argument:
      -- thefit    :   Fit instance
      -- thepat    :   Pattern instance
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      myEngine

      - -
      -
      -
      -
      Value:
      -
      -<diffpy.srrietveld.refinebackend.RietveldEngine instance at 0xb7ac124c\
      ->
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.instrument-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.instrument-pysrc.html deleted file mode 100644 index 0fadbc1a..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.instrument-pysrc.html +++ /dev/null @@ -1,2235 +0,0 @@ - - - - - srrietveld.instrument - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module instrument - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.instrument

      -
      -   1  ############################################################################## 
      -   2  # 
      -   3  # diffpy.srrietveld by DANSE Diffraction group 
      -   4  #                   Simon J. L. Billinge 
      -   5  #                   (c) 2008 Trustees of the Columbia University 
      -   6  #                   in the City of New York.  All rights reserved. 
      -   7  # 
      -   8  # File coded by:    Wenduo Zhou 
      -   9  # 
      -  10  # See AUTHORS.txt for a list of people who contributed. 
      -  11  # See LICENSE.txt for license information. 
      -  12  # 
      -  13  ############################################################################## 
      -  14  """ Classes for Instrument-Specified Refinement Setup 
      -  15   
      -  16    Created On  :   2008.05.08 
      -  17   
      -  18  List of Classes 
      -  19    * Instrument 
      -  20    |       -  __init__(self, name="Instrument") 
      -  21    |       -  getName() 
      -  22    |       -  getType() 
      -  23    |       -  getBackgroundType() 
      -  24    |       -  genMeasurement(self, datafilename="fakedata.dat") 
      -  25    | 
      -  26    |       -  genRietveldComponents(self, fit, Data, bgData): 
      -  27    |       -  setPhase(self, fit, lattice, atomlist) 
      -  28    |       -  setPeakProfileInfo(self, parameterdict) 
      -  29    |       -  setZero(self, zshift=None) 
      -  30    | 
      -  31    |       -  importFromFit(self, myfit) 
      -  32    |       -  importRietveldObject(self, rietobj) 
      -  33    | 
      -  34    |-- ThermalNeutronTOFInstrument 
      -  35    |       - getBankNumbersList(self) 
      -  36    |       - getBankInfoDict(self, bankno) 
      -  37    | 
      -  38    |-- ConstWavelengthInstrument 
      -  39      | 
      -  40      |-- XrayInstrument 
      -  41          - addExcludedRegion(self, begin, end) 
      -  42          - getExcludedRegions(self) 
      -  43      |-- NeutronCWInstrument 
      -  44     
      -  45   
      -  46  External Methods List: 
      -  47    * getInstrument(instrumentName) 
      -  48    * isPatternOneBank(thefit, thepat) 
      -  49   
      -  50  """ 
      -  51   
      -  52  __id__ = "$Id: instrument.py 2918 2009-03-18 19:26:39Z wdzhou $" 
      -  53   
      -  54  from diffpy.srrietveld              import * 
      -  55  from diffpy.refinementapi.errors    import  FitConfigurationError 
      -  56  import diffpy.srrietveld.xmlgenerator as XMLG 
      -  57  import diffpy.srrietveld.xmlinterface as XMLI 
      -  58   
      -
      59 -class Instrument: -
      60 """ base class for all Instrument-Specified refinement setup classes - 61 """ - 62 -
      63 - def __init__(self, name="Instrument"): -
      64 """ - 65 initialization - 66 """ - 67 self._Name = name - 68 - 69 self._backgroundType = None - 70 self._background = {} - 71 self._profileparamdict = {} - 72 - 73 return -
      74 -
      75 - def __str__(self): -
      76 """ - 77 Customized format output - 78 - 79 Return : str - 80 """ - 81 rstring = "Instrument: %-20s\n"% (self._Name) - 82 - 83 return rstring -
      84 - 85 -
      86 - def getName(self): -
      87 """ - 88 Give the name of the instrument - 89 - 90 Return : str - 91 """ - 92 return self._Name -
      93 - 94 -
      95 - def getType(self): -
      96 """ - 97 Give the type of the instrument - 98 - 99 Return : str - 100 """ - 101 return self._Type -
      102 - 103 -
      104 - def getBackgroundType(self): -
      105 """ - 106 Give the type of the background - 107 - 108 Return : str - 109 """ - 110 return self._backgroundType -
      111 - 112 -
      113 - def genRietveldComponent(self): -
      114 """ Generate and optionally add a RietveldComponenet to a Fit instance - 115 of virtual/baseclass Instrument - 116 """ - 117 errmsg = "method %-20s is virtual"% ("Instrument.setRietveldComponents") - 118 raise NotImplementedError(errmsg) - 119 - 120 return -
      121 - 122 -
      123 - def setPhase(self, fit, lattice, atomlist): -
      124 """ - 125 set up a (single) phase model to each RietveldComponent in a Fit instance - 126 including - 127 1. Lattice - 128 2. Atoms - 129 3. (default) Peak profile (instrument dependent) - 130 - 131 Return : None - 132 """ - 133 errmsg = "method %-20s is virtual"% ("Instrument.setPhase") - 134 raise NotImplementedError(errmsg) - 135 - 136 return -
      137 - 138 -
      139 - def setPeakProfileInfo(self, parameterdict): -
      140 """ - 141 import some parameters to PeakProfile's parameter dictionary - 142 - 143 Argument: - 144 - parameterdict : dictionary key = parameter name, val = value - 145 - 146 Return : None - 147 """ - 148 for paraname in parameterdict.keys(): - 149 self._profileparamdict[paraname] = parameterdict[paraname] - 150 - 151 return -
      152 - 153 -
      154 - def setZero(self, zshift=None): -
      155 """ - 156 Set zero-shift - 157 - 158 Argument: - 159 - zshift : float - 160 - 161 Return : None - 162 """ - 163 errmsg = "Function setZero() is Virtual in Base Class Instrument. \n" - 164 errmsg = "Class %-15s Must Implement Its Own"% (self.__class__.__name__) - 165 raise NotImplementedError(errmsg) -
      166 - 167 -
      168 - def importFromFit(self, myfit): -
      169 """ - 170 Import a RietvledAPI.Fit instance to give data to this Instrument object - 171 - 172 Virtual base class method - 173 - 174 Arguments: - 175 - myfit : diffpy.rietveldapi.Fit instance - 176 - 177 Return : None - 178 """ - 179 errmsg = "Virtual class method cannot be used; Implemented %-20s"% \ - 180 (self.__class__.__name__) - 181 raise NotImplementedError(errmsg) - 182 - 183 return -
      184 - 185 -
      186 - def importRietveldObject(self, rietobj): -
      187 """ - 188 Import a Rietveld object's parameters to a dictionary - 189 - 190 Return : dict - 191 """ - 192 paramdict = {} - 193 - 194 paramdict["Type"] = rietobj.__class__.__name__ - 195 for paramname in rietobj.getRefinableParameters(): - 196 paramdict[paramname] = rietobj.getValue(paramname) - 197 - 198 return paramdict -
      199 - 200 -
      201 - def genMeasurement(self, refinebankidlist, datafilenamedict, userrangedict, - 202 userexcludedregiondict, bgpointsdict): -
      203 """ Generate a Measurement from from base-class Instrument - 204 - 205 Arguement: - 206 - datafilename : str - 207 - 208 Return : Measurement instance - 209 """ - 210 if self.__class__.__name__ == "Instrument": - 211 errmsg = "Method genMeasurement should be implemented by extended class %-20s"% \ - 212 (self.__class__.__name__) - 213 raise NotImplementedError, errmsg - 214 - 215 if not isinstance(bgpointsdict, dict): - 216 errmsg = "Background Dictionary Is Not Set Up Right" - 217 raise NotImplementedError, errmsg - 218 - 219 return None -
      220 - 221 -
      222 -class ConstWavelengthInstrument(Instrument): -
      223 """ - 224 constant wavelength diffractometer, will be extended to - 225 (1) Xray - 226 (2) CWNeutron - 227 - 228 The infodict should be in the structure as: - 229 Instrument: Name, Type, - 230 | - 231 |--- ENERGY: Lambda, Lambda1, ... ... - 232 | - 233 |--- PEAKPROFIEL: Type, U, V, W, ... ... - 234 | - 235 |--- SETUP (Experiement Setup): - 236 | | - 237 | |--- EXCLUDEDREGION - 238 | | - 239 | |--- Fit Range - 240 | - 241 |--- BACKGROUND: Type, Coefficients, ... .. - 242 """ -
      243 - def __init__(self, wavelength, resolution, peakprofiledict, name="Constant Wave Instrument", wavelength2=None, ratio=0.0, backgroundinfodict=None): -
      244 """ - 245 initialization - 246 - 247 Argument: - 248 wavelength : float, main wavelength - 249 resolution : float - 250 peakprofiledict : dictionary for peak profile type and paraemeters - 251 name : string - 252 wavelength2 : 2nd beam's wavelength - 253 ratio : float - 254 """ - 255 Instrument.__init__(self, name) - 256 - 257 self._infodict = {} - 258 self._Type = "Constant Wave Length" - 259 - 260 # Level 2 Dictionary - 261 self._infodict["ENERGY"] = {} - 262 self._infodict["SETUP"] = {} - 263 self._infodict["SETUP"]["EXCLUDEDREGION"] = [] - 264 if peakprofiledict is None: - 265 self._infodict["PEAKPROFILE"] = {} - 266 elif isinstance(peakprofiledict, dict): - 267 self._infodict["PEAKPROFILE"] = peakprofiledict - 268 else: - 269 raise FitConfigurationError("Incorrect peakprofiledict Type") - 270 - 271 - 272 # Leve 3: Energy - 273 self._infodict["ENERGY"]["Lambda"] = wavelength - 274 self._infodict["ENERGY"]["Lambda2"] = wavelength2 - 275 self._infodict["ENERGY"]["Ratio"] = ratio - 276 self._infodict["ENERGY"]["Resolution"] = resolution - 277 - 278 # Leve 3: Background - 279 if backgroundinfodict is not None: - 280 self._infodict["BACKGROUND"] = backgroundinfodict - 281 else: - 282 self._infodict["BACKGROUND"] = {} - 283 - 284 return -
      285 - 286 -
      287 - def __str__(self): -
      288 """ - 289 Customized format output - 290 - 291 Return : str - 292 """ - 293 rstring = Instrument.__str__(self)+"\n" - 294 - 295 for tname in sorted(self._infodict.keys()): - 296 rstring += " %-20s = %-20s\n"% (tname, self._infodict[tname]) - 297 - 298 return rstring -
      299 - 300 -
      301 - def getWaveLength(self): -
      302 """ - 303 Return the wave-length - 304 - 305 Return : float - 306 """ - 307 lambda1 = self._infodict["ENERGY"]["Lambda"] - 308 lambda2 = self._infodict["ENERGY"]["Lambda2"] - 309 ratio = self._infodict["ENERGY"]["Ratio"] - 310 - 311 if abs(lambda1-lambda2) > 1.0E-5 and abs(ratio) > 1.0E-5: - 312 raise NotImplementedError("Not Considering 2-Lambda Case yet") - 313 else: - 314 return lambda1 -
      315 - 316 -
      317 - def genRietveldComponent(self, datafile, backgrounddict, measurerange, - 318 excludedregionslist, structure, myfit, bankno=-1): -
      319 """ CW Wavelengvth Instrument: Generate and optionally add a - 320 RietveldComponenet to a Fit instance with extra-measurement information - 321 An individual instrument can have one and only one structure - 322 - 323 Virtual in ConstWavelengthInstrument - 324 - 325 Argument: - 326 ... - 327 - backgrounddict : dictionary for background information - 328 if string at position 0 is I, interpolated - 329 background coming from a file - 330 if string at position 0 is P, polynomial - 331 background - 332 - 333 Return : RietveldComponent object - 334 """ - 335 RC = myEngine.getRietveldEngineModule("RietveldComponent") - 336 import midscript as MS - 337 - 338 # 1. check - 339 if self.__class__.__name__ == "ConstWavelengthInstrument": - 340 errmsg = "%-15s is Virtual, Cannot be Called!"% (self.__class__.__name) - 341 raise FitConfigurationError(errmsg) - 342 - 343 # 2. generate component and add to Fit optionally - 344 comp = RC.RietveldComponent() - 345 if myfit is not None: - 346 myfit.addComponent(comp) - 347 myfit.setInstrument(myinstrument = self, bankid = -1, component = comp) - 348 else: - 349 errmsg = "When will Fit add this Component?" - 350 raise NotImplementedError, errmsg - 351 # END-IF-ELSE - 352 - 353 # 3. pattern, background, range, resolution, and excluded regions - 354 comp.setPattern(self.temp_pattern) - 355 - 356 # 3.1 Set Background - 357 if backgrounddict is None: - 358 # the default situation is not developed yet! - 359 raise NotImplementedError("Notice Developer") - 360 - 361 else: - 362 # Measurement overrides, generate a background - 363 # Instantiate Background and set - 364 type = backgrounddict["Type"] - 365 - 366 if type[0] == "I": - 367 format = backgrounddict["Format"] - 368 if format == "File": - 369 raise NotImplementedError("Haven't Decided Where to Read In Background File") - 370 elif format == "Selected": - 371 backgroundpoints = backgrounddict["Selected"] - 372 background = MS.initInterpolatedBackground(backgroundpoints) - 373 - 374 elif type[0] == "P": - 375 desireorder = backgrounddict["Order"] - 376 backgroundPoints = backgrounddict["Points"] - 377 if backgroundPoints is None or len(backgroundPoints) == 0: - 378 backgroundPoints = [backgrounddict["Bkpos"]] - 379 background = MS.initPolynomialBackground(backgroundPoints, desireorder) - 380 else: - 381 errmsg = "Background Type = %-10 Is Not Supported"% (backgroundtuple[0]) - 382 raise NotImplementedError(errmsg) - 383 # END-IF - 384 if self._infodict["BACKGROUND"].has_key("Bkpos"): - 385 background.setOrigin(self._infodict["BACKGROUND"]["Bkpos"]) - 386 - 387 comp.setBackground(background) - 388 - 389 # END-IF-else: - 390 - 391 self.temp_pattern.setResolution(self._infodict["ENERGY"]["Resolution"]) - 392 self.temp_pattern.setMeasureRange(measurerange) - 393 - 394 # 3.2 set excluded region and zero - 395 completeregions = self._infodict["SETUP"]["EXCLUDEDREGION"][:] - 396 if excludedregionslist is not None: - 397 completeregions.extend(excludedregionslist) - 398 - 399 for excludedregion in completeregions: - 400 exregion = (excludedregion["Begin"], excludedregion["End"]) - 401 self.temp_pattern.addExcludedRegion(exregion) - 402 - 403 self.temp_pattern.setValue("zshift", self._infodict["SETUP"]["Zero"]) - 404 - 405 # 4. phase and peak profile - 406 for phase in structure: - 407 peakprofile = MS.genPeakProfile(self._infodict["PEAKPROFILE"]["Type"], - 408 self._profileparamdict) - 409 phase.setPeakProfile(peakprofile) - 410 comp.addPhase(phase) - 411 # LOOP-OVER - 412 - 413 # 5. clean - 414 self.temp_pattern = None - 415 - 416 return comp -
      417 - 418 -
      419 - def addExcludedRegion(self, begin, end): -
      420 """ - 421 Add excluded region to Constant Wave Insturment setup - 422 - 423 Argument: - 424 - begin : float - 425 - end : float - 426 - 427 Return : None - 428 """ - 429 # FIXME An algorithm is anticipated to combine excluded region with overlap - 430 self._infodict["SETUP"]["EXCLUDEDREGION"].append( {"Begin":begin, "End":end} ) - 431 - 432 return -
      433 - 434 -
      435 - def getExcludedRegions(self): -
      436 """ - 437 Return all the excluded region - 438 - 439 Return : None - 440 """ - 441 return self._infodict["SETUP"]["EXCLUDEDREGION"] -
      442 - 443 -
      444 - def setZero(self, zshift=None): -
      445 """ - 446 Set zero-shift for an Constant Wave Instrument (1-bank) - 447 - 448 Argument: - 449 - zshift : float - 450 - 451 Return : None - 452 """ - 453 self._infodict["SETUP"]["Zero"] = zshift - 454 - 455 return -
      456 - 457 -
      458 - def importFromFit(self, myfit): -
      459 """ - 460 Import a RietvledAPI.Fit instance to give data to this - 461 Constant Wave Insturment - 462 - 463 Arguments: - 464 - myfit : diffpy.rietveldapi.Fit instance - 465 - 466 Return : None - 467 """ - 468 import diffpy.rietveldapi.backgrounds as APIBKGD - 469 - 470 numcomp = myfit.getNumComponents() - 471 for nindex in xrange(numcomp): - 472 comp = myfit.getComponent(nindex) - 473 pat = comp.getPattern() - 474 phase = comp.getPhase(0) # use first phase as type - 475 background = comp.getBackground() - 476 peakprofile = phase.getPeakProfile() - 477 - 478 # Get Value Pertinent to Bank and Pattern - 479 self._infodict["ENERGY"]["Lambda"] = pat.getPrimaryWavelength() - 480 self._infodict["ENERGY"]["Lambda2"] = pat.getSecondaryWavelength() - 481 self._infodict["ENERGY"]["Resolution"] = pat.getResolution() - 482 - 483 # Excluded Region - 484 self._infodict["SETUP"]["EXCLUDEDREGION"] = [] - 485 for exregion in pat.getExcludedRegionsList(): - 486 exdict = {} - 487 exdict["Begin"] = exregion[0] - 488 exdict["End"] = exregion[1] - 489 self._infodict["SETUP"]["EXCLUDEDREGION"].append(exdict) - 490 self._infodict["SETUP"]["Zero"] = pat.getValue("zshift") - 491 - 492 # PeakProfile - 493 self._infodict["PEAKPROFILE"] = self.importRietveldObject(peakprofile) - 494 - 495 # Background - 496 if isinstance(background, APIBKGD.PolynomialBackground): - 497 # Polynomail - 498 self._infodict["BACKGROUND"] = {} - 499 self._infodict["BACKGROUND"]["Type" ] = "Polynomial" - 500 self._infodict["BACKGROUND"]["Order"] = str(background.getOrder()) - 501 self._infodict["BACKGROUND"]["Bkpos"] = str(background.getOrigin()) - 502 coeffstring = "" - 503 starttowrite = False - 504 for i in xrange(12): - 505 parname = "b"+str(12-i) - 506 parval = background.getValue(parname) - 507 # 1. turn the flag on for the 1st non-zero - 508 if abs(parval) > 1.0E-8: - 509 if starttowrite is False: - 510 starttowrite = True - 511 # 2. write on - 512 if starttowrite is True: - 513 coeffstring = str(parval) + " " + coeffstring - 514 # LOOP-OVER - 515 - 516 self._infodict["BACKGROUND"]["Coefficients"] = coeffstring - 517 - 518 elif isinstance(background, APIBKGD.InterpolatedBackground): - 519 # FIXME not sure making sense self._infodict["BACKGROUND"]["Bkpos"] = str(background.getOrigin()) - 520 self._infodict["BACKGROUND"]["Type" ] = "Interpolated" - 521 else: - 522 self._infodict["BACKGROUND"] = self.importRietveldObject(background) - 523 - 524 # LOOP-OVER: for nindex in xrange(numcomp): - 525 - 526 return -
      527 - 528 -
      529 -class XrayInstrument(ConstWavelengthInstrument): -
      530 """ - 531 Constrant wave X-ray diffractometer - 532 """ -
      533 - def __init__(self, wavelength=None, resolution=None, peakprofiledict=None, - 534 name="Xray Diffractometer", wavelength2=None, ratio=0.0, - 535 backgroundinfodict=None): -
      536 """ - 537 initialization - 538 - 539 Arguement: - 540 - peakprofiledict : dictionary, information and parameters of profile - 541 """ - 542 ConstWavelengthInstrument.__init__(self, wavelength, resolution, peakprofiledict, name, wavelength2, ratio, backgroundinfodict) - 543 - 544 self._Type = "Xray" - 545 self._backgroundType = "Interpolation" - 546 self._infodict["BACKGROUND"]["Type"] = "Linear Interpolation" - 547 - 548 return -
      549 - 550 -
      551 - def __str__(self): -
      552 """ - 553 Customized format output - 554 - 555 Return : str - 556 """ - 557 rstring = ConstWavelengthInstrument.__str__(self) - 558 rstring += "Instrument Type: Xray" - 559 - 560 return rstring -
      561 - 562 -
      563 - def genRietveldComponent(self, datafile, backgroundtuple, measurerange, - 564 excludedregionslist, structure, myfit=None, bankno=-1): -
      565 """ Generate and optionally add a RietveldComponenet to a Fit instance - 566 by an X-ray Instrument - 567 - 568 Argument: - 569 ... - 570 ... - 571 - 572 Return : ... ... - 573 """ - 574 import midscript as MS - 575 PS = myEngine.getRietveldEngineModule("patternparsers") - 576 - 577 # 1. Obtain required information from info-dict - 578 wavelength = self._infodict["ENERGY"]["Lambda"] - 579 wavelength2 = self._infodict["ENERGY"]["Lambda2"] - 580 ratio = self._infodict["ENERGY"]["Ratio"] - 581 - 582 # 2. init and set up pattern - 583 # FIXME - Only accept XYSigma format - 584 self.temp_pattern = MS.initCWXrayPattern(dfname=datafile, parser=PS.XYSigmaParser(), - 585 wavelength=wavelength, wavelength2=wavelength2, ratio=ratio) - 586 self.temp_pattern.setInstrument(self) - 587 - 588 # 3. generate Rietveld comonent - 589 comp = ConstWavelengthInstrument.genRietveldComponent(self, datafile, backgroundtuple, - 590 measurerange, excludedregionslist, structure, myfit) - 591 - 592 return comp -
      593 - 594 -
      595 - def genMeasurement(self, refinebankidlist, datafilenamedict, userrangedict, - 596 userexcludedregiondict, bgpointsdict): -
      597 """ Generate a Measurement from X-ray instrument - 598 Using the same as srrietveld-refine.py - 599 Step-1 generate XML files - 600 Step-2 read XML file and generate the measurement including - 601 a) data file name, b) user-defined refinement range (3) user defined - 602 excluded region, (4) user-provided background points - 603 The bank-ID is 0 for instrument that does not have setup of bank - 604 - 605 Arguement: - 606 refinebankidlist : list, of int - 607 datafilenamedict : dict. key = int (bank ID), val = str (file name) - 608 userrangedict : dict. key = int (bank ID), val = 2-tuple (begin, end) - 609 userexcludedregiondict: dict. key = int (bank ID), val = 2-tuple (begin, end) - 610 bgpointsdict : dict. key = int (bank ID), val = list of 2-tuple - 611 - 612 Return : list, of list of Measurement instance - 613 """ - 614 # FIXME - This is the (partial) clone of genMeasurement() in srrietveld-refine - 615 - 616 ConstWavelengthInstrument.genMeasurement(self, refinebankidlist, datafilenamedict, - 617 userrangedict, userexcludedregiondict, bgpointsdict) - 618 - 619 xmlfname = "tempmeasure.xml" - 620 - 621 # 1. Generate measurement XML file - 622 measurexmlgen = XMLG.XrayInstrumentMeasurementXMLGenerator(datafilenamedict[0], - 623 bgpointsdict[0], nouncertaintyoutput = True) - 624 measurexmlgen.exportXML(xmlfname) - 625 - 626 # 2. generate measurement from XML - 627 expmeasurelist = XMLI.MeasurementXMLParser( [xmlfname] ).getMeasurements() - 628 - 629 return expmeasurelist -
      630 - 631 -
      632 -class NeutronCWInstrument(ConstWavelengthInstrument): -
      633 """ - 634 Constrant wave X-ray diffractometer - 635 """ -
      636 - def __init__(self, wavelength=None, resolution=None, peakprofiledict=None, name="Xray Diffractometer", - 637 wavelength2=None, ratio=0.0, backgroundinfodict=None): -
      638 """ - 639 initialization - 640 - 641 Arguement: - 642 - peakprofiledict : dictionary, information and parameters of profile - 643 """ - 644 # 1. Call base class - 645 ConstWavelengthInstrument.__init__(self, wavelength, resolution, peakprofiledict, - 646 name, wavelength2, ratio, backgroundinfodict) - 647 - 648 self._Type = "NeutronCW" - 649 - 650 # 2. Set background - 651 try: - 652 # User given - 653 if self._infodict["BACKGROUND"]["Type"][0].lower() == "p": - 654 self._backgroundType = "Polynomial" - 655 else: - 656 self._backgroundType = "Interpolated" - 657 except KeyError, err: - 658 # Default - 659 self._backgroundType = "Polynomial" - 660 - 661 if not self._infodict.has_key("BACKGROUND"): - 662 self._infodict["BACKGROUND"] = {} - 663 self._infodict["BACKGROUND"]["Type"] = self._backgroundType - 664 - 665 return -
      666 - 667 -
      668 - def __str__(self): -
      669 """ - 670 Customized format output - 671 - 672 Return : str - 673 """ - 674 rstring = ConstWavelengthInstrument.__str__(self) - 675 rstring += "Instrument Type: Neutron Constant Wave" - 676 - 677 return rstring -
      678 - 679 -
      680 - def genRietveldComponent(self, datafile, backgroundtuple, measurerange, - 681 excludedregionslist, structure, myfit=None, bankno=-1): -
      682 """ generate and optionally add a RietveldComponenet to a Fit instance - 683 in a Neutron constant wave length instrument - 684 - 685 Argument: - 686 ... - 687 ... - 688 - 689 Return : ... ... - 690 """ - 691 import midscript as MS - 692 PS = myEngine.getRietveldEngineModule("patternparsers") - 693 - 694 # 1. Obtain required information from info-dict - 695 wavelength = self._infodict["ENERGY"]["Lambda"] - 696 wavelength2 = self._infodict["ENERGY"]["Lambda2"] - 697 ratio = self._infodict["ENERGY"]["Ratio"] - 698 - 699 # 2. init and set up pattern - 700 self.temp_pattern = MS.initCWNeutronPattern(dfname=datafile, parser=PS.XYSigmaParser(), - 701 wavelength=wavelength, wavelength2=wavelength2, ratio=ratio) - 702 self.temp_pattern.setInstrument(self) - 703 - 704 # 3. Inspect background - 705 if backgroundtuple is None: - 706 backgrounddict = self._infodict["BACKGROUND"] - 707 else: - 708 backgrounddict = backgroundtuple - 709 - 710 # 4. generate Rietveld comonent - 711 comp = ConstWavelengthInstrument.genRietveldComponent(self, datafile, backgrounddict, - 712 measurerange, excludedregionslist, structure, myfit) - 713 - 714 return comp -
      715 - 716 -
      717 - def genMeasurement(self, datafilename="fakedata.dat"): -
      718 """ - 719 Generate a Measurement from this instrument - 720 - 721 Arguement: - 722 - datafilename : str - 723 - 724 Return : Measurement instance - 725 """ - 726 import measurements as MM - 727 import diffpy.srrietveld.datafileconverter as SDV - 728 - 729 errmsg = "Refer to the style in TOFInstrument" - 730 raise NotImplementedError, errmsg - 731 - 732 measurement = MM.Measurement() - 733 - 734 # 1. Set data file - 735 measurement.setDataFileName(datafilename) - 736 - 737 # 2. Parse data file - 738 # FIXME Only RAPDF/XYSigma data can be used! - 739 p = SDV.RAPDFDataParser(datafilename) - 740 xs, ys, ss = p.getData() - 741 thmin = xs[0] - 742 thmax = xs[-1] - 743 measurement.setMeasureRange( (thmin, thmax) ) - 744 - 745 return [measurement] -
      746 - 747 -
      748 -class TOFInstrument(Instrument): -
      749 """ - 750 General Time-of-flight (TOF) instrument - 751 """ - 752 -
      753 - def __init__(self, name="TOF", backgroundtype="Polynomial", peakprofiletype=None): -
      754 """ - 755 initialization - 756 - 757 Argument: - 758 name : string - 759 backgroundtype : string - 760 peakprofiletype : string - 761 """ - 762 Instrument.__init__(self, name) - 763 - 764 self._Type = "TOF" - 765 self._name = name - 766 - 767 self._peakprofiletype = peakprofiletype - 768 self._backgroundtype = backgroundtype - 769 self._bankinfodict = {} - 770 - 771 return -
      772 - 773 -
      774 - def __str__(self): -
      775 """ - 776 Customized output - 777 """ - 778 rstr = "" - 779 bankidlist = sorted(self._bankinfodict.keys()) - 780 for bankid in bankidlist: - 781 rstr += "Bank %-5s\n"% (bankid) - 782 dictkey = [] - 783 for key in sorted(self._bankinfodict[bankid].keys()): - 784 val = self._bankinfodict[bankid][key] - 785 if isinstance(val, dict): - 786 dictkey.append(key) - 787 else: - 788 rstr += " %-15s %-15s\n"% (key, val) - 789 - 790 for key in sorted(dictkey): - 791 rstr += "Sub Dict: %-15s\n"% (key) - 792 for parname in self._bankinfodict[bankid][key].keys(): - 793 rstr += " %-15s %-15s\n"% (parname, self._bankinfodict[bankid][key][parname]) - 794 - 795 return rstr -
      796 - 797 -
      798 - def getBankNumbersList(self): -
      799 """ - 800 Get the information of all the bank number - 801 - 802 Return : list of int - 803 """ - 804 return self._bankinfodict.keys() -
      805 - 806 -
      807 - def getBankInfoDict(self, bankno): -
      808 """ - 809 Get the dictionary decribing the characteristic of a specific bank - 810 - 811 Argument: - 812 - bankno : int - 813 - 814 Return : dict - 815 """ - 816 return self._bankinfodict[bankno] -
      817 - 818 -
      819 - def getExcludedRegions(self, bankid): -
      820 """ - 821 Return all the excluded region of a specific bank - 822 - 823 Argument: - 824 - bankid : int - 825 - 826 Return : None - 827 """ - 828 return self._bankinfodict[bankid]["ExcludedRegions"] -
      829 - 830 -
      831 - def genFileParser(self, bankid): -
      832 """ - 833 Generate file parser - 834 - 835 Return : Parser - 836 """ - 837 PS = myEngine.getRietveldEngineModule("patternparsers") - 838 - 839 if self._name == "GEM": - 840 parser = PS.GSSParser(bankid) - 841 else: - 842 parser = PS.XYSigmaParser() - 843 - 844 return parser -
      845 - 846 -
      847 - def setBankInfo(self, bankid, dtt1, dtt2, twothetabank, xcross, width, range=None, - 848 excludedregions=None, peakprofile=None, expdecay=None, backgroundinfo=None): -
      849 """ TOF Instrument's setup is specific to each bank; - 850 Every bank should be set up individually - 851 - 852 Arguments: - 853 - bankno : int, bank number, 0 stand for integration from all banks - 854 - dtt1 : float - 855 - dtt2 : float - 856 - twothetabank : float - 857 - xcross : float - 858 - width : float - 859 - range : 3-tuple of float, thmin, thmax, resolution - 860 - excluededregions : list of 2-tuples - 861 - peakprofiles : dictionary to set peak profiles - 862 - expdecay : dict, set up exponential decay - 863 """ - 864 self._bankinfodict[bankid] = {} - 865 self._bankinfodict[bankid]["Bank"] = bankid - 866 - 867 # 1. Geometry - 868 self._bankinfodict[bankid]["GEOMETRY"] = {} - 869 self._bankinfodict[bankid]["GEOMETRY"]["TwoThetaBank"] = twothetabank - 870 self._bankinfodict[bankid]["GEOMETRY"]["Dtt1"] = dtt1 - 871 self._bankinfodict[bankid]["GEOMETRY"]["Dtt2"] = dtt2 - 872 self._bankinfodict[bankid]["GEOMETRY"]["Width"] = width - 873 self._bankinfodict[bankid]["GEOMETRY"]["Xcross"] = xcross - 874 - 875 # 2. Setup: Excluded Region - 876 self._bankinfodict[bankid]["SETUP"] = {} - 877 self._bankinfodict[bankid]["SETUP"]["EXCLUDEDREGION"] = [] - 878 if excludedregions is not None: - 879 for exregion in excludedregions: - 880 begin = exregion[0] - 881 end = exregion[1] - 882 exdict = {} - 883 exdict["Begin"] = begin - 884 exdict["End"] = end - 885 self._bankinfodict[bankid]["SETUP"]["EXCLUDEDREGION"].append(exdict) - 886 self._bankinfodict[bankid]["SETUP"]["RANGE"] = {} - 887 if range is not None: - 888 self._bankinfodict[bankid]["SETUP"]["RANGE"]["Min"] = range[0] - 889 self._bankinfodict[bankid]["SETUP"]["RANGE"]["Max"] = range[1] - 890 self._bankinfodict[bankid]["GEOMETRY"]["Resolution"] = range[2] - 891 - 892 # 3. Background - 893 if backgroundinfo is None: - 894 # Polynomail as default - 895 self._bankinfodict[bankid]["BACKGROUND"] = {} - 896 self._bankinfodict[bankid]["BACKGROUND"]["Type" ] = "Polynomial" - 897 self._bankinfodict[bankid]["BACKGROUND"]["Order"] = 6 - 898 self._bankinfodict[bankid]["BACKGROUND"]["Bkpos"] = 3000.00 - 899 coeffstring = "" - 900 self._bankinfodict[bankid]["BACKGROUND"]["Coefficients"] = coeffstring - 901 - 902 else: - 903 self._bankinfodict[bankid]["BACKGROUND"] = {} - 904 self._bankinfodict[bankid]["BACKGROUND"]["Type" ] = backgroundinfo["Type"] - 905 self._bankinfodict[bankid]["BACKGROUND"]["Order"] = backgroundinfo["Order"] - 906 self._bankinfodict[bankid]["BACKGROUND"]["Bkpos"] = backgroundinfo["Bkpos"] - 907 self._bankinfodict[bankid]["BACKGROUND"]["Points"] = backgroundinfo["Points"] - 908 - 909 # LOOP-OVER: for nindex in xrange(numcomp): - 910 - 911 # 4. PeakProfile, Decay and Absorption - 912 if peakprofile is None: - 913 peakprofile = {} - 914 - 915 if expdecay is None: - 916 expdecay = {} - 917 - 918 self._bankinfodict[bankid]["PEAKPROFILE"] = peakprofile - 919 self._bankinfodict[bankid]["PEAKPROFILE"]["DECAY"] = expdecay - 920 - 921 return -
      922 - 923 -
      924 - def setZero(self, bankno=0, zshift=None, zerot=None): -
      925 """ - 926 Set zero-shift to a bank - 927 - 928 Argument: - 929 - bankno : int - 930 - zshift : float - 931 - zerot : float - 932 - 933 Return : None - 934 """ - 935 if zshift is not None: - 936 self._bankinfodict[bankno]["zshift"] = zshift - 937 - 938 return -
      939 - 940 -
      941 - def genRietveldComponent(self, myfit, structure, bankno, datafile, backgroundtuple = None, - 942 measurerange = None, excludedregionslist = None): -
      943 """ TOF Instrument: Generate and optionally add a RietveldComponenet to a Fit instance - 944 Only a SINGLE structure (multiple phase) can be set to a Rietveld Component - 945 - 946 Argument: - 947 - myfit : Fit - 948 - structure : list of Phases - 949 - bankno : integer, bank number - 950 - datafile : str - 951 - backgroundtuple : 2-tuple, (string, list of floats) or (string, string) - 952 if string at position 0 is I, interpolated background coming from a file - 953 if string at position 0 is P, polynomial background - 954 - measurerange : 2-tuple - 955 - excludedregionslist : list of 2-tuples - 956 - 957 Return : Rietveld Component - 958 """ - 959 import midscript as MS - 960 REC = myEngine.getRietveldEngineModule("RietveldComponent") - 961 - 962 # 1. generate component and add to Fit optionally - 963 comp = REC.RietveldComponent() - 964 if myfit is not None: - 965 myfit.addComponent(comp) - 966 myfit.setInstrument(myinstrument = self, bankid = bankno, component = comp) - 967 - 968 # 2. Set pattern, background, range, resolution, and excluded regions - 969 # FIXME In this step, only XYSigma file is considered - 970 # 2.1 Set necessary information - 971 try: - 972 dangle = self._bankinfodict[bankno]["GEOMETRY"]["TwoThetaBank"] - 973 dtt1 = self._bankinfodict[bankno]["GEOMETRY"]["Dtt1"] - 974 dtt2 = self._bankinfodict[bankno]["GEOMETRY"]["Dtt2"] - 975 width = self._bankinfodict[bankno]["GEOMETRY"]["Width"] - 976 xcross = self._bankinfodict[bankno]["GEOMETRY"]["Xcross"] - 977 except KeyError, err: - 978 errmsg = "bankno = %-10s Error: %-40s\n"% (bankno, err) - 979 errmsg += "Available Banks: %-30s\n"% (self._bankinfodict.keys()) - 980 errmsg += "Available Items: %-30s"% (self._bankinfodict[bankno].keys()) - 981 raise FitConfigurationError(errmsg) - 982 - 983 if excludedregionslist is not None: - 984 self._bankinfodict[bankno]["SETUP"]["EXCLUDEDREGION"].extend(excludedregionslist) - 985 curexcludedregions = self._bankinfodict[bankno]["SETUP"]["EXCLUDEDREGION"] - 986 - 987 myparser = self.genFileParser(bankno) - 988 - 989 pattern = MS.initTOFPattern(datafile, parser=myparser, bank=bankno, dangle=dangle,\ - 990 dtt1=dtt1, dtt2=dtt2, xcross=xcross, width=width, excludedregions=curexcludedregions) - 991 pattern.setInstrument(self) - 992 - 993 # 2.2 set zero shift - 994 if self._bankinfodict[bankno]["GEOMETRY"].has_key("zshift"): - 995 pattern.setValue("zshift", self._bankinfodict[bankno]["GEOMETRY"]["zshift"]) - 996 - 997 comp.setPattern(pattern) - 998 - 999 # 3. Background: (from measurement overriding) -1000 if backgroundtuple is None: -1001 if self._bankinfodict[bankno].has_key("BACKGROUND"): -1002 backgroundType = self._bankinfodict[bankno]["BACKGROUND"]["Type"] -1003 bkpos = self._bankinfodict[bankno]["BACKGROUND"]["Bkpos"] -1004 desireorder = self._bankinfodict[bankno]["BACKGROUND"]["Order"] -1005 backgroundPoints = [bkpos] -1006 backgroundPoints.extend(self._bankinfodict[bankno]["BACKGROUND"]["Coefficients"]) -1007 else: -1008 errmsg = "No Background Information Given: %-20s"% (self._bankinfodict[bankno].keys()) -1009 raise NotImplementedError(errmsg) -1010 else: -1011 backgroundType = backgroundtuple[0] -1012 backgroundPoints = backgroundtuple[1] -1013 desireorder = backgroundtuple[2] -1014 # END-IF-ELSE -1015 -1016 backgroundType = backgroundType[0].upper() -1017 if backgroundType == "I": -1018 background = MS.initInterpolatedBackground(backgroundPoints) -1019 elif backgroundType == "P": -1020 background = MS.initPolynomialBackground(backgroundPoints, desireorder) -1021 else: -1022 errmsg = "Background Type %-10s Is Not Supported" % (backgroundType) -1023 raise NotImplementedError, errmsg -1024 # END-IF-ELSE -1025 -1026 comp.setBackground(background) -1027 -1028 # 4. Measure Range: (from measurement overriding) -1029 if measurerange is not None: -1030 pattern.setMeasureRange(measurerange) -1031 else: -1032 thmin = self._bankinfodict[bankno]["Thmin"] -1033 thmax = self._bankinfodict[bankno]["Thmax"] -1034 pattern.setMeasureRange( (thmin, thmax) ) -1035 resol = self._bankinfodict[bankno]["Resolution"] -1036 pattern.setResolution(resol) -1037 -1038 # 5. phase and peak profile -1039 for phase in structure: -1040 # 5.1 Add Phase -1041 numbanks = len(self._bankinfodict.keys()) -1042 if numbanks == 1: -1043 phasecopy = phase -1044 else: -1045 phasecopy = phase.multiBankDuplicate() -1046 comp.addPhase(phasecopy) -1047 -1048 # 5.2 Add Peak and etc. -1049 if self._peakprofiletype is not None: -1050 # FIXME This is remain from the previous prototype design, will be removed -1051 peakprofile = MS.genPeakProfile(self._peakprofiletype, self._profileparamdict) -1052 else: -1053 peakprofiledict = self._bankinfodict[bankno]["PEAKPROFILE"] -1054 peakprofiledict["decay"] = peakprofiledict["DECAY"] -1055 peakprofiletype = peakprofiledict["Type"] -1056 peakprofile, expdecay, absorption = MS.genPeakProfile(peakprofiletype, peakprofiledict) -1057 # END-IF-ELSE -1058 -1059 phasecopy.setPeakProfile(peakprofile) -1060 if absorption is not None: -1061 phasecopy.setAbsorptionCorrection(absorption) -1062 if expdecay is not None: -1063 phasecopy.addExpDecayFunction(expdecay) -1064 # LOOP-OVER -1065 -1066 return comp -
      1067 -1068 -
      1069 - def importFromFit(self, myfit): -
      1070 """ -1071 Import a RietvledAPI.Fit instance to give data to TOFInstrument -1072 -1073 Arguments: -1074 - myfit : diffpy.rietveldapi.Fit instance -1075 -1076 Return : None -1077 """ -1078 import diffpy.rietveldapi.backgrounds as APIBKGD -1079 -1080 numcomp = myfit.getNumComponents() -1081 for nindex in xrange(numcomp): -1082 comp = myfit.getComponent(nindex) -1083 pat = comp.getPattern() -1084 phase = comp.getPhase(0) # use first phase as type -1085 background = comp.getBackground() -1086 peakprofile = phase.getPeakProfile() -1087 expdecay = phase.getExpDecayFunction() -1088 abscor = phase.getAbsorptionCorrection() -1089 -1090 # Init Bankno -1091 bankno = pat.getBankNumber() -1092 self._bankinfodict[bankno] = {} -1093 self._bankinfodict[bankno]["GEOMETRY"] = {} -1094 self._bankinfodict[bankno]["SETUP"] = {} -1095 self._bankinfodict[bankno]["BACKGROUND"] = {} -1096 -1097 # Get Value Pertinent to Bank and Pattern -1098 # 1. Geometry, energy (resolution) -1099 dangle = pat.getDetectorAngle() -1100 dtt1 = pat.getValue("dtt1") -1101 dtt2 = pat.getValue("dtt2") -1102 width = pat.getValue("width") -1103 xcross = pat.getValue("xcross") -1104 zshift = pat.getValue("zshift") -1105 res = pat.getResolution() -1106 -1107 self._bankinfodict[bankno]["Bank"] = bankno -1108 self._bankinfodict[bankno]["GEOMETRY"]["TwoThetaBank"] = dangle -1109 self._bankinfodict[bankno]["GEOMETRY"]["Dtt1"] = dtt1 -1110 self._bankinfodict[bankno]["GEOMETRY"]["Dtt2"] = dtt2 -1111 self._bankinfodict[bankno]["GEOMETRY"]["Width"] = width -1112 self._bankinfodict[bankno]["GEOMETRY"]["Xcross"] = xcross -1113 self._bankinfodict[bankno]["GEOMETRY"]["zshift"] = zshift -1114 self._bankinfodict[bankno]["GEOMETRY"]["Resolution"] = res -1115 -1116 # Excluded Region -1117 self._bankinfodict[bankno]["SETUP"]["EXCLUDEDREGION"] = [] -1118 for exregion in pat.getExcludedRegionsList(): -1119 begin = exregion[0] -1120 end = exregion[1] -1121 exdict = {} -1122 exdict["Begin"] = begin -1123 exdict["End"] = end -1124 self._bankinfodict[bankno]["SETUP"]["EXCLUDEDREGION"].append(exdict) -1125 self._bankinfodict[bankno]["SETUP"]["RANGE"] = {} -1126 range = pat.getMeasureRange() -1127 self._bankinfodict[bankno]["SETUP"]["RANGE"]["Min"] = range[0] -1128 self._bankinfodict[bankno]["SETUP"]["RANGE"]["Max"] = range[1] -1129 -1130 # PeakProfile -1131 self._bankinfodict[bankno]["PEAKPROFILE"] = self.importRietveldObject(peakprofile) -1132 self._bankinfodict[bankno]["PEAKPROFILE"]["DECAY"] = self.importRietveldObject(expdecay) -1133 self._bankinfodict[bankno]["PEAKPROFILE"]["ABSORPTION"] = self.importRietveldObject(abscor) -1134 -1135 # Background -1136 if isinstance(background, APIBKGD.PolynomialBackground): -1137 # Polynomail -1138 self._bankinfodict[bankno]["BACKGROUND"] = {} -1139 self._bankinfodict[bankno]["BACKGROUND"]["Type" ] = "Polynomial" -1140 self._bankinfodict[bankno]["BACKGROUND"]["Order"] = str(background.getOrder()) -1141 self._bankinfodict[bankno]["BACKGROUND"]["Bkpos"] = str(background.getOrigin()) -1142 coeffstring = "" -1143 starttowrite = False -1144 for i in xrange(12): -1145 parname = "b"+str(12-i) -1146 parval = background.getValue(parname) -1147 # 1. turn the flag on for the 1st non-zero -1148 if abs(parval) > 1.0E-8: -1149 if starttowrite is False: -1150 starttowrite = True -1151 # 2. write on -1152 if starttowrite is True: -1153 coeffstring = str(parval) + " " + coeffstring -1154 # LOOP-OVER -1155 self._bankinfodict[bankno]["BACKGROUND"]["Coefficients"] = coeffstring -1156 -1157 else: -1158 self._bankinfodict[bankno]["BACKGROUND"] = self.importRietveldObject(background) -1159 -1160 # LOOP-OVER: for nindex in xrange(numcomp): -1161 -1162 return -
      1163 -1164 -
      1165 - def genMeasurement(self, refinebankidlist, datafilenamedict, userrangedict, -1166 userexcludedregiondict, bgpointsdict): -
      1167 """ Generate a Measurement from this instrument -1168 -1169 Using the same as srrietveld-refine.py -1170 (1) generate XML files -1171 (2) read XML file and generate the measurement -1172 -1173 Arguement: -1174 - datafilename : str -1175 - bgpoints : list of floats -1176 -1177 Return : list, of list of Measurement instance -1178 """ -1179 # FIXME - This is the clone of genMeasurement() in srrietveld-refine -1180 -1181 xmlfname = "tempmeasure.xml" -1182 -1183 # 1. Generate measurement XML file -1184 measurexmlgen = XMLG.NPDFMeasurementXMLGenerator(datafilenamedict, refinebankidlist, -1185 userexcludedregiondict, userrangedict) -1186 measurexmlgen.exportXML(xmlfname) -1187 -1188 # 2. generate measurement from XML -1189 expmeasurelist = XMLI.MeasurementXMLParser( [xmlfname] ).getMeasurements() -1190 -1191 return expmeasurelist -
      1192 -1193 # END Class: ThermalNeutronTOFInstrument(Instrument) -1194 -1195 -1196 -
      1197 -class ThermalNeutronTOFInstrument(Instrument): -
      1198 """ -1199 General Thermal Neutron TOF instrument -1200 """ -1201 -
      1202 - def __init__(self, name="Thermal Neutron TOF", backgroundtype="Polynomial", peakprofiletype=None): -
      1203 """ -1204 initialization -1205 -1206 Argument: -1207 name : string -1208 backgroundtype : string -1209 peakprofiletype : string -1210 """ -1211 Instrument.__init__(self, name) -1212 -1213 self._Type = "ThermalNeutronTOF" -1214 -1215 self._peakprofiletype = peakprofiletype -1216 self._backgroundtype = backgroundtype -1217 self._bankinfodict = {} -1218 -1219 return -
      1220 -1221 -
      1222 - def getBankNumbersList(self): -
      1223 """ -1224 Get the information of all the bank number -1225 -1226 Return : list of int -1227 """ -1228 return self._bankinfodict.keys() -
      1229 -1230 -
      1231 - def getBankInfoDict(self, bankno): -
      1232 """ -1233 Get the dictionary decribing the characteristic of a specific bank -1234 -1235 Argument: -1236 - bankno : int -1237 -1238 Return : dict -1239 """ -1240 return self._bankinfodict[bankno] -
      1241 -1242 -
      1243 - def setBankInfo(self, bankno, dtt1, dtt2, dtt1t, dtt2t, twothetabank, xcross, width, \ -1244 range=None, excludedregions=None, peakprofile=None, backgroundinfo=None): -
      1245 """ -1246 Thermal Neutron TOF Instrument's setup is specific to each bank; -1247 Every bank should be set up individually -1248 -1249 Arguments: -1250 - bankno : int, bank number, 0 stand for integration from all banks -1251 - dtt1 : float -1252 - dtt2 : float -1253 - dtt1t : float -1254 - dtt2t : float -1255 - twothetabank : float -1256 - xcross : float -1257 - width : float -1258 - range : 3-tuple of float, thmin, thmax, resolution -1259 - excluededregions : list of 2-tuples -1260 - peakprofiles : dictionary to set peak profiles -1261 """ -1262 bankattrdict = {} -1263 bankattrdict["BankNo"] = bankno -1264 bankattrdict["Dtt1"] = dtt1 -1265 bankattrdict["Dtt2"] = dtt2 -1266 bankattrdict["Dtt1t"] = dtt1t -1267 bankattrdict["Dtt2t"] = dtt2t -1268 bankattrdict["TwoThetaBank"] = twothetabank -1269 bankattrdict["Xcross"] = xcross -1270 bankattrdict["Width"] = width -1271 -1272 if range is not None: -1273 thmin, thmax, resolution = range -1274 bankattrdict["Thmin"] = thmin -1275 bankattrdict["Thmax"] = thmax -1276 bankattrdict["Resolution"] = resolution -1277 -1278 if excludedregions is not None: -1279 bankattrdict["ExcludedRegions"] = excludedregions -1280 else: -1281 bankattrdict["ExcludedRegions"] = [] -1282 -1283 if peakprofile is not None: -1284 bankattrdict["PeakProfile"] = peakprofile -1285 -1286 if backgroundinfo is not None: -1287 bankattrdict["Background"] = backgroundinfo -1288 -1289 # Warning Message -1290 if self._bankinfodict.has_key(bankno): -1291 errmsg = "Bank No. %-5s is Reset"% (bankno) -1292 print "Warning! %-40s"% (errmsg) -1293 -1294 self._bankinfodict[bankno] = bankattrdict -1295 -1296 return -
      1297 -1298 -
      1299 - def setZero(self, bankno=0, zshift=None, zerot=None): -
      1300 """ -1301 Set zero-shift to a bank -1302 -1303 Argument: -1304 - bankno : int -1305 - zshift : float -1306 - zerot : float -1307 -1308 Return : None -1309 """ -1310 if zshift is not None: -1311 self._bankinfodict[bankno]["zshift"] = zshift -1312 -1313 if zerot is not None: -1314 self._bankinfodict[bankno]["zerot"] = zerot -1315 -1316 return -
      1317 -1318 -
      1319 - def genRietveldComponent(self, myfit, structure, bankno, datafile, backgroundtuple=None, measurerange=None, excludedregionslist=None): -
      1320 """ -1321 generate and optionally add a RietveldComponenet to a Fit instance -1322 -1323 Virtual in ConstWavelengthInstrument -1324 -1325 Argument: -1326 ... -1327 - bankno : integer, bank number -1328 - backgroundtuple : 2-tuple, (string, list of floats) or (string, string) -1329 if string at position 0 is I, interpolated background coming from a file -1330 if string at position 0 is P, polynomial background -1331 -1332 Return : ... ... -1333 """ -1334 import midscript as MS -1335 REComponent = myEngine.getRietveldEngineModule("RietveldComponent") -1336 PS = myEngine.getRietveldEngineModule("patternparsers") -1337 -1338 # 1. generate component and add to Fit optionally -1339 comp = REComponent() -1340 if myfit is not None: -1341 myfit.addComponent(comp) -1342 -1343 # 2. Set pattern, background, range, resolution, and excluded regions -1344 # FIXME In this step, only XYSigma file is considered -1345 # 2.1 Set necessary information -1346 try: -1347 dangle = self._bankinfodict[bankno]["TwoThetaBank"] -1348 dtt1 = self._bankinfodict[bankno]["Dtt1"] -1349 dtt2 = self._bankinfodict[bankno]["Dtt2"] -1350 dtt1t = self._bankinfodict[bankno]["Dtt1t"] -1351 dtt2t = self._bankinfodict[bankno]["Dtt2t"] -1352 width = self._bankinfodict[bankno]["Width"] -1353 xcross = self._bankinfodict[bankno]["Xcross"] -1354 except KeyError, err: -1355 print "bankno = %-10s"% (bankno) -1356 print "Available Banks: %-30s"% (self._bankinfodict.keys()) -1357 print "Available Items: %-30s"% (self._bankinfodict[bankno].keys()) -1358 raise KeyError, err -1359 -1360 if excludedregionslist is not None: -1361 self._bankinfodict[bankno]["ExcludedRegions"].extend(excludedregionslist) -1362 curexcludedregions = self._bankinfodict[bankno]["ExcludedRegions"] -1363 -1364 pattern = MS.initThermalTOFPattern(datafile, parser=PS.XYSigmaParser(), bank=bankno, dangle=dangle,\ -1365 dtt1=dtt1, dtt2=dtt2, dtt1t=dtt1t, dtt2t=dtt2t, xcross=xcross, width=width, \ -1366 excludedregions=curexcludedregions) -1367 pattern.setInstrument(self) -1368 -1369 # 2.2 set zero shift -1370 if self._bankinfodict[bankno].has_key("zshift"): -1371 pattern.setValue("zshift", self._bankinfodict[bankno]["zshift"]) -1372 if self._bankinfodict[bankno].has_key("zerot"): -1373 pattern.setValue("zerot", self._bankinfodict[bankno]["zerot"]) -1374 -1375 comp.setPattern(pattern) -1376 -1377 # 3. Background: (from measurement overriding) -1378 if backgroundtuple is None: -1379 if self._bankinfodict[bankno].has_key("Background"): -1380 backgroundType = self._bankinfodict[bankno]["Background"]["Type"] -1381 bkpos = self._bankinfodict[bankno]["Background"]["Bkpos"] -1382 desireorder = self._bankinfodict[bankno]["Background"]["Order"] -1383 backgroundPoints = [bkpos] -1384 backgroundPoints.extend(self._bankinfodict[bankno]["Background"]["Points"]) -1385 else: -1386 pass -1387 else: -1388 backgroundType = backgroundtuple[0] -1389 backgroundPoints = backgroundtuple[1] -1390 desireorder = backgroundtuple[2] -1391 -1392 if backgroundType == "I": -1393 background = MS.initInterpolatedBackground(backgroundpoints) -1394 elif backgroundType == "P": -1395 background = MS.initPolynomialBackground(backgroundPoints, desireorder) -1396 -1397 comp.setBackground(background) -1398 -1399 # 4. Measure Range: (from measurement overriding) -1400 if measurerange is not None: -1401 pattern.setMeasureRange(measurerange) -1402 else: -1403 thmin = self._bankinfodict[bankno]["Thmin"] -1404 thmax = self._bankinfodict[bankno]["Thmax"] -1405 pattern.setMeasureRange( (thmin, thmax) ) -1406 resol = self._bankinfodict[bankno]["Resolution"] -1407 pattern.setResolution(resol) -1408 -1409 # 5. phase and peak profile -1410 for phase in model: -1411 # 5.1 Add Phase -1412 comp.addPhase(phase) -1413 -1414 # 5.2 Add Peak and etc. -1415 if self._peakprofiletype is not None: -1416 # FIXME This is remain from the previous prototype design, will be removed -1417 peakprofile = MS.genPeakProfile(self._peakprofiletype, self._profileparamdict) -1418 else: -1419 peakprofiledict = self._bankinfodict[bankno]["PeakProfile"] -1420 peakprofiletype = peakprofiledict["Type"] -1421 peakprofile, expdecay, absorption = MS.genPeakProfile(peakprofiletype, peakprofiledict) -1422 -1423 phase.setPeakProfile(peakprofile) -1424 phase.setAbsorptionCorrection(absorption) -1425 phase.addExpDecayFunction(expdecay) -1426 -1427 return comp -
      1428 -1429 -
      1430 - def importFromFit(self, myfit): -
      1431 """ -1432 Import a RietvledAPI.Fit instance to give data to this Instrument object -1433 -1434 Arguments: -1435 - myfit : diffpy.rietveldapi.Fit instance -1436 -1437 Return : None -1438 """ -1439 import diffpy.rietveldapi.backgrounds as APIBKGD -1440 -1441 numcomp = myfit.getNumComponents() -1442 for nindex in xrange(numcomp): -1443 comp = myfit.getComponent(nindex) -1444 pat = comp.getPattern() -1445 phase = comp.getPhase(0) # use first phase as type -1446 background = comp.getBackground() -1447 peakprofile = phase.getPeakProfile() -1448 expdecay = phase.getExpDecayFunction() -1449 abscor = phase.getAbsorptionCorrection() -1450 -1451 # Init Bankno -1452 bankno = pat.getBankNumber() -1453 self._bankinfodict[bankno] = {} -1454 -1455 # Get Value Pertinent to Bank and Pattern -1456 dangle = pat.getDetectorAngle() -1457 dtt1 = pat.getValue("dtt1") -1458 dtt2 = pat.getValue("dtt2") -1459 dtt1t = pat.getValue("dtt1t") -1460 dtt2t = pat.getValue("dtt2t") -1461 width = pat.getValue("width") -1462 xcross = pat.getValue("xcross") -1463 zshift = pat.getValue("zshift") -1464 zerot = pat.getValue("zerot") -1465 -1466 self._bankinfodict[bankno]["Bank"] = bankno -1467 self._bankinfodict[bankno]["TwoThetaBank"] = dangle -1468 self._bankinfodict[bankno]["Dtt1"] = dtt1 -1469 self._bankinfodict[bankno]["Dtt2"] = dtt2 -1470 self._bankinfodict[bankno]["Dtt1t"] = dtt1t -1471 self._bankinfodict[bankno]["Dtt2t"] = dtt2t -1472 self._bankinfodict[bankno]["Width"] = width -1473 self._bankinfodict[bankno]["Xcross"] = xcross -1474 self._bankinfodict[bankno]["zshift"] = zshift -1475 self._bankinfodict[bankno]["zerot"] = zerot -1476 -1477 # Range and resolution -1478 st, ed = pat.getMeasureRange() -1479 res = pat.getResolution() -1480 rangedict = {} -1481 rangedict["Thmin"] = st -1482 rangedict["Thmax"] = ed -1483 rangedict["Resolution"] = res -1484 self._bankinfodict[bankno]["RANGE"] = rangedict -1485 -1486 # Excluded Region -1487 self._bankinfodict[bankno]["EXCLUDEDREGION"] = [] -1488 for exregion in pat.getExcludedRegionsList(): -1489 exdict = {} -1490 exdict["Start"] = exregion[0] -1491 exdict["End"] = exregion[1] -1492 self._bankinfodict[bankno]["EXCLUDEDREGION"].append(exdict) -1493 -1494 # PeakProfile -1495 self._bankinfodict[bankno]["PEAKPROFILE"] = self.importRietveldObject(peakprofile) -1496 self._bankinfodict[bankno]["PEAKPROFILE"]["DECAY"] = self.importRietveldObject(expdecay) -1497 self._bankinfodict[bankno]["PEAKPROFILE"]["ABSORPTION"] = self.importRietveldObject(abscor) -1498 -1499 -1500 # Background -1501 if isinstance(background, APIBKGD.PolynomialBackground): -1502 # Polynomail -1503 self._bankinfodict[bankno]["BACKGROUND"] = {} -1504 self._bankinfodict[bankno]["BACKGROUND"]["Type" ] = "Polynomial" -1505 self._bankinfodict[bankno]["BACKGROUND"]["Order"] = str(background.getOrder()) -1506 self._bankinfodict[bankno]["BACKGROUND"]["Bkpos"] = str(background.getOrigin()) -1507 coeffstring = "" -1508 starttowrite = False -1509 for i in xrange(12): -1510 parname = "b"+str(12-i) -1511 parval = background.getValue(parname) -1512 # 1. turn the flag on for the 1st non-zero -1513 if abs(parval) > 1.0E-8: -1514 if starttowrite is False: -1515 starttowrite = True -1516 # 2. write on -1517 if starttowrite is True: -1518 coeffstring = str(parval) + " " + coeffstring -1519 # LOOP-OVER -1520 -1521 self._bankinfodict[bankno]["BACKGROUND"]["Coefficients"] = coeffstring -1522 -1523 else: -1524 self._bankinfodict[bankno]["BACKGROUND"] = self.importRietveldObject(background) -1525 -1526 # LOOP-OVER: for nindex in xrange(numcomp): -1527 -1528 return -
      1529 -1530 -
      1531 - def genMeasurement(self, datafilename="fakedata.dat"): -
      1532 """ -1533 Generate a Measurement from this instrument -1534 -1535 Arguement: -1536 - datafilename : str -1537 -1538 Return : Measurement instance -1539 """ -1540 import measurements as MM -1541 -1542 measurement = MM.Measurement() -1543 -1544 # Set bank number to 0: bank combining all banks/detectors -1545 measurement.setBankNumber(0) -1546 measurement.setDataFileName(datafilename) -1547 -1548 return [measurement] -
      1549 -1550 # END Class: ThermalNeutronTOFInstrument(Instrument) -1551 -1552 -
      1553 -def getInstrument(instrumentName): -
      1554 """ -1555 initialize an extended Instrument instance by instrumentName -1556 -1557 Arguement: -1558 instrumentName : string, name of an instrument -1559 -1560 Return : Instrument instance -1561 """ -1562 for instrument in instrumentList: -1563 if instrument.Name == instrumentName: -1564 return instrument() -1565 -1566 wmsg = "Instrument %-10s has not been implemented"% (instrumentName) -1567 print wmsg -1568 return None -
      1569 -1570 -
      1571 -def isPatternOneBank(thefit, thepat): -
      1572 """ -1573 Judge whether the given pattern is one of the banks in a multiple-bank -1574 diffractometer -1575 -1576 Justification: Diffraction data coming from the same instrument but different time -1577 will correspond to different Instrument instance in initial configuration -1578 -1579 Argument: -1580 - thefit : Fit instance -1581 - thepat : Pattern instance -1582 """ -1583 thisinstrument = thepat.getInstrument() -1584 boolresult = False -1585 selfexist = False -1586 otherbankexist = False -1587 -1588 numcomps = thefit.getNumComponents() -1589 if thisinstrument is not None: -1590 # if no instrument information, then it is a stand-alone pattern -1591 for nindex in xrange(numcomps): -1592 pattern = thefit.getComponent(nindex).getPattern() -1593 if pattern.__repr__() == thepat.__repr__(): -1594 # self pattern must exist in thefit -1595 selfexist = True -1596 elif pattern.getInstrument() == thisinstrument: -1597 # other pattern with same instrument: see 'Justification' -1598 otherbankexist = True -1599 # END-IF -1600 # LOOP-OVER -1601 -1602 else: -1603 # No instrument setup -1604 if numcomps > 1: -1605 selfexist = True -1606 otherbankexist = True -1607 # Checkk selfexist -1608 for nindex in xrange(numcomps): -1609 pattern = thefit.getComponent(nindex).getPattern() -1610 if pattern.__repr__() == thepat.__repr__(): -1611 # self pattern must exist in thefit -1612 selfexist = True -1613 # End-If-Else -1614 -1615 if selfexist is False: -1616 errmsg = "Input Pattern is not belonged to input Fit" -1617 raise NotImplementedError(errmsg) -1618 -1619 if otherbankexist is True: -1620 boolresult = True -1621 -1622 return boolresult -
      1623 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.instrument.ConstWavelengthInstrument-class.html b/static_root/doc/srrietveld/developers/srrietveld.instrument.ConstWavelengthInstrument-class.html deleted file mode 100644 index 4f7a4232..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.instrument.ConstWavelengthInstrument-class.html +++ /dev/null @@ -1,713 +0,0 @@ - - - - - srrietveld.instrument.ConstWavelengthInstrument - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module instrument :: - Class ConstWavelengthInstrument - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ConstWavelengthInstrument

      source code

      -
      -Instrument --+
      -             |
      -            ConstWavelengthInstrument
      -
      - -
      Known Subclasses:
      -
      - NeutronCWInstrument, - XrayInstrument -
      - -
      -
      -
      -constant wavelength diffractometer, will be extended to
      -(1) Xray
      -(2) CWNeutron
      -
      -The infodict should be in the structure as:
      -Instrument:  Name, Type, 
      -  |
      -  |--- ENERGY: Lambda, Lambda1, ... ...
      -  |
      -  |--- PEAKPROFIEL:  Type, U, V, W, ... ...
      -  |
      -  |--- SETUP (Experiement Setup): 
      -  |       |
      -  |       |--- EXCLUDEDREGION
      -  |       |
      -  |       |--- Fit Range
      -  |
      -  |--- BACKGROUND: Type, Coefficients, ... ..
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - wavelength, - resolution, - peakprofiledict, - name='Constant Wave Instrument', - wavelength2=None, - ratio=0.0, - backgroundinfodict=None)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - Customized format output
      - source code - -
      - -
      -   - - - - - - -
      getWaveLength(self)
      - Return the wave-length
      - source code - -
      - -
      -   - - - - - - -
      genRietveldComponent(self, - datafile, - backgrounddict, - measurerange, - excludedregionslist, - structure, - myfit, - bankno=-1)
      - CW Wavelengvth Instrument: Generate and optionally add a -RietveldComponenet to a Fit instance with extra-measurement information -An individual instrument can have one and only one structure - -Virtual in ConstWavelengthInstrument - -Argument: -...
      - source code - -
      - -
      -   - - - - - - -
      addExcludedRegion(self, - begin, - end)
      - Add excluded region to Constant Wave Insturment setup...
      - source code - -
      - -
      -   - - - - - - -
      getExcludedRegions(self)
      - Return all the excluded region
      - source code - -
      - -
      -   - - - - - - -
      setZero(self, - zshift=None)
      - Set zero-shift for an Constant Wave Instrument (1-bank)...
      - source code - -
      - -
      -   - - - - - - -
      importFromFit(self, - myfit)
      - Import a RietvledAPI.Fit instance to give data to this...
      - source code - -
      - -
          Inherited from Instrument
      -   - - - - - - -
      genMeasurement(self, - refinebankidlist, - datafilenamedict, - userrangedict, - userexcludedregiondict, - bgpointsdict)
      - Generate a Measurement from from base-class Instrument...
      - source code - -
      - -
      -   - - - - - - -
      getBackgroundType(self)
      - Give the type of the background
      - source code - -
      - -
      -   - - - - - - -
      getName(self)
      - Give the name of the instrument
      - source code - -
      - -
      -   - - - - - - -
      getType(self)
      - Give the type of the instrument
      - source code - -
      - -
      -   - - - - - - -
      importRietveldObject(self, - rietobj)
      - Import a Rietveld object's parameters to a dictionary
      - source code - -
      - -
      -   - - - - - - -
      setPeakProfileInfo(self, - parameterdict)
      - import some parameters to PeakProfile's parameter dictionary...
      - source code - -
      - -
      -   - - - - - - -
      setPhase(self, - fit, - lattice, - atomlist)
      - set up a (single) phase model to each RietveldComponent in a Fit instance -including -1.
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - wavelength, - resolution, - peakprofiledict, - name='Constant Wave Instrument', - wavelength2=None, - ratio=0.0, - backgroundinfodict=None) -
      (Constructor) -

      -
      source code  -
      - -

      initialization

      - Argument: wavelength : float, main wavelength resolution : - float peakprofiledict : dictionary for peak profile type and - paraemeters name : string wavelength2 : 2nd beam's - wavelength ratio : float -
      -
      Overrides: - Instrument.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      __str__(self) -
      (Informal representation operator) -

      -
      source code  -
      - -

      Customized format output

      - Return : str -
      -
      Overrides: - Instrument.__str__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getWaveLength(self) -

      -
      source code  -
      - -

      Return the wave-length

      - Return : float -
      -
      -
      -
      - -
      - -
      - - -
      -

      genRietveldComponent(self, - datafile, - backgrounddict, - measurerange, - excludedregionslist, - structure, - myfit, - bankno=-1) -

      -
      source code  -
      - -
      -CW Wavelengvth Instrument: Generate and optionally add a 
      -RietveldComponenet to a Fit instance with extra-measurement information
      -An individual instrument can have one and only one structure 
      -
      -Virtual in ConstWavelengthInstrument
      -
      -Argument:
      -... 
      -- backgrounddict    :   dictionary for background information
      -                        if string at position 0 is I, interpolated 
      -                        background coming from a file
      -                        if string at position 0 is P, polynomial 
      -                        background
      -
      -Return              :   RietveldComponent object
      -
      -
      -
      -
      Overrides: - Instrument.genRietveldComponent -
      -
      -
      -
      - -
      - -
      - - -
      -

      addExcludedRegion(self, - begin, - end) -

      -
      source code  -
      - -
      -
      -Add excluded region to Constant Wave Insturment setup
      -
      -Argument:
      -- begin :   float
      -- end   :   float
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getExcludedRegions(self) -

      -
      source code  -
      - -

      Return all the excluded region

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      setZero(self, - zshift=None) -

      -
      source code  -
      - -
      -
      -Set zero-shift for an Constant Wave Instrument (1-bank)
      -
      -Argument:
      -- zshift    :   float
      -
      -Return      :   None
      -
      -
      -
      -
      Overrides: - Instrument.setZero -
      -
      -
      -
      - -
      - -
      - - -
      -

      importFromFit(self, - myfit) -

      -
      source code  -
      - -
      -
      -Import a RietvledAPI.Fit instance to give data to this
      -Constant Wave Insturment
      -
      -Arguments:
      -- myfit     :   diffpy.rietveldapi.Fit instance
      -
      -Return      :   None
      -
      -
      -
      -
      Overrides: - Instrument.importFromFit -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.instrument.Instrument-class.html b/static_root/doc/srrietveld/developers/srrietveld.instrument.Instrument-class.html deleted file mode 100644 index f0aea893..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.instrument.Instrument-class.html +++ /dev/null @@ -1,627 +0,0 @@ - - - - - srrietveld.instrument.Instrument - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module instrument :: - Class Instrument - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class Instrument

      source code

      -
      Known Subclasses:
      -
      - ConstWavelengthInstrument, - TOFInstrument, - ThermalNeutronTOFInstrument -
      - -
      -base class for all Instrument-Specified refinement setup classes

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - name='Instrument')
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - Customized format output
      - source code - -
      - -
      -   - - - - - - -
      getName(self)
      - Give the name of the instrument
      - source code - -
      - -
      -   - - - - - - -
      getType(self)
      - Give the type of the instrument
      - source code - -
      - -
      -   - - - - - - -
      getBackgroundType(self)
      - Give the type of the background
      - source code - -
      - -
      -   - - - - - - -
      genRietveldComponent(self)
      - Generate and optionally add a RietveldComponenet to a Fit instance - of virtual/baseclass Instrument
      - source code - -
      - -
      -   - - - - - - -
      setPhase(self, - fit, - lattice, - atomlist)
      - set up a (single) phase model to each RietveldComponent in a Fit instance -including -1.
      - source code - -
      - -
      -   - - - - - - -
      setPeakProfileInfo(self, - parameterdict)
      - import some parameters to PeakProfile's parameter dictionary...
      - source code - -
      - -
      -   - - - - - - -
      setZero(self, - zshift=None)
      - Set zero-shift...
      - source code - -
      - -
      -   - - - - - - -
      importFromFit(self, - myfit)
      - Import a RietvledAPI.Fit instance to give data to this Instrument object...
      - source code - -
      - -
      -   - - - - - - -
      importRietveldObject(self, - rietobj)
      - Import a Rietveld object's parameters to a dictionary
      - source code - -
      - -
      -   - - - - - - -
      genMeasurement(self, - refinebankidlist, - datafilenamedict, - userrangedict, - userexcludedregiondict, - bgpointsdict)
      - Generate a Measurement from from base-class Instrument...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __str__(self) -
      (Informal representation operator) -

      -
      source code  -
      - -

      Customized format output

      - Return : str -
      -
      -
      -
      - -
      - -
      - - -
      -

      getName(self) -

      -
      source code  -
      - -

      Give the name of the instrument

      - Return : str -
      -
      -
      -
      - -
      - -
      - - -
      -

      getType(self) -

      -
      source code  -
      - -

      Give the type of the instrument

      - Return : str -
      -
      -
      -
      - -
      - -
      - - -
      -

      getBackgroundType(self) -

      -
      source code  -
      - -

      Give the type of the background

      - Return : str -
      -
      -
      -
      - -
      - -
      - - -
      -

      setPhase(self, - fit, - lattice, - atomlist) -

      -
      source code  -
      - -
      -
      -set up a (single) phase model to each RietveldComponent in a Fit instance
      -including
      -1. Lattice
      -2. Atoms
      -3. (default) Peak profile (instrument dependent)
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setPeakProfileInfo(self, - parameterdict) -

      -
      source code  -
      - -
      -
      -import some parameters to PeakProfile's parameter dictionary
      -
      -Argument:
      -- parameterdict :   dictionary key = parameter name, val = value
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setZero(self, - zshift=None) -

      -
      source code  -
      - -
      -
      -Set zero-shift
      -
      -Argument:
      -- zshift    :   float
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      importFromFit(self, - myfit) -

      -
      source code  -
      - -
      -
      -Import a RietvledAPI.Fit instance to give data to this Instrument object
      -
      -Virtual base class method
      -
      -Arguments:
      -- myfit     :   diffpy.rietveldapi.Fit instance
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      importRietveldObject(self, - rietobj) -

      -
      source code  -
      - -

      Import a Rietveld object's parameters to a dictionary

      - Return : dict -
      -
      -
      -
      - -
      - -
      - - -
      -

      genMeasurement(self, - refinebankidlist, - datafilenamedict, - userrangedict, - userexcludedregiondict, - bgpointsdict) -

      -
      source code  -
      - -
      -Generate a Measurement from from base-class Instrument
      -
      -Arguement:
      -- datafilename  :   str
      -
      -Return          :   Measurement instance
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.instrument.NeutronCWInstrument-class.html b/static_root/doc/srrietveld/developers/srrietveld.instrument.NeutronCWInstrument-class.html deleted file mode 100644 index 62811eef..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.instrument.NeutronCWInstrument-class.html +++ /dev/null @@ -1,566 +0,0 @@ - - - - - srrietveld.instrument.NeutronCWInstrument - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module instrument :: - Class NeutronCWInstrument - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class NeutronCWInstrument

      source code

      -
      -           Instrument --+    
      -                        |    
      -ConstWavelengthInstrument --+
      -                            |
      -                           NeutronCWInstrument
      -
      - -
      -Constrant wave X-ray diffractometer

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - wavelength=None, - resolution=None, - peakprofiledict=None, - name='Xray Diffractometer', - wavelength2=None, - ratio=0.0, - backgroundinfodict=None)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - Customized format output
      - source code - -
      - -
      -   - - - - - - -
      genRietveldComponent(self, - datafile, - backgroundtuple, - measurerange, - excludedregionslist, - structure, - myfit=None, - bankno=-1)
      - generate and optionally add a RietveldComponenet to a Fit instance - in a Neutron constant wave length instrument
      - source code - -
      - -
      -   - - - - - - -
      genMeasurement(self, - datafilename='fakedata.dat')
      - Generate a Measurement from this instrument...
      - source code - -
      - -
          Inherited from ConstWavelengthInstrument
      -   - - - - - - -
      addExcludedRegion(self, - begin, - end)
      - Add excluded region to Constant Wave Insturment setup...
      - source code - -
      - -
      -   - - - - - - -
      getExcludedRegions(self)
      - Return all the excluded region
      - source code - -
      - -
      -   - - - - - - -
      getWaveLength(self)
      - Return the wave-length
      - source code - -
      - -
      -   - - - - - - -
      importFromFit(self, - myfit)
      - Import a RietvledAPI.Fit instance to give data to this...
      - source code - -
      - -
      -   - - - - - - -
      setZero(self, - zshift=None)
      - Set zero-shift for an Constant Wave Instrument (1-bank)...
      - source code - -
      - -
          Inherited from Instrument
      -   - - - - - - -
      getBackgroundType(self)
      - Give the type of the background
      - source code - -
      - -
      -   - - - - - - -
      getName(self)
      - Give the name of the instrument
      - source code - -
      - -
      -   - - - - - - -
      getType(self)
      - Give the type of the instrument
      - source code - -
      - -
      -   - - - - - - -
      importRietveldObject(self, - rietobj)
      - Import a Rietveld object's parameters to a dictionary
      - source code - -
      - -
      -   - - - - - - -
      setPeakProfileInfo(self, - parameterdict)
      - import some parameters to PeakProfile's parameter dictionary...
      - source code - -
      - -
      -   - - - - - - -
      setPhase(self, - fit, - lattice, - atomlist)
      - set up a (single) phase model to each RietveldComponent in a Fit instance -including -1.
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - wavelength=None, - resolution=None, - peakprofiledict=None, - name='Xray Diffractometer', - wavelength2=None, - ratio=0.0, - backgroundinfodict=None) -
      (Constructor) -

      -
      source code  -
      - -
      -
      -initialization
      -
      -Arguement:
      -- peakprofiledict   :   dictionary, information and parameters of profile
      -
      -
      -
      -
      Overrides: - ConstWavelengthInstrument.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      __str__(self) -
      (Informal representation operator) -

      -
      source code  -
      - -

      Customized format output

      - Return : str -
      -
      Overrides: - ConstWavelengthInstrument.__str__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      genRietveldComponent(self, - datafile, - backgroundtuple, - measurerange, - excludedregionslist, - structure, - myfit=None, - bankno=-1) -

      -
      source code  -
      - -

      generate and optionally add a RietveldComponenet to a Fit instance in - a Neutron constant wave length instrument

      -

      Argument: ... ...

      - Return : ... ... -
      -
      Overrides: - ConstWavelengthInstrument.genRietveldComponent -
      -
      -
      -
      - -
      - -
      - - -
      -

      genMeasurement(self, - datafilename='fakedata.dat') -

      -
      source code  -
      - -
      -
      -Generate a Measurement from this instrument
      -
      -Arguement:
      -- datafilename  :   str
      -
      -Return          :   Measurement instance
      -
      -
      -
      -
      Overrides: - Instrument.genMeasurement -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.instrument.TOFInstrument-class.html b/static_root/doc/srrietveld/developers/srrietveld.instrument.TOFInstrument-class.html deleted file mode 100644 index a7da108b..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.instrument.TOFInstrument-class.html +++ /dev/null @@ -1,833 +0,0 @@ - - - - - srrietveld.instrument.TOFInstrument - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module instrument :: - Class TOFInstrument - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class TOFInstrument

      source code

      -
      -Instrument --+
      -             |
      -            TOFInstrument
      -
      - -
      -General Time-of-flight (TOF) instrument

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - name='TOF', - backgroundtype='Polynomial', - peakprofiletype=None)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - Customized output
      - source code - -
      - -
      -   - - - - - - -
      getBankNumbersList(self)
      - Get the information of all the bank number
      - source code - -
      - -
      -   - - - - - - -
      getBankInfoDict(self, - bankno)
      - Get the dictionary decribing the characteristic of a specific bank...
      - source code - -
      - -
      -   - - - - - - -
      getExcludedRegions(self, - bankid)
      - Return all the excluded region of a specific bank...
      - source code - -
      - -
      -   - - - - - - -
      genFileParser(self, - bankid)
      - Generate file parser
      - source code - -
      - -
      -   - - - - - - -
      setBankInfo(self, - bankid, - dtt1, - dtt2, - twothetabank, - xcross, - width, - range=None, - excludedregions=None, - peakprofile=None, - expdecay=None, - backgroundinfo=None)
      - TOF Instrument's setup is specific to each bank;...
      - source code - -
      - -
      -   - - - - - - -
      setZero(self, - bankno=0, - zshift=None, - zerot=None)
      - Set zero-shift to a bank...
      - source code - -
      - -
      -   - - - - - - -
      genRietveldComponent(self, - myfit, - structure, - bankno, - datafile, - backgroundtuple=None, - measurerange=None, - excludedregionslist=None)
      - TOF Instrument: Generate and optionally add a RietveldComponenet to a Fit instance...
      - source code - -
      - -
      -   - - - - - - -
      importFromFit(self, - myfit)
      - Import a RietvledAPI.Fit instance to give data to TOFInstrument...
      - source code - -
      - -
      -   - - - - - - -
      genMeasurement(self, - refinebankidlist, - datafilenamedict, - userrangedict, - userexcludedregiondict, - bgpointsdict)
      - Generate a Measurement from this instrument...
      - source code - -
      - -
          Inherited from Instrument
      -   - - - - - - -
      getBackgroundType(self)
      - Give the type of the background
      - source code - -
      - -
      -   - - - - - - -
      getName(self)
      - Give the name of the instrument
      - source code - -
      - -
      -   - - - - - - -
      getType(self)
      - Give the type of the instrument
      - source code - -
      - -
      -   - - - - - - -
      importRietveldObject(self, - rietobj)
      - Import a Rietveld object's parameters to a dictionary
      - source code - -
      - -
      -   - - - - - - -
      setPeakProfileInfo(self, - parameterdict)
      - import some parameters to PeakProfile's parameter dictionary...
      - source code - -
      - -
      -   - - - - - - -
      setPhase(self, - fit, - lattice, - atomlist)
      - set up a (single) phase model to each RietveldComponent in a Fit instance -including -1.
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - name='TOF', - backgroundtype='Polynomial', - peakprofiletype=None) -
      (Constructor) -

      -
      source code  -
      - -

      initialization

      - Argument: name : string backgroundtype : string - peakprofiletype : string -
      -
      Overrides: - Instrument.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      __str__(self) -
      (Informal representation operator) -

      -
      source code  -
      - - Customized output -
      -
      Overrides: - Instrument.__str__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getBankNumbersList(self) -

      -
      source code  -
      - -

      Get the information of all the bank number

      - Return : list of int -
      -
      -
      -
      - -
      - -
      - - -
      -

      getBankInfoDict(self, - bankno) -

      -
      source code  -
      - -
      -
      -Get the dictionary decribing the characteristic of a specific bank
      -
      -Argument:
      -- bankno    :   int
      -
      -Return      :   dict
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getExcludedRegions(self, - bankid) -

      -
      source code  -
      - -
      -
      -Return all the excluded region of a specific bank
      -
      -Argument:
      -- bankid    :   int
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genFileParser(self, - bankid) -

      -
      source code  -
      - -

      Generate file parser

      - Return : Parser -
      -
      -
      -
      - -
      - -
      - - -
      -

      setBankInfo(self, - bankid, - dtt1, - dtt2, - twothetabank, - xcross, - width, - range=None, - excludedregions=None, - peakprofile=None, - expdecay=None, - backgroundinfo=None) -

      -
      source code  -
      - -
      -TOF Instrument's setup is specific to each bank;
      -Every bank should be set up individually
      -
      -Arguments:
      -- bankno            :   int, bank number, 0 stand for integration from all banks
      -- dtt1              :   float
      -- dtt2              :   float
      -- twothetabank      :   float
      -- xcross            :   float
      -- width             :   float
      -- range             :   3-tuple of float, thmin, thmax, resolution
      -- excluededregions  :   list of 2-tuples
      -- peakprofiles      :   dictionary to set peak profiles
      -- expdecay          :   dict, set up exponential decay
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setZero(self, - bankno=0, - zshift=None, - zerot=None) -

      -
      source code  -
      - -
      -
      -Set zero-shift to a bank
      -
      -Argument:
      -- bankno    :   int
      -- zshift    :   float
      -- zerot     :   float
      -
      -Return      :   None
      -
      -
      -
      -
      Overrides: - Instrument.setZero -
      -
      -
      -
      - -
      - -
      - - -
      -

      genRietveldComponent(self, - myfit, - structure, - bankno, - datafile, - backgroundtuple=None, - measurerange=None, - excludedregionslist=None) -

      -
      source code  -
      - -
      -TOF Instrument: Generate and optionally add a RietveldComponenet to a Fit instance
      -Only a SINGLE structure (multiple phase) can be set to a Rietveld Component
      -
      -Argument:
      -- myfit             :   Fit
      -- structure         :   list of Phases
      -- bankno            :   integer, bank number
      -- datafile          :   str
      -- backgroundtuple   :   2-tuple, (string, list of floats)  or (string, string)
      -                        if string at position 0 is I, interpolated background coming from a file
      -                        if string at position 0 is P, polynomial background
      -- measurerange      :   2-tuple
      -- excludedregionslist   :   list of 2-tuples
      -
      -Return  :   Rietveld Component
      -
      -
      -
      -
      Overrides: - Instrument.genRietveldComponent -
      -
      -
      -
      - -
      - -
      - - -
      -

      importFromFit(self, - myfit) -

      -
      source code  -
      - -
      -
      -Import a RietvledAPI.Fit instance to give data to TOFInstrument
      -
      -Arguments:
      -- myfit     :   diffpy.rietveldapi.Fit instance
      -
      -Return      :   None
      -
      -
      -
      -
      Overrides: - Instrument.importFromFit -
      -
      -
      -
      - -
      - -
      - - -
      -

      genMeasurement(self, - refinebankidlist, - datafilenamedict, - userrangedict, - userexcludedregiondict, - bgpointsdict) -

      -
      source code  -
      - -
      -Generate a Measurement from this instrument
      -
      -Using the same as srrietveld-refine.py
      -(1) generate XML files
      -(2) read XML file and generate the measurement
      -
      -Arguement:
      -- datafilename  :   str
      -- bgpoints      :   list of floats
      -
      -Return          :   list, of list of Measurement instance
      -
      -
      -
      -
      Overrides: - Instrument.genMeasurement -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.instrument.ThermalNeutronTOFInstrument-class.html b/static_root/doc/srrietveld/developers/srrietveld.instrument.ThermalNeutronTOFInstrument-class.html deleted file mode 100644 index f53d0fb0..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.instrument.ThermalNeutronTOFInstrument-class.html +++ /dev/null @@ -1,719 +0,0 @@ - - - - - srrietveld.instrument.ThermalNeutronTOFInstrument - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module instrument :: - Class ThermalNeutronTOFInstrument - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ThermalNeutronTOFInstrument

      source code

      -
      -Instrument --+
      -             |
      -            ThermalNeutronTOFInstrument
      -
      - -
      -General Thermal Neutron TOF instrument

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - name='Thermal Neutron TOF', - backgroundtype='Polynomial', - peakprofiletype=None)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      getBankNumbersList(self)
      - Get the information of all the bank number
      - source code - -
      - -
      -   - - - - - - -
      getBankInfoDict(self, - bankno)
      - Get the dictionary decribing the characteristic of a specific bank...
      - source code - -
      - -
      -   - - - - - - -
      setBankInfo(self, - bankno, - dtt1, - dtt2, - dtt1t, - dtt2t, - twothetabank, - xcross, - width, - range=None, - excludedregions=None, - peakprofile=None, - backgroundinfo=None)
      - Thermal Neutron TOF Instrument's setup is specific to each bank;...
      - source code - -
      - -
      -   - - - - - - -
      setZero(self, - bankno=0, - zshift=None, - zerot=None)
      - Set zero-shift to a bank...
      - source code - -
      - -
      -   - - - - - - -
      genRietveldComponent(self, - myfit, - structure, - bankno, - datafile, - backgroundtuple=None, - measurerange=None, - excludedregionslist=None)
      - generate and optionally add a RietveldComponenet to a Fit instance - -Virtual in ConstWavelengthInstrument - -Argument: -...
      - source code - -
      - -
      -   - - - - - - -
      importFromFit(self, - myfit)
      - Import a RietvledAPI.Fit instance to give data to this Instrument object...
      - source code - -
      - -
      -   - - - - - - -
      genMeasurement(self, - datafilename='fakedata.dat')
      - Generate a Measurement from this instrument...
      - source code - -
      - -
          Inherited from Instrument
      -   - - - - - - -
      __str__(self)
      - Customized format output
      - source code - -
      - -
      -   - - - - - - -
      getBackgroundType(self)
      - Give the type of the background
      - source code - -
      - -
      -   - - - - - - -
      getName(self)
      - Give the name of the instrument
      - source code - -
      - -
      -   - - - - - - -
      getType(self)
      - Give the type of the instrument
      - source code - -
      - -
      -   - - - - - - -
      importRietveldObject(self, - rietobj)
      - Import a Rietveld object's parameters to a dictionary
      - source code - -
      - -
      -   - - - - - - -
      setPeakProfileInfo(self, - parameterdict)
      - import some parameters to PeakProfile's parameter dictionary...
      - source code - -
      - -
      -   - - - - - - -
      setPhase(self, - fit, - lattice, - atomlist)
      - set up a (single) phase model to each RietveldComponent in a Fit instance -including -1.
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - name='Thermal Neutron TOF', - backgroundtype='Polynomial', - peakprofiletype=None) -
      (Constructor) -

      -
      source code  -
      - -

      initialization

      - Argument: name : string backgroundtype : string - peakprofiletype : string -
      -
      Overrides: - Instrument.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getBankNumbersList(self) -

      -
      source code  -
      - -

      Get the information of all the bank number

      - Return : list of int -
      -
      -
      -
      - -
      - -
      - - -
      -

      getBankInfoDict(self, - bankno) -

      -
      source code  -
      - -
      -
      -Get the dictionary decribing the characteristic of a specific bank
      -
      -Argument:
      -- bankno    :   int
      -
      -Return      :   dict
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setBankInfo(self, - bankno, - dtt1, - dtt2, - dtt1t, - dtt2t, - twothetabank, - xcross, - width, - range=None, - excludedregions=None, - peakprofile=None, - backgroundinfo=None) -

      -
      source code  -
      - -
      -
      -Thermal Neutron TOF Instrument's setup is specific to each bank;
      -Every bank should be set up individually
      -
      -Arguments:
      -- bankno            :   int, bank number, 0 stand for integration from all banks
      -- dtt1              :   float
      -- dtt2              :   float
      -- dtt1t             :   float
      -- dtt2t             :   float
      -- twothetabank      :   float
      -- xcross            :   float
      -- width             :   float
      -- range             :   3-tuple of float, thmin, thmax, resolution
      -- excluededregions  :   list of 2-tuples
      -- peakprofiles      :   dictionary to set peak profiles
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setZero(self, - bankno=0, - zshift=None, - zerot=None) -

      -
      source code  -
      - -
      -
      -Set zero-shift to a bank
      -
      -Argument:
      -- bankno    :   int
      -- zshift    :   float
      -- zerot     :   float
      -
      -Return      :   None
      -
      -
      -
      -
      Overrides: - Instrument.setZero -
      -
      -
      -
      - -
      - -
      - - -
      -

      genRietveldComponent(self, - myfit, - structure, - bankno, - datafile, - backgroundtuple=None, - measurerange=None, - excludedregionslist=None) -

      -
      source code  -
      - -
      -
      -generate and optionally add a RietveldComponenet to a Fit instance
      -
      -Virtual in ConstWavelengthInstrument
      -
      -Argument:
      -... 
      -- bankno            :   integer, bank number
      -- backgroundtuple   :   2-tuple, (string, list of floats)  or (string, string)
      -                        if string at position 0 is I, interpolated background coming from a file
      -                        if string at position 0 is P, polynomial background
      -
      -Return  :   ... ...
      -
      -
      -
      -
      Overrides: - Instrument.genRietveldComponent -
      -
      -
      -
      - -
      - -
      - - -
      -

      importFromFit(self, - myfit) -

      -
      source code  -
      - -
      -
      -Import a RietvledAPI.Fit instance to give data to this Instrument object
      -
      -Arguments:
      -- myfit     :   diffpy.rietveldapi.Fit instance
      -
      -Return      :   None
      -
      -
      -
      -
      Overrides: - Instrument.importFromFit -
      -
      -
      -
      - -
      - -
      - - -
      -

      genMeasurement(self, - datafilename='fakedata.dat') -

      -
      source code  -
      - -
      -
      -Generate a Measurement from this instrument
      -
      -Arguement:
      -- datafilename  :   str
      -
      -Return          :   Measurement instance
      -
      -
      -
      -
      Overrides: - Instrument.genMeasurement -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.instrument.XrayInstrument-class.html b/static_root/doc/srrietveld/developers/srrietveld.instrument.XrayInstrument-class.html deleted file mode 100644 index ccac0101..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.instrument.XrayInstrument-class.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - - srrietveld.instrument.XrayInstrument - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module instrument :: - Class XrayInstrument - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class XrayInstrument

      source code

      -
      -           Instrument --+    
      -                        |    
      -ConstWavelengthInstrument --+
      -                            |
      -                           XrayInstrument
      -
      - -
      -Constrant wave X-ray diffractometer

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - wavelength=None, - resolution=None, - peakprofiledict=None, - name='Xray Diffractometer', - wavelength2=None, - ratio=0.0, - backgroundinfodict=None)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - Customized format output
      - source code - -
      - -
      -   - - - - - - -
      genRietveldComponent(self, - datafile, - backgroundtuple, - measurerange, - excludedregionslist, - structure, - myfit=None, - bankno=-1)
      - Generate and optionally add a RietveldComponenet to a Fit instance - by an X-ray Instrument
      - source code - -
      - -
      -   - - - - - - -
      genMeasurement(self, - refinebankidlist, - datafilenamedict, - userrangedict, - userexcludedregiondict, - bgpointsdict)
      - Generate a Measurement from X-ray instrument -Using the same as srrietveld-refine.py - Step-1 generate XML files - Step-2 read XML file and generate the measurement including - a) data file name, b) user-defined refinement range (3) user defined - excluded region, (4) user-provided background points -The bank-ID is 0 for instrument that does not have setup of bank - -Arguement: - refinebankidlist : list, of int - datafilenamedict : dict.
      - source code - -
      - -
          Inherited from ConstWavelengthInstrument
      -   - - - - - - -
      addExcludedRegion(self, - begin, - end)
      - Add excluded region to Constant Wave Insturment setup...
      - source code - -
      - -
      -   - - - - - - -
      getExcludedRegions(self)
      - Return all the excluded region
      - source code - -
      - -
      -   - - - - - - -
      getWaveLength(self)
      - Return the wave-length
      - source code - -
      - -
      -   - - - - - - -
      importFromFit(self, - myfit)
      - Import a RietvledAPI.Fit instance to give data to this...
      - source code - -
      - -
      -   - - - - - - -
      setZero(self, - zshift=None)
      - Set zero-shift for an Constant Wave Instrument (1-bank)...
      - source code - -
      - -
          Inherited from Instrument
      -   - - - - - - -
      getBackgroundType(self)
      - Give the type of the background
      - source code - -
      - -
      -   - - - - - - -
      getName(self)
      - Give the name of the instrument
      - source code - -
      - -
      -   - - - - - - -
      getType(self)
      - Give the type of the instrument
      - source code - -
      - -
      -   - - - - - - -
      importRietveldObject(self, - rietobj)
      - Import a Rietveld object's parameters to a dictionary
      - source code - -
      - -
      -   - - - - - - -
      setPeakProfileInfo(self, - parameterdict)
      - import some parameters to PeakProfile's parameter dictionary...
      - source code - -
      - -
      -   - - - - - - -
      setPhase(self, - fit, - lattice, - atomlist)
      - set up a (single) phase model to each RietveldComponent in a Fit instance -including -1.
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - wavelength=None, - resolution=None, - peakprofiledict=None, - name='Xray Diffractometer', - wavelength2=None, - ratio=0.0, - backgroundinfodict=None) -
      (Constructor) -

      -
      source code  -
      - -
      -
      -initialization
      -
      -Arguement:
      -- peakprofiledict   :   dictionary, information and parameters of profile
      -
      -
      -
      -
      Overrides: - ConstWavelengthInstrument.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      __str__(self) -
      (Informal representation operator) -

      -
      source code  -
      - -

      Customized format output

      - Return : str -
      -
      Overrides: - ConstWavelengthInstrument.__str__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      genRietveldComponent(self, - datafile, - backgroundtuple, - measurerange, - excludedregionslist, - structure, - myfit=None, - bankno=-1) -

      -
      source code  -
      - -

      Generate and optionally add a RietveldComponenet to a Fit instance by - an X-ray Instrument

      -

      Argument: ... ...

      - Return : ... ... -
      -
      Overrides: - ConstWavelengthInstrument.genRietveldComponent -
      -
      -
      -
      - -
      - -
      - - -
      -

      genMeasurement(self, - refinebankidlist, - datafilenamedict, - userrangedict, - userexcludedregiondict, - bgpointsdict) -

      -
      source code  -
      - -
      -Generate a Measurement from X-ray instrument
      -Using the same as srrietveld-refine.py
      -  Step-1 generate XML files
      -  Step-2 read XML file and generate the measurement including
      -         a) data file name, b) user-defined refinement range (3) user defined 
      -         excluded region, (4) user-provided background points
      -The bank-ID is 0 for instrument that does not have setup of bank
      -
      -Arguement:
      -  refinebankidlist  : list, of int
      -  datafilenamedict  : dict.  key = int (bank ID), val = str (file name)
      -  userrangedict     : dict.  key = int (bank ID), val = 2-tuple (begin, end)
      -  userexcludedregiondict: dict.  key = int (bank ID), val = 2-tuple (begin, end)
      -  bgpointsdict      : dict.  key = int (bank ID), val = list of 2-tuple
      -
      -Return          :   list, of list of Measurement instance
      -
      -
      -
      -
      Overrides: - Instrument.genMeasurement -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.io-module.html b/static_root/doc/srrietveld/developers/srrietveld.io-module.html deleted file mode 100644 index 5280fa79..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.io-module.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - srrietveld.io - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module io - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module io

      source code

      -A collection of IO processing

      - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      getDataFromColumnFile(filename, - colstart, - colend, - output='tuple')
      - Reading a data file which containing 2 or 3 column of data in format:...
      - source code - -
      - -
      -   - - - - - - -
      writeToColumnFile(datatupleset=None, - dataarrayset=None, - filename=None)
      - Write a list of tuples or list of arrays to a file...
      - source code - -
      - -
      -   - - - - - - -
      listFileNamesInDirectory(directory)
      - Find all the files in a given directory...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: io.py 2792 2009-03-02 15:56:43Z wdzhou $' -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      getDataFromColumnFile(filename, - colstart, - colend, - output='tuple') -

      -
      source code  -
      - -
      -
      -Reading a data file which containing 2 or 3 column of data in format:
      -X-Y-Sigma
      -
      -Argument:
      -- filename  :   str, data file name
      -- colstart  :   int
      -- colend    :   int, colend > colstart
      -- output    :   str, output option  tuple/numpy
      -
      -Return      :   list of n-list
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      writeToColumnFile(datatupleset=None, - dataarrayset=None, - filename=None) -

      -
      source code  -
      - -
      -
      -Write a list of tuples or list of arrays to a file
      -
      -Argument:
      -- dataset   :   str
      -- filename  :   str
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      listFileNamesInDirectory(directory) -

      -
      source code  -
      - -
      -
      -Find all the files in a given directory
      -
      -Arguments:
      -- directory :   str
      -
      -Return      :   list of str, as file names,
      -                * without directory/path with file name
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.io-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.io-pysrc.html deleted file mode 100644 index 020c2132..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.io-pysrc.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - srrietveld.io - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module io - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.io

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15    A collection of IO processing 
      - 16  """ 
      - 17   
      - 18  __id__ = "$Id: io.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      - 19   
      -
      20 -def getDataFromColumnFile(filename, colstart, colend, output="tuple"): -
      21 """ - 22 Reading a data file which containing 2 or 3 column of data in format: - 23 X-Y-Sigma - 24 - 25 Argument: - 26 - filename : str, data file name - 27 - colstart : int - 28 - colend : int, colend > colstart - 29 - output : str, output option tuple/numpy - 30 - 31 Return : list of n-list - 32 """ - 33 # 1. read data file - 34 ifile = open(filename, "r") - 35 lines = ifile.readlines() - 36 ifile.close() - 37 - 38 # 2. import - 39 if output == "tuple": - 40 dataset = [] - 41 opmode = 0 - 42 - 43 elif output == "numpy": - 44 import numpy - 45 coldatalist = [] - 46 for i in xrange(colstart, colend+1): - 47 coldatalist.append( [] ) - 48 opmode = 1 - 49 - 50 else: - 51 errmsg = "option %-10s unknown" % (output) - 52 raise NotImplementedError(errmsg) - 53 - 54 for line in lines: - 55 line = line.strip() - 56 terms = line.split() - 57 if opmode == 0: - 58 tup = [] - 59 - 60 if line != "": - 61 try: - 62 if opmode == 0: - 63 for i in xrange(colstart, colend+1): - 64 val = float(terms[i]) - 65 tup.append(val) - 66 dataset.append(tup) - 67 - 68 elif opmode == 1: - 69 for i in xrange(colstart, colend+1): - 70 val = float(terms[i]) - 71 coldatalist[i-colstart].append(val) - 72 - 73 # END-IF-ELSE - 74 except ValueError, err: - 75 errmsg = "%-20s is not valid"% (line.split("\n")[0]) - 76 raise ValueError(errmsg) - 77 except IndexError, err: - 78 errmsg = "%-20s is not valid"% (line.split("\n")[0]) - 79 raise IndexError(errmsg) - 80 # END-IF - 81 # LOOP-OVER - 82 - 83 # 3. prepare output - 84 if opmode == 0: - 85 return dataset - 86 - 87 elif opmode == 1: - 88 arraylist = [] - 89 for coldata in coldatalist: - 90 iarray = numpy.array(coldata) - 91 arraylist.append(iarray) - 92 - 93 return arraylist - 94 - 95 return -
      96 - 97 -
      98 -def writeToColumnFile(datatupleset=None, dataarrayset=None, filename=None): -
      99 """ -100 Write a list of tuples or list of arrays to a file -101 -102 Argument: -103 - dataset : str -104 - filename : str -105 -106 Return : None -107 """ -108 wbuf = "" -109 -110 if datatupleset is not None: -111 # data tuple set -112 for r in datatupleset: -113 for i in xrange(len(r)): -114 wbuf += "%-15s " % (r[i]) -115 if r != datatupleset[-1]: -116 wbuf += "\n" -117 # LOOP-OVER -118 -119 elif dataarrayset is not None: -120 # data array set -121 length = len(dataarrayset[0]) -122 numarr = len(dataarrayset) -123 for i in xrange(length): -124 for j in xrange(numarr): -125 wbuf += "%-15s " % (dataarrayset[j][i]) -126 if i < length-1: -127 wbuf += "\n" -128 # LOOP-OVER -129 -130 else: -131 raise NotImplementedError("Input Error") -132 # END-IF-ELSE -133 -134 ofile = open(filename, "w") -135 ofile.write(wbuf) -136 ofile.close() -137 -138 return -
      139 -140 -141 -
      142 -def listFileNamesInDirectory(directory): -
      143 """ -144 Find all the files in a given directory -145 -146 Arguments: -147 - directory : str -148 -149 Return : list of str, as file names, -150 * without directory/path with file name -151 """ -152 import os -153 -154 # 1. System call -155 try: -156 allfilenameslist = os.listdir(directory) -157 except OSError, err: -158 errmsg = "List Files in Directory %-30s Error!"% (directory) -159 raise FitConfigurationError(errmsg) -160 -161 # 2. Find file names -162 filenameslist = [] -163 for filename in allfilenameslist: -164 filenameslist.append(filename) -165 -166 return filenameslist -
      167 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities-module.html b/static_root/doc/srrietveld/developers/srrietveld.mar_utilities-module.html deleted file mode 100644 index 25753e95..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities-module.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - srrietveld.mar_utilities - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module mar_utilities - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module mar_utilities

      source code

      -Utilities for analysis of MAR scans measured at the APS: class - MarSetup -- MAR image plate setup and effective time interval class - SpecMarExposure -- spec record of MAR exposure class MarImage -- records - extracted from MAR image header

      - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - MarSetup
      - MAR image plate experiment setup. -
      -   - - SpecMarExposure
      - Spec record of MAR exposure -
      -   - - MarImage
      - MAR image records. -
      -   - - ChiFile
      - CHI file with integrated MAR image. -
      - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      getSpecMarExposures(specfile)
      - Return a list of all SpecMarExposure events in specfile.
      - source code - -
      - -
      -   - - - - - - -
      defineMarSetup(name, - **kwargs)
      - Define MAR image plate experiment setup for given time interval.
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: mar_utilities.py 2792 2009-03-02 15:56:43Z wdzh... -
      -   - - _spec_mar_exposures = None -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      getSpecMarExposures(specfile) -

      -
      source code  -
      - - Return a list of all SpecMarExposure events in specfile. When specfile - is empty, return empty list. -
      -
      -
      -
      - -
      - -
      - - -
      -

      defineMarSetup(name, - **kwargs) -

      -
      source code  -
      - -
      -Define MAR image plate experiment setup for given time interval.
      -
      -Required arguments:
      -
      -name          -- name of this experiment setup
      -start_date    -- time when this setup comes into effect, for example
      -                 Mon Aug 21 08:26:51 2006
      -stop_date     -- expiry time of this MAR setup
      -x_dimension   -- number of pixels in MAR image
      -y_dimension   -- number of pixels in MAR image
      -xray_wavelength -- x-ray wavelength in Angstroms
      -polarization_factor -- Lorentz polarization factor (0.96 for 6ID-D)
      -x_pixel_size  -- number of pixels per 1 mm in x direction
      -y_pixel_size  -- number of pixels per 1 mm in y direction
      -x_beam_center -- x coordinate of beam center in pixels
      -y_beam_center -- y coordinate of beam center in pixels
      -distance      -- sample to detector distance
      -tilt_rotation -- tilt axis rotation
      -angle_of_tilt -- tilt magnitude around tilt axis
      -tth_step      -- 2 theta step used in integration
      -spec_file     -- spec file with scan records
      -
      -Optional arguments:
      -
      -spec_fixed_records -- optional file with fixes of wrong spec_file records,
      -                      such as invalid FILE or overflown monitor counts
      -
      -Return instance of MarSetup.
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: mar_utilities.py 2792 2009-03-02 15:56:43Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.mar_utilities-pysrc.html deleted file mode 100644 index d3279088..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities-pysrc.html +++ /dev/null @@ -1,1102 +0,0 @@ - - - - - srrietveld.mar_utilities - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module mar_utilities - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.mar_utilities

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:     
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """Utilities for analysis of MAR scans measured at the APS: 
      - 15      class MarSetup -- MAR image plate setup and effective time interval 
      - 16      class SpecMarExposure -- spec record of MAR exposure 
      - 17      class MarImage -- records extracted from MAR image header 
      - 18  """ 
      - 19   
      - 20  # version 
      - 21  __id__ = '$Id: mar_utilities.py 2792 2009-03-02 15:56:43Z wdzhou $' 
      - 22   
      - 23  import os 
      - 24  import re 
      - 25  import time 
      - 26   
      - 27  ############################################################################## 
      - 28  # classes 
      - 29  ############################################################################## 
      - 30   
      -
      31 -class MarSetup(object): -
      32 """MAR image plate experiment setup. - 33 - 34 Required input data members: - 35 - 36 name -- name of this experiment setup - 37 start_date -- time when this setup comes into effect, for example - 38 Mon Aug 21 08:26:51 2006 - 39 stop_date -- expiry time of this MAR setup - 40 x_dimension -- number of pixels in MAR image - 41 y_dimension -- number of pixels in MAR image - 42 xray_wavelength -- x-ray wavelength in Angstroms - 43 polarization_factor -- Lorentz polarization factor (0.96 for 6ID-D) - 44 x_pixel_size -- number of pixels per 1 mm in x direction - 45 y_pixel_size -- number of pixels per 1 mm in y direction - 46 x_beam_center -- x coordinate of beam center in pixels - 47 y_beam_center -- y coordinate of beam center in pixels - 48 distance -- sample to detector distance - 49 tilt_rotation -- tilt axis rotation - 50 angle_of_tilt -- tilt magnitude around tilt axis - 51 tth_step -- 2 theta step used in integration - 52 spec_file -- spec file with scan records - 53 - 54 Optional input data members: - 55 - 56 spec_fixed_records -- optional file with fixes of wrong spec_file records, - 57 such as invalid FILE or overflown monitor counts - 58 - 59 Calculated data members: - 60 - 61 tth_max -- maximum 2 theta angle possible - 62 tth_step_min -- low boundary for tth_step - 63 start_date_seconds -- start time in seconds since 1970-01-01 - 64 stop_date_seconds -- stop time in seconds since 1970-01-01 - 65 xray_energy_keV -- x-ray energy in keV - 66 - 67 Static members: - 68 - 69 all_setups -- list of all setups sorted by effective time - 70 """ - 71 - 72 # Static data members - 73 all_setups = [] - 74 -
      75 - def __init__(self, name, **kwargs): -
      76 """Create new MarSetup. Must supply all input data members - 77 as described in MarSetup.__doc__. - 78 """ - 79 self.name = name - 80 self.start_date = kwargs['start_date'] - 81 self.stop_date = kwargs['stop_date'] - 82 self.x_dimension = kwargs['x_dimension'] - 83 self.y_dimension = kwargs['y_dimension'] - 84 self.xray_wavelength = kwargs['xray_wavelength'] - 85 self.polarization_factor = kwargs['polarization_factor'] - 86 self.x_pixel_size = kwargs['x_pixel_size'] - 87 self.y_pixel_size = kwargs['y_pixel_size'] - 88 self.x_beam_center = kwargs['x_beam_center'] - 89 self.y_beam_center = kwargs['y_beam_center'] - 90 self.distance = kwargs['distance'] - 91 self.tilt_rotation = kwargs['tilt_rotation'] - 92 self.angle_of_tilt = kwargs['angle_of_tilt'] - 93 self.tth_step = kwargs['tth_step'] - 94 self.spec_file = kwargs['spec_file'] - 95 self.spec_fixed_records = kwargs.get('spec_fixed_records', '') - 96 # initialize derived members - 97 self.tth_max = None - 98 self.tth_step_min = None - 99 self.start_date_seconds = None -100 self.stop_date_seconds = None -101 self.xray_energy_keV = None -102 # check all arguments -103 self.__processArgs() -104 return -
      105 -
      106 - def __eq__(self, other): -
      107 """Comparison operator. -108 """ -109 res = self is other or isinstance(other, MarSetup) and \ -110 str(self) == str(other) -111 return res -
      112 -
      113 - def __processArgs(self): -
      114 """Check user data and calculate derived members. -115 """ -116 import math -117 self.tth_max = 180.0/math.pi * math.atan( -118 max(self.x_dimension*self.x_pixel_size/1e3, -119 self.y_dimension*self.y_pixel_size/1e3)/2/self.distance ) -120 self.tth_step_min = self.tth_max/min(self.x_dimension, self.y_dimension) -121 if self.tth_step < self.tth_step_min: -122 raise ValueError, \ -123 "tth_step must be larger than %f" % self.tth_step_min -124 self.start_date_seconds = time.mktime(time.strptime(self.start_date)) -125 self.stop_date_seconds = time.mktime(time.strptime(self.stop_date)) -126 # E = h*c / lambda -127 self.xray_energy_keV = 12.398419 / self.xray_wavelength -128 if not os.path.isfile(self.spec_file): -129 raise IOError, "Cannot open %r" % self.spec_file -130 self.spec_file = os.path.abspath(self.spec_file) -131 if self.spec_fixed_records: -132 if not os.path.isfile(self.spec_fixed_records): -133 raise IOError, "Cannot open %r" % self.spec_fixed_records -134 self.spec_fixed_records = os.path.abspath(self.spec_fixed_records) -135 # check time values -136 if self.start_date_seconds > self.stop_date_seconds: -137 raise ValueError, "Invalid values of start_date and stop_date" -138 return -
      139 -
      140 - def __str__(self): -
      141 """Nice string representation of MarSetup. -142 """ -143 lines = [ "[%s]" % self.name, -144 "start_date = %s" % self.start_date, -145 "stop_date = %s" % self.stop_date, -146 "x_dimension = %s" % self.x_dimension, -147 "y_dimension = %s" % self.y_dimension, -148 "xray_wavelength = %s" % self.xray_wavelength, -149 "polarization_factor = %s" % self.polarization_factor, -150 "x_pixel_size = %s" % self.x_pixel_size, -151 "y_pixel_size = %s" % self.y_pixel_size, -152 "x_beam_center = %s" % self.x_beam_center, -153 "y_beam_center = %s" % self.y_beam_center, -154 "distance = %s" % self.distance, -155 "tilt_rotation = %s" % self.tilt_rotation, -156 "angle_of_tilt = %s" % self.angle_of_tilt, -157 "tth_step = %s" % self.tth_step, -158 "spec_file = %s" % self.spec_file, -159 "spec_fixed_records = %s" % self.spec_fixed_records -160 ] -161 s = "\n".join(lines) -162 return s -
      163 -
      164 - def define(self): -
      165 """Add this MarSetup to global list of effective setups. -166 """ -167 # check for intersecting effective times: -168 start, stop = self.start_date_seconds, self.stop_date_seconds -169 for ms in MarSetup.all_setups: -170 if start < ms.stop_date_seconds and stop > ms.start_date_seconds: -171 if self == ms: return -172 raise ValueError, \ -173 "Effective time clashes with setup %r" % ms.name -174 # setup seem OK now: -175 MarSetup.all_setups.append(self) -176 cmp = lambda x, y : x.start_date_seconds < y.start_date_seconds -177 MarSetup.all_setups.sort(cmp) -178 return -
      179 -
      180 - def undef(self): -
      181 """Remove this MarSetup from global list of effective setups. -182 """ -183 try: -184 MarSetup.all_setups.remove(self) -185 except ValueError: -186 pass -187 return -
      188 -
      189 - def fit2dIntegrateMacro(self, mar_file, chi_file): -
      190 """Build fit2d macro for integrating and saving single scan -191 -192 mar_file -- path to input MAR image file -193 chi_file -- output chi file -194 -195 Return string. -196 """ -197 from fit2d_macros import fit2d_integrate -198 d = { 'mar_file' : mar_file, -199 'chi_file' : chi_file, -200 } -201 d.update(self.__dict__) -202 s = fit2d_integrate % d -203 return s -
      204 -205 # Static methods -206 -
      207 - def undefAll(): -
      208 """Undefine all effective MAR setups. Static method. -209 """ -210 del MarSetup.all_setups[:] -211 return -
      212 undefAll = staticmethod(undefAll) -213 -
      214 - def getEffectiveSetup(date_seconds): -
      215 """Find effective MarSetup at specified time. Static method. -216 -217 date_seconds -- timestamp in seconds since 1970-01-01 -218 -219 Return instance of MarSetup. -220 Raise InvalidValue if there is no setup defined at date_seconds. -221 """ -222 for ms in MarSetup.all_setups: -223 if ms.start_date_seconds <= date_seconds <= ms.stop_date_seconds: -224 return ms -225 # we get here only when setup was not found -226 raise ValueError, "MarSetup not defined for `%s'" % \ -227 time.ctime(date_seconds) -228 pass -
      229 getEffectiveSetup = staticmethod(getEffectiveSetup) -230 -
      231 - def fromConfigFileObject(fp): -
      232 """Read one or more MarSetups from a file like object. Static method. -233 -234 fp -- configuration file object -235 -236 Return list of MarSetup instances. -237 """ -238 rv = [] -239 import ConfigParser -240 defaults = {'spec_fixed_records' : ''} -241 cfg = ConfigParser.SafeConfigParser(defaults) -242 cfg.readfp(fp) -243 duplicates = {} -244 for sctn in cfg.sections(): -245 if sctn in duplicates: -246 raise ConfigParser.DuplicateSectionError, \ -247 "Duplicate section [%s]" % (sctn) -248 duplicates[sctn] = None -249 # try hard to resolve spec_file value -250 cfg_spec_file = cfg.get(sctn, 'spec_file') -251 if not os.path.isfile(cfg_spec_file): -252 f_realdir = os.path.dirname(os.path.realpath(f)) -253 cfg_spec_file = os.path.join(f_realdir, cfg_spec_file) -254 # define mar setup -255 ms = MarSetup(name = sctn, -256 start_date = cfg.get(sctn, 'start_date'), -257 stop_date = cfg.get(sctn, 'stop_date'), -258 x_dimension = cfg.getint(sctn, 'x_dimension'), -259 y_dimension = cfg.getint(sctn, 'y_dimension'), -260 xray_wavelength = cfg.getfloat(sctn, 'xray_wavelength'), -261 polarization_factor = cfg.getfloat(sctn, 'polarization_factor'), -262 x_pixel_size = cfg.getfloat(sctn, 'x_pixel_size'), -263 y_pixel_size = cfg.getfloat(sctn, 'y_pixel_size'), -264 x_beam_center = cfg.getfloat(sctn, 'x_beam_center'), -265 y_beam_center = cfg.getfloat(sctn, 'y_beam_center'), -266 distance = cfg.getfloat(sctn, 'distance'), -267 tilt_rotation = cfg.getfloat(sctn, 'tilt_rotation'), -268 angle_of_tilt = cfg.getfloat(sctn, 'angle_of_tilt'), -269 tth_step = cfg.getfloat(sctn, 'tth_step'), -270 spec_file = cfg_spec_file, -271 spec_fixed_records = cfg.get(sctn, 'spec_fixed_records'), -272 ) -273 rv.append(ms) -274 return rv -
      275 fromConfigFileObject = staticmethod(fromConfigFileObject) -276 -
      277 - def fromConfigStr(s): -
      278 """Read one or more MarSetups from a string. Static method. -279 -280 s -- string with one or more string representations of MarSetup -281 -282 Return list of MarSetup instances. -283 """ -284 import cStringIO -285 fp = cStringIO.StringIO(s) -286 return MarSetup.fromConfigFileObject(fp) -
      287 fromConfigStr = staticmethod(fromConfigStr) -
      288 -289 # End of class MarSetup -290 -
      291 -class SpecMarExposure(object): -
      292 """Spec record of MAR exposure -293 -294 Data members: -295 -296 record -- string with full record from the spec file -297 d -- D record, date and time of this exposure -298 d_seconds -- d converted to seconds since 1970-01-01 -299 -300 Properties (assignemnt updates record): -301 -302 file -- FILE value -303 monitor -- monitor counts -304 -305 Private members: -306 -307 _Lline -- index of line with L values -308 """ -309 -310 # constants -311 __Lidx_monitor = 5 -312 -
      313 - def __init__(self, s): -
      314 """Initialize SpecMarExposure from a string. -315 The string is searched for the first record of MAR exposure. -316 """ -317 ifirst = s.index('#MAR exposure') -318 ilast = s.index('\n\n', ifirst) + 1 -319 # fill in data members -320 self.record = s[ifirst:ilast] -321 self.d = re.search(r'^#D (.+)\s*$', self.record, re.M).group(1) -322 self.d_seconds = time.mktime(time.strptime(self.d)) -323 self._dir = re.search(r'^#DIR (\S+)', self.record, re.M).group(1) -324 self._file = re.search(r'^#FILE (\S+)', self.record, re.M).group(1) -325 rx = re.search(r'(^#L .*\n)(^.*)', self.record, re.M) -326 self._Lline = self.record[:rx.start(2)].count('\n') -327 Lwords = rx.group(2).strip().split() -328 self._monitor = float(Lwords[self.__Lidx_monitor]) -329 return -
      330 -331 # file property -
      332 - def _get_file(self): -
      333 return self._file -
      334 - def _set_file(self, value): -
      335 self._file = value -336 pat = re.compile(r'^#FILE (\S+)', re.M) -337 self.record = pat.sub('#FILE ' + value, self.record) -338 return -
      339 file = property(_get_file, _set_file) -340 -341 # monitor property -
      342 - def _get_monitor(self): -
      343 return self._monitor -
      344 - def _set_monitor(self, value): -
      345 lines = self.record.split('\n') -346 Lwords = lines[self._Lline].strip().split() -347 Lwords[self.__Lidx_monitor] = "%g" % value -348 lines[self._Lline] = " ".join(Lwords) -349 self.record = "\n".join(lines) -350 return -
      351 monitor = property(_get_monitor, _set_monitor) -352 -
      353 - def __str__(self): -
      354 """Spec string representation. -355 """ -356 return self.record -
      357 -358 # End of class SpecMarExposure -359 -
      360 -class MarImage(object): -
      361 """MAR image records. So far only few header records. -362 -363 Data members: -364 -365 mar_file -- full path to MAR image file -366 date -- date and time of image readout -367 format -- image plate format -368 intensity_min -- minimum pixel intensity -369 intensity_max -- maximum pixel intensity -370 intensity_ave -- average pixel intensity -371 intensity_sig -- standard deviation of pixel intensity -372 -373 Calculated data members: -374 -375 date_seconds -- date converted to seconds -376 headlines -- list of stripped header lines -377 mar_setup -- instance of MarSetup used for integration -378 spec_file -- spec file (normal or fixed) containing spec_record -379 spec_record -- instance of SpecMarExposure record -380 chiobj -- instance of ChiFile with integration results -381 tth -- reference to chiobj.tth -382 Iobs -- reference to chiobj.Iobs -383 monitor -- monitor counts from spec_record -384 """ -385 -
      386 - def __init__(self, mar_file, mar_setup=None): -
      387 """Initialize from MAR image file. -388 -389 mar_file -- MAR image file -390 mar_setup -- instance of MarSetup. The effective setup for particular -391 time can be found by MarSetup.getEffectiveSetup(). -392 """ -393 # declare data members -394 self.mar_file = os.path.abspath(mar_file) -395 self.date = None -396 self.format = None -397 self.intensity_min = None -398 self.intensity_max = None -399 self.intensity_ave = None -400 self.intensity_sig = None -401 self.date_seconds = None -402 self.headlines = [] -403 self._mar_setup = mar_setup -404 self._spec_file = None -405 self._spec_record = None -406 self.tth = None -407 self.Iobs = None -408 self.fit2d_chi_str = None -409 # business done here -410 self._readMarFile() -411 return -
      412 -413 # mar_setup property, related data get invalidated on change -
      414 - def _get_mar_setup(self): -
      415 return self._mar_setup -
      416 - def _set_mar_setup(self, value): -
      417 if value == self._mar_setup: return -418 self._spec_file = None -419 self._spec_record = None -420 self._mar_setup = value -
      421 mar_setup = property(_get_mar_setup, _set_mar_setup) -422 -423 # routine for getting spec related properties: -
      424 - def _get_spec_stuff(self): -
      425 """Obtain members _spec_file and _spec_record from mar_setup member. -426 """ -427 # abbreviations: -428 ms = self.mar_setup -429 basefile = os.path.basename(self.mar_file) -430 # figure out if we use normal or fixed spec file -431 # first try normal spec_file -432 specfile = self.mar_setup.spec_file -433 specrecs = [ rc for rc in getSpecMarExposures(ms.spec_file) -434 if rc.d_seconds < self.date_seconds ][-1:] -435 if not specrecs: -436 raise RuntimeError, "No record for scan %r in specfile %r." % \ -437 (basefile, specfile) -438 fixedrecs = [ rc for rc in getSpecMarExposures(ms.spec_fixed_records) -439 if rc.d_seconds < self.date_seconds ][-1:] -440 # override specrecs if there is corresponding fixed record -441 if fixedrecs and fixedrecs[-1].d_seconds >= specrecs[-1].d_seconds: -442 specrecs = fixedrecs -443 specfile = ms.spec_fixed_records -444 specrecord = specrecs[-1] -445 if specrecord.file != os.path.splitext(basefile)[0]: -446 raise RuntimeError, "Scan filename %r not matched in %r." % \ -447 (basefile, specfile) -448 self._spec_record = specrecord -449 self._spec_file = specfile -450 return -
      451 -452 # spec_file property, read only -
      453 - def _get_spec_file(self): -
      454 if self._spec_file is None: self._get_spec_stuff() -455 return self._spec_file -
      456 spec_file = property(_get_spec_file) -457 -458 # spec_record property, read only -
      459 - def _get_spec_record(self): -
      460 if self._spec_record is None: self._get_spec_stuff() -461 return self._spec_record -
      462 spec_record = property(_get_spec_record) -463 -464 # monitor property, read only -
      465 - def _get_monitor(self): -
      466 return self.spec_record.monitor -
      467 monitor = property(_get_monitor) -468 -
      469 - def _readMarFile(self): -
      470 """Read and extract data from self.mar_file. -471 """ -472 f = open(self.mar_file) -473 # headlines -474 self.headlines = f.readlines(4096) -475 first = last = None -476 for i, line in zip(range(len(self.headlines)), self.headlines): -477 if first is None and 'mar research' in line: first = i + 1 -478 if last is None and 'END OF HEADER' in line: last = i + 1 -479 self.headlines = [ s.lstrip('#\t ').rstrip() -480 for s in self.headlines[first:last] ] -481 # parse headlines -482 for line in self.headlines: -483 if not line: continue -484 w = line.split() -485 if w[0] == 'DATE': self.date = line[4:].lstrip().rstrip('z') -486 if w[0] == 'FORMAT': self.format = line[6:].lstrip() -487 if w[0] == 'INTENSITY': -488 self.intensity_min = float(w[2]) -489 self.intensity_max = float(w[4]) -490 self.intensity_ave = float(w[6]) -491 self.intensity_sig = float(w[8]) -492 # date_seconds -493 self.date_seconds = time.mktime(time.strptime(self.date)) -494 return -
      495 -
      496 - def integrate(self): -
      497 """Integrate this image using fit2d. -498 Store results in data members 'tth', 'Iobs' and 'fit2d_chi_str'. -499 """ -500 # abbreviation -501 ms = self.mar_setup -502 # prepare fit2d macro and output chi file -503 import tempfile -504 fdmac, tmpmacfile = tempfile.mkstemp('.mac', 'MarImage_integrate') -505 fdchi, tmpchifile = tempfile.mkstemp('.chi', 'MarImage_integrate') -506 mac = ms.fit2dIntegrateMacro(self.mar_file, tmpchifile) + '\n' -507 os.write(fdmac, mac) -508 os.close(fdmac) -509 os.close(fdchi) -510 # execute fit2d -511 save_DISPLAY = os.environ.get('DISPLAY') -512 os.unsetenv('DISPLAY') -513 d = { 'tmpmacfile' : tmpmacfile } -514 d.update(ms.__dict__) -515 cmd = ( "fit2d -key -dim%(x_dimension)ix%(y_dimension)i " + -516 "-mac%(tmpmacfile)s" ) % d -517 status = os.system(cmd) -518 if save_DISPLAY: os.environ['DISPLAY'] = save_DISPLAY -519 if not os.WIFEXITED(status) or os.WEXITSTATUS(status): -520 raise RuntimeError, "Execution of %r failed" % cmd -521 self.chiobj = ChiFile(tmpchifile) -522 self.chiobj.mar_file = self.mar_file -523 self.chiobj.date = self.date -524 self.chiobj.mar_setup = self.mar_setup -525 self.chiobj.spec_record = self.spec_record -526 # make links to chiobj data -527 self.tth = self.chiobj.tth -528 self.Iobs = self.chiobj.Iobs -529 # clean temporaries -530 os.remove(tmpmacfile) -531 os.remove(tmpchifile) -532 return -
      533 -
      534 - def writeChiFile(self, filename): -
      535 """Write integrated intensities to a file in CHI format. -536 -537 filename -- output CHI file -538 """ -539 self.chiobj.write(filename) -540 return -
      541 -
      542 - def writeGSASFile(self, filename): -
      543 """Write integrated intensities to a file in GSAS format. -544 -545 filename -- output GSAS file -546 """ -547 self.chiobj.writeGSAS(filename) -548 return -
      549 -550 # End of class MarImage -551 -
      552 -class ChiFile(object): -
      553 """CHI file with integrated MAR image. The CHI file must be in format -554 produced by MarImage.writeChiFile() method. -555 -556 Data members: -557 -558 chi_file -- full path to CHI file -559 mar_file -- path to MAR image file -560 date -- date and time of image readout -561 mar_setup -- instance of MarSetup used for integration -562 spec_record -- instance of SpecMarExposure recorded in ChiFile -563 fit2d_head -- 4-line header of CHI file generated by fit2d -564 tth -- list of 2 theta values in degrees -565 Iobs -- list of integrated raw intensities -566 -567 Calculated data members: -568 -569 monitor -- monitor counts from spec_record -570 Q -- list of diffraction wavevectors in (A**-1) -571 Inor -- intensities normalized by scaled monitor -572 """ -573 -574 monitor_scale = 1.0e-7 -575 -
      576 - def __init__(self, chi_file=None): -
      577 """Initialize from existing CHI file. -578 -579 chi_file -- CHI file in a format of MarImage.writeChiFile() -580 """ -581 # declare data members -582 self.chi_file = None -583 self.mar_file = None -584 self.date = None -585 self._mar_setup = None -586 self._spec_record = None -587 self.fit2d_head = None -588 self.tth = [] -589 self.Iobs = [] -590 self.monitor = None -591 self.Q = [] -592 self.Inor = [] -593 # business done here -594 if chi_file: self.read(chi_file) -595 return -
      596 -597 # spec_record property - assignment updates monitor and Inor -
      598 - def _get_spec_record(self): -
      599 return self._spec_record -
      600 - def _set_spec_record(self, value): -
      601 if value is self._spec_record: return -602 self._spec_record = value -603 self.monitor = self._spec_record.monitor -604 self._updateInor() -605 return -
      606 spec_record = property(_get_spec_record, _set_spec_record) -607 -608 # mar_setup property - assignment updates Q -
      609 - def _get_mar_setup(self): -
      610 return self._mar_setup -
      611 - def _set_mar_setup(self, value): -
      612 if value == self._mar_setup: return -613 self._mar_setup = value -614 self._updateQ() -615 return -
      616 mar_setup = property(_get_mar_setup, _set_mar_setup) -617 -
      618 - def read(self, filename): -
      619 """Read data from given file. Detect file format and choose -620 appropriate reader. -621 """ -622 self.chi_file = filename -623 body = open(self.chi_file).read() -624 if re.match(r'^# Created by mar_utilities', body): -625 self.__readMarUtilitiesStr(body) -626 elif re.match(r'^# Created by mar_integrate.sh', body): -627 raise IOError, "File %r is in unsupported format." % \ -628 self.chi_file -629 else: -630 self.__readFit2dChiStr(body) -631 self._updateQ() -632 self._updateInor() -633 return -
      634 -
      635 - def __readMarUtilitiesStr(self, body): -
      636 """Read and process data from a string in mar_utilities format. -637 """ -638 matchdata = re.search(r'^##+ start data\s*$', body, re.M) -639 if not matchdata: -640 raise IOError, "File %r is not in mar_utilities format." % \ -641 self.chi_file -642 headbody = body[:matchdata.end()].rstrip() -643 databody = body[matchdata.end():].strip() -644 # parsers for headbody sections -645 def parseSectionMarImage(s): -646 for line in s.split('\n'): -647 bareline = line.lstrip('#').strip() -648 name, value = (bareline.split('=', 1) + 2*[''])[:2] -649 if name == "mar_file": self.mar_file = value -650 elif name == "date": self.date = value -651 return -
      652 def parseSectionMarSetup(s): -653 scfg = re.sub(r'(?m)^# +', '', s) -654 self.mar_setup = MarSetup.fromConfigStr(scfg)[0] -655 return -
      656 def parseSectionSpecMarExposure(s): -657 sspec = re.sub(r'(?m)^# {0,3}', '', s) -658 self.spec_record = SpecMarExposure(sspec) -659 return -660 def parseSectionOrigChiHeader(s): -661 chihead = re.sub(r'(?m)^# {0,3}', '', s) -662 chiheadlines = chihead.split('\n', 4)[:4] -663 self.fit2d_head = '\n'.join(chiheadlines) + '\n' -664 return -665 # split headbody to sections and pass them to parsers -666 headrecs = re.split(r'(?m)(^# \w+.*:\s*\n)', headbody) -667 for n, s in zip(headrecs[1::2], headrecs[2::2]): -668 nb = n.strip('# :\n') -669 if nb == 'MarImage': -670 parseSectionMarImage(s) -671 elif nb == 'MarSetup': -672 parseSectionMarSetup(s) -673 elif nb == 'SpecMarExposure': -674 parseSectionSpecMarExposure(s) -675 elif nb == 'Original header in CHI format': -676 parseSectionOrigChiHeader(s) -677 else: pass -678 # read data -679 tth, Iobs = [], [] -680 for line in databody.split('\n'): -681 w = line.split() -682 tth.append(float(w[0])) -683 Iobs.append(float(w[1])) -684 self.tth = tth -685 self.Iobs = Iobs -686 return -687 -
      688 - def __readFit2dChiStr(self, body): -
      689 """Read and process data from a string in fit2d CHI format. -690 """ -691 lines = body.rstrip().split('\n') -692 # fit2d chi format - 3rd line empty, 4th gives number of points -693 if lines[2].strip() == '' and re.match(r'^\d+$', lines[3].strip()): -694 start = 4 -695 # otherwise find the first line that starts with a float -696 else: -697 float_first = r'^\s*[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?' -698 pos = re.search(float_first, body, re.M).start() -699 start = body[:pos].count('\n') -700 self.fit2d_head = '\n'.join(lines[:start]) + '\n' -701 self.tth, self.Iobs = [], [] -702 for line in lines[start:]: -703 w = line.split() -704 self.tth.append(float(w[0])) -705 self.Iobs.append(float(w[1])) -706 return -
      707 -
      708 - def writeStr(self): -
      709 """Return string of integrated intensities in CHI format. -710 """ -711 lines = [] -712 lines.append("# Created by mar_utilities version " + -713 __id__.split()[2]) -714 # MarImage: -715 if self.mar_file: -716 lines.append("# MarImage:") -717 lines.append("# mar_file=%s" % self.mar_file) -718 lines.append("# date=%s" % self.date) -719 # MarSetup: -720 if self.mar_setup: -721 lines.append("# MarSetup:") -722 lines += [ "# " + s for s in str(self.mar_setup).split('\n') ] -723 # SpecMarExposure: -724 if self.spec_record: -725 lines.append("# SpecMarExposure:") -726 for s in str(self.spec_record).split('\n'): -727 lines.append("# " + s) -728 # Original header in CHI format: -729 if self.fit2d_head: -730 lines.append("# Original header in CHI format:") -731 for s in self.fit2d_head.split('\n', 4)[:4]: -732 lines.append("# " + s) -733 # data are here -734 if self.tth: lines.append("##### start data") -735 for tth, iobs in zip(self.tth, self.Iobs): -736 lines.append("%-11g %g" % (tth, iobs)) -737 rv = re.sub('(?m)\s+$', '', "\n".join(lines)) + '\n' -738 return rv -
      739 -
      740 - def write(self, filename): -
      741 """Write integrated intensities to a file in CHI format. -742 -743 filename -- output CHI file -744 """ -745 s = self.writeStr() -746 self.chi_file = filename -747 open(filename, 'w').write(s) -748 return -
      749 -
      750 - def writeGSASStr(self): -
      751 """Return string of integrated intensities in GSAS format. -752 """ -753 import math -754 lines = [] -755 ltitle = 'Angular Profile' -756 if self.mar_file: ltitle += ': %s' % os.path.basename(self.mar_file) -757 if len(ltitle) > 80: ltitle = ltitle[:80] -758 lines.append("%-80s" % ltitle) -759 ibank = 1 -760 nchan = len(self.Iobs) -761 nrec = int(math.ceil(nchan/10.0)) -762 # two-theta0 and dtwo-theta in centidegrees -763 tth0_cdg = self.tth[0] * 100 -764 dtth_cdg = (self.tth[-1] - self.tth[0]) / (len(self.tth) - 1) * 100 -765 lbank = "BANK %4i %4i %4i CONST%10.5f%10.5f%10.5f%10.5f STD" % \ -766 (ibank, nchan, nrec, tth0_cdg, dtth_cdg, 0, 0) -767 lines.append("%-80s" % lbank) -768 lrecs = [ "%2i%6.0f" % (1, iobs) for iobs in self.Iobs ] -769 for i in range(0, len(lrecs), 10): -770 lines.append("".join(lrecs[i:i+10])) -771 lines[-1] = "%-80s" % lines[-1] -772 rv = "\r\n".join(lines) + "\r\n" -773 return rv -
      774 -
      775 - def writeGSAS(self, filename): -
      776 """Write integrated intensities to a file in GSAS format. -777 -778 filename -- output GSAS file -779 """ -780 s = self.writeGSASStr() -781 open(filename, 'w').write(s) -782 return -
      783 -
      784 - def _updateInor(self): -
      785 """Update Inor from Iobs values. -786 """ -787 self.Inor = None -788 if not self.Iobs or not self.monitor: return -789 self.Inor = [iobs / (self.monitor*ChiFile.monitor_scale) -790 for iobs in self.Iobs] -791 return -
      792 -
      793 - def _updateQ(self): -
      794 """Update Q from tth values. -795 """ -796 self.Q = None -797 if not self.tth or not self.mar_setup: return -798 from math import pi, sin -799 lmbd = self.mar_setup.xray_wavelength -800 self.Q = [4*pi*sin(pi/180*tth/2) for tth in self.tth] -801 return -
      802 -803 # End of class ChiFile -804 -805 ############################################################################## -806 # routines -807 ############################################################################## -808 -809 # global dictionary of MAR exposure lists -810 _spec_mar_exposures = None -811 -
      812 -def getSpecMarExposures(specfile): -
      813 """Return a list of all SpecMarExposure events in specfile. -814 When specfile is empty, return empty list. -815 """ -816 if specfile == '': return [] -817 global _spec_mar_exposures -818 if _spec_mar_exposures is None: _spec_mar_exposures = {} -819 specpath = os.path.abspath(specfile) -820 if specpath in _spec_mar_exposures: -821 return _spec_mar_exposures[specpath] -822 # here we need to read the spec file -823 mexps = [] -824 spectext = open(specfile).read().replace('\r', '') -825 spectext = spectext.rstrip() + '\n\n' -826 recs = re.split('(?ms)(^#MAR exposure.+?\n\n)', spectext) -827 for s in recs[1::2]: mexps.append(SpecMarExposure(s)) -828 cmp = lambda x, y : x.d_seconds < y.d_seconds -829 mexps.sort(cmp) -830 _spec_mar_exposures[specpath] = mexps -831 return mexps -
      832 -
      833 -def defineMarSetup(name, **kwargs): -
      834 """Define MAR image plate experiment setup for given time interval. -835 -836 Required arguments: -837 -838 name -- name of this experiment setup -839 start_date -- time when this setup comes into effect, for example -840 Mon Aug 21 08:26:51 2006 -841 stop_date -- expiry time of this MAR setup -842 x_dimension -- number of pixels in MAR image -843 y_dimension -- number of pixels in MAR image -844 xray_wavelength -- x-ray wavelength in Angstroms -845 polarization_factor -- Lorentz polarization factor (0.96 for 6ID-D) -846 x_pixel_size -- number of pixels per 1 mm in x direction -847 y_pixel_size -- number of pixels per 1 mm in y direction -848 x_beam_center -- x coordinate of beam center in pixels -849 y_beam_center -- y coordinate of beam center in pixels -850 distance -- sample to detector distance -851 tilt_rotation -- tilt axis rotation -852 angle_of_tilt -- tilt magnitude around tilt axis -853 tth_step -- 2 theta step used in integration -854 spec_file -- spec file with scan records -855 -856 Optional arguments: -857 -858 spec_fixed_records -- optional file with fixes of wrong spec_file records, -859 such as invalid FILE or overflown monitor counts -860 -861 Return instance of MarSetup. -862 """ -863 mar_setup = MarSetup(name, **kwargs) -864 mar_setup.define() -865 return mar_setup -
      866 -867 # End of file -868 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.ChiFile-class.html b/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.ChiFile-class.html deleted file mode 100644 index 434b3ef5..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.ChiFile-class.html +++ /dev/null @@ -1,627 +0,0 @@ - - - - - srrietveld.mar_utilities.ChiFile - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module mar_utilities :: - Class ChiFile - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ChiFile

      source code

      -
      -object --+
      -         |
      -        ChiFile
      -
      - -
      -

      CHI file with integrated MAR image. The CHI file must be in format - produced by MarImage.writeChiFile() method.

      -

      Data members:

      -

      chi_file -- full path to CHI file mar_file -- path to MAR - image file date -- date and time of image readout mar_setup - -- instance of MarSetup used for integration spec_record -- instance of - SpecMarExposure recorded in ChiFile fit2d_head -- 4-line header of CHI - file generated by fit2d tth -- list of 2 theta values in - degrees Iobs -- list of integrated raw intensities

      -

      Calculated data members:

      - monitor -- monitor counts from spec_record Q -- list - of diffraction wavevectors in (A**-1) Inor -- intensities - normalized by scaled monitor

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - chi_file=None)
      - Initialize from existing CHI file.
      - source code - -
      - -
      -   - - - - - - -
      _get_spec_record(self) - source code - -
      - -
      -   - - - - - - -
      _set_spec_record(self, - value) - source code - -
      - -
      -   - - - - - - -
      _get_mar_setup(self) - source code - -
      - -
      -   - - - - - - -
      _set_mar_setup(self, - value) - source code - -
      - -
      -   - - - - - - -
      read(self, - filename)
      - Read data from given file.
      - source code - -
      - -
      -   - - - - - - -
      __readMarUtilitiesStr(self, - body)
      - Read and process data from a string in mar_utilities format.
      - source code - -
      - -
      -   - - - - - - -
      __readFit2dChiStr(self, - body)
      - Read and process data from a string in fit2d CHI format.
      - source code - -
      - -
      -   - - - - - - -
      writeStr(self)
      - Return string of integrated intensities in CHI format.
      - source code - -
      - -
      -   - - - - - - -
      write(self, - filename)
      - Write integrated intensities to a file in CHI format.
      - source code - -
      - -
      -   - - - - - - -
      writeGSASStr(self)
      - Return string of integrated intensities in GSAS format.
      - source code - -
      - -
      -   - - - - - - -
      writeGSAS(self, - filename)
      - Write integrated intensities to a file in GSAS format.
      - source code - -
      - -
      -   - - - - - - -
      _updateInor(self)
      - Update Inor from Iobs values.
      - source code - -
      - -
      -   - - - - - - -
      _updateQ(self)
      - Update Q from tth values.
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __str__ -

      -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - monitor_scale = 1e-07 -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -   - - spec_record -
      -   - - mar_setup -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - chi_file=None) -
      (Constructor) -

      -
      source code  -
      - -

      Initialize from existing CHI file.

      - chi_file -- CHI file in a format of MarImage.writeChiFile() -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      read(self, - filename) -

      -
      source code  -
      - - Read data from given file. Detect file format and choose appropriate - reader. -
      -
      -
      -
      - -
      - -
      - - -
      -

      write(self, - filename) -

      -
      source code  -
      - -

      Write integrated intensities to a file in CHI format.

      - filename -- output CHI file -
      -
      -
      -
      - -
      - -
      - - -
      -

      writeGSAS(self, - filename) -

      -
      source code  -
      - -

      Write integrated intensities to a file in GSAS format.

      - filename -- output GSAS file -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Property Details[hide private]
      -
      - -
      - -
      -

      spec_record

      - -
      -
      Get Method:
      -
      srrietveld.mar_utilities.ChiFile._get_spec_record(self) -
      -
      Set Method:
      -
      srrietveld.mar_utilities.ChiFile._set_spec_record(self, - value) -
      -
      -
      -
      - -
      - -
      -

      mar_setup

      - -
      -
      Get Method:
      -
      srrietveld.mar_utilities.ChiFile._get_mar_setup(self) -
      -
      Set Method:
      -
      srrietveld.mar_utilities.ChiFile._set_mar_setup(self, - value) -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.MarImage-class.html b/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.MarImage-class.html deleted file mode 100644 index e4bf9d48..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.MarImage-class.html +++ /dev/null @@ -1,594 +0,0 @@ - - - - - srrietveld.mar_utilities.MarImage - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module mar_utilities :: - Class MarImage - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class MarImage

      source code

      -
      -object --+
      -         |
      -        MarImage
      -
      - -
      -

      MAR image records. So far only few header records.

      -

      Data members:

      -

      mar_file -- full path to MAR image file date -- date and - time of image readout format -- image plate format intensity_min - -- minimum pixel intensity intensity_max -- maximum pixel intensity - intensity_ave -- average pixel intensity intensity_sig -- standard - deviation of pixel intensity

      -

      Calculated data members:

      - date_seconds -- date converted to seconds headlines -- list of - stripped header lines mar_setup -- instance of MarSetup used for - integration spec_file -- spec file (normal or fixed) containing - spec_record spec_record -- instance of SpecMarExposure record chiobj - -- instance of ChiFile with integration results tth -- - reference to chiobj.tth Iobs -- reference to chiobj.Iobs monitor - -- monitor counts from spec_record

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - mar_file, - mar_setup=None)
      - Initialize from MAR image file.
      - source code - -
      - -
      -   - - - - - - -
      _get_mar_setup(self) - source code - -
      - -
      -   - - - - - - -
      _set_mar_setup(self, - value) - source code - -
      - -
      -   - - - - - - -
      _get_spec_stuff(self)
      - Obtain members _spec_file and _spec_record from mar_setup - member.
      - source code - -
      - -
      -   - - - - - - -
      _get_spec_file(self) - source code - -
      - -
      -   - - - - - - -
      _get_spec_record(self) - source code - -
      - -
      -   - - - - - - -
      _get_monitor(self) - source code - -
      - -
      -   - - - - - - -
      _readMarFile(self)
      - Read and extract data from self.mar_file.
      - source code - -
      - -
      -   - - - - - - -
      integrate(self)
      - Integrate this image using fit2d.
      - source code - -
      - -
      -   - - - - - - -
      writeChiFile(self, - filename)
      - Write integrated intensities to a file in CHI format.
      - source code - -
      - -
      -   - - - - - - -
      writeGSASFile(self, - filename)
      - Write integrated intensities to a file in GSAS format.
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __str__ -

      -
      - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -   - - mar_setup -
      -   - - spec_file -
      -   - - spec_record -
      -   - - monitor -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - mar_file, - mar_setup=None) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialize from MAR image file.
      -
      -mar_file  -- MAR image file
      -mar_setup -- instance of MarSetup.  The effective setup for particular
      -             time can be found by MarSetup.getEffectiveSetup().
      -
      -
      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      integrate(self) -

      -
      source code  -
      - - Integrate this image using fit2d. Store results in data members 'tth', - 'Iobs' and 'fit2d_chi_str'. -
      -
      -
      -
      - -
      - -
      - - -
      -

      writeChiFile(self, - filename) -

      -
      source code  -
      - -

      Write integrated intensities to a file in CHI format.

      - filename -- output CHI file -
      -
      -
      -
      - -
      - -
      - - -
      -

      writeGSASFile(self, - filename) -

      -
      source code  -
      - -

      Write integrated intensities to a file in GSAS format.

      - filename -- output GSAS file -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Property Details[hide private]
      -
      - -
      - -
      -

      mar_setup

      - -
      -
      Get Method:
      -
      srrietveld.mar_utilities.MarImage._get_mar_setup(self) -
      -
      Set Method:
      -
      srrietveld.mar_utilities.MarImage._set_mar_setup(self, - value) -
      -
      -
      -
      - -
      - -
      -

      spec_file

      - -
      -
      Get Method:
      -
      srrietveld.mar_utilities.MarImage._get_spec_file(self) -
      -
      -
      -
      - -
      - -
      -

      spec_record

      - -
      -
      Get Method:
      -
      srrietveld.mar_utilities.MarImage._get_spec_record(self) -
      -
      -
      -
      - -
      - -
      -

      monitor

      - -
      -
      Get Method:
      -
      srrietveld.mar_utilities.MarImage._get_monitor(self) -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.MarSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.MarSetup-class.html deleted file mode 100644 index 5d5f58e0..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.MarSetup-class.html +++ /dev/null @@ -1,626 +0,0 @@ - - - - - srrietveld.mar_utilities.MarSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module mar_utilities :: - Class MarSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class MarSetup

      source code

      -
      -object --+
      -         |
      -        MarSetup
      -
      - -
      -
      -MAR image plate experiment setup.
      -
      -Required input data members:
      -
      -name          -- name of this experiment setup
      -start_date    -- time when this setup comes into effect, for example
      -                 Mon Aug 21 08:26:51 2006
      -stop_date     -- expiry time of this MAR setup
      -x_dimension   -- number of pixels in MAR image
      -y_dimension   -- number of pixels in MAR image
      -xray_wavelength -- x-ray wavelength in Angstroms
      -polarization_factor -- Lorentz polarization factor (0.96 for 6ID-D)
      -x_pixel_size  -- number of pixels per 1 mm in x direction
      -y_pixel_size  -- number of pixels per 1 mm in y direction
      -x_beam_center -- x coordinate of beam center in pixels
      -y_beam_center -- y coordinate of beam center in pixels
      -distance      -- sample to detector distance
      -tilt_rotation -- tilt axis rotation
      -angle_of_tilt -- tilt magnitude around tilt axis
      -tth_step      -- 2 theta step used in integration
      -spec_file     -- spec file with scan records
      -
      -Optional input data members:
      -
      -spec_fixed_records -- optional file with fixes of wrong spec_file records,
      -                      such as invalid FILE or overflown monitor counts
      -
      -Calculated data members:
      -
      -tth_max            -- maximum 2 theta angle possible
      -tth_step_min       -- low boundary for tth_step
      -start_date_seconds -- start time in seconds since 1970-01-01
      -stop_date_seconds  -- stop time in seconds since 1970-01-01
      -xray_energy_keV    -- x-ray energy in keV
      -
      -Static members:
      -
      -all_setups    -- list of all setups sorted by effective time
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - name, - **kwargs)
      - Create new MarSetup.
      - source code - -
      - -
      -   - - - - - - -
      __eq__(self, - other)
      - Comparison operator.
      - source code - -
      - -
      -   - - - - - - -
      __processArgs(self)
      - Check user data and calculate derived members.
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - Nice string representation of MarSetup.
      - source code - -
      - -
      -   - - - - - - -
      define(self)
      - Add this MarSetup to global list of effective setups.
      - source code - -
      - -
      -   - - - - - - -
      undef(self)
      - Remove this MarSetup from global list of effective setups.
      - source code - -
      - -
      -   - - - - - - -
      fit2dIntegrateMacro(self, - mar_file, - chi_file)
      - Build fit2d macro for integrating and saving single scan
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__ -

      -
      - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Static Methods[hide private]
      -
      -   - - - - - - -
      undefAll()
      - Undefine all effective MAR setups.
      - source code - -
      - -
      -   - - - - - - -
      getEffectiveSetup(date_seconds)
      - Find effective MarSetup at specified time.
      - source code - -
      - -
      -   - - - - - - -
      fromConfigFileObject(fp)
      - Read one or more MarSetups from a file like object.
      - source code - -
      - -
      -   - - - - - - -
      fromConfigStr(s)
      - Read one or more MarSetups from a string.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - all_setups = [] -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - name, - **kwargs) -
      (Constructor) -

      -
      source code  -
      - - Create new MarSetup. Must supply all input data members as described - in MarSetup.__doc__. -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      __str__(self) -
      (Informal representation operator) -

      -
      source code  -
      - - Nice string representation of MarSetup. -
      -
      Overrides: - object.__str__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      fit2dIntegrateMacro(self, - mar_file, - chi_file) -

      -
      source code  -
      - -

      Build fit2d macro for integrating and saving single scan

      -

      mar_file -- path to input MAR image file chi_file -- output chi - file

      - Return string. -
      -
      -
      -
      - -
      - -
      - - -
      -

      undefAll() -
      Static Method -

      -
      source code  -
      - - Undefine all effective MAR setups. Static method. -
      -
      -
      -
      - -
      - -
      - - -
      -

      getEffectiveSetup(date_seconds) -
      Static Method -

      -
      source code  -
      - -

      Find effective MarSetup at specified time. Static method.

      -

      date_seconds -- timestamp in seconds since 1970-01-01

      - Return instance of MarSetup. Raise InvalidValue if there is no setup - defined at date_seconds. -
      -
      -
      -
      - -
      - -
      - - -
      -

      fromConfigFileObject(fp) -
      Static Method -

      -
      source code  -
      - -

      Read one or more MarSetups from a file like object. Static - method.

      -

      fp -- configuration file object

      - Return list of MarSetup instances. -
      -
      -
      -
      - -
      - -
      - - -
      -

      fromConfigStr(s) -
      Static Method -

      -
      source code  -
      - -

      Read one or more MarSetups from a string. Static method.

      -

      s -- string with one or more string representations of MarSetup

      - Return list of MarSetup instances. -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.SpecMarExposure-class.html b/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.SpecMarExposure-class.html deleted file mode 100644 index 711e4a53..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.mar_utilities.SpecMarExposure-class.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - srrietveld.mar_utilities.SpecMarExposure - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module mar_utilities :: - Class SpecMarExposure - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class SpecMarExposure

      source code

      -
      -object --+
      -         |
      -        SpecMarExposure
      -
      - -
      -

      Spec record of MAR exposure

      -

      Data members:

      -

      record -- string with full record from the spec file d -- D - record, date and time of this exposure d_seconds -- d converted to - seconds since 1970-01-01

      -

      Properties (assignemnt updates record):

      -

      file -- FILE value monitor -- monitor counts

      -

      Private members:

      - _Lline -- index of line with L values

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - s)
      - Initialize SpecMarExposure from a string.
      - source code - -
      - -
      -   - - - - - - -
      _get_file(self) - source code - -
      - -
      -   - - - - - - -
      _set_file(self, - value) - source code - -
      - -
      -   - - - - - - -
      _get_monitor(self) - source code - -
      - -
      -   - - - - - - -
      _set_monitor(self, - value) - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - Spec string representation.
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__ -

      -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - __Lidx_monitor = 5 -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -   - - file -
      -   - - monitor -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - s) -
      (Constructor) -

      -
      source code  -
      - - Initialize SpecMarExposure from a string. The string is searched for - the first record of MAR exposure. -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      __str__(self) -
      (Informal representation operator) -

      -
      source code  -
      - - Spec string representation. -
      -
      Overrides: - object.__str__ -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Property Details[hide private]
      -
      - -
      - -
      -

      file

      - -
      -
      Get Method:
      -
      srrietveld.mar_utilities.SpecMarExposure._get_file(self) -
      -
      Set Method:
      -
      srrietveld.mar_utilities.SpecMarExposure._set_file(self, - value) -
      -
      -
      -
      - -
      - -
      -

      monitor

      - -
      -
      Get Method:
      -
      srrietveld.mar_utilities.SpecMarExposure._get_monitor(self) -
      -
      Set Method:
      -
      srrietveld.mar_utilities.SpecMarExposure._set_monitor(self, - value) -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.measurements-module.html b/static_root/doc/srrietveld/developers/srrietveld.measurements-module.html deleted file mode 100644 index ec08a0f1..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.measurements-module.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - srrietveld.measurements - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module measurements - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module measurements

      source code

      -
      -
      -Measurement:    Classes to handle measurement information interfaced
      -                with the user
      -
      -   * List of Setting Methods:
      -   -  __init__(self):
      -   -  setBankNumber(self, bankno):
      -   -  setDataFileName(self, filename):
      -   -  setBackground(self, backgroundinfo):
      -   -  setMeasureRange(self, measurerange):
      -   -  addExcludedRegions(self, excludedregions):
      -
      -   * List of Information Retrieval Methods:
      -   -  getBankNumber(self)
      -   -  getDataFileName(self)
      -   -  getBackgroundType(self)
      -   -  getBackgroundDict(self)
      -   -  getMeasureRange(self)
      -   -  getExcludedRegions(self)
      -
      -Created On: 2008.07.29
      -
      -


      - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - Measurement
      - Base class for the information of a typical measurement... -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: measurements.py 2918 2009-03-18 19:26:39Z wdzho... -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: measurements.py 2918 2009-03-18 19:26:39Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.measurements-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.measurements-pysrc.html deleted file mode 100644 index 1b04d68a..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.measurements-pysrc.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - srrietveld.measurements - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module measurements - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.measurements

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ 
      - 16   Measurement:    Classes to handle measurement information interfaced 
      - 17                   with the user 
      - 18   
      - 19      * List of Setting Methods: 
      - 20      -  __init__(self): 
      - 21      -  setBankNumber(self, bankno): 
      - 22      -  setDataFileName(self, filename): 
      - 23      -  setBackground(self, backgroundinfo): 
      - 24      -  setMeasureRange(self, measurerange): 
      - 25      -  addExcludedRegions(self, excludedregions): 
      - 26   
      - 27      * List of Information Retrieval Methods: 
      - 28      -  getBankNumber(self) 
      - 29      -  getDataFileName(self) 
      - 30      -  getBackgroundType(self) 
      - 31      -  getBackgroundDict(self) 
      - 32      -  getMeasureRange(self) 
      - 33      -  getExcludedRegions(self) 
      - 34   
      - 35   Created On: 2008.07.29 
      - 36  """ 
      - 37  __id__ = "$Id: measurements.py 2918 2009-03-18 19:26:39Z wdzhou $" 
      - 38   
      - 39  from    diffpy.refinementapi.errors         import FitConfigurationError 
      - 40   
      -
      41 -class Measurement(object): -
      42 """ - 43 Base class for the information of a typical measurement - 44 - 45 This is for a SINGLE MEASUREMETN such - 46 (1) One bank measure in a TOF experiment - 47 (2) One 2-theta data in a constant wave experiment - 48 - 49 Methods List: - 50 - - 51 - - 52 - - 53 """ -
      54 - def __init__(self): -
      55 """ - 56 initialization - 57 """ - 58 self._banknumber = -1 - 59 self._datafname = "" - 60 self._measurerange = None - 61 self._excludedregions = [] - 62 self._backgrounddict = None - 63 - 64 return -
      65 - 66 -
      67 - def getBankNumber(self): -
      68 """ - 69 Return Bank Number - 70 - 71 Return : integer - 72 """ - 73 return self._banknumber -
      74 - 75 -
      76 - def setBankNumber(self, bankno): -
      77 """ - 78 Set the bank number, which should >= 0 - 79 - 80 Argument: - 81 - bankno : int, >= 0 - 82 - 83 Return : None - 84 """ - 85 if not isinstance(bankno, int): - 86 errmsg = "Bank Number Must Be Integer Input = %-5s of Type %-10s"% (bankno, type(bankno)) - 87 raise FitConfigurationError(errmsg) - 88 - 89 if bankno < 0: - 90 errmsg = "Bank Number Cannot Be Less Than 0; Input = %-5s"% (bankno) - 91 raise FitConfigurationError(errmsg) - 92 - 93 self._banknumber = bankno - 94 - 95 return -
      96 - 97 -
      98 - def getDataFileName(self): -
      99 """ -100 Return Bank Number -101 -102 Return : str -103 """ -104 if self._datafname == "": -105 errmsg = "DataFileName Haven't Been Setup" -106 raise FitConfigurationError(errmsg) -107 -108 return self._datafname -
      109 -110 -
      111 - def setDataFileName(self, filename): -
      112 """ -113 Set the bank number, which should >= 0 -114 -115 Argument: -116 - bankno : int, >= 0 -117 -118 Return : None -119 """ -120 if not isinstance(filename, str): -121 errmsg = "%-20s: setDataFileName: Data File Name Must Be String! " \ -122 % (self.__class__.__name__) + "Current input = %-5s of Type %-10s" \ -123 % (filename, filename.__class__.__name__) -124 raise FitConfigurationError(errmsg) -125 -126 self._datafname = filename -127 -128 return -
      129 -130 -
      131 - def getBackgroundType(self): -
      132 """ -133 Return background type -134 -135 Return : str -136 """ -137 return self._backgroundtype -
      138 -139 -
      140 - def getBackgroundDictionary(self): -
      141 """ -142 Return background parameter dictionary -143 -144 Return : dictionary -145 """ -146 return self._backgrounddict -
      147 -148 -
      149 - def setBackground(self, backgroundtype, backgroundinfo): -
      150 """ -151 Set the background information -152 -153 Argument: -154 - backgroundtype : -155 - backgroundict : Dictionary of background information -156 -157 Return : None -158 """ -159 if not isinstance(backgroundinfo, dict): -160 raise FitConfigurationError("Input backgroundinfo is of type %-20s NOT dictionary") -161 self._backgroundtype = backgroundtype -162 self._backgrounddict = backgroundinfo -163 -164 return -
      165 -166 -
      167 - def getMeasureRange(self): -
      168 """ -169 Return Measurement Range -170 -171 Return : tuple -172 """ -173 return self._measurerange -
      174 -175 -
      176 - def setMeasureRange(self, measurerange): -
      177 """ -178 Set the Measurement Range, -179 -180 Argument: -181 - bankno : int, >= 0 -182 -183 Return : None -184 """ -185 self._measurerange = measurerange -186 -187 return -
      188 -189 -
      190 - def getExcludedRegions(self): -
      191 """ -192 Return Excluded Regions -193 -194 Return : tuple -195 """ -196 return self._excludedregions -
      197 -198 -
      199 - def addExcludedRegion(self, bankno, start, end): -
      200 """ -201 Set the Excluded Regions -202 -203 Argument: -204 - bankno : int, -205 - start : float -206 - end : float -207 -208 Return : None -209 """ -210 region = {} -211 region["Begin"] = start -212 region["End"] = end -213 self._excludedregions.append(region) -214 -215 return -
      216 -217 # END CLASS: class Measurement(object): -218 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.measurements.Measurement-class.html b/static_root/doc/srrietveld/developers/srrietveld.measurements.Measurement-class.html deleted file mode 100644 index eb1e3b49..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.measurements.Measurement-class.html +++ /dev/null @@ -1,710 +0,0 @@ - - - - - srrietveld.measurements.Measurement - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module measurements :: - Class Measurement - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class Measurement

      source code

      -
      -object --+
      -         |
      -        Measurement
      -
      - -
      -
      -
      -Base class for the information of a typical measurement
      -
      -This is for a SINGLE MEASUREMETN such
      -(1) One bank measure in a TOF experiment
      -(2) One 2-theta data in a constant wave experiment
      -
      -Methods List:
      --
      --
      --
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      getBankNumber(self)
      - Return Bank Number
      - source code - -
      - -
      -   - - - - - - -
      setBankNumber(self, - bankno)
      - Set the bank number, which should >= 0...
      - source code - -
      - -
      -   - - - - - - -
      getDataFileName(self)
      - Return Bank Number
      - source code - -
      - -
      -   - - - - - - -
      setDataFileName(self, - filename)
      - Set the bank number, which should >= 0...
      - source code - -
      - -
      -   - - - - - - -
      getBackgroundType(self)
      - Return background type
      - source code - -
      - -
      -   - - - - - - -
      getBackgroundDictionary(self)
      - Return background parameter dictionary
      - source code - -
      - -
      -   - - - - - - -
      setBackground(self, - backgroundtype, - backgroundinfo)
      - Set the background information...
      - source code - -
      - -
      -   - - - - - - -
      getMeasureRange(self)
      - Return Measurement Range
      - source code - -
      - -
      -   - - - - - - -
      setMeasureRange(self, - measurerange)
      - Set the Measurement Range, ...
      - source code - -
      - -
      -   - - - - - - -
      getExcludedRegions(self)
      - Return Excluded Regions
      - source code - -
      - -
      -   - - - - - - -
      addExcludedRegion(self, - bankno, - start, - end)
      - Set the Excluded Regions...
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __str__ -

      -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self) -
      (Constructor) -

      -
      source code  -
      - - initialization -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getBankNumber(self) -

      -
      source code  -
      - -

      Return Bank Number

      - Return : integer -
      -
      -
      -
      - -
      - -
      - - -
      -

      setBankNumber(self, - bankno) -

      -
      source code  -
      - -
      -
      -Set the bank number, which should >= 0
      -
      -Argument:
      -- bankno    :   int, >= 0
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getDataFileName(self) -

      -
      source code  -
      - -

      Return Bank Number

      - Return : str -
      -
      -
      -
      - -
      - -
      - - -
      -

      setDataFileName(self, - filename) -

      -
      source code  -
      - -
      -
      -Set the bank number, which should >= 0
      -
      -Argument:
      -- bankno    :   int, >= 0
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getBackgroundType(self) -

      -
      source code  -
      - -

      Return background type

      - Return : str -
      -
      -
      -
      - -
      - -
      - - -
      -

      getBackgroundDictionary(self) -

      -
      source code  -
      - -

      Return background parameter dictionary

      - Return : dictionary -
      -
      -
      -
      - -
      - -
      - - -
      -

      setBackground(self, - backgroundtype, - backgroundinfo) -

      -
      source code  -
      - -
      -
      -Set the background information
      -
      -Argument:
      -- backgroundtype    :   
      -- backgroundict     :   Dictionary of background information
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getMeasureRange(self) -

      -
      source code  -
      - -

      Return Measurement Range

      - Return : tuple -
      -
      -
      -
      - -
      - -
      - - -
      -

      setMeasureRange(self, - measurerange) -

      -
      source code  -
      - -
      -
      -Set the Measurement Range, 
      -
      -Argument:
      -- bankno    :   int, >= 0
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getExcludedRegions(self) -

      -
      source code  -
      - -

      Return Excluded Regions

      - Return : tuple -
      -
      -
      -
      - -
      - -
      - - -
      -

      addExcludedRegion(self, - bankno, - start, - end) -

      -
      source code  -
      - -
      -
      -Set the Excluded Regions
      -
      -Argument:
      -- bankno    :   int,
      -- start     :   float
      -- end       :   float
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.midscript-module.html b/static_root/doc/srrietveld/developers/srrietveld.midscript-module.html deleted file mode 100644 index a352d8ab..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.midscript-module.html +++ /dev/null @@ -1,2118 +0,0 @@ - - - - - srrietveld.midscript - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module midscript - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module midscript

      source code

      -

      container for a series of middle-level API supporting end-user scripts - these API are NOT defined in standard diffpy.rietveldapi they are in the - mode of conceptual testing and subject to major modification

      - External Methods List: -
        -
      • - initTCHProfilePseudoVoigt(parameterdict=None, peakrange=8.0, - u=1.0, v=1.0, w=1.0, x=0.0, y=0.0) -
      • -
      • - getPatterns(fit): -
      • -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      getPatterns(fit)
      - Get all the patterns of a Fit instance...
      - source code - -
      - -
      -   - - - - - - -
      setPattern(pat, - dfname, - parser)
      - basic functions to set up a Pattern...
      - source code - -
      - -
      -   - - - - - - -
      mapStructure(sourcefit, - targetfit)
      - Map the strcture parameters from a Fit instance to another instance...
      - source code - -
      - -
      -   - - - - - - -
      initTOFPattern(dfname, - parser, - bank=1, - dangle=None, - excludedregions=None, - dtt1=None, - dtt2=None, - zshift=0.0, - xcross=0.0, - width=0.0)
      - initialize and set up a TOF pattern with all necessary parameters...
      - source code - -
      - -
      -   - - - - - - -
      initThermalTOFPattern(dfname, - parser, - bank=1, - dangle=None, - excludedregions=None, - dtt1=None, - dtt2=None, - zshift=0.0, - dtt1t=None, - dtt2t=None, - zerot=0.0, - xcross=None, - width=None)
      - Initialize Thermal Neutron TOF Pattern
      - source code - -
      - -
      -   - - - - - - -
      setCWPattern(pat, - dfname, - parser, - wavelength, - wavelength2=0.0, - ratio=0.0, - zshift=0.0, - region=None)
      - set up a Constant Wavelength Pattern pattern with all necessary parameters...
      - source code - -
      - -
      -   - - - - - - -
      initCWXrayPattern(dfname, - parser, - wavelength, - wavelength2=0.0, - ratio=0.0, - zshift=0.0, - region=None, - resfname=None)
      - initalize and set up a constant wavelength X-ray pattern with all necessary parameters...
      - source code - -
      - -
      -   - - - - - - -
      initCWNeutronPattern(dfname, - parser, - wavelength, - wavelength2=0.0, - ratio=0.0, - zshift=0.0, - region=None, - resfname=None)
      - initialize and set up a constant wavelength neutron pattern with all necessary parameters...
      - source code - -
      - -
      -   - - - - - - -
      initBackground(backgroundType, - backgroundPoints)
      - initialize a Background instance and set value to it
      - source code - -
      - -
      -   - - - - - - -
      initPolynomialBackground(backgroundPoints, - order=12)
      - initialze a Polynomial background
      - source code - -
      - -
      -   - - - - - - -
      initInterpolatedBackground(backgroundpoints, - btype='linear')
      - user will use the background interpolated from a list of user-selected ...
      - source code - -
      - -
      -   - - - - - - -
      setExcludedRegion(pattern, - excludedregionslist)
      - Set excluded regions to a pattern...
      - source code - -
      - -
      -   - - - - - - -
      setRefineRegion(pattern, - regionlist)
      - user defines the region to refine in a more directed manner than ...
      - source code - -
      - -
      -   - - - - - - -
      reloadData(myfit, - datafilename, - bankid=None)
      - Load another data file to current Fit instance.
      - source code - -
      - -
      -   - - - - - - -
      addAtom(phase, - atomtype, - fractcoordinate, - occ, - biso, - baniso=None, - atomtag='auto')
      - add an atom to a phase instance...
      - source code - -
      - -
      -   - - - - - - -
      Cubic(a)
      - set the lattice to be cubic...
      - source code - -
      - -
      -   - - - - - - -
      genLattice(a, - b, - c, - alpha, - beta, - gamma)
      - generate a Lattice withtout further knowledge...
      - source code - -
      - -
      -   - - - - - - -
      initCrystalPhase(lattice, - spacegroup, - phasename='')
      - initialize and set a CrystalPhase instance...
      - source code - -
      - -
      -   - - - - - - -
      replaceStructureModel(thefit, - modeltuplelist, - cindex='all')
      - Replace the structure model inside a Fit object...
      - source code - -
      - -
      -   - - - - - - -
      initProfilePseudoVoigtIkedaCarpenter(sig0=0.0, - sig1=0.0, - sig2=0.0, - gam0=0.0, - gam1=0.0, - gam2=0.0)
      - new and set up a Pseudo-Voig Ikeda-Carpenter peak profile instance...
      - source code - -
      - -
      -   - - - - - - -
      initPseudoVoigtExpDSpacing(parameterdict=None, - peakrange=8.0, - sig0=0.0, - sig1=0.0, - sig2=0.0, - gam0=0.0, - gam1=0.0, - gam2=0.0)
      - New and set up a PsuedoVoigt Exponent D-Spacing...
      - source code - -
      - -
      -   - - - - - - -
      initPseudoVoigtExp(parameterdict=None, - peakrange=8.0, - sig0=0.0, - sig1=0.0, - sig2=0.0, - gam0=0.0, - gam1=0.0, - gam2=0.0)
      - New and set up a PsuedoVoigt Exponent back-to-back...
      - source code - -
      - -
      -   - - - - - - -
      initExponentialDecay(parameterdict=None, - alph0=0.0, - beta0=0.0, - alph1=0.0, - beta1=0.0)
      - Initializae a Thermal Expoential-Decay Object...
      - source code - -
      - -
      -   - - - - - - -
      initThermalExponentialDecay(parameterdict=None, - alph0=0.0, - beta0=0.0, - alph1=0.0, - beta1=0.0, - alph0t=0.0, - beta0t=0.0, - alph1t=0.0, - beta1t=0.0)
      - Initializae a Thermal Expoential-Decay Object...
      - source code - -
      - -
      -   - - - - - - -
      initCylindricalAbsorptionCorrection(parameterdict=None, - abs1=0.0, - abs2=0.0)
      - Initialize and set up an Absorption-Correction object...
      - source code - -
      - -
      -   - - - - - - -
      set2ThetaSymmetricPeakProfile(prof, - peakrange, - u=1.0, - v=1.0, - w=1.0, - x=1.0, - y=1.0, - resfile=None)
      - set up a 2-theta symmetric peak profile...
      - source code - -
      - -
      -   - - - - - - -
      initProfileGaussian(peakrange=8.0, - u=1.0, - v=1.0, - w=1.0, - x=0.0, - y=0.0)
      - initalize and set up a Gaussian PeakProfile instance
      - source code - -
      - -
      -   - - - - - - -
      initProfilePseudoVoigt(parameterdict=None, - peakrange=8.0, - u=1.0, - v=1.0, - w=1.0, - x=0.0, - y=0.0, - eta0=1.0)
      - initialize and set up a Pseudo Voigt Peak Profile instance...
      - source code - -
      - -
      -   - - - - - - -
      initProfileTCHPseudoVoigt(parameterdict=None, - peakrange=8.0, - u=1.0, - v=1.0, - w=1.0, - x=0.0, - y=0.0)
      - initialize and set up a Thomas-Cox-Hasting (TCH) Pseudo Voigt Peak Profile instance...
      - source code - -
      - -
      -   - - - - - - -
      initProfileSplitPseudoVoigt(parameterdict=None, - peakrange=8.0)
      - initialize and set up a Thomas-Cox-Hasting (TCH) Pseudo Voigt Peak Profile instance...
      - source code - -
      - -
      -   - - - - - - -
      genPeakProfile(peakprofilename, - parameterdict)
      - Generate a proper PeakProfile object according to some given name...
      - source code - -
      - -
      -   - - - - - - -
      genFit(instrument, - phaseslist, - experimentslist=None)
      - Generate a Fit instance (Feature fixed)...
      - source code - -
      - -
      -   - - - - - - -
      addComponent(fit, - pattern, - phases, - background=None, - bkgdvaluelist=None, - bkgdorigin=7000.0, - peakprofile=None, - expdecay=None)
      - generate a RietveldComponent to a Fit instance - -arguments -- pattern : Pattern instance -- phases : list of Phase instance -- background : Background instance -- bkgdvaluelist : list of 2-tuple/float (defualt=None) - 1-tuple: b1, b2, ....
      - source code - -
      - -
      -   - - - - - - -
      locateRefinableParameter(startobj, - paraname, - info=None)
      - locate the parent object of a specific refinable parameter...
      - source code - -
      - -
      -   - - - - - - -
      checkMust(fit)
      - check a list of important parameters that must be set right!...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: midscript.py 2918 2009-03-18 19:26:39Z wdzhou $' -
      -   - - myEngine = <diffpy.srrietveld.refinebackend.RietveldEngine ins... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      getPatterns(fit) -

      -
      source code  -
      - -
      -
      -Get all the patterns of a Fit instance
      -
      -Argument    
      -- fit   :   Fit instance
      -
      -Return  :   list of Patterns
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setPattern(pat, - dfname, - parser) -

      -
      source code  -
      - -
      -
      -basic functions to set up a Pattern
      -
      -argument:
      -- pat       :   Pattern instance
      -- dfname    :   string, data file name
      -- parser    :   Parser() instance
      -
      -return  --  None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      mapStructure(sourcefit, - targetfit) -

      -
      source code  -
      - -
      -
      -Map the strcture parameters from a Fit instance to another instance
      -
      -Requirement:
      -* source-Fit and target-Fit have the same Fit structure and same 
      -  Crystal structure
      -
      -Argument:
      -- sourcefit :   Fit instance
      -- targetfit :   Fit instance
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initTOFPattern(dfname, - parser, - bank=1, - dangle=None, - excludedregions=None, - dtt1=None, - dtt2=None, - zshift=0.0, - xcross=0.0, - width=0.0) -

      -
      source code  -
      - -
      -
      -initialize and set up a TOF pattern with all necessary parameters
      -
      -arguement
      -- dfname            :   string, data file name
      -- parser            :   Parser() instance
      -- dangle            :   double, detector angle
      -- bank              :   int, bank number (default=1)
      -- excludedregions   :   list of 2-tuples (default=None): excluded region
      -- dtt1              :   float (default=None)
      -- dtt2              :   float (default=None)
      -- resfile           :   resolution file (default=None)
      -
      -return  --  TOFPattern instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setCWPattern(pat, - dfname, - parser, - wavelength, - wavelength2=0.0, - ratio=0.0, - zshift=0.0, - region=None) -

      -
      source code  -
      - -
      -
      -set up a Constant Wavelength Pattern pattern with all necessary parameters
      -
      -arguement
      -- dfname        :   string, data file name
      -- parser        :   Parser() instance
      -- region        :   list of 2-tuples (default=None): refine region
      -- wavelength    :   float, (first) wave length in A
      -- wavelength2   :   float, 2nd wave length in A
      -- resfile       :   resolution file (default=None)
      -
      -return  --  None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initCWXrayPattern(dfname, - parser, - wavelength, - wavelength2=0.0, - ratio=0.0, - zshift=0.0, - region=None, - resfname=None) -

      -
      source code  -
      - -
      -
      -initalize and set up a constant wavelength X-ray pattern with all necessary parameters
      -
      -arguement
      -- dfname        :   string, data file name
      -- parser        :   Parser() instance
      -- region        :   list of 2-tuples (default=None): refine region
      -- wavelength    :   float, (first) wave length in A
      -- wavelength2   :   float, 2nd wave length in A
      -- resfile       :   resolution file (default=None)
      -
      -return  --  CWXrayPattern instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initCWNeutronPattern(dfname, - parser, - wavelength, - wavelength2=0.0, - ratio=0.0, - zshift=0.0, - region=None, - resfname=None) -

      -
      source code  -
      - -
      -
      -initialize and set up a constant wavelength neutron pattern with all necessary parameters
      -
      -arguement
      -- dfname        :   string, data file name
      -- parser        :   Parser() instance
      -- region        :   list of 2-tuples (default=None): refine region
      -- wavelength    :   float, (first) wave length in A
      -- wavelength2   :   float, 2nd wave length in A
      -- resfile       :   resolution file (default=None)
      -
      -return  --  CWNeutronPattern instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initPolynomialBackground(backgroundPoints, - order=12) -

      -
      source code  -
      - -

      initialze a Polynomial background

      -

      backgroundPoints : list of float

      - return : PolynomialBackground instance -
      -
      -
      -
      - -
      - -
      - - -
      -

      initInterpolatedBackground(backgroundpoints, - btype='linear') -

      -
      source code  -
      - -
      -
      -user will use the background interpolated from a list of user-selected 
      -background points
      -
      -argument
      -- backgroundpoints  :   2D numpy array or a list of 2 (or more) tuples 
      -                        as backgroundpoints[x][0] is the position
      -                        and backgroundpoints[x][1] is the background
      -- btype             :   string, background type
      -
      -return  --  a Background instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setExcludedRegion(pattern, - excludedregionslist) -

      -
      source code  -
      - -
      -
      -Set excluded regions to a pattern
      -
      -Argument:
      -- pattern               :   diffpy.rietveldapi.DiffractionPattern
      -- excludedregionslist   :   list of dict ["Begin", "End"]
      -
      -Return                  :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setRefineRegion(pattern, - regionlist) -

      -
      source code  -
      - -
      -
      -user defines the region to refine in a more directed manner than 
      -defining excluded region
      -
      -The refine regions (i.e., excluded regions) defined before will be removed
      -by this method
      -
      -if regionlist = empty list:    region to be refined
      -
      -argument
      -- parentobj :   A RietveldComponent or Pattern instance
      -                to hold this diffraction data
      -- regionlist:   2D numpy array or a list of 2 (or more) tuples
      -                as the region to refine
      -
      -return  --  None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      reloadData(myfit, - datafilename, - bankid=None) -

      -
      source code  -
      - -
      -
      -Load another data file to current Fit instance. 
      -If bankid is given, data file will be set to specific bank.
      -Otherwise, the datafilename will be set to all banks/components
      -
      -Argument:
      -- myfit         :   Fit instance
      -- datafilename  :   str
      -- bankid        :   int
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      addAtom(phase, - atomtype, - fractcoordinate, - occ, - biso, - baniso=None, - atomtag='auto') -

      -
      source code  -
      - -
      -
      -add an atom to a phase instance
      -
      -argument
      -- phase             :   a Phase instance
      -- atomtype          :   string, atom's type
      -- fraccoordinate    :   list of float, (x,y,z)
      -- occ               :   float, occupancy number
      -- biso              :   float, isotropic thermal factor B
      -- baniso            :   list/6-tuple/numpy array for B11, B22, B33, B12, B13, B23
      -- atomtag           :   tag of the atom, default to be 'auto'
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      Cubic(a) -

      -
      source code  -
      - -
      -
      -set the lattice to be cubic
      -
      -argument
      -- a :   float, lattice size in \AA
      -
      -return  --  Lattice instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genLattice(a, - b, - c, - alpha, - beta, - gamma) -

      -
      source code  -
      - -
      -
      -generate a Lattice withtout further knowledge
      -
      -Arguments:
      -- a
      -- b
      -- c
      -- alpha
      -- beta
      -- gamma
      -
      -Return  :   diffpy.rietveldapi.Lattice
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initCrystalPhase(lattice, - spacegroup, - phasename='') -

      -
      source code  -
      - -
      -
      -initialize and set a CrystalPhase instance
      -
      -argument
      -- lattice   :   Lattice instance
      -- spacegroup:   string, space group
      -- phasename :   string, name of the phase
      -
      -return  --  CrystalPhase instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      replaceStructureModel(thefit, - modeltuplelist, - cindex='all') -

      -
      source code  -
      - -
      -
      -Replace the structure model inside a Fit object
      -
      -Argument:
      -- thefit    :   Fit instance
      -- modeltuple:   list 3-tuples:  (Lattice, List of Atoms, str/Space group)
      -- cindex    :   int, or str/"all":  component
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initProfilePseudoVoigtIkedaCarpenter(sig0=0.0, - sig1=0.0, - sig2=0.0, - gam0=0.0, - gam1=0.0, - gam2=0.0) -

      -
      source code  -
      - -
      -
      -new and set up a Pseudo-Voig Ikeda-Carpenter peak profile instance
      -
      -argument
      -- sig0  :   float,
      -- sig1  :   float,
      -- sig2  :   float,
      -- gam0  :   float,
      -- gam1  :   float,
      -- gam2  :   float,
      -- alph0 :   float,
      -- beta0 :   float,
      -- alph1 :   float
      -- kappa :   float
      -- resfname  :   string, resolution file name (default=None)
      -- bank  :   integer, optional bank number in resolution file
      -
      -return  --   (PseudoVoigtIkedaCarpenter, ExponentialDecay) instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initPseudoVoigtExpDSpacing(parameterdict=None, - peakrange=8.0, - sig0=0.0, - sig1=0.0, - sig2=0.0, - gam0=0.0, - gam1=0.0, - gam2=0.0) -

      -
      source code  -
      - -
      -
      -New and set up a PsuedoVoigt Exponent D-Spacing
      -
      -Prioty:
      -
      -argument
      -- sig0  :   float,
      -- sig1  :   float,
      -- sig2  :   float,
      -- gam0  :   float,
      -- gam1  :   float,
      -- gam2  :   float,
      -- kappa :   float
      -
      -return  --   PseudoVoigtIkedaCarpenter instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initPseudoVoigtExp(parameterdict=None, - peakrange=8.0, - sig0=0.0, - sig1=0.0, - sig2=0.0, - gam0=0.0, - gam1=0.0, - gam2=0.0) -

      -
      source code  -
      - -
      -
      -New and set up a PsuedoVoigt Exponent back-to-back
      -
      -argument
      -- sig0  :   float,
      -- sig1  :   float,
      -- sig2  :   float,
      -- gam0  :   float,
      -- gam1  :   float,
      -- gam2  :   float,
      -
      -return  --   PseudoVoigtIkedaCarpenter instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initExponentialDecay(parameterdict=None, - alph0=0.0, - beta0=0.0, - alph1=0.0, - beta1=0.0) -

      -
      source code  -
      - -
      -
      -Initializae a Thermal Expoential-Decay Object
      -
      -Priority:   Data in parameterdict will override  
      -
      -Argument:
      -- parameterdict :   dictionary
      -- alph0     :   float,
      -- beta0     :   float,
      -- alph1     :   float,
      -- beta1     :   float,
      -
      -Return      :   ExpDecayFunction object
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initThermalExponentialDecay(parameterdict=None, - alph0=0.0, - beta0=0.0, - alph1=0.0, - beta1=0.0, - alph0t=0.0, - beta0t=0.0, - alph1t=0.0, - beta1t=0.0) -

      -
      source code  -
      - -
      -
      -Initializae a Thermal Expoential-Decay Object
      -
      -Priority:   Data in parameterdict will override  
      -
      -Argument:
      -- parameterdict :   dictionary
      -- alph0     :   float,
      -- beta0     :   float,
      -- alph1     :   float,
      -- beta1     :   float,
      -- alph0t    :   float,
      -- beta0t    :   float,
      -- alph1t    :   float,
      -- beta1t    :   float,
      -
      -Return      :   ThermalExpDecayFunction object
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initCylindricalAbsorptionCorrection(parameterdict=None, - abs1=0.0, - abs2=0.0) -

      -
      source code  -
      - -
      -
      -Initialize and set up an Absorption-Correction object
      -
      -Arguments:
      -- parameterdict :   dictionary
      -
      -Return          :   AbsorptionCorrection instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      set2ThetaSymmetricPeakProfile(prof, - peakrange, - u=1.0, - v=1.0, - w=1.0, - x=1.0, - y=1.0, - resfile=None) -

      -
      source code  -
      - -
      -
      -set up a 2-theta symmetric peak profile
      -
      -argument:
      -- peakrange :   float,
      -- u
      -- v
      -- w
      -- x
      -- y
      -- resfile   :   string, file name of resolution file
      -
      -return  --  None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initProfileGaussian(peakrange=8.0, - u=1.0, - v=1.0, - w=1.0, - x=0.0, - y=0.0) -

      -
      source code  -
      - -

      initalize and set up a Gaussian PeakProfile instance

      - return -- GaussianProfile -
      -
      -
      -
      - -
      - -
      - - -
      -

      initProfilePseudoVoigt(parameterdict=None, - peakrange=8.0, - u=1.0, - v=1.0, - w=1.0, - x=0.0, - y=0.0, - eta0=1.0) -

      -
      source code  -
      - -
      -
      -initialize and set up a Pseudo Voigt Peak Profile instance
      -
      -Arguements:
      -- parameterdict :   dictionary
      -
      -return  --  PseudoVoigtProfile
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initProfileTCHPseudoVoigt(parameterdict=None, - peakrange=8.0, - u=1.0, - v=1.0, - w=1.0, - x=0.0, - y=0.0) -

      -
      source code  -
      - -
      -
      -initialize and set up a Thomas-Cox-Hasting (TCH) Pseudo Voigt Peak Profile instance
      -
      -Arguements:
      -- parameterdict :   dictionary
      -
      -return  --  PseudoVoigtProfile
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      initProfileSplitPseudoVoigt(parameterdict=None, - peakrange=8.0) -

      -
      source code  -
      - -
      -
      -initialize and set up a Thomas-Cox-Hasting (TCH) Pseudo Voigt Peak Profile instance
      -
      -Arguements:
      -- parameterdict :   dictionary
      -
      -return  --  PseudoVoigtProfile
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genPeakProfile(peakprofilename, - parameterdict) -

      -
      source code  -
      - -
      -Generate a proper PeakProfile object according to some given name
      -
      -Argument:
      -- peakprofilename   :   string, name of peak profile
      -- parameterdict     :   dictionary, parameter for init the peak profile
      -
      -Return              :   Rietveld PeakProfile instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genFit(instrument, - phaseslist, - experimentslist=None) -

      -
      source code  -
      - -
      -Generate a Fit instance (Feature fixed)
      -
      -Arguement:
      -- instrument        :   Instrument instance
      -- phaseslist        :   List of diffpy.srrietvel.Phase
      -- experimentslist   :   list, of list of measurements
      -
      -Return              :   diffpy.srrietvel.Fit
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      addComponent(fit, - pattern, - phases, - background=None, - bkgdvaluelist=None, - bkgdorigin=7000.0, - peakprofile=None, - expdecay=None) -

      -
      source code  -
      - -
      -
      -generate a RietveldComponent to a Fit instance
      -
      -arguments
      -- pattern       :   Pattern instance
      -- phases        :   list of Phase instance
      -- background    :   Background instance
      -- bkgdvaluelist :   list of 2-tuple/float (defualt=None)
      -                    1-tuple: b1, b2, ....
      -                    2-tuple: (tof1, b1), (tof2, b2), ... 
      -- bkgdorigin    :   float, polynomial background origin
      -- peakprofile   :   diffpy.rietveldapi.PeakProfile instance (default=None)
      -- expdecay      :   diffpy.rietveldapi.ExpDecayFunction instance (default=None)
      -
      -return  --  RietveldComponent
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      locateRefinableParameter(startobj, - paraname, - info=None) -

      -
      source code  -
      - -
      -
      -locate the parent object of a specific refinable parameter
      -
      -arguments
      -startobj    :   object to search for a parameter of it or in the object belonged to it
      -paraname    :   string, name of parameter
      -info        :   string, some additional information for this parameter in order to avoid
      -                two parameters with the same/similar name
      -
      -return  --  ???
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      checkMust(fit) -

      -
      source code  -
      - -
      -
      -check a list of important parameters that must be set right!
      -
      -argument
      -- fit   :   Fit instance
      -
      -return  --  Boolean
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      myEngine

      - -
      -
      -
      -
      Value:
      -
      -<diffpy.srrietveld.refinebackend.RietveldEngine instance at 0xb7ac124c\
      ->
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.midscript-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.midscript-pysrc.html deleted file mode 100644 index 982bb188..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.midscript-pysrc.html +++ /dev/null @@ -1,1717 +0,0 @@ - - - - - srrietveld.midscript - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module midscript - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.midscript

      -
      -   1  ############################################################################## 
      -   2  # 
      -   3  # diffpy.srrietveld by DANSE Diffraction group 
      -   4  #                   Simon J. L. Billinge 
      -   5  #                   (c) 2008 Trustees of the Columbia University 
      -   6  #                   in the City of New York.  All rights reserved. 
      -   7  # 
      -   8  # File coded by:    Wenduo Zhou 
      -   9  # 
      -  10  # See AUTHORS.txt for a list of people who contributed. 
      -  11  # See LICENSE.txt for license information. 
      -  12  # 
      -  13  ############################################################################## 
      -  14   
      -  15  """ 
      -  16  container for a series of middle-level API supporting end-user scripts 
      -  17  these API are NOT defined in standard diffpy.rietveldapi 
      -  18  they are in the mode of conceptual testing and subject to major modification 
      -  19   
      -  20  External Methods List: 
      -  21    - initTCHProfilePseudoVoigt(parameterdict=None, peakrange=8.0, u=1.0, v=1.0, w=1.0, x=0.0, y=0.0) 
      -  22    - getPatterns(fit): 
      -  23  """ 
      -  24   
      -  25  __id__ = "$Id: midscript.py 2918 2009-03-18 19:26:39Z wdzhou $" 
      -  26   
      -  27  from    diffpy.refinementapi.errors         import FitConfigurationError 
      -  28  from    diffpy.refinementapi.exceptiontools import verifyType 
      -  29  from    diffpy.srrietveld                          import * 
      -  30   
      -  31  # Suite 1: Pattern Related 
      -
      32 -def getPatterns(fit): -
      33 """ - 34 Get all the patterns of a Fit instance - 35 - 36 Argument - 37 - fit : Fit instance - 38 - 39 Return : list of Patterns - 40 """ - 41 patlist = [] - 42 - 43 numcomp = fit.getNumComponents() - 44 for c in xrange(numcomp): - 45 comp = fit.getComponent(c) - 46 pat = comp.getPattern() - 47 patlist.append(pat) - 48 - 49 return patlist -
      50 - 51 -
      52 -def setPattern(pat, dfname, parser): -
      53 """ - 54 basic functions to set up a Pattern - 55 - 56 argument: - 57 - pat : Pattern instance - 58 - dfname : string, data file name - 59 - parser : Parser() instance - 60 - 61 return -- None - 62 """ - 63 PT = myEngine.getRietveldEngineModule("patterns") - 64 verifyType(pat, PT.DiffractionPattern) - 65 - 66 # import and parse data - 67 try: - 68 pat.loadData(dfname, parser) - 69 except IOError, err: - 70 print "%-50s"% (err) - 71 print "File %-15s Cannot be Loaded Correcctly"% (dfname) - 72 pat.rietveldStatus = False - 73 - 74 return None -
      75 - 76 -
      77 -def mapStructure(sourcefit, targetfit): -
      78 """ - 79 Map the strcture parameters from a Fit instance to another instance - 80 - 81 Requirement: - 82 * source-Fit and target-Fit have the same Fit structure and same - 83 Crystal structure - 84 - 85 Argument: - 86 - sourcefit : Fit instance - 87 - targetfit : Fit instance - 88 - 89 Return : None - 90 """ - 91 # FIXME Not Optimized for Multiple Bank - 92 numcomp = sourcefit.getNumComponents() - 93 for cindex in xrange(numcomp): - 94 scomp = sourcefit.getComponent(cindex) - 95 tcomp = targetfit.getComponent(cindex) - 96 numphase = scomp.getNumPhases() - 97 for pindex in xrange(numphase): - 98 sphase = scomp.getPhase(pindex) - 99 tphase = tcomp.getPhase(pindex) - 100 # 1. Lattice - 101 slattice = sphase.getLattice() - 102 tlattice = tphase.getLattice() - 103 slattice.mapTo(tlattice) - 104 - 105 # 2. Atoms - 106 numatom = sphase.getNumAtoms() - 107 for aindex in xrange(numatom): - 108 satom = sphase.getAtom(aindex) - 109 tatom = tphase.getAtom(aindex) - 110 satom.mapTo(tatom) - 111 - 112 # ADP - 113 sadp = satom.getADP() - 114 tadp = tatom.getADP() - 115 sadp.mapTo(tadp) - 116 # LOOP-OVER: for aindex in xrange(numatom) - 117 # LOOP-OVER: for pindex in xrange(numphase) - 118 # LOOP-OVER: for cindex in xrange(numcomp) - 119 - 120 return -
      121 - 122 -
      123 -def initTOFPattern(dfname, parser, bank=1, dangle=None, excludedregions=None, - 124 dtt1=None, dtt2=None, zshift=0.0, xcross=0.0, width=0.0): -
      125 """ - 126 initialize and set up a TOF pattern with all necessary parameters - 127 - 128 arguement - 129 - dfname : string, data file name - 130 - parser : Parser() instance - 131 - dangle : double, detector angle - 132 - bank : int, bank number (default=1) - 133 - excludedregions : list of 2-tuples (default=None): excluded region - 134 - dtt1 : float (default=None) - 135 - dtt2 : float (default=None) - 136 - resfile : resolution file (default=None) - 137 - 138 return -- TOFPattern instance - 139 """ - 140 PT = myEngine.getRietveldEngineModule("patterns") - 141 - 142 # generate - 143 pat = PT.TOFPattern() - 144 # data - 145 pat.loadData(dfname, parser) - 146 # bank setup - 147 pat.setBank(bank) - 148 - 149 pat.setValue("zshift", zshift) - 150 pat.setValue("dtt1", dtt1) - 151 pat.setValue("dtt2", dtt2) - 152 pat.setValue("xcross", xcross) - 153 pat.setValue("width", width) - 154 pat.setDetectorAngle(dangle) - 155 - 156 # setup the excluded region - 157 setExcludedRegion(pat, excludedregions) - 158 - 159 return pat -
      160 - 161 -
      162 -def initThermalTOFPattern(dfname, parser, bank=1, dangle=None, excludedregions=None, - 163 dtt1=None, dtt2=None, zshift=0.0, - 164 dtt1t=None, dtt2t=None, zerot=0.0, xcross=None, width=None): -
      165 """ - 166 Initialize Thermal Neutron TOF Pattern - 167 - 168 """ - 169 PT = myEngine.getRietveldEngineModule("patterns") - 170 - 171 # generate - 172 pat = PT.ThermalNeutronTOFPattern() - 173 # data - 174 pat.loadData(dfname, parser) - 175 # bank and fixed instrument parameters setup - 176 pat.setBank(bank) - 177 pat.setDetectorAngle(dangle) - 178 # refinable parameter set up - 179 pat.setValue("zshift", zshift) - 180 pat.setValue("dtt1", dtt1) - 181 pat.setValue("dtt2", dtt2) - 182 pat.setValue("zerot", zerot) - 183 pat.setValue("dtt1t", dtt1t) - 184 pat.setValue("dtt2t", dtt2t) - 185 pat.setValue("xcross", xcross) - 186 pat.setValue("width", width) - 187 # setup the excluded region - 188 setExcludedRegion(pat, excludedregions) - 189 - 190 return pat -
      191 - 192 -
      193 -def setCWPattern(pat, dfname, parser, wavelength, wavelength2=0.0, ratio=0.0, - 194 zshift=0.0, region=None): -
      195 """ - 196 set up a Constant Wavelength Pattern pattern with all necessary parameters - 197 - 198 arguement - 199 - dfname : string, data file name - 200 - parser : Parser() instance - 201 - region : list of 2-tuples (default=None): refine region - 202 - wavelength : float, (first) wave length in A - 203 - wavelength2 : float, 2nd wave length in A - 204 - resfile : resolution file (default=None) - 205 - 206 return -- None - 207 """ - 208 PT = myEngine.getRietveldEngineModule("patterns") - 209 verifyType(pat, PT.CWPattern) - 210 - 211 # call base function - 212 setPattern(pat, dfname, parser) - 213 - 214 # setup the excluded region - 215 if not region is None: - 216 verifyType(region, list) - 217 setRefineRegion(pat, region) - 218 - 219 # set up the excluded region - 220 pat.setValue("zshift", zshift) - 221 # set up the wavelength information - 222 pat.setPrimaryWavelength(wavelength) - 223 pat.setValue("Lambda", wavelength) - 224 if wavelength2 is not None: - 225 pat.setSecondaryWavelength(wavelength2) - 226 else: - 227 ratio = 0.0 - 228 pat.setIntensityRatio(ratio) - 229 - 230 return None -
      231 - 232 -
      233 -def initCWXrayPattern(dfname, parser, wavelength, wavelength2=0.0, ratio=0.0, - 234 zshift=0.0, region=None, resfname=None): -
      235 """ - 236 initalize and set up a constant wavelength X-ray pattern with all necessary parameters - 237 - 238 arguement - 239 - dfname : string, data file name - 240 - parser : Parser() instance - 241 - region : list of 2-tuples (default=None): refine region - 242 - wavelength : float, (first) wave length in A - 243 - wavelength2 : float, 2nd wave length in A - 244 - resfile : resolution file (default=None) - 245 - 246 return -- CWXrayPattern instance - 247 """ - 248 PT = myEngine.getRietveldEngineModule("patterns") - 249 - 250 pat = PT.CWXPattern() - 251 - 252 setCWPattern(pat, dfname, parser, wavelength, wavelength2, ratio, zshift, region) - 253 - 254 return pat -
      255 - 256 -
      257 -def initCWNeutronPattern(dfname, parser, wavelength, wavelength2=0.0, ratio=0.0, - 258 zshift=0.0, region=None, resfname=None): -
      259 """ - 260 initialize and set up a constant wavelength neutron pattern with all necessary parameters - 261 - 262 arguement - 263 - dfname : string, data file name - 264 - parser : Parser() instance - 265 - region : list of 2-tuples (default=None): refine region - 266 - wavelength : float, (first) wave length in A - 267 - wavelength2 : float, 2nd wave length in A - 268 - resfile : resolution file (default=None) - 269 - 270 return -- CWNeutronPattern instance - 271 """ - 272 PT = myEngine.getRietveldEngineModule("patterns") - 273 - 274 pat = PT.CWNPattern() - 275 - 276 setCWPattern(pat, dfname, parser, wavelength, wavelength2, ratio, zshift, region) - 277 - 278 return pat -
      279 - 280 -
      281 -def initBackground(backgroundType, backgroundPoints): -
      282 """ - 283 initialize a Background instance and set value to it - 284 """ - 285 if backgroundType == "Polynomial": - 286 background = initPolynomialBackground(backgroundPoints) - 287 elif backgroundType == "Interpolated Linear": - 288 background = initInterpolatedBackground(backgroundPoints, "linear") - 289 elif backgroundType == "Interpolated Cubic": - 290 background = initInterpolatedBackground(backgroundPoints, "cubic") - 291 else: - 292 raise NotImplementedError("background type = %-20s not defined" %(backgroundType)) - 293 - 294 return background -
      295 - 296 -
      297 -def initPolynomialBackground(backgroundPoints, order=12): -
      298 """ - 299 initialze a Polynomial background - 300 - 301 backgroundPoints : list of float - 302 - 303 return : PolynomialBackground instance - 304 """ - 305 BKGD = myEngine.getRietveldEngineModule("backgrounds") - 306 - 307 # 1. Determine the order - 308 numpoints = len(backgroundPoints) - 309 if numpoints > order+1: - 310 errmsg = "Given background points number is larger than desired polynomial order\n" - 311 errmsg += "Given order = %-5s, Given Num Points = %-30s\n"% (order, numpoints) - 312 errmsg += "Input Points: %-40s"% (backgroundPoints) - 313 raise FitConfigurationError(errmsg) - 314 - 315 # 2. Generate background and set up origin - 316 bkgd = BKGD.PolynomialBackground(order) - 317 bkgd.setOrigin(backgroundPoints[0]) - 318 - 319 # setup the background - 320 for bindex in xrange(1, numpoints): - 321 parname = "b"+str(bindex) - 322 bkgd.setValue(parname, backgroundPoints[bindex]) - 323 - 324 return bkgd -
      325 - 326 -
      327 -def initInterpolatedBackground(backgroundpoints, btype="linear"): -
      328 """ - 329 user will use the background interpolated from a list of user-selected - 330 background points - 331 - 332 argument - 333 - backgroundpoints : 2D numpy array or a list of 2 (or more) tuples - 334 as backgroundpoints[x][0] is the position - 335 and backgroundpoints[x][1] is the background - 336 - btype : string, background type - 337 - 338 return -- a Background instance - 339 """ - 340 BKGD = myEngine.getRietveldEngineModule("backgrounds") - 341 - 342 background = BKGD.InterpolatedBackground(btype) - 343 background.addBackgroundPoints(backgroundpoints) - 344 - 345 return background -
      346 - 347 -
      348 -def setExcludedRegion(pattern, excludedregionslist): -
      349 """ - 350 Set excluded regions to a pattern - 351 - 352 Argument: - 353 - pattern : diffpy.rietveldapi.DiffractionPattern - 354 - excludedregionslist : list of dict ["Begin", "End"] - 355 - 356 Return : None - 357 """ - 358 if excludedregionslist is None: - 359 return - 360 - 361 if not isinstance(excludedregionslist, list): - 362 errmsg = "Input Incorrect Type" - 363 raise FitConfigurationError(errmsg) - 364 - 365 sortedlist = sorted(excludedregionslist) - 366 - 367 for regiondict in sortedlist: - 368 bound = (regiondict["Begin"], regiondict["End"]) - 369 pattern.addExcludedRegion(bound) - 370 - 371 return -
      372 - 373 -
      374 -def setRefineRegion(pattern, regionlist): -
      375 """ - 376 user defines the region to refine in a more directed manner than - 377 defining excluded region - 378 - 379 The refine regions (i.e., excluded regions) defined before will be removed - 380 by this method - 381 - 382 if regionlist = empty list: region to be refined - 383 - 384 argument - 385 - parentobj : A RietveldComponent or Pattern instance - 386 to hold this diffraction data - 387 - regionlist: 2D numpy array or a list of 2 (or more) tuples - 388 as the region to refine - 389 - 390 return -- None - 391 """ - 392 raise NotImplementedError("This function is not tested") - 393 excludedregion = [] - 394 for rindex in xrange(len(regionlist)+1): - 395 - 396 # low limit - 397 if rindex == 0: - 398 low = 0.0 - 399 else: - 400 low = regionlist[rindex-1][1] - 401 # uplimit - 402 if rindex == len(regionlist): - 403 high = 1.0E10 - 404 else: - 405 high = regionlist[rindex][0] - 406 # add - 407 excludedregion.append( (low, high) ) - 408 - 409 # End -- for rindex in xrange(len(regionlist)+1) - 410 - 411 pattern.setExcludedRegion(excludedregion) - 412 - 413 return -
      414 - 415 -
      416 -def reloadData(myfit, datafilename, bankid = None): -
      417 """ - 418 Load another data file to current Fit instance. - 419 If bankid is given, data file will be set to specific bank. - 420 Otherwise, the datafilename will be set to all banks/components - 421 - 422 Argument: - 423 - myfit : Fit instance - 424 - datafilename : str - 425 - bankid : int - 426 - 427 Return : None - 428 """ - 429 # FIXME: Only the XYSigma Parser is supported at this moment - 430 - 431 import diffpy.rietveldapi.patterns as APIP - 432 - 433 PS = myEngine.getRietveldEngineModule("patternparsers") - 434 - 435 bankfound = False - 436 - 437 numcomp = myfit.getNumComponents() - 438 for cindex in xrange(numcomp): - 439 comp = myfit.getComponent(cindex) - 440 pat = comp.getPattern() - 441 if bankid is None or isinstance(pat, APIP.CWPattern): - 442 # Default to set dame data files to all components - 443 pat.loadData(datafilename, PS.XYSigmaParser()) - 444 bankfound = True - 445 else: - 446 if pat.getBankNumber() == bankid: - 447 pat.loadData(datafilename, PS.XYSigmaParser()) - 448 bankfound = True - 449 break - 450 # END-IF-ELSE - 451 # LOOP-OVER - 452 - 453 if bankfound is False: - 454 errmsg = "Bank %-5s Cannot Be Found. " % (bankid) - 455 raise NotImplementedError, errmsg - 456 - 457 return -
      458 - 459 # - 460 # Suite 2: Phase Related - 461 # -
      462 -def addAtom(phase, atomtype, fractcoordinate, occ, biso, baniso=None, atomtag="auto"): -
      463 """ - 464 add an atom to a phase instance - 465 - 466 argument - 467 - phase : a Phase instance - 468 - atomtype : string, atom's type - 469 - fraccoordinate : list of float, (x,y,z) - 470 - occ : float, occupancy number - 471 - biso : float, isotropic thermal factor B - 472 - baniso : list/6-tuple/numpy array for B11, B22, B33, B12, B13, B23 - 473 - atomtag : tag of the atom, default to be 'auto' - 474 """ - 475 AT = myEngine.getRietveldEngineModule("atoms") - 476 AP = myEngine.getRietveldEngineModule("adps") - 477 - 478 def generateAtomTag(phase, atomtype): - 479 """ - 480 generate an individual atom tag against all the atoms included in the phase already - 481 - 482 this method is NOT FOOLPROOF: - 483 Limitation 1: - 484 Malfunction Case: There are 2 Oxygen atoms. The automatic mode for the first atom - 485 will label it with 'O1'. If the user label the 2nd O atom with 'O1'. In this level, - 486 this method cannot avoid the error - 487 - 488 Limitatin 2: - 489 same type of atom number won't exceed 100 - 490 - 491 argument: - 492 - phase : diffpy.srrietveld Phase instance - 493 - atomtype : string, atom's type - 494 - 495 return -- string, new label - 496 """ - 497 count = 0 - 498 numatom = phase.getNumAtoms() - 499 - 500 for aindex in xrange(numatom): - 501 # search for all atoms - 502 atom = phase.getAtom(aindex) - 503 elem = atom.getElement() - 504 if elem == atomtype: - 505 # atom with same type - 506 tag = atom.getTag() - 507 # find out the current maximum counting number - 508 if '0' <= tag[-1] and tag[-1] <= '9': - 509 # if the last letter is digit - 510 if '0' < tag[-2] and tag[-2] <='9': - 511 # if the 2nd last letter is digit - 512 num = int(tag[-2]+tag[-1]) - 513 else: - 514 num = int(tag[-1]) - 515 else: - 516 num = 0 - 517 if num > count: - 518 count = num - 519 - 520 newnum = count + 1 - 521 newtag = atomtype+str(newnum) - 522 - 523 return newtag -
      524 - 525 - 526 try: - 527 # create an Atom object and set up its value - 528 newatom = AT.Atom(atomtype) - 529 phase.addAtom(newatom) - 530 # fractional position - 531 newatom.setValue("x", fractcoordinate[0]) - 532 newatom.setValue("y", fractcoordinate[1]) - 533 newatom.setValue("z", fractcoordinate[2]) - 534 newatom.setValue("occ", occ) - 535 - 536 # set up the tag - 537 if atomtag == "auto": - 538 tag = generateAtomTag(phase, atomtype) - 539 else: - 540 tag = atomtag - 541 newatom.setTag(tag) - 542 - 543 # Create a displacement factor for the atom - 544 if baniso is None: - 545 disp = AP.IsotropicAtomicDisplacementFactor() - 546 else: - 547 disp = AP.AnisotropicAtomicDisplacementFactor() - 548 newatom.setADP(disp) - 549 - 550 # set Biso - 551 disp.setValue("Biso", biso) - 552 # set B11, B22, B33, B12, B13, B23 - 553 if baniso is not None: - 554 disp.setValue("B11", baniso[0]) - 555 disp.setValue("B22", baniso[1]) - 556 disp.setValue("B33", baniso[2]) - 557 disp.setValue("B12", baniso[3]) - 558 disp.setValue("B13", baniso[4]) - 559 disp.setValue("B23", baniso[5]) - 560 - 561 except IndexError, err: - 562 errmsg = "addAtom(): Input < biso > is incorrect. biso = %-40s. biso should contains 6 components"% \ - 563 (biso) - 564 raise FitConfigurationError(errmsg) - 565 - 566 return newatom - 567 - 568 -
      569 -def Cubic(a): -
      570 """ - 571 set the lattice to be cubic - 572 - 573 argument - 574 - a : float, lattice size in \AA - 575 - 576 return -- Lattice instance - 577 """ - 578 LT = myEngine.getRietveldEngineModule("Lattice") - 579 - 580 # initialize a Lattice instance - 581 lattice = LT.Lattice() - 582 - 583 # set value - 584 lattice._a = a - 585 lattice._b = a - 586 lattice._c = a - 587 lattice._alpha = 90.0 - 588 lattice._beta = 90.0 - 589 lattice._gamma = 90.0 - 590 lattice.setValue("a", a) - 591 lattice.setValue("b", a) - 592 lattice.setValue("c", a) - 593 lattice.setValue("alpha", 90) - 594 lattice.setValue("beta" , 90) - 595 lattice.setValue("gamma", 90) - 596 - 597 return lattice -
      598 - 599 -
      600 -def genLattice(a, b, c, alpha, beta, gamma): -
      601 """ - 602 generate a Lattice withtout further knowledge - 603 - 604 Arguments: - 605 - a - 606 - b - 607 - c - 608 - alpha - 609 - beta - 610 - gamma - 611 - 612 Return : diffpy.rietveldapi.Lattice - 613 """ - 614 Lattice = myEngine.getRietveldEngineModule("Lattice") - 615 # initialize a Lattice instance - 616 lattice = Lattice.Lattice() - 617 - 618 # set value - 619 lattice._a = a - 620 lattice._b = b - 621 lattice._c = c - 622 lattice._alpha = alpha - 623 lattice._beta = beta - 624 lattice._gamma = gamma - 625 lattice.setValue("a", a) - 626 lattice.setValue("b", b) - 627 lattice.setValue("c", c) - 628 lattice.setValue("alpha", alpha) - 629 lattice.setValue("beta" , beta) - 630 lattice.setValue("gamma", gamma) - 631 - 632 return lattice -
      633 - 634 -
      635 -def initCrystalPhase(lattice, spacegroup, phasename=""): -
      636 """ - 637 initialize and set a CrystalPhase instance - 638 - 639 argument - 640 - lattice : Lattice instance - 641 - spacegroup: string, space group - 642 - phasename : string, name of the phase - 643 - 644 return -- CrystalPhase instance - 645 """ - 646 PHS = myEngine.getRietveldEngineModule("phases") - 647 - 648 phase = PHS.CrystalPhase(phasename) - 649 - 650 phase.setSpaceGroup(spacegroup) - 651 - 652 phase.setLattice(lattice) - 653 - 654 return phase -
      655 - 656 -
      657 -def replaceStructureModel(thefit, modeltuplelist , cindex="all"): -
      658 """ - 659 Replace the structure model inside a Fit object - 660 - 661 Argument: - 662 - thefit : Fit instance - 663 - modeltuple: list 3-tuples: (Lattice, List of Atoms, str/Space group) - 664 - cindex : int, or str/"all": component - 665 - 666 Return : None - 667 """ - 668 # 1. get the list of componets to for new phase - 669 compslist = [] - 670 if cindex == "all": - 671 numcomps = thefit.getNumComponents() - 672 for lcindex in xrange(numcomps): - 673 comp = thefit.getComponent(lcindex) - 674 compslist.append(comp) - 675 else: - 676 comp = thefit.getComponent(cindex) - 677 compslist.append(comp) - 678 - 679 # 2. replace - 680 for comp in compslist: - 681 numphase = comp.getNumPhases() - 682 for pindex in xrange(numphase): - 683 # 2.1 get phase and new structure model - 684 phase = comp.getPhase(pindex) - 685 newlattice, newatomslist, newspacegroup = modeltuplelist[pindex] - 686 # 2.2 replace space group - 687 phase.setSpaceGroup(newspacegroup) - 688 # 2.3 replace lattice - 689 phase.setLattice(newlattice) - 690 # 2.4 replace atom (delete old -> add new) - 691 numatoms = phase.getNumAtoms() - 692 curratomslist = [] - 693 for aindex in xrange(numatoms): - 694 atom = phase.getAtom(aindex) - 695 curratomslist.append(atom) - 696 for atom in curratomslist: - 697 phase.removeAtom(atom) - 698 for atom in newatomslist: - 699 if 0: # 1547 - 700 print "\n+++++++++ 1547 +++++++++++++\n" - 701 print "%-20s %-15s"% (atom._adp.__repr__(), atom._adp) - 702 print "\n---------------------------\n" - 703 print atom._sratom - 704 exit(0) - 705 phase.addAtom(atom) - 706 # LOOP-OVER: for pindex in xrange(numphase) - 707 # LOOP-OVER: for comp in composlist - 708 - 709 return -
      710 - 711 # - 712 # Suite 3: Peak Profie Related - 713 # -
      714 -def initProfilePseudoVoigtIkedaCarpenter(sig0=0.0, sig1=0.0, sig2=0.0, gam0=0.0, gam1=0.0, gam2=0.0): -
      715 """ - 716 new and set up a Pseudo-Voig Ikeda-Carpenter peak profile instance - 717 - 718 argument - 719 - sig0 : float, - 720 - sig1 : float, - 721 - sig2 : float, - 722 - gam0 : float, - 723 - gam1 : float, - 724 - gam2 : float, - 725 - alph0 : float, - 726 - beta0 : float, - 727 - alph1 : float - 728 - kappa : float - 729 - resfname : string, resolution file name (default=None) - 730 - bank : integer, optional bank number in resolution file - 731 - 732 return -- (PseudoVoigtIkedaCarpenter, ExponentialDecay) instance - 733 """ - 734 PEK = myEngine.getRietveldEngineModule("peakprofiles") - 735 DEC = myEngine.getRietveldEngineModule("expdecayfunction") - 736 - 737 # initialize peak profile - 738 prof = PEK.TOFPseudoVoigtIkedaCarpenter() - 739 - 740 # set value - 741 prof.setValue("sigma0", sig0) - 742 prof.setValue("sigma1", sig1) - 743 prof.setValue("sigma2", sig2) - 744 prof.setValue("gamma0", gam0) - 745 prof.setValue("gamma1", gam1) - 746 prof.setValue("gamma2", gam2) - 747 - 748 return prof -
      749 - 750 -
      751 -def initPseudoVoigtExpDSpacing(parameterdict=None, peakrange=8.0, sig0=0.0, sig1=0.0, sig2=0.0, \ - 752 gam0=0.0, gam1=0.0, gam2=0.0): -
      753 """ - 754 New and set up a PsuedoVoigt Exponent D-Spacing - 755 - 756 Prioty: - 757 - 758 argument - 759 - sig0 : float, - 760 - sig1 : float, - 761 - sig2 : float, - 762 - gam0 : float, - 763 - gam1 : float, - 764 - gam2 : float, - 765 - kappa : float - 766 - 767 return -- PseudoVoigtIkedaCarpenter instance - 768 """ - 769 PEK = myEngine.getRietveldEngineModule("peakprofiles") - 770 - 771 # 1. Initialize peak profile - 772 prof = PEK.PseudoVoigtExpDSpacing() - 773 - 774 # 2. Override - 775 if parameterdict is not None: - 776 if parameterdict.has_key("sigma0"): - 777 sig0 = parameterdict["sigma0"] - 778 if parameterdict.has_key("sigma1"): - 779 sig1 = parameterdict["sigma1"] - 780 if parameterdict.has_key("sigma2"): - 781 sig2 = parameterdict["sigma2"] - 782 if parameterdict.has_key("gamma0"): - 783 gam0 = parameterdict["gamma0"] - 784 if parameterdict.has_key("gamma1"): - 785 gam1 = parameterdict["gamma1"] - 786 if parameterdict.has_key("gamma2"): - 787 gam2 = parameterdict["gamma2"] - 788 - 789 # set value - 790 prof.setPeakRange(peakrange) - 791 - 792 prof.setValue("sigma0", sig0) - 793 prof.setValue("sigma1", sig1) - 794 prof.setValue("sigma2", sig2) - 795 prof.setValue("gamma0", gam0) - 796 prof.setValue("gamma1", gam1) - 797 prof.setValue("gamma2", gam2) - 798 - 799 return prof -
      800 - 801 -
      802 -def initPseudoVoigtExp(parameterdict=None, peakrange=8.0, sig0=0.0, sig1=0.0, sig2=0.0, \ - 803 gam0=0.0, gam1=0.0, gam2=0.0): -
      804 """ - 805 New and set up a PsuedoVoigt Exponent back-to-back - 806 - 807 argument - 808 - sig0 : float, - 809 - sig1 : float, - 810 - sig2 : float, - 811 - gam0 : float, - 812 - gam1 : float, - 813 - gam2 : float, - 814 - 815 return -- PseudoVoigtIkedaCarpenter instance - 816 """ - 817 PEK = myEngine.getRietveldEngineModule("peakprofiles") - 818 - 819 # 1. Initialize peak profile - 820 prof = PEK.PseudoVoigtExp() - 821 - 822 # 2. Override - 823 if parameterdict is not None: - 824 if parameterdict.has_key("sigma0"): - 825 sig0 = parameterdict["sigma0"] - 826 if parameterdict.has_key("sigma1"): - 827 sig1 = parameterdict["sigma1"] - 828 if parameterdict.has_key("sigma2"): - 829 sig2 = parameterdict["sigma2"] - 830 if parameterdict.has_key("gamma0"): - 831 gam0 = parameterdict["gamma0"] - 832 if parameterdict.has_key("gamma1"): - 833 gam1 = parameterdict["gamma1"] - 834 if parameterdict.has_key("gamma2"): - 835 gam2 = parameterdict["gamma2"] - 836 - 837 # set value - 838 prof.setPeakRange(peakrange) - 839 - 840 prof.setValue("sigma0", sig0) - 841 prof.setValue("sigma1", sig1) - 842 prof.setValue("sigma2", sig2) - 843 prof.setValue("gamma0", gam0) - 844 prof.setValue("gamma1", gam1) - 845 prof.setValue("gamma2", gam2) - 846 - 847 return prof -
      848 - 849 -
      850 -def initExponentialDecay(parameterdict=None, alph0=0.0, beta0=0.0, alph1=0.0, beta1=0.0): -
      851 """ - 852 Initializae a Thermal Expoential-Decay Object - 853 - 854 Priority: Data in parameterdict will override - 855 - 856 Argument: - 857 - parameterdict : dictionary - 858 - alph0 : float, - 859 - beta0 : float, - 860 - alph1 : float, - 861 - beta1 : float, - 862 - 863 Return : ExpDecayFunction object - 864 """ - 865 DEC = myEngine.getRietveldEngineModule("expdecayfunction") - 866 - 867 # 1. Parameter-Dictionary Overrides - 868 if parameterdict is not None: - 869 if parameterdict.has_key("alpha0"): - 870 alph0 = parameterdict["alpha0"] - 871 if parameterdict.has_key("alpha1"): - 872 alph1 = parameterdict["alpha1"] - 873 if parameterdict.has_key("beta0"): - 874 beta0 = parameterdict["beta0"] - 875 if parameterdict.has_key("beta1"): - 876 beta1 = parameterdict["beta1"] - 877 - 878 # 2. generate an DecayFunction and set up the value - 879 expd = DEC.ExpDecayFunction() - 880 - 881 expd.setValue("alpha0", alph0) - 882 expd.setValue("beta0", beta0) - 883 expd.setValue("alpha1", alph1) - 884 expd.setValue("beta1", beta1) - 885 - 886 return expd -
      887 - 888 -
      889 -def initThermalExponentialDecay(parameterdict=None, alph0=0.0, beta0=0.0, alph1=0.0, beta1=0.0, \ - 890 alph0t=0.0, beta0t=0.0, alph1t=0.0, beta1t=0.0): -
      891 """ - 892 Initializae a Thermal Expoential-Decay Object - 893 - 894 Priority: Data in parameterdict will override - 895 - 896 Argument: - 897 - parameterdict : dictionary - 898 - alph0 : float, - 899 - beta0 : float, - 900 - alph1 : float, - 901 - beta1 : float, - 902 - alph0t : float, - 903 - beta0t : float, - 904 - alph1t : float, - 905 - beta1t : float, - 906 - 907 Return : ThermalExpDecayFunction object - 908 """ - 909 DEC = myEngine.getRietveldEngineModule("expdecayfunction") - 910 - 911 # 1. Parameter-Dictionary Overrides - 912 if parameterdict is not None: - 913 if parameterdict.has_key("alpha0"): - 914 alph0 = parameterdict["alpha0"] - 915 if parameterdict.has_key("alpha1"): - 916 alph1 = parameterdict["alpha1"] - 917 if parameterdict.has_key("alph0t"): - 918 alph0t = parameterdict["alph0t"] - 919 if parameterdict.has_key("alph1t"): - 920 alph1t = parameterdict["alph1t"] - 921 if parameterdict.has_key("beta0"): - 922 beta0 = parameterdict["beta0"] - 923 if parameterdict.has_key("beta1"): - 924 beta1 = parameterdict["beta1"] - 925 if parameterdict.has_key("beta0t"): - 926 beta0t = parameterdict["beta0t"] - 927 if parameterdict.has_key("beta1t"): - 928 beta1t = parameterdict["beta1t"] - 929 - 930 # 2. generate an DecayFunction and set up the value - 931 expd = DEC.ThermalExpDecayFunction() - 932 - 933 expd.setValue("alpha0", alph0) - 934 expd.setValue("beta0", beta0) - 935 expd.setValue("alpha1", alph1) - 936 expd.setValue("beta1", beta1) - 937 expd.setValue("alph0t", alph0t) - 938 expd.setValue("beta0t", beta0t) - 939 expd.setValue("alph1t", alph1t) - 940 expd.setValue("beta1t", beta1t) - 941 - 942 return expd -
      943 - 944 -
      945 -def initCylindricalAbsorptionCorrection(parameterdict=None, abs1=0.0, abs2=0.0): -
      946 """ - 947 Initialize and set up an Absorption-Correction object - 948 - 949 Arguments: - 950 - parameterdict : dictionary - 951 - 952 Return : AbsorptionCorrection instance - 953 """ - 954 EA = myEngine.getRietveldEngineModule("absorptioncorrections") - 955 - 956 # 1. Init - 957 abscorrection = EA.CylindricalAbsorptionCorrection() - 958 - 959 # 2. Override - 960 if parameterdict is not None: - 961 if 0: # 1101 - 962 print "1101: keys = %-30s" %(parameterdict.keys()) - 963 sys.exit(0) - 964 if parameterdict.has_key("abs1"): - 965 abs1 = parameterdict["abs1"] - 966 if parameterdict.has_key("abs2"): - 967 abs2 = parameterdict["abs2"] - 968 - 969 # 3. Setup - 970 abscorrection.setValue("abs1", abs1) - 971 abscorrection.setValue("abs2", abs2) - 972 - 973 return abscorrection -
      974 - 975 -
      976 -def set2ThetaSymmetricPeakProfile(prof, peakrange, u=1.0, v=1.0, w=1.0, x=1.0, y=1.0, resfile=None): -
      977 """ - 978 set up a 2-theta symmetric peak profile - 979 - 980 argument: - 981 - peakrange : float, - 982 - u - 983 - v - 984 - w - 985 - x - 986 - y - 987 - resfile : string, file name of resolution file - 988 - 989 return -- None - 990 """ - 991 raise NotImplementedError("Not be implemented") - 992 - 993 return -
      994 - 995 -
      996 -def initProfileGaussian(peakrange=8.0, u=1.0, v=1.0, w=1.0, x=0.0, y=0.0): -
      997 """ - 998 initalize and set up a Gaussian PeakProfile instance - 999 -1000 return -- GaussianProfile -1001 """ -1002 PEK = myEngine.getRietveldEngineModule("peakprofiles") -1003 -1004 prof = PEK.GaussianProfile() -1005 -1006 # 1. Set peak range -1007 prof.setPeakRange(peakrange) -1008 -1009 # 2. Set all parameters -1010 prof.setValue("X", x) -1011 prof.setValue("Y", y) -1012 prof.setValue("U", u) -1013 prof.setValue("V", v) -1014 prof.setValue("W", w) -1015 -1016 return prof -
      1017 -1018 -
      1019 -def initProfilePseudoVoigt(parameterdict=None, peakrange=8.0, u=1.0, v=1.0, w=1.0, x=0.0, y=0.0, eta0=1.0): -
      1020 """ -1021 initialize and set up a Pseudo Voigt Peak Profile instance -1022 -1023 Arguements: -1024 - parameterdict : dictionary -1025 -1026 return -- PseudoVoigtProfile -1027 """ -1028 PEK = myEngine.getRietveldEngineModule("peakprofiles") -1029 -1030 prof = PEK.PseudoVoigtProfile() -1031 -1032 # 1. Parameter Dictionary Override -1033 if parameterdict.has_key("W"): -1034 w = parameterdict["W"] -1035 if parameterdict.has_key("U"): -1036 u = parameterdict["U"] -1037 if parameterdict.has_key("V"): -1038 v = parameterdict["V"] -1039 if parameterdict.has_key("eta0"): -1040 eta0 = parameterdict["eta0"] -1041 -1042 # 2. Set peak range -1043 prof.setPeakRange(peakrange) -1044 -1045 # 3. Set all parameters -1046 prof.setValue("eta0", eta0) -1047 prof.setValue("X", x) -1048 prof.setValue("Y", y) -1049 prof.setValue("U", u) -1050 prof.setValue("V", v) -1051 prof.setValue("W", w) -1052 -1053 return prof -
      1054 -1055 -
      1056 -def initProfileTCHPseudoVoigt(parameterdict=None, peakrange=8.0, u=1.0, v=1.0, w=1.0, x=0.0, y=0.0): -
      1057 """ -1058 initialize and set up a Thomas-Cox-Hasting (TCH) Pseudo Voigt Peak Profile instance -1059 -1060 Arguements: -1061 - parameterdict : dictionary -1062 -1063 return -- PseudoVoigtProfile -1064 """ -1065 PEK = myEngine.getRietveldEngineModule("peakprofiles") -1066 -1067 prof = PEK.TCHPseudoVoigtProfile() -1068 -1069 # 1. Parameter Dictionary Override -1070 if parameterdict.has_key("W"): -1071 w = parameterdict["W"] -1072 if parameterdict.has_key("U"): -1073 u = parameterdict["U"] -1074 if parameterdict.has_key("V"): -1075 v = parameterdict["V"] -1076 if parameterdict.has_key("X"): -1077 x = parameterdict["X"] -1078 if parameterdict.has_key("Y"): -1079 y = parameterdict["Y"] -1080 if parameterdict.has_key("Scale"): -1081 s = parameterdict["Scale"] -1082 -1083 # 2. Set peak range -1084 prof.setPeakRange(peakrange) -1085 -1086 # 3. Set all parameters -1087 prof.setValue("X", x) -1088 prof.setValue("Y", y) -1089 prof.setValue("U", u) -1090 prof.setValue("V", v) -1091 prof.setValue("W", w) -1092 prof.setValue("scale", s) -1093 -1094 return prof -
      1095 -1096 -
      1097 -def initProfileSplitPseudoVoigt(parameterdict=None, peakrange=8.0): -
      1098 """ -1099 initialize and set up a Thomas-Cox-Hasting (TCH) Pseudo Voigt Peak Profile instance -1100 -1101 Arguements: -1102 - parameterdict : dictionary -1103 -1104 return -- PseudoVoigtProfile -1105 """ -1106 PEK = myEngine.getRietveldEngineModule("peakprofiles") -1107 -1108 prof = PEK.SplitPseudoVoigtProfile() -1109 -1110 # 1. Parameter Dictionary Override -1111 if parameterdict.has_key("WL"): -1112 wl = parameterdict["WL"] -1113 if parameterdict.has_key("UL"): -1114 ul = parameterdict["UL"] -1115 if parameterdict.has_key("VL"): -1116 vl = parameterdict["VL"] -1117 if parameterdict.has_key("XL"): -1118 xl = parameterdict["XL"] -1119 if parameterdict.has_key("Eta0L"): -1120 etal = parameterdict["Eta0L"] -1121 elif parameterdict.has_key("eta0L"): -1122 etal = parameterdict["eta0L"] -1123 else: -1124 etal = 0.0 -1125 -1126 if parameterdict.has_key("WR"): -1127 wr = parameterdict["WR"] -1128 if parameterdict.has_key("UR"): -1129 ur = parameterdict["UR"] -1130 if parameterdict.has_key("VR"): -1131 vr = parameterdict["VR"] -1132 if parameterdict.has_key("XR"): -1133 xr = parameterdict["XR"] -1134 if parameterdict.has_key("Eta0R"): -1135 etar = parameterdict["Eta0R"] -1136 elif parameterdict.has_key("eta0R"): -1137 etar = parameterdict["eta0R"] -1138 else: -1139 etar = 0.0 -1140 -1141 if parameterdict.has_key("Scale"): -1142 s = parameterdict["Scale"] -1143 -1144 # 2. Set peak range -1145 prof.setPeakRange(peakrange) -1146 -1147 # 3. Set all parameters -1148 prof.setValue("scale", s) -1149 -1150 prof.setValue("XL", xl) -1151 prof.setValue("UL", ul) -1152 prof.setValue("VL", vl) -1153 prof.setValue("WL", wl) -1154 prof.setValue("eta0L",etal) -1155 -1156 prof.setValue("XR", xr) -1157 prof.setValue("UR", ur) -1158 prof.setValue("VR", vr) -1159 prof.setValue("WR", wr) -1160 prof.setValue("eta0R",etar) -1161 -1162 return prof -
      1163 -1164 -
      1165 -def genPeakProfile(peakprofilename, parameterdict): -
      1166 """ Generate a proper PeakProfile object according to some given name -1167 -1168 Argument: -1169 - peakprofilename : string, name of peak profile -1170 - parameterdict : dictionary, parameter for init the peak profile -1171 -1172 Return : Rietveld PeakProfile instance -1173 """ -1174 pname = peakprofilename.lower() -1175 -1176 if pname == "pseudovoigt": -1177 # Constant Wavelength PseudoVoigt -1178 peakprofile = initProfilePseudoVoigt(parameterdict) -1179 -1180 return peakprofile -1181 -1182 elif pname == "pseudovoigtexp": -1183 # T.O.F Pseudo Voigt -1184 # 1. Get peak profile parameters -1185 peakprofile = initPseudoVoigtExp(parameterdict) -1186 -1187 # 2. Get Absorption -1188 if parameterdict.has_key("absorption"): -1189 absorption = initCylindricalAbsorptionCorrection(parameterdict["absorption"]) -1190 else: -1191 absorption = None -1192 -1193 # 3. Get ExpDecay -1194 if parameterdict.has_key("decay"): -1195 expdecay = initExponentialDecay(parameterdict["decay"]) -1196 else: -1197 wmsg = "Warning: PseudoVoigtExponential does not have " + \ -1198 "Exponential Decay setup" -1199 print "Warning Message 252", wmsg -1200 expdecay = None -1201 -1202 return ( (peakprofile, expdecay, absorption) ) -1203 -1204 elif pname == "pseudovoigtexpdspacing": -1205 # 1. Get Peak Profile Parameters -1206 peakprofile = initPseudoVoigtExpDSpacing(parameterdict) -1207 -1208 # 2. Get Absorption -1209 if parameterdict.has_key("absorption"): -1210 absorption = initCylindricalAbsorptionCorrection(parameterdict["absorption"]) -1211 else: -1212 absorption = None -1213 -1214 # 3. Get ExpDecay -1215 if parameterdict.has_key("decay"): -1216 expdecay = initThermalExponentialDecay(parameterdict["decay"]) -1217 else: -1218 expdecay = None -1219 -1220 return ( (peakprofile, expdecay, absorption) ) -1221 -1222 elif pname == "tofpseudovoigtikedacarpenter": -1223 # T.O.F. Pseudo Voigt with Ikeda Carpenter -1224 # 1. Get Peak Profile Parameters -1225 sig0 = parameterdict["sigma0"] -1226 sig1 = parameterdict["sigma1"] -1227 sig2 = parameterdict["sigma2"] -1228 gam0 = parameterdict["gamma0"] -1229 gam1 = parameterdict["gamma1"] -1230 gam2 = parameterdict["gamma2"] -1231 -1232 peakprofile = initProfilePseudoVoigtIkedaCarpenter(sig0, sig1, sig2, gam0, gam1, gam2) -1233 -1234 # 2. Get Absorption -1235 if parameterdict.has_key("absorption"): -1236 absorption = initCylindricalAbsorptionCorrection(parameterdict["absorption"]) -1237 else: -1238 absorption = None -1239 -1240 # 3. Get ExpDecay -1241 if parameterdict.has_key("decay"): -1242 expdecay = initExponentialDecay(parameterdict["decay"]) -1243 else: -1244 expdecay = None -1245 -1246 return ( (peakprofile, expdecay, absorption) ) -1247 -1248 elif pname == "tch pseudovoigt" or pname.count("tch") == 1: -1249 -1250 peakprofile = initProfileTCHPseudoVoigt(parameterdict) -1251 -1252 return peakprofile -1253 -1254 elif pname == "split pseudovoigt" or pname == "splitpseudovoigtprofile": -1255 -1256 peakprofile = initProfileSplitPseudoVoigt(parameterdict) -1257 -1258 return peakprofile -1259 -1260 else: -1261 errmsg = "Peak Profile < %-10s / %-10s > hasn't been Implemented"% (pname, peakprofilename) -1262 raise NotImplementedError(errmsg) -1263 -1264 return -
      1265 -1266 """ -1267 Suite 4: RietveldComponent and Fit Related -1268 """ -
      1269 -def genFit(instrument, phaseslist, experimentslist = None): -
      1270 """ Generate a Fit instance (Feature fixed) -1271 -1272 Arguement: -1273 - instrument : Instrument instance -1274 - phaseslist : List of diffpy.srrietvel.Phase -1275 - experimentslist : list, of list of measurements -1276 -1277 Return : diffpy.srrietvel.Fit -1278 """ -1279 FT = myEngine.getRietveldEngineModule("Fit") -1280 -1281 # 1. Check input valid or not and Initialize Fit() -1282 if not isinstance(phaseslist, list) or len(phaseslist) == 0: -1283 errmsg = "No Phase Input: Input = %-30s" % (phaseslist) -1284 raise NotImplementedError, errmsg -1285 -1286 if experimentslist is None: -1287 experimentslist = [[]] -1288 -1289 if len(experimentslist) == 0: -1290 errmsg = "No Experiment Set Up! Find out in which situation, " + \ -1291 "getFit() works well without experiment/measurement" -1292 raise NotImplementedError, errmsg -1293 -1294 myFit = FT.Fit() -1295 myFit.setNumExperiments( len(experimentslist) ) -1296 -1297 # 2. Generate RietveldComponent by each measurement in each experiment -1298 for expid in xrange( len(experimentslist) ): -1299 for measurement in experimentslist[expid]: -1300 # 2.1 Retrieve necessary information -1301 curbankno = measurement.getBankNumber() -1302 curdatafname = measurement.getDataFileName() -1303 curbackground = measurement.getBackgroundDictionary() -1304 curmeasurerange = measurement.getMeasureRange() -1305 curexcregions = measurement.getExcludedRegions() -1306 -1307 # 2.2 Construct RietveldComponent -1308 component = instrument.genRietveldComponent(bankno=curbankno, -1309 datafile=curdatafname, backgroundtuple=curbackground, -1310 measurerange=curmeasurerange, excludedregionslist=curexcregions, -1311 structure = phaseslist, myfit = myFit) -1312 -1313 # 2.3 Set up experiment information -1314 myFit.setExperimentInformation(expid, component) -1315 # LOOP-OVER -1316 # LOOP-OVER : for measurement in measurements -1317 -1318 return myFit -
      1319 -1320 -
      1321 -def addComponent(fit, pattern, phases, background=None, bkgdvaluelist=None, bkgdorigin=7000.0, peakprofile=None, -1322 expdecay=None): -
      1323 """ -1324 generate a RietveldComponent to a Fit instance -1325 -1326 arguments -1327 - pattern : Pattern instance -1328 - phases : list of Phase instance -1329 - background : Background instance -1330 - bkgdvaluelist : list of 2-tuple/float (defualt=None) -1331 1-tuple: b1, b2, .... -1332 2-tuple: (tof1, b1), (tof2, b2), ... -1333 - bkgdorigin : float, polynomial background origin -1334 - peakprofile : diffpy.rietveldapi.PeakProfile instance (default=None) -1335 - expdecay : diffpy.rietveldapi.ExpDecayFunction instance (default=None) -1336 -1337 return -- RietveldComponent -1338 """ -1339 RC = myEngine.getRietveldEngineModule("RietveldComponent") -1340 BKGD = myEngine.getRietveldEngineModule("backgrounds") -1341 -1342 verifyType(phases, list) -1343 -1344 # generate component -1345 comp = RC.RietveldComponent() -1346 fit.addComponent(comp) -1347 -1348 # set up pattern -1349 comp.setPattern(pattern) -1350 -1351 # add phases -1352 for phase in phases[:]: -1353 newphase = comp.addPhase(phase) -1354 if newphase != phase: -1355 phases.remove(phase) -1356 phases.append(newphase) -1357 # print "New Phase: new phase at %-20s"% (newphase.__repr__) -1358 else: -1359 pass -1360 # print "Old Phase: old=new phase at %-20s"% (newphase.__repr__) -1361 -1362 # set the background -1363 if not background is None: -1364 comp.setBackground(background) -1365 -1366 # set up the background properties -1367 if not bkgdvaluelist is None: -1368 verifyType(bkgdvaluelist, list) -1369 if isinstance(background, BKGD.PolynomialBackground): -1370 # case 1: polynormial -1371 verifyType(bkgdorigin, float) -1372 background.setOrigin(bkgdorigin) -1373 for bindex in xrange(len(bkgdvaluelist)): -1374 parname = "b"+str(bindex+1) -1375 background.setValue(parname, bkgdvaluelist[bindex]) -1376 elif isinstance(background, BKGD.InterpolatedBackground): -1377 # case 2: user-selected background points -1378 background.addBackgroundPoints(bkgdvaluelist) -1379 else: -1380 errmsg = "addComponent(): Background of type %-20s has not been implemented"% \ -1381 (type(background)) -1382 raise NotImplementedError(errmsg) -1383 -1384 # End ... if instance(background, ....) -1385 # End ... if bkgdvaluelist != None -1386 # End ... if background != None -1387 -1388 # set peak profile -1389 if not peakprofile is None: -1390 for phase in phases: -1391 phase.setPeakProfile(peakprofile) -1392 # End -- if peakprofile != None: -1393 -1394 # set expdecay -1395 if not expdecay is None: -1396 for phase in phases: -1397 phase.addExpDecayFunction(expdecay) -1398 # End -- if expdecay != None: -1399 -1400 return comp -
      1401 -1402 -1403 # -1404 # Suite 5: Parameter Query -1405 # -
      1406 -def locateRefinableParameter(startobj, paraname, info=None): -
      1407 """ -1408 locate the parent object of a specific refinable parameter -1409 -1410 arguments -1411 startobj : object to search for a parameter of it or in the object belonged to it -1412 paraname : string, name of parameter -1413 info : string, some additional information for this parameter in order to avoid -1414 two parameters with the same/similar name -1415 -1416 return -- ??? -1417 """ -1418 raise NotImplementedError("Here") -
      1419 -1420 -1421 # -1422 # Suite 6: Foolproof -1423 # -
      1424 -def checkMust(fit): -
      1425 """ -1426 check a list of important parameters that must be set right! -1427 -1428 argument -1429 - fit : Fit instance -1430 -1431 return -- Boolean -1432 """ -1433 pass -
      1434 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.mixedphaseanalyzer-module.html b/static_root/doc/srrietveld/developers/srrietveld.mixedphaseanalyzer-module.html deleted file mode 100644 index 9dc0b8ec..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.mixedphaseanalyzer-module.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - srrietveld.mixedphaseanalyzer - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module mixedphaseanalyzer - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module mixedphaseanalyzer

      source code

      -
      -
      -Figure out the starting value of the scale factor of
      -    a mixed-phase structure model to a particular pattern
      -
      -Idea:
      -1. with background properly subtracted (not necessary to be precise), 
      -    the peak intensities can be easily compared
      -2. the strongest peaks should be used to figure out the proper scale factor
      -    for each phase
      -3. interactively run each single phase model and compare to the diffraction
      -    data
      -4. interactively run the mixed-phase model and compare to the diffraction
      -    data
      -5. output the pcr file
      -
      -


      - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      searchPeaks(patterndata, - numpeak)
      - flag the peaks in a pattern data
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: mixedphaseanalyzer.py 2792 2009-03-02 15:56:43Z... -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: mixedphaseanalyzer.py 2792 2009-03-02 15:56:43Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.mixedphaseanalyzer-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.mixedphaseanalyzer-pysrc.html deleted file mode 100644 index 532d6f51..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.mixedphaseanalyzer-pysrc.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - srrietveld.mixedphaseanalyzer - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module mixedphaseanalyzer - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.mixedphaseanalyzer

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2008 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Wenduo Zhou 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14   
      -15  """ 
      -16  Figure out the starting value of the scale factor of 
      -17      a mixed-phase structure model to a particular pattern 
      -18   
      -19  Idea: 
      -20  1. with background properly subtracted (not necessary to be precise),  
      -21      the peak intensities can be easily compared 
      -22  2. the strongest peaks should be used to figure out the proper scale factor 
      -23      for each phase 
      -24  3. interactively run each single phase model and compare to the diffraction 
      -25      data 
      -26  4. interactively run the mixed-phase model and compare to the diffraction 
      -27      data 
      -28  5. output the pcr file 
      -29  """ 
      -30  __id__ = "$Id: mixedphaseanalyzer.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      -31   
      -32   
      -
      33 -def searchPeaks(patterndata, numpeak): -
      34 """ -35 flag the peaks in a pattern data -36 """ -37 raise NotImplementedError("To Be Developed") -
      38 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.modelrw-module.html b/static_root/doc/srrietveld/developers/srrietveld.modelrw-module.html deleted file mode 100644 index 9dde91de..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.modelrw-module.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - srrietveld.modelrw - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module modelrw - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module modelrw

      source code

      -
      -
      -Structure model reader and writer (import/export)
      -model can be imported from/exported to 
      -1. CIF
      -2. PCR file
      -3. ... ..
      -
      -Created On  2008/05/12
      -
      -


      - - - - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - ModelRW
      - base class for model read/write -
      -   - - CifRW
      - extended class for importing/exporting CIF file -
      - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      importCIF(ciffname)
      - import a CIF file and export the model information...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: modelrw.py 2792 2009-03-02 15:56:43Z wdzhou $' -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      importCIF(ciffname) -

      -
      source code  -
      - -
      -
      -import a CIF file and export the model information
      -
      -Argument
      -ciffname    :   string, CIF file name
      -
      -Return  :   3-tuple
      -            (lattice instance, string for spacegroup, list of dictionary for atoms information)
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.modelrw-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.modelrw-pysrc.html deleted file mode 100644 index ca29240d..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.modelrw-pysrc.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - srrietveld.modelrw - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module modelrw - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.modelrw

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2008 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Wenduo Zhou 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14  """ 
      -15   Structure model reader and writer (import/export) 
      -16   model can be imported from/exported to  
      -17   1. CIF 
      -18   2. PCR file 
      -19   3. ... .. 
      -20    
      -21   Created On  2008/05/12 
      -22  """ 
      -23  __id__ = "$Id: modelrw.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      -24   
      -25  import midscript as MS 
      -26   
      -
      27 -class ModelRW: -
      28 """ -29 base class for model read/write -30 """ -
      31 - def __init__(self, filename): -
      32 """ -33 initialization -34 """ -35 raise NotImplementedError("To be implemented") -36 -37 if not validFile(filename): -38 raise InputError(errmsg) -39 -40 self._filename = filename -41 -42 return -
      43 -44 -
      45 - def exportModel(self): -
      46 """ -47 parse the file and export the model -48 -49 Arguments: -50 -51 Return : list of Phase instance -52 """ -53 if self.__class__.__name__ == "ModelRW": -54 errmsg = "exportModel is Virtual to class %-10s"% (self.__class__.__name__) -55 raise NotImplementedError(errmsg) -56 -57 return -
      58 -59 -
      60 -class CifRW(ModelRW): -
      61 """ -62 extended class for importing/exporting CIF file -63 """ -
      64 - def __init__(self): -
      65 """ -66 initialization -67 """ -68 ModelRW.__init__(self) -69 -70 return -
      71 -72 -73 # external static functions -74 -
      75 -def importCIF(ciffname): -
      76 """ -77 import a CIF file and export the model information -78 -79 Argument -80 ciffname : string, CIF file name -81 -82 Return : 3-tuple -83 (lattice instance, string for spacegroup, list of dictionary for atoms information) -84 """ -85 rtuple = CifRW().importModel(ciffname) -86 -87 return rtuple -
      88 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.modelrw.CifRW-class.html b/static_root/doc/srrietveld/developers/srrietveld.modelrw.CifRW-class.html deleted file mode 100644 index 039c869b..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.modelrw.CifRW-class.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - srrietveld.modelrw.CifRW - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module modelrw :: - Class CifRW - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CifRW

      source code

      -
      -ModelRW --+
      -          |
      -         CifRW
      -
      - -
      -extended class for importing/exporting CIF file

      - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
          Inherited from ModelRW
      -   - - - - - - -
      exportModel(self)
      - parse the file and export the model
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self) -
      (Constructor) -

      -
      source code  -
      - - initialization -
      -
      Overrides: - ModelRW.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.modelrw.ModelRW-class.html b/static_root/doc/srrietveld/developers/srrietveld.modelrw.ModelRW-class.html deleted file mode 100644 index 019afd49..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.modelrw.ModelRW-class.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - srrietveld.modelrw.ModelRW - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module modelrw :: - Class ModelRW - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ModelRW

      source code

      -
      Known Subclasses:
      -
      - CifRW -
      - -
      -base class for model read/write

      - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - filename)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      exportModel(self)
      - parse the file and export the model
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      exportModel(self) -

      -
      source code  -
      - -

      parse the file and export the model

      -

      Arguments:

      - Return : list of Phase instance -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.monitormem-module.html b/static_root/doc/srrietveld/developers/srrietveld.monitormem-module.html deleted file mode 100644 index 35d57620..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.monitormem-module.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - srrietveld.monitormem - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module monitormem - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module monitormem

      source code

      - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - MemoryMonitor
      - Utility class to monitor memory -
      - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      garbageCheck(suddenstop=True)
      - Check Garbage...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: monitormem.py 2792 2009-03-02 15:56:43Z wdzhou $' -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      garbageCheck(suddenstop=True) -

      -
      source code  -
      - -
      -
      -Check Garbage
      -
      -Exit execution if a garbage is not empty as intended
      -
      -Argument:
      -- suddenstop    :   Boolean, 
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.monitormem-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.monitormem-pysrc.html deleted file mode 100644 index e5fc1887..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.monitormem-pysrc.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - srrietveld.monitormem - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module monitormem - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.monitormem

      -
      -  1  #!/usr/bin/python 
      -  2  ############################################################################## 
      -  3  # 
      -  4  # diffpy.srrietveld by DANSE Diffraction group 
      -  5  #                   Simon J. L. Billinge 
      -  6  #                   (c) 2008 Trustees of the Columbia University 
      -  7  #                   in the City of New York.  All rights reserved. 
      -  8  # 
      -  9  # File coded by:    Wenduo Zhou 
      - 10  # 
      - 11  # See AUTHORS.txt for a list of people who contributed. 
      - 12  # See LICENSE.txt for license information. 
      - 13  # 
      - 14  ############################################################################## 
      - 15   
      - 16  __id__ = "$Id: monitormem.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      - 17   
      - 18  import subprocess 
      - 19   
      -
      20 -class MemoryMonitor(object): -
      21 """ - 22 Utility class to monitor memory - 23 """ - 24 refholder = [] - 25 initmem = 0.0 - 26 index = 0.0 - 27 logfilename = "memorylog.dat" - 28 -
      29 - def __init__(self, username=None): -
      30 """ - 31 Create new MemoryMonitor instance to view a user or current user - 32 - 33 Argument: - 34 - username : str/None - 35 - 36 Return : None - 37 """ - 38 # 1. Generate user name if necessary - 39 if username is None: - 40 import os - 41 output = os.popen4("whoami") - 42 username = output[1].readlines()[0].strip() - 43 for op in output: - 44 op.close() - 45 - 46 # 2. give user name - 47 self.username = username - 48 - 49 return -
      50 - 51 -
      52 - def usage(self): -
      53 """ - 54 Return int containing memory used by user's processes. - 55 """ - 56 self.process = subprocess.Popen("ps -u %s -o rss | awk '{sum+=$1} END {print sum}'" % self.username, - 57 shell=True, - 58 stdout=subprocess.PIPE, - 59 ) - 60 self.stdout_list = self.process.communicate()[0].split('\n') - 61 - 62 memusage = int(self.stdout_list[0]) - 63 - 64 return memusage -
      65 - 66 -
      67 - def reset(self): -
      68 """ - 69 Reset the class variables - 70 """ - 71 MemoryMonitor.refholder[:] = [] - 72 MemoryMonitor.initmem = self.usage() - 73 MemoryMonitor.index = 0.0 - 74 - 75 msg = "%-5s %-20s %-20s\n"% (0, MemoryMonitor.initmem, 0.0) - 76 lfile = open(MemoryMonitor.logfilename, "w") - 77 lfile.write(msg) - 78 lfile.close() - 79 - 80 return -
      81 - 82 -
      83 - def report(self): -
      84 """ - 85 report result - 86 """ - 87 self.record(MemoryMonitor.index+0.05) - 88 - 89 msgout = "" - 90 for ref in MemoryMonitor.refholder: - 91 msgout += "%r\n"% (ref) - 92 print msgout - 93 print - 94 - 95 import gc - 96 gc.collect() - 97 print "In garbage item number = %-5s\n"% (len(gc.garbage)) - 98 for g in gc.garbage: - 99 print "%-5s %r"% (index, g) -100 index += 1 -101 -102 import diffpy.pyfullprof.core.fit as CF -103 refdict = CF.Fit.__refsbase__ -104 for key in sorted(refdict.keys()): -105 print "%-5s %r"% (key, refdict[key]) -106 -107 return -
      108 -109 -
      110 - def record(self, index): -
      111 """ -112 Record the current memory -113 """ -114 if index <= MemoryMonitor.index: -115 MemoryMonitor.index += 1.0 -116 else: -117 MemoryMonitor.index = index -118 -119 memusage = self.usage() -120 msg = "%-5s %-20s %-20s\n"% (MemoryMonitor.index, memusage, memusage-MemoryMonitor.initmem) -121 lfile = open(MemoryMonitor.logfilename, "a") -122 lfile.write(msg) -123 lfile.close() -124 -125 return -
      126 -127 -
      128 - def register(self, objref): -
      129 """ -130 Register a reference -131 """ -132 import weakref -133 -134 MemoryMonitor.refholder.append( weakref.ref(objref) ) -135 -136 print "Register %r"% (MemoryMonitor.refholder[-1]) -137 -138 return -
      139 -140 # END-CLASS-DEF -141 -142 -
      143 -def garbageCheck(suddenstop=True): -
      144 """ -145 Check Garbage -146 -147 Exit execution if a garbage is not empty as intended -148 -149 Argument: -150 - suddenstop : Boolean, -151 -152 Return : None -153 """ -154 import gc -155 gc.collect() -156 -157 # 1. Message -158 msg = "Items In Garbage Collector = %-10s"% (len(gc.garbage)) -159 if len(gc.garbage) != 0: -160 index = 0 -161 for g in gc.garbage: -162 msg += "%-5s %r\n"% (index, g) -163 index += 1 -164 msg += "---------------- Over --------------------" -165 # END-IF -166 print msg -167 -168 # 2. Deal with garbage -169 if len(gc.garbage) != 0: -170 if suddenstop is True: -171 # A Raise Error -172 errmsg = "Garbage Collector Is Not Empty" -173 raise NotImplementedError(errmg) -174 else: -175 # B Clear -176 for g in gc.garbage: -177 g.__dict__.clear() -178 gc.garbage[:] = [] -179 # END-IF -180 -181 if 0: -182 # FIXME Not used these functionality now -183 import diffpy.pyfullprof.Fit as PF -184 import diffpy.pyfullprof.core.fit as CF -185 -186 msg = "" -187 -188 msg += "\n" -189 refdict = PF.Fit.__refsbase__ -190 for key in sorted(refdict.keys()): -191 msg += "%-5s %r\n"% (key, refdict[key]) -192 -193 msg += "\n" -194 refdict = CF.Fit.__refsbase__ -195 for key in sorted(refdict.keys()): -196 msg += "%-5s %r\n"% (key, refdict[key]) -197 -198 msg += "\n" -199 print msg -200 -201 return -
      202 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.monitormem.MemoryMonitor-class.html b/static_root/doc/srrietveld/developers/srrietveld.monitormem.MemoryMonitor-class.html deleted file mode 100644 index c228db36..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.monitormem.MemoryMonitor-class.html +++ /dev/null @@ -1,375 +0,0 @@ - - - - - srrietveld.monitormem.MemoryMonitor - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module monitormem :: - Class MemoryMonitor - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class MemoryMonitor

      source code

      -
      -object --+
      -         |
      -        MemoryMonitor
      -
      - -
      -Utility class to monitor memory

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - username=None)
      - Create new MemoryMonitor instance to view a user or current user...
      - source code - -
      - -
      -   - - - - - - -
      usage(self)
      - Return int containing memory used by user's processes.
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the class variables
      - source code - -
      - -
      -   - - - - - - -
      report(self)
      - report result
      - source code - -
      - -
      -   - - - - - - -
      record(self, - index)
      - Record the current memory
      - source code - -
      - -
      -   - - - - - - -
      register(self, - objref)
      - Register a reference
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __str__ -

      -
      - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - refholder = [] -
      -   - - initmem = 0.0 -
      -   - - index = 0.0 -
      -   - - logfilename = 'memorylog.dat' -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - username=None) -
      (Constructor) -

      -
      source code  -
      - -
      -
      -Create new MemoryMonitor instance to view a user or current user
      -
      -Argument:
      -- username  :   str/None
      -
      -Return      :   None
      -
      -
      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.parallelrefinecontrol-module.html b/static_root/doc/srrietveld/developers/srrietveld.parallelrefinecontrol-module.html deleted file mode 100644 index 6fc46721..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.parallelrefinecontrol-module.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - srrietveld.parallelrefinecontrol - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module parallelrefinecontrol - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module parallelrefinecontrol

      source code

      -Refine a list of

      - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - ParallelRefinementControl
      - Controllng class for refining many dataset in parallel -
      - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: parallelrefinecontrol.py 2921 2009-03-20 15:43:... -
      -   - - _SCREENOUTPUT = True -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: parallelrefinecontrol.py 2921 2009-03-20 15:43:13Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.parallelrefinecontrol-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.parallelrefinecontrol-pysrc.html deleted file mode 100644 index 7822e6f5..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.parallelrefinecontrol-pysrc.html +++ /dev/null @@ -1,415 +0,0 @@ - - - - - srrietveld.parallelrefinecontrol - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module parallelrefinecontrol - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.parallelrefinecontrol

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ 
      - 16  Refine a list of  
      - 17  """ 
      - 18   
      - 19  __id__ = "$Id: parallelrefinecontrol.py 2921 2009-03-20 15:43:13Z wdzhou $" 
      - 20   
      - 21  # FIXME - ParallelRefinementControl can be inherited from some base class with  
      - 22  #         SequentialRefineCntrol 
      - 23   
      - 24  _SCREENOUTPUT = True 
      - 25   
      -
      27 """ Controllng class for refining many dataset in parallel - 28 """ -
      29 - def __init__(self, instrument, datafilestructure, environparname, - 30 bkgdinfodict = None): -
      31 """ Initialization - 32 - 33 Argument - 34 - instrument : Instrument - 35 - datafilestructure : dictionary: key = data file name; value = (Crystal structure, value) - 36 - environparname : str - 37 - bkgdinfodict : dict - 38 - 39 Return : None - 40 """ - 41 import copy - 42 - 43 self._myInstrument = instrument - 44 self._datafilestructure = copy.copy(datafilestructure) - 45 self._bkgdinfodict = bkgdinfodict - 46 self._environparname = environparname - 47 self._myRefineStrategy = None - 48 self._savedirectory = None - 49 - 50 self._fitsPool = {} - 51 self._savedfilePool = {} - 52 - 53 return -
      54 - 55 -
      56 - def setRefineStrategy(self, refstr): -
      57 """ Set refinement strategy - 58 - 59 Arguments: - 60 - refstr : RefineStrategy instance or None - 61 - 62 Return : None - 63 """ - 64 self._myRefineStrategy = refstr - 65 - 66 return -
      67 - 68 -
      69 - def refine(self): -
      70 """ Refine all data files in parallel - 71 - 72 Return : None - 73 """ - 74 import copy - 75 import os - 76 import refinestrategy as RS - 77 import refinemanager as RM - 78 import midscript as MS - 79 import phasescript as PU - 80 import diffpy.pyfullprof.Fit as FPF - 81 - 82 # 1. prepare and set intermittent output - 83 processid = RM.getProcessID() - 84 self.directory = "seq"+processid - 85 os.mkdir(self.directory) - 86 os.mkdir(self.directory+"/FP") - 87 os.mkdir(self.directory+"/Proj") - 88 - 89 # 2. refine - 90 for datafilename in sorted( self._datafilestructure.keys() ): - 91 - 92 # 2.1 unpack - 93 thisstructure, thisenvparval = self._datafilestructure[datafilename] - 94 - 95 # 2.2 generate a Fit instance - 96 # FIXME - Only support single experiment sequential fitting - 97 expmeasurelist = [] - 98 measurementslist = self._myInstrument.genMeasurement(datafilename) - 99 expmeasurelist.append( measurementslist ) -100 -101 # Set background if available -102 if len(measurementslist) == 1 and self._bkgdinfodict is not None: -103 measurementslist[0].setBackground(self._bkgdinfodict["Type"], -104 self._bkgdinfodict) -105 else: -106 if len(measurementslist) > 1: -107 errmsg = "# of Measurements = %-5s. Cannot Handle Now" % \ -108 (len(measurementslist)) -109 raise NotImplementedError, errmsg -110 # END-IF -111 # END-IF-ELSE -112 -113 curFit = MS.genFit(self._myInstrument, [thisstructure], expmeasurelist) -114 -115 # 2.3 Set up RefineManager and Refinement Strategy -116 myrefinemanager = RM.MultiStepRefineManager(curFit) -117 if self._myRefineStrategy is None: -118 # using default refine strategy -119 self._myRefineStrategy = RS.RefineStrategy() -120 raise NotImplementedError("Contact developer to deal with this situation") -121 -122 # 2.4 Refine and update current-Fit -123 refinedetail, processid = myrefinemanager.refine(self._myRefineStrategy) -124 -125 # 2.5 Save refinement result for this step -126 # 2.5.1 Export phases parameters -127 # FIXME - Assume that all patterns have the same phases -128 component = curFit.getComponent(0) -129 numphases = component.getNumPhases() -130 phasedictlist = [] -131 for pindex in xrange(numphases): -132 phase = component.getPhase(pindex) -133 phasedict = PU.genPhaseDict(phase) -134 phasedictlist.append(phasedict) -135 -136 # 2.5.2 Save refinement manager to (1) project file (2) engine file (e.g., pcr, exp) -137 refinefilename = "refine"+str(thisenvparval)+".proj" -138 myrefinemanager.save(refinefilename) -139 -140 enginefilename = "" -141 if isinstance(curFit, FPF.Fit): -142 enginefilename = "refine" + str(thisenvparval) + ".pcr" -143 curFit.saveToEngineFile(enginefilename) -144 -145 # 2.5.3 Save into Fits Pool: save the Fit instance -146 refinehistory = myrefinemanager.getHistory() -147 -148 self._fitsPool[thisenvparval] = (curFit, refinedetail, refinehistory, phasedictlist) -149 self._savedfilePool[thisenvparval] = (refinefilename, enginefilename) -150 -151 # 2.5.4 Remove data from saved Fit -152 rietnum = curFit.getNumComponents() -153 for cindex in xrange(rietnum): -154 component = curFit.getComponent(cindex) -155 pattern = component.getPattern() -156 pattern.unloadData() -157 -158 # 2.5.5 Update the loop variables -159 prevfit = curFit -160 myrefinemanager = None -161 -162 # 2.6 move directory to respository -163 cmd = "mv %-20s %-20s"% (processid, self.directory) -164 os.system(cmd) -165 cmd = "mv %-20s %-20s"% (refinefilename, self.directory+"/Proj") -166 os.system(cmd) -167 if isinstance(curFit, FPF.Fit): -168 cmd = "mv %-20s %-20s"% (enginefilename, self.directory+"/FP") -169 os.system(cmd) -170 -171 # 2.7 Optional Output -172 if _SCREENOUTPUT is True: -173 print "\n********************* Sequential Refine Summary ******************************" -174 print "%-15s %-60s"% (thisenvparval, refinedetail) -175 print "***********************************************************************************\n" -176 -177 # LOOP-OVER: for tup in self._dataSetTupList -178 -179 return -
      180 -181 # END-DEF refine(self, savefname="tempseq.proj") -182 -183 -
      184 - def save(self, savefilename): -
      185 """ Save self to a pickle file -186 -187 Arguement -188 - savefilename : str -189 -190 Return : None -191 """ -192 # FIXME - It is exactly the same as sequentialrefinecntrol.save() -193 import pickle -194 import xmlgenerator as XMLG -195 import os -196 -197 # 1. Process names and generate the result directory -198 savedirname = savefilename.split(".")[0].strip() -199 savexmlname = savedirname+".xml" -200 try: -201 os.mkdir(savedirname) -202 except OSError, err: -203 pass -204 -205 # 2. Pickel save -206 # FIXME It will be removed later ... -207 if savefilename is None: -208 savefilename = str(self._processid) -209 elif not isinstance(savefilename, str): -210 errmsg = "Input File Name %-20s Is Not String"% (savefilename) -211 raise FitConfigurationError(savefilename) -212 -213 pfile = open(savefilename, "w") -214 pickle.dump(self, pfile) -215 pfile.close() -216 -217 # 3. XML save -218 xmldict = {} -219 for parval in sorted(self._fitsPool.keys()): -220 curFit, refinedetail, refinehistory, phasedictlist = self._fitsPool[parval] -221 xmldict[parval] = {} -222 xmldict[parval]["Structure"] = phasedictlist -223 xmldict[parval]["RefineInfo"] = refinedetail.toDict() -224 -225 xmldict[parval]["SavedFile"] = {} -226 xmldict[parval]["SavedFile"]["Proj"] = self._savedfilePool[parval][0] -227 xmldict[parval]["SavedFile"]["FP"] = self._savedfilePool[parval][1] -228 # LOOP-OVER -229 -230 seqxmlgen = XMLG.SeqFitRecordXMLGenerator(xmldict) -231 seqxmlgen.exportXML(savexmlname) -232 -233 cmd = "mv %-10s %-10s"% (savexmlname, savedirname) -234 os.system(cmd) -235 -236 # 4. Directory save -237 -238 if self.directory is not None: -239 cmd = "mv %-15s %-15s"% (self.directory+"/FP", savedirname) -240 os.system(cmd) -241 -242 cmd = "mv %-15s %-15s"% (self.directory+"/Proj", savedirname) -243 os.system(cmd) -244 # END-IF -245 -246 return -
      247 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.parallelrefinecontrol.ParallelRefinementControl-class.html b/static_root/doc/srrietveld/developers/srrietveld.parallelrefinecontrol.ParallelRefinementControl-class.html deleted file mode 100644 index 38b914d1..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.parallelrefinecontrol.ParallelRefinementControl-class.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - srrietveld.parallelrefinecontrol.ParallelRefinementControl - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module parallelrefinecontrol :: - Class ParallelRefinementControl - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ParallelRefinementControl

      source code

      -Controllng class for refining many dataset in parallel

      - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - instrument, - datafilestructure, - environparname, - bkgdinfodict=None)
      - Initialization...
      - source code - -
      - -
      -   - - - - - - -
      setRefineStrategy(self, - refstr)
      - Set refinement strategy...
      - source code - -
      - -
      -   - - - - - - -
      refine(self)
      - Refine all data files in parallel
      - source code - -
      - -
      -   - - - - - - -
      save(self, - savefilename)
      - Save self to a pickle file...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - instrument, - datafilestructure, - environparname, - bkgdinfodict=None) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization
      -
      -Argument
      -- instrument        :   Instrument
      -- datafilestructure :   dictionary: key = data file name; value = (Crystal structure, value)
      -- environparname    :   str
      -- bkgdinfodict      :   dict
      -
      -Return              :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setRefineStrategy(self, - refstr) -

      -
      source code  -
      - -
      -Set refinement strategy
      -
      -Arguments:
      -- refstr    :   RefineStrategy instance or None
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      refine(self) -

      -
      source code  -
      - -

      Refine all data files in parallel

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      save(self, - savefilename) -

      -
      source code  -
      - -
      -Save self to a pickle file
      -
      -Arguement
      -- savefilename  :   str
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.phasescript-module.html b/static_root/doc/srrietveld/developers/srrietveld.phasescript-module.html deleted file mode 100644 index 19724493..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.phasescript-module.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - srrietveld.phasescript - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module phasescript - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module phasescript

      source code

      -
      -
      -Script for dealing with structure phase
      -
      -Utility methods include:
      --  genPhaseDict(phase)
      -
      -


      - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      getTuple(rietobj, - parname)
      - Get the value and uncertainty of a parameter in a Rietveld object...
      - source code - -
      - -
      -   - - - - - - -
      genPhaseDict(phase)
      - Generate a standard Phase-Info-Dictionary...
      - source code - -
      - -
      -   - - - - - - -
      genPhaseCIF(ciffilename='')
      - generate the branch for CIF file
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: phasescript.py 2792 2009-03-02 15:56:43Z wdzhou $' -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      getTuple(rietobj, - parname) -

      -
      source code  -
      - -
      -
      -Get the value and uncertainty of a parameter in a Rietveld object
      -
      -Argument:
      -- rietobj   :   Rietveld.Refinable object
      -- parname   :   str
      -
      -Return      :   (float, float) = (value, uncertainty)
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genPhaseDict(phase) -

      -
      source code  -
      - -
      -
      -Generate a standard Phase-Info-Dictionary
      -
      -Argument:
      -- phase     :   diffpy.rietveldapi.Phase
      -
      -Return      :   Dictionary
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.phasescript-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.phasescript-pysrc.html deleted file mode 100644 index 83bdf75f..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.phasescript-pysrc.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - srrietveld.phasescript - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module phasescript - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.phasescript

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15  Script for dealing with structure phase 
      - 16   
      - 17  Utility methods include: 
      - 18  -  genPhaseDict(phase) 
      - 19   
      - 20  """ 
      - 21  __id__ = "$Id: phasescript.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      - 22   
      - 23   
      -
      24 -def getTuple(rietobj, parname): -
      25 """ - 26 Get the value and uncertainty of a parameter in a Rietveld object - 27 - 28 Argument: - 29 - rietobj : Rietveld.Refinable object - 30 - parname : str - 31 - 32 Return : (float, float) = (value, uncertainty) - 33 """ - 34 parvalue = rietobj.getValue(parname) - 35 parsigma = rietobj.getUncertainty(parname) - 36 - 37 return (parvalue, parsigma) -
      38 - 39 -
      40 -def genPhaseDict(phase): -
      41 """ - 42 Generate a standard Phase-Info-Dictionary - 43 - 44 Argument: - 45 - phase : diffpy.rietveldapi.Phase - 46 - 47 Return : Dictionary - 48 """ - 49 # 1. Initialize Dictionary and Some Phase Information - 50 phaseinfodict = {} - 51 - 52 phaseinfodict["SpaceGroup"] = phase.getSpaceGroup() - 53 phaseinfodict["Type"] = "User" - 54 phaseinfodict["Name"] = phase.getName() - 55 - 56 # 2. Lattice - 57 lattice = phase.getLattice() - 58 for paramname in lattice.getRefinableParameters(): - 59 phaseinfodict[paramname] = getTuple(lattice, paramname) - 60 - 61 # 3. Atom - 62 phaseinfodict["ATOM"] = [] - 63 numatoms = phase.getNumAtoms() - 64 for aindex in xrange(numatoms): - 65 - 66 # 1. Initialize and Get Some Necessary Information - 67 atom = phase.getAtom(aindex) - 68 element = atom.getElement() - 69 tag = atom.getTag() - 70 adp = atom.getADP() - 71 - 72 # 2. Set Static Information - 73 atominfodict = {} - 74 atominfodict["Element"] = element - 75 atominfodict["Tag"] = tag - 76 - 77 # 3. Set Atom's Refinable - 78 for paramname in atom.getRefinableParameters(): - 79 atominfodict[paramname] = getTuple(atom, paramname) - 80 - 81 # 4. Set ADP's Refinable - 82 for paramname in adp.getRefinableParameters(): - 83 atominfodict[paramname] = getTuple(adp, paramname) - 84 - 85 phaseinfodict["ATOM"].append(atominfodict) - 86 - 87 # LOOP-OVER: for aindex in xrange(numatoms) - 88 - 89 return phaseinfodict -
      90 - 91 -
      92 -def genPhaseCIF(ciffilename = ""): -
      93 """ - 94 generate the branch for CIF file - 95 """ - 96 pha = self._rietxml.createElementNS("", "PHASE") - 97 - 98 pha.setAttributeNS("", "Type", "CIF") - 99 pha.setAttributeNS("", "CifFile", "structure1.cif") -100 -101 return pha -
      102 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.plot2d-module.html b/static_root/doc/srrietveld/developers/srrietveld.plot2d-module.html deleted file mode 100644 index 9000b4af..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.plot2d-module.html +++ /dev/null @@ -1,656 +0,0 @@ - - - - - srrietveld.plot2d - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module plot2d - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module plot2d

      source code

      -
      -plot2d.py is in charge of plotting some 2D graph with 
      -publication standard output
      -
      -created on 2007.09.27
      -
      -Main Client Method:
      -    plot2D(plotset, unitx, unity, infolist, colorlist, stylelist, marklist):
      -
      -        plot a 2D graph for one or a coule of lines on a same graph
      -
      -        Arguments:
      -        plotset         --  list of array, number of array = 2*line
      -                            [x1, y1, x2, y2, ...], where xi, yi are
      -                            lists containing the column data
      -        unitx           --  string, information/unit of x-axis
      -        unity           --  string, information/unit of y-axis
      -        infolist        --  list  , label of each line (y1, y2, ... )  
      -        colorlist       --  list  , string, color of each line (y1, y2, ... )
      -        sytlelist       --  list  , string, style of each line (y1, y2, ... )
      -        marklist        --  list  , string, mark  of each line (y1, y2, ... )
      -
      -        plotset :  Length = #Line * 2;
      -        infolist, colorlist, stylelist, marklist: Length = #Line * 2
      -
      -Classes Definition
      --  class PlotInfo2D
      -   *  __init__(self, listx, listy, color="black", style="solid", mark="none", label="")
      --  class Plot2D
      -   *  __init__(self, stringx = "", stringy = "", plotlist=[])
      -
      -


      - - - - - - - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - Plot2D
      - Class to handle plotting a 2D graph containing multiple lines... -
      -   - - PlotInfo2D
      - class PlotInfo2D contains the plot information for plotting a 2D figure... -
      -   - - PlotMatLib
      - Class PlotMatLib is dedicated to make plots by matplot lib... -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      plotFit(fit)
      - Plot the patterns in a fit.
      - source code - -
      - -
      -   - - - - - - -
      plotPattern(pat)
      - Plot a pattern.
      - source code - -
      - -
      -   - - - - - - -
      _plotPattern(pat)
      - Plot the observed and fit DiffractionPattern data.
      - source code - -
      - -
      -   - - - - - - -
      plotObservedPattern(pat)
      - Plot the observed DiffractionPattern data.
      - source code - -
      - -
      -   - - - - - - -
      plot2D(plotset, - unitx, - unity, - infolist, - colorlist, - stylelist, - marklist, - xlimtuple='auto', - ylimtuple='auto')
      - plot a 2D graph for one or a coule of lines on a same graph - -Arguments: -plotset -- list of array, number of array = 2*line - [x1, y1, x2, y2, ...], where xi, yi are - lists containing the column data -unitx -- string, information/unit of x-axis -unity -- string, information/unit of y-axis -infolist -- list , label of each line (y1, y2, ...
      - source code - -
      - -
      -   - - - - - - -
      _isFloat(f)
      - Test if an object is a float.
      - source code - -
      - -
      -   - - - - - - -
      _isFloatList(L)
      - Test if a list contains only floats.
      - source code - -
      - -
      -   - - - - - - -
      _isInt(f)
      - Test if an object is a int.
      - source code - -
      - -
      -   - - - - - - -
      _isIntList(L)
      - Test if a list contains only ints.
      - source code - -
      - -
      -   - - - - - - -
      _rebinArray(A, - xold, - xnew)
      - Rebin the an array by interpolating over the new x range.
      - source code - -
      - -
      -   - - - - - - -
      removeRegion(xs, - yslist, - excludedregion)
      - Remove a region (on x) from (xs, [y1s, y2s]) list pair...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: plot2d.py 2839 2009-03-10 21:36:23Z wdzhou $' -
      -   - - _offsetMultiplier = 1.5 -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      plotFit(fit) -

      -
      source code  -
      - -

      Plot the patterns in a fit.

      -

      It wraps method: plotPattern()

      -

      Argument: fit - An instance of Fit or a list of instances.

      - Return - None -
      -
      -
      -
      - -
      - -
      - - -
      -

      plotPattern(pat) -

      -
      source code  -
      - -
      -
      -Plot a pattern.
      -
      -pat     --  An instance of DiffractionPattern or a list of
      -            DiffractionPattern instances. If the fit has been performed,
      -            this will plot the data, fit and difference.  Otherwise, it will
      -            just plot the observed pattern.
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      _plotPattern(pat) -

      -
      source code  -
      - -
      -Plot the observed and fit DiffractionPattern data.
      -
      -pat     --  An instance of DiffractionPattern or a list of
      -            DiffractionPattern instances. If the fit has been performed,
      -            this will plot the data, fit and difference.  Otherwise, it will
      -            just plot the observed pattern.
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      plotObservedPattern(pat) -

      -
      source code  -
      - -
      -Plot the observed DiffractionPattern data.
      -
      -pat     --  An instance of DiffractionPattern or a list of
      -            DiffractionPattern instances.
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      plot2D(plotset, - unitx, - unity, - infolist, - colorlist, - stylelist, - marklist, - xlimtuple='auto', - ylimtuple='auto') -

      -
      source code  -
      - -
      -
      -plot a 2D graph for one or a coule of lines on a same graph
      -
      -Arguments:
      -plotset         --  list of array, number of array = 2*line
      -                    [x1, y1, x2, y2, ...], where xi, yi are
      -                    lists containing the column data
      -unitx           --  string, information/unit of x-axis
      -unity           --  string, information/unit of y-axis
      -infolist        --  list  , label of each line (y1, y2, ... )
      -colorlist       --  list  , string, color of each line (y1, y2, ... )
      -sytellist       --  list  , string, style of each line (y1, y2, ... )
      -marklist        --  list  , string, mark  of each line (y1, y2, ... )
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      _rebinArray(A, - xold, - xnew) -

      -
      source code  -
      - -

      Rebin the an array by interpolating over the new x range.

      -

      Arguments: A -- Array to interpolate xold -- Old sampling - array xnew -- New sampling array

      -

      This uses cubic spline interpolation.

      - Returns: A new array over the new sampling array. -
      -
      -
      -
      - -
      - -
      - - -
      -

      removeRegion(xs, - yslist, - excludedregion) -

      -
      source code  -
      - -
      -
      -Remove a region (on x) from (xs, [y1s, y2s]) list pair
      -
      -Argument:
      -- xs    :   list/array of float
      -- ys    :   list/array of float
      -- excludedregion    :   tuple (x, y)
      -
      -Return  :   2-tuple 
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.plot2d-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.plot2d-pysrc.html deleted file mode 100644 index 479e228f..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.plot2d-pysrc.html +++ /dev/null @@ -1,1055 +0,0 @@ - - - - - srrietveld.plot2d - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module plot2d - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.plot2d

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ plot2d.py is in charge of plotting some 2D graph with  
      - 16  publication standard output 
      - 17   
      - 18  created on 2007.09.27 
      - 19   
      - 20  Main Client Method: 
      - 21      plot2D(plotset, unitx, unity, infolist, colorlist, stylelist, marklist): 
      - 22   
      - 23          plot a 2D graph for one or a coule of lines on a same graph 
      - 24   
      - 25          Arguments: 
      - 26          plotset         --  list of array, number of array = 2*line 
      - 27                              [x1, y1, x2, y2, ...], where xi, yi are 
      - 28                              lists containing the column data 
      - 29          unitx           --  string, information/unit of x-axis 
      - 30          unity           --  string, information/unit of y-axis 
      - 31          infolist        --  list  , label of each line (y1, y2, ... )   
      - 32          colorlist       --  list  , string, color of each line (y1, y2, ... ) 
      - 33          sytlelist       --  list  , string, style of each line (y1, y2, ... ) 
      - 34          marklist        --  list  , string, mark  of each line (y1, y2, ... ) 
      - 35   
      - 36          plotset :  Length = #Line * 2; 
      - 37          infolist, colorlist, stylelist, marklist: Length = #Line * 2 
      - 38   
      - 39  Classes Definition 
      - 40  -  class PlotInfo2D 
      - 41     *  __init__(self, listx, listy, color="black", style="solid", mark="none", label="") 
      - 42  -  class Plot2D 
      - 43     *  __init__(self, stringx = "", stringy = "", plotlist=[]) 
      - 44  """ 
      - 45   
      - 46  __id__ = "$Id: plot2d.py 2839 2009-03-10 21:36:23Z wdzhou $" 
      - 47   
      - 48  from viserrors import VisualizationError 
      - 49  from diffpy.refinementapi.exceptiontools import verifyType, isIterable 
      - 50  import numpy 
      - 51   
      - 52  _offsetMultiplier = 1.5 
      - 53   
      - 54   
      -
      55 -def plotFit(fit): -
      56 """ - 57 Plot the patterns in a fit. - 58 - 59 It wraps method: plotPattern() - 60 - 61 Argument: - 62 fit - An instance of Fit or a list of instances. - 63 - 64 Return - None - 65 """ - 66 from diffpy.rietveldapi.fitutils import getAllPatterns - 67 if not isIterable(fit): - 68 fit = [fit] - 69 pats = [] - 70 for f in fit: - 71 pats.extend(getAllPatterns(f)) - 72 plotPattern(pats) - 73 - 74 return -
      75 - 76 -
      77 -def plotPattern(pat): -
      78 """ - 79 Plot a pattern. - 80 - 81 pat -- An instance of DiffractionPattern or a list of - 82 DiffractionPattern instances. If the fit has been performed, - 83 this will plot the data, fit and difference. Otherwise, it will - 84 just plot the observed pattern. - 85 """ - 86 import diffpy.rietveldapi.patterns as APIPattern - 87 if not isIterable(pat): - 88 pat = [pat] - 89 for p in pat: - 90 verifyType(p, APIPattern.DiffractionPattern) - 91 - 92 _plotPattern(pat) - 93 - 94 return -
      95 - 96 -
      97 -def _plotPattern(pat): -
      98 """Plot the observed and fit DiffractionPattern data. - 99 -100 pat -- An instance of DiffractionPattern or a list of -101 DiffractionPattern instances. If the fit has been performed, -102 this will plot the data, fit and difference. Otherwise, it will -103 just plot the observed pattern. -104 """ -105 import diffpy.rietveldapi.patterns as APIPattern -106 -107 if not isIterable(pat): -108 pat = [pat] -109 npat = len(pat) -110 -111 # Get the data organized. When multiple sets are plotted, the optimal offset -112 # is inferred and the data is scaled accordingly. -113 plotset = [] -114 Ymax = 0 -115 for p in pat: -116 Xcal, Ycal = p.getCalculatedPattern() -117 # Make sure Ycal is not all zero. If it is, then plot only the pattern -118 # and not the fit. -119 if not Ycal.any(): -120 _plotObservedPattern(pat) -121 return -122 -123 # Interpolate Yobs over Xcal -124 Xobs, Yobs = p.getObservedPattern() -125 Yobs = _rebinArray(Yobs, Xobs, Xcal) -126 Ydif = Yobs - Ycal -127 -128 # remove excluded region -129 excludedregions = p.getExcludedRegion() -130 xcal = Xcal[:] -131 ycal = Ycal[:] -132 ydif = Ydif[:] -133 -134 for excludedregion in excludedregions: -135 xcal, ylist = removeRegion(xcal, [ycal, ydif], excludedregion) -136 ycal = ylist[0] -137 ydif = ylist[1] -138 -139 if len(xcal) != len(ycal) or len(xcal) != len(ydif): -140 print len(xcal), len(ycal), len(ydif) -141 raise NotImplementedError("Here... not right!") -142 -143 # Reflections -144 reflectdicts = p.getReflections() -145 minydif = min(ydif) -146 yrefval = 1.5*min(ydif) -147 xreflist = [] -148 yreflist = [] -149 for reflectdict in reflectdicts: -150 for key in reflectdict.keys(): -151 xreflist.append(reflectdict[key][0]) -152 yreflist.append(yrefval) -153 xreflist = sorted(xreflist) -154 xref = numpy.array(xreflist) -155 yref = numpy.array(yreflist) -156 -157 # Get the maximum Y value for scaling purposes -158 Ymax = max(max(ycal), max(Yobs)) -159 -160 # Add the plots to a list -161 plotset.extend([Xcal, Yobs, xcal, ycal, xcal, ydif, xref, yref]) -162 # LOOP-OVER -163 -164 offset = 0 -165 diffOffset = 0 -166 # Place these in the same order as the legend -167 for i in range(npat-1,-1,-1): -168 -169 yobs = plotset[6*i+1] -170 ycal = plotset[6*i+3] -171 Ydif = plotset[6*i+5] -172 yref = plotset[6*i+7] -173 -174 # Scale the data -175 scale = Ymax/max(Yobs) -176 Yobs *= scale -177 Ycal *= scale -178 Ydif *= scale -179 yref *= scale -180 -181 preoffset = _offsetMultiplier*max(Yobs) -182 -183 # Offset the data -184 diffOffset = _offsetMultiplier*(max(Ydif)) -185 preoffset = _offsetMultiplier*max(Yobs) -186 Yobs += offset -187 Ycal += offset -188 Ydif += offset - diffOffset -189 yref += offset - diffOffset -190 -191 # Calculate the next offset -192 offset += preoffset + diffOffset -193 -194 # Set up the other attributes of the plot -195 infolist = [] -196 for p in pat: -197 if isinstance(p, APIPattern.CWPattern) is True: -198 infolist.append("I_obs (%s)"%p.getName().split(".")[0]) -199 infolist.append("I_cal (%s)"%p.getName().split(".")[0]) -200 infolist.append("I_diff (%s)"%p.getName().split(".")[0]) -201 infolist.append(" ") -202 else: -203 infolist.append("I_obs (Bank %s)"%p.getBankNumber()) -204 infolist.append("I_cal (Bank %s)"%p.getBankNumber()) -205 infolist.append("I_diff (Bank %s)"%p.getBankNumber()) -206 infolist.append(" ") -207 -208 xaxis = "%s (%s)"%(pat[0].getScatteringVariable(), pat[0].getUnits()) -209 yaxis = "Intensity (arb.)" -210 colorlist = ["black", "red", "green", "black"]*npat -211 stylelist = ["none", "solid", "solid", "none"]*npat -212 marklist = ["+", "none", "none", "|"]*npat -213 -214 plot2D(plotset, xaxis, yaxis, infolist, colorlist, stylelist, marklist) -215 -216 return -
      217 -218 -
      219 -def plotObservedPattern(pat): -
      220 """Plot the observed DiffractionPattern data. -221 -222 pat -- An instance of DiffractionPattern or a list of -223 DiffractionPattern instances. -224 """ -225 if not isIterable(pat): -226 pat = [pat] -227 -228 # Get the data organized. When multiple sets are plotted, a optimal offset -229 # is inferred and the data is scaled accordingly. -230 plotset = [] -231 Ymax = 0 -232 for p in pat: -233 -234 Xobs, Yobs = p.getObservedPattern() -235 -236 # Get the maximum Y value for scaling purposes -237 Ymax = max(Ymax, max(Yobs)) -238 -239 # Add the plots to a list -240 plotset.extend([Xcal, Yobs]) -241 -242 -243 offset = 0 -244 # Place these in the same order as the legend -245 for i in range(npat-1,-1,-1): -246 Yobs = plotset[2*i+1] -247 -248 # Scale the data -249 scale = Ymax/max(Yobs) -250 Yobs *= scale -251 -252 # Offset the data -253 Yobs += offset -254 -255 # Calculate the next offset -256 offset += _offsetMultiplier*max(Yobs) -257 -258 # Set up the other attributes of the plot -259 infolist = [] -260 for p in pat: -261 infolist.append("Iobs (%s)"%p.getName()) -262 -263 npat = len(pat) -264 xaxis = "%s (%s)"%(pat[0].getScatteringVariable(), pat[0].getUnits()) -265 yaxis = "Intensity (arb.)" -266 colorlist = ["black"]*npat -267 stylelist = ["none"]*npat -268 marklist = ["+"]*npat -269 -270 plot2D(plotset, xaxis, yaxis, infolist, colorlist, stylelist, marklist) -271 -272 return -
      273 -274 -
      275 -def plot2D(plotset, unitx, unity, infolist, colorlist, stylelist, marklist, -276 xlimtuple = "auto", ylimtuple = "auto"): -
      277 """ -278 plot a 2D graph for one or a coule of lines on a same graph -279 -280 Arguments: -281 plotset -- list of array, number of array = 2*line -282 [x1, y1, x2, y2, ...], where xi, yi are -283 lists containing the column data -284 unitx -- string, information/unit of x-axis -285 unity -- string, information/unit of y-axis -286 infolist -- list , label of each line (y1, y2, ... ) -287 colorlist -- list , string, color of each line (y1, y2, ... ) -288 sytellist -- list , string, style of each line (y1, y2, ... ) -289 marklist -- list , string, mark of each line (y1, y2, ... ) -290 """ -291 # 1. prepare -292 plotlist = [] -293 for index in xrange(0, len(infolist)): -294 infotuple = (plotset[2*index], plotset[2*index+1], colorlist[index], -295 stylelist[index], marklist[index], infolist[index]) -296 plotlist.append(infotuple) -297 # LOOP-OVER -298 -299 # 2. x and y limit -300 if xlimtuple is "auto": -301 xmax = max( plotset[0] ) -302 xmin = min( plotset[0] ) -303 for sindex in xrange( 1, len(plotset) ): -304 if sindex % 2 == 0: -305 # x-value array are numbered as even -306 if max( plotset[sindex] ) > xmax: -307 xmax = max( plotset[sindex] ) -308 if min( plotset[sindex] ) < xmin: -309 xmin = min( plotset[sindex] ) -310 # END-IF -311 # LOOP-OVER -312 xlimtuple = (xmin, xmax) -313 -314 elif len(xlimtuple) != 2: -315 xliumtuple = None -316 -317 else: -318 pass -319 -320 if ylimtuple is "auto": -321 ymax = max( plotset[1] ) -322 ymin = min( plotset[1] ) -323 for sindex in xrange( 2, len(plotset) ): -324 if sindex % 2 == 1: -325 # x-value array are numbered as even -326 if max( plotset[sindex] ) > ymax: -327 ymax = max( plotset[sindex] ) -328 if min( plotset[sindex] ) < ymin: -329 ymin = min( plotset[sindex] ) -330 # END-IF -331 # LOOP-OVER -332 -333 # Re-scale ymax/ymin -334 if ymax > 0: -335 ymax = ymax * 1.10 -336 else: -337 ymax = ymax / 1.10 -338 -339 if ymin > 0: -340 ymin = ymin / 1.10 -341 else: -342 ymin = ymin * 1.10 -343 -344 ylimtuple = (ymin * 1.10, ymax * 1.10) -345 -346 elif len(ylimtuple) != 2: -347 yliumtuple = None -348 -349 else: -350 pass -351 -352 # 3. plot -353 plot2dref = Plot2D(unitx, unity, plotlist) -354 plot2dref.plot(xlimtuple, ylimtuple) -355 -356 return -
      357 -358 -
      359 -class Plot2D(object): -
      360 """Class to handle plotting a 2D graph containing multiple lines -361 -362 Attributes: -363 - stringX -364 - stringY -365 - linelist[(list-x, list-y, color, line-style)] -366 """ -
      367 - def __init__(self, stringx = "", stringy = "", plotlist=[]): -
      368 """ -369 initialization with the option to set up x-axis, y-axis and several lines in the graph -370 -371 Argument: -372 - stringx : str, label of x-axis -373 - stringy : str, label of y-axis -374 - plotlist : list of 5-tuple: -375 (array-x, array-y, color, line-style, mark, legend-title) -376 each tuple is ONE LINE -377 -378 Return : None -379 """ -380 # 1. Check Input argument -381 if isinstance(stringx, str) and isinstance(stringy, str): -382 self.stringX = stringx -383 self.stringY = stringy -384 else: -385 raise VisualizationError("Axes labels must be strings") -386 -387 # 2. Check and append plotlist -388 self.linelist = [] -389 if isIterable(plotlist): -390 for listx, listy, color, linestyle, mark, legend in plotlist: -391 if not isIterable(listx): -392 raise VisualizationError("list-X is not iterable") -393 if not isIterable(listy): -394 raise VisualizationError("list-Y is not iterable") -395 plotinfo = PlotInfo2D(listx, listy, color=color, style=linestyle, mark=mark, label=legend) -396 self.linelist.append(plotinfo) -397 # LOOP-OVER -398 else: -399 raise VisualizationError("plotlist must be iterable") -400 # END-IF -401 -402 return -
      403 -404 -
      405 - def plot(self, limxtuple, limytuple): -
      406 """ Plotting -407 -408 Argument: -409 - limxtuple : 2-tuple or None to limit the range of X-axis -410 - limytuple 2-tuple of None to limit the range of Y-axis -411 -412 Return : None -413 """ -414 PlotMatLib.plot2D(self.linelist, self.stringX, self.stringY, limxtuple, limytuple) -415 -416 return -
      417 -418 -
      419 - def setLine(self, listx, listy, color="black", style="solid", mark="none", label = ""): -
      420 """ -421 set a new line with enough information -422 """ -423 plotinfo = PlotInfo2D(listx, listy, color, style, mark, label) -424 self.linelist.append(plotinfo) -425 -426 return -
      427 -428 -
      429 -class PlotInfo2D(object): -
      430 """ -431 class PlotInfo2D contains the plot information for plotting a 2D figure -432 It is not bounded to matplotlib tightly -433 -434 Attributes: -435 - listx -436 - listy -437 - color -438 - mark : mark style -439 - style : line style -440 - label : label for the legend -441 """ -442 -443 ColorList = ["black", "blue", "green", "yellow", "red", "cyan"] -444 LineStyleList = ["solid", "dash", "none"] -445 MarkStyleList = ["+", "circle", "dot", "square", "up triangle", "x", "|", "none"] -446 -
      447 - def __init__(self, listx, listy, color="black", style="solid", mark="none", label=""): -
      448 """ -449 initialization -450 -451 Argument: -452 - listx : list of float -453 - listy : list of float -454 - color : str -455 - style : str -456 - mark : str -457 - label : str -458 """ -459 # Initialize -460 self.label = label -461 self.setX(listx) -462 self.setY(listy) -463 self.setColor(color) -464 self.setLineStyle(style) -465 self.setMarkStyle(mark) -466 -467 # Check -468 if len(self.listx) != len(self.listy): -469 from warnings import warn -470 wmsg = "listx and listy length is not equal" -471 warn(wmsg) -472 -473 return -
      474 -475 -
      476 - def getX(self): -
      477 """ -478 get the x-coordinate list -479 """ -480 return self.listx -
      481 -482 -
      483 - def getY(self): -
      484 """ -485 get the y-coordinate list -486 """ -487 return self.listy -
      488 -489 -
      490 - def getColor(self): -
      491 """ -492 get the color -493 """ -494 return self.color -
      495 -496 -
      497 - def getLineStyle(self): -
      498 """ -499 get the line style -500 """ -501 return self.style -
      502 -503 -
      504 - def getMarkStyle(self): -
      505 """ -506 get the mark style -507 """ -508 return self.mark -
      509 -
      510 - def getLabel(self): -
      511 """Get the label for the legend.""" -512 return self.label -
      513 -
      514 - def setLabel(self, label): -
      515 """Set the label.""" -516 self.label = label -517 return -
      518 -
      519 - def setX(self, listx): -
      520 """ -521 set the x-coordinate of all data points -522 -523 listx: iterable of floats -524 """ -525 if _isFloatList(listx): -526 self.listx = list(listx) -527 else: -528 raise VisualizationError("Input must be an iterable of floats.") -529 return -
      530 -531 -
      532 - def setY(self, listy): -
      533 """ -534 set the x-coordinate of all data points -535 -536 listx: ListFloat -537 """ -538 if _isFloatList(listy): -539 self.listy = list(listy) -540 else: -541 raise VisualizationError("Input must be an iterable of floats.") -
      542 -543 -
      544 - def setColor(self, color="black"): -
      545 """ -546 set the color to system understandable color -547 """ -548 if isinstance(color,str) and color.lower() in PlotInfo2D.ColorList: -549 self.color = color.lower() -550 else: -551 from warnings import warn -552 wmsg = "color '%s' is not supported, using 'black'"%color -553 warn(wmsg) -554 self.color = "black" -555 -556 return -
      557 -558 -
      559 - def setLineStyle(self, style="solid"): -
      560 """ -561 set the color to system understandable color -562 """ -563 if isinstance(style, str) and style.lower() in PlotInfo2D.LineStyleList: -564 self.style = style.lower() -565 else: -566 from warnings import warn -567 wmsg = "line style '%s' is not supported, using 'solid'"%style -568 warn(wmsg) -569 self.style = "solid" -570 -571 return -
      572 -573 -
      574 - def setMarkStyle(self, mark="none"): -
      575 """ -576 set the color to system understandable color -577 """ -578 if isinstance(mark, str) and mark.lower() in PlotInfo2D.MarkStyleList: -579 self.mark = mark.lower() -580 else: -581 from warnings import warn -582 wmsg = "Mark '%s' is not supported, using 'none'"%mark -583 warn(wmsg) -584 self.mark = "none" -585 -586 return -
      587 -588 -
      589 -class PlotMatLib(object): -
      590 """ -591 Class PlotMatLib is dedicated to make plots by matplot lib -592 Most of the methods in this class are class instance -593 -594 Attribute -595 - -596 """ -597 ColorTable = {"black":'k', "blue":"b", "green":"g", "red":"r", "cyan":'c', "yellow":'y'} -598 LineStyleTable = {"solid":"-", "dot":':', "dash":"--", "dash dot":'-.', "none":''} -599 MarkStyleTable = {"none":"", "+":"+", "circle":'o', "dot":',', "square":'s', "x":'x', "up triangle":'^', "|":'|'} -600 -
      601 - def __init__(self): -
      602 """ -603 Initialization -604 """ -605 return -
      606 -607 @staticmethod -
      608 - def plot2D(plotinfolist, labelx, labely, xlimtuple, ylimtuple): -
      609 """ -610 Plotting the 2D Figure by matplotlib using multiple threads -611 -612 -613 Argument: -614 - plotinfolist : list of PlotInfo2D instances -615 - labelx : str: label for X-axis -616 - labely : str: label for Y-axis -617 -618 Return : None -619 """ -620 from threading import Thread -621 import pylab -622 -623 class plotFigure(Thread): -624 """ -625 class PlotFigure is a multi-thread class to plot a figure -626 """ -627 -628 def __init__ (self, linelist, labelx, labely): -629 """ -630 initialization -631 -632 linelist: list of PlotInfo2D instances -633 xlabel : label for x-axis -634 ylabel : label for y-axis -635 """ -636 Thread.__init__(self) -637 -638 self.linelist = linelist -639 self.labelx = labelx -640 self.labely = labely -641 self.status = -1 -642 -643 return -
      644 -645 -646 def run(self): -647 """ -648 running plot -649 """ -650 # Show this and then turn off interactive -651 # configure all line (1) x list (2) y-list (3) line style -652 for info in self.linelist: -653 # construct information -654 xlist = info.getX() -655 ylist = info.getY() -656 color = PlotMatLib.ColorTable[info.getColor()] -657 linestyle = PlotMatLib.LineStyleTable[info.getLineStyle()] -658 markstyle = PlotMatLib.MarkStyleTable[info.getMarkStyle()] -659 matstyle = color+linestyle+markstyle -660 -661 raise NotImplementedError("1043") -662 if 1: -663 print "1043: matstyle = %-20s"% (matstyle) -664 -665 # plot to a line -666 line = pylab.plot(xlist, ylist, matstyle) -667 -668 # set up axis and title -669 pylab.xlabel(self.labelx) -670 pylab.ylabel(self.labely) -671 -672 raise NotImplementedError, "Not Used. More Debug" -673 -674 # set the position float digit and show -675 pylab.gca().format_coord = lambda x, y : 'x=%g, y=%g' % (x,y) -676 -677 # Draw the figure -678 pylab.show() -679 -680 return -
      681 -682 # END class plotFigure -683 -684 -685 def plotFigureSingleThread(plotinfolist, labelx, labely, xlimtuple = None, ylimtuple = None): -686 """ Using the single thread to do plotting -687 -688 Argument: -689 - plotinfolist : list of PlotInfo2D instances for plotting -690 - labelx : label for x-axis -691 - labely : label for y-axis -692 - xlimtuple : 2-tuple of float to limit the range of x-axis -693 - ylimtuple : 2-tuple of float to limit the rnage of y-axis -694 """ -695 for info in plotinfolist: -696 # construct information -697 xlist = info.getX() -698 ylist = info.getY() -699 label = info.getLabel() -700 color = PlotMatLib.ColorTable[info.getColor()] -701 linestyle = PlotMatLib.LineStyleTable[info.getLineStyle()] -702 markstyle = PlotMatLib.MarkStyleTable[info.getMarkStyle()] -703 matstyle = color+linestyle+markstyle -704 -705 # plot to a line -706 line = pylab.plot(xlist, ylist, matstyle, label=label) -707 -708 # set up axis and title -709 pylab.xlabel(labelx) -710 pylab.ylabel(labely) -711 pylab.legend(loc=1) -712 -713 # set the position float digit and show -714 pylab.gca().format_coord = lambda x, y : 'x=%g, y=%g' % (x,y) -715 -716 if xlimtuple is not None: -717 pylab.xlim( xlimtuple ) -718 if ylimtuple is not None: -719 pylab.ylim( ylimtuple ) -720 -721 # show -722 pylab.show() -723 -724 return -725 -726 # END-DEF plotFigureSingleThread(plotinfolist, labelx, labely): -727 -728 # Main Functions -729 # 1. Plot -730 current = plotFigureSingleThread(plotinfolist, labelx, labely, xlimtuple, ylimtuple) -731 -732 #current = plotFigure(plotinfolist, labelx, labely) -733 #current.start() -734 -735 return -736 -737 # END-DEF def plot2D(plotinfolist, labelx, labely): -738 -739 # END-CLASS-DEF Plot2D -740 -741 -
      742 -def _isFloat(f): -
      743 """Test if an object is a float.""" -744 try: -745 float(f) -746 return True -747 except ValueError: -748 return False -
      749 -750 -
      751 -def _isFloatList(L): -
      752 """Test if a list contains only floats.""" -753 return sum(map(_isFloat, L)) == len(L) -
      754 -755 -
      756 -def _isInt(f): -
      757 """Test if an object is a int.""" -758 return isinstance(f, int) -
      759 -760 -
      761 -def _isIntList(L): -
      762 """Test if a list contains only ints.""" -763 return sum(map(_isInt, L)) == len(L) -
      764 -765 -
      766 -def _rebinArray(A, xold, xnew): -
      767 """Rebin the an array by interpolating over the new x range. -768 -769 Arguments: -770 A -- Array to interpolate -771 xold -- Old sampling array -772 xnew -- New sampling array -773 -774 This uses cubic spline interpolation. -775 -776 Returns: A new array over the new sampling array. -777 """ -778 from scipy.interpolate import splrep, splev -779 finterp = splrep(xold, A, s=0) -780 return splev(xnew, finterp, der=0) -
      781 -782 -
      783 -def removeRegion(xs, yslist, excludedregion): -
      784 """ -785 Remove a region (on x) from (xs, [y1s, y2s]) list pair -786 -787 Argument: -788 - xs : list/array of float -789 - ys : list/array of float -790 - excludedregion : tuple (x, y) -791 -792 Return : 2-tuple -793 """ -794 import auxiliary as AX -795 -796 lowbound = excludedregion[0] -797 upbound = excludedregion[1] -798 -799 if lowbound >= upbound: -800 errmsg = "Region given is in wrong order (%-10s %-10s)"% \ -801 (lowbound, upbound) -802 raise NotImplementedError(errmsg) -803 # END-IF -804 -805 lowindex = AX.getValueIndex(xs, lowbound) -806 upindex = AX.getValueIndex(xs, upbound) -807 -808 newxs = numpy.concatenate( (xs[0:lowindex], xs[upindex:len(xs)]) ) -809 newyslist = [] -810 for ys in yslist: -811 newys = numpy.concatenate( (ys[0:lowindex], ys[upindex:len(xs)]) ) -812 newyslist.append(newys) -813 -814 return ( (newxs, newyslist) ) -
      815 -816 -817 if __name__ == "__main__": -818 # Simple tests -819 -820 P = PlotInfo2D([],[]) -821 P.setColor("allka") -822 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.plot2d.Plot2D-class.html b/static_root/doc/srrietveld/developers/srrietveld.plot2d.Plot2D-class.html deleted file mode 100644 index e8717512..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.plot2d.Plot2D-class.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - srrietveld.plot2d.Plot2D - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module plot2d :: - Class Plot2D - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class Plot2D

      source code

      -
      -object --+
      -         |
      -        Plot2D
      -
      - -
      -
      -Class to handle plotting a 2D graph containing multiple lines
      -
      -Attributes:
      -- stringX
      -- stringY
      -- linelist[(list-x, list-y, color, line-style)]
      -
      -


      - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - stringx='', - stringy='', - plotlist=[])
      - initialization with the option to set up x-axis, y-axis and several lines in the graph...
      - source code - -
      - -
      -   - - - - - - -
      plot(self, - limxtuple, - limytuple)
      - Plotting...
      - source code - -
      - -
      -   - - - - - - -
      setLine(self, - listx, - listy, - color='black', - style='solid', - mark='none', - label='')
      - set a new line with enough information
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __str__ -

      -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - stringx='', - stringy='', - plotlist=[]) -
      (Constructor) -

      -
      source code  -
      - -
      -
      -initialization with the option to set up x-axis, y-axis and several lines in the graph
      -
      -Argument:
      -- stringx   :   str, label of x-axis
      -- stringy   :   str, label of y-axis
      -- plotlist  :   list of 5-tuple: 
      -                (array-x, array-y, color, line-style, mark, legend-title)
      -                each tuple is ONE LINE
      -
      -Return      :   None
      -
      -
      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      plot(self, - limxtuple, - limytuple) -

      -
      source code  -
      - -
      -Plotting
      -
      -Argument:
      -- limxtuple :   2-tuple or None to limit the range of X-axis
      -- limytuple     2-tuple of None to limit the range of Y-axis
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.plot2d.PlotInfo2D-class.html b/static_root/doc/srrietveld/developers/srrietveld.plot2d.PlotInfo2D-class.html deleted file mode 100644 index 90fee88c..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.plot2d.PlotInfo2D-class.html +++ /dev/null @@ -1,596 +0,0 @@ - - - - - srrietveld.plot2d.PlotInfo2D - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module plot2d :: - Class PlotInfo2D - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class PlotInfo2D

      source code

      -
      -object --+
      -         |
      -        PlotInfo2D
      -
      - -
      -
      -
      -class PlotInfo2D contains the plot information for plotting a 2D figure
      -It is not bounded to matplotlib tightly
      -
      -Attributes:
      -- listx
      -- listy
      -- color
      -- mark   : mark style
      -- style  : line style
      -- label  : label for the legend
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - listx, - listy, - color='black', - style='solid', - mark='none', - label='')
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getX(self)
      - get the x-coordinate list
      - source code - -
      - -
      -   - - - - - - -
      getY(self)
      - get the y-coordinate list
      - source code - -
      - -
      -   - - - - - - -
      getColor(self)
      - get the color
      - source code - -
      - -
      -   - - - - - - -
      getLineStyle(self)
      - get the line style
      - source code - -
      - -
      -   - - - - - - -
      getMarkStyle(self)
      - get the mark style
      - source code - -
      - -
      -   - - - - - - -
      getLabel(self)
      - Get the label for the legend.
      - source code - -
      - -
      -   - - - - - - -
      setLabel(self, - label)
      - Set the label.
      - source code - -
      - -
      -   - - - - - - -
      setX(self, - listx)
      - set the x-coordinate of all data points
      - source code - -
      - -
      -   - - - - - - -
      setY(self, - listy)
      - set the x-coordinate of all data points
      - source code - -
      - -
      -   - - - - - - -
      setColor(self, - color='black')
      - set the color to system understandable color
      - source code - -
      - -
      -   - - - - - - -
      setLineStyle(self, - style='solid')
      - set the color to system understandable color
      - source code - -
      - -
      -   - - - - - - -
      setMarkStyle(self, - mark='none')
      - set the color to system understandable color
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __str__ -

      -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - ColorList = ['black', 'blue', 'green', 'yellow', 'red', 'cyan'] -
      -   - - LineStyleList = ['solid', 'dash', 'none'] -
      -   - - MarkStyleList = ['+', 'circle', 'dot', 'square', 'up triangle'... -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - listx, - listy, - color='black', - style='solid', - mark='none', - label='') -
      (Constructor) -

      -
      source code  -
      - -
      -
      -initialization
      -
      -Argument:
      -- listx :   list of float
      -- listy :   list of float
      -- color :   str
      -- style :   str
      -- mark  :   str
      -- label :   str
      -
      -
      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      setX(self, - listx) -

      -
      source code  -
      - -

      set the x-coordinate of all data points

      - listx: iterable of floats -
      -
      -
      -
      - -
      - -
      - - -
      -

      setY(self, - listy) -

      -
      source code  -
      - -

      set the x-coordinate of all data points

      - listx: ListFloat -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      MarkStyleList

      - -
      -
      -
      -
      Value:
      -
      -['+', 'circle', 'dot', 'square', 'up triangle', 'x', '|', 'none']
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.plot2d.PlotMatLib-class.html b/static_root/doc/srrietveld/developers/srrietveld.plot2d.PlotMatLib-class.html deleted file mode 100644 index ef10826e..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.plot2d.PlotMatLib-class.html +++ /dev/null @@ -1,450 +0,0 @@ - - - - - srrietveld.plot2d.PlotMatLib - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module plot2d :: - Class PlotMatLib - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class PlotMatLib

      source code

      -
      -object --+
      -         |
      -        PlotMatLib
      -
      - -
      -
      -
      -Class PlotMatLib is dedicated to make plots by matplot lib
      -Most of the methods in this class are class instance
      -
      -Attribute
      -- 
      -
      -


      - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self)
      - Initialization
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __str__ -

      -
      - - - - - - - - - -
      - - - - - -
      Static Methods[hide private]
      -
      -   - - - - - - -
      plot2D(plotinfolist, - labelx, - labely, - xlimtuple, - ylimtuple)
      - Plotting the 2D Figure by matplotlib using multiple threads...
      - source code - -
      - -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - ColorTable = {'black': 'k', 'blue': 'b', 'cyan': 'c', 'green':... -
      -   - - LineStyleTable = {'dash': '--', 'dash dot': '-.', 'dot': ':', ... -
      -   - - MarkStyleTable = {'+': '+', 'circle': 'o', 'dot': ',', 'none':... -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      plot2D(plotinfolist, - labelx, - labely, - xlimtuple, - ylimtuple) -
      Static Method -

      -
      source code  -
      - -
      -
      -Plotting the 2D Figure by matplotlib using multiple threads
      -
      -
      -Argument:
      -- plotinfolist  :   list of PlotInfo2D instances
      -- labelx        :   str: label for X-axis
      -- labely        :   str: label for Y-axis
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      ColorTable

      - -
      -
      -
      -
      Value:
      -
      -{'black': 'k',
      - 'blue': 'b',
      - 'cyan': 'c',
      - 'green': 'g',
      - 'red': 'r',
      - 'yellow': 'y'}
      -
      -
      -
      -
      -
      - -
      - -
      -

      LineStyleTable

      - -
      -
      -
      -
      Value:
      -
      -{'dash': '--', 'dash dot': '-.', 'dot': ':', 'none': '', 'solid': '-'}
      -
      -
      -
      -
      -
      - -
      - -
      -

      MarkStyleTable

      - -
      -
      -
      -
      Value:
      -
      -{'+': '+',
      - 'circle': 'o',
      - 'dot': ',',
      - 'none': '',
      - 'square': 's',
      - 'up triangle': '^',
      - 'x': 'x',
      - '|': '|'}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.qbackgrounds-module.html b/static_root/doc/srrietveld/developers/srrietveld.qbackgrounds-module.html deleted file mode 100644 index c5507674..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.qbackgrounds-module.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - srrietveld.qbackgrounds - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module qbackgrounds - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module qbackgrounds

      source code

      - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: qbackgrounds.py 2792 2009-03-02 15:56:43Z wdzho... -
      -   - - Qbackground = {'NI': [4.3719382075, 5.2504694632, 9.0205874168... -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: qbackgrounds.py 2792 2009-03-02 15:56:43Z wdzhou $'
      -
      -
      -
      -
      -
      - -
      - -
      -

      Qbackground

      - -
      -
      -
      -
      Value:
      -
      -{'NI': [4.3719382075,
      -        5.2504694632,
      -        9.02058741689,
      -        10.989616226,
      -        13.692870068,
      -        14.6947993767,
      -        16.8213521681,
      -        17.9899250189,
      -...
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.qbackgrounds-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.qbackgrounds-pysrc.html deleted file mode 100644 index 0ec03a3e..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.qbackgrounds-pysrc.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - srrietveld.qbackgrounds - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module qbackgrounds - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.qbackgrounds

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2008 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Wenduo Zhou 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14   
      -15  __id__ = "$Id: qbackgrounds.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      -16   
      -17  Qbackground = { 
      -18      "NI": [ 
      -19          4.3719382075 ,  
      -20          5.2504694632 ,  
      -21          9.02058741689,  
      -22          10.989616226 ,  
      -23          13.692870068 ,  
      -24          14.6947993767,  
      -25          16.8213521681,  
      -26          17.9899250189,  
      -27          19.5018336685,  
      -28          20.4064418636,  
      -29          22.0384720608,  
      -30          22.8088843252,  
      -31          24.0914063578,  
      -32          25.9634408655,  
      -33          27.9531334617,  
      -34          28.5022568082,  
      -35          29.5109904331,  
      -36          31.1439675075,  
      -37          32.6853451374,  
      -38          34.0540449984,  
      -39          35.4139322147,  
      -40          36.9302242532,  
      -41          39.1653430946,  
      -42          39.6513200114,  
      -43          40.4157168045,  
      -44          41.5792418738,  
      -45          42.6160549873,  
      -46          43.0922293255,  
      -47          43.7257869956,  
      -48          44.7508856588,  
      -49          46.1204349511,  
      -50          46.7834046967,  
      -51          47.6356617099,  
      -52          48.5978934397,  
      -53          49.5178858627,  
      -54          50.3931725232,  
      -55          51.1883766441,  
      -56      ], 
      -57  } 
      -58   
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinebackend-module.html b/static_root/doc/srrietveld/developers/srrietveld.refinebackend-module.html deleted file mode 100644 index bd603ff1..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinebackend-module.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - srrietveld.refinebackend - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinebackend - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module refinebackend

      source code

      -Refinement Backend Setup

      - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - RietveldEngine
      - Refinement Engine -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: refinebackend.py 2792 2009-03-02 15:56:43Z wdzh... -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: refinebackend.py 2792 2009-03-02 15:56:43Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinebackend-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.refinebackend-pysrc.html deleted file mode 100644 index 99e6c621..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinebackend-pysrc.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - srrietveld.refinebackend - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinebackend - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.refinebackend

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2008 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Wenduo Zhou 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14  """ 
      -15  Refinement Backend Setup 
      -16  """ 
      -17   
      -18  __id__ = "$Id: refinebackend.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      -19   
      -
      20 -class RietveldEngine: -
      21 """ -22 Refinement Engine -23 """ -
      24 - def __init__(self): -
      25 """ -26 Initialization -27 """ -28 self._rietveld_engine_modules = {} -29 self._rietveld_engine = 'diffpy.pyfullprof' -30 return -
      31 -32 -
      33 - def getRietveldEngineModule(self, submodule=None): -
      34 """ -35 build full name of the requested module, the default -36 is top-level engine module -37 -38 Argument: -39 - submodule : str/None, name of sub-module -40 -41 Return : Module imported -42 """ -43 # 1. generate module name or full-length sub-module name -44 modname = self._rietveld_engine -45 if submodule is not None: -46 modname += "." + submodule -47 -48 # 2. check if modname has been cached, if not, import module and cache -49 if not modname in self._rietveld_engine_modules.keys(): -50 exec 'import %s as mod' % modname -51 self._rietveld_engine_modules[modname] = mod -52 -53 # 3. here modname is for sure in the _rietveld_engine_modules dictionary -54 mod = self._rietveld_engine_modules[modname] -55 -56 return mod -
      57 -58 -
      59 - def setRietveldEngine(self, module_name): -
      60 """ -61 Set Rietveld Engine to this class. -62 No module is imported -63 -64 Argument: -65 - module_name : str -66 -67 Return : None -68 """ -69 self._rietveld_engine_modules = {} -70 self._rietveld_engine = module_name -71 -72 return -
      73 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinebackend.RietveldEngine-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinebackend.RietveldEngine-class.html deleted file mode 100644 index 3e88c26d..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinebackend.RietveldEngine-class.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - srrietveld.refinebackend.RietveldEngine - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinebackend :: - Class RietveldEngine - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class RietveldEngine

      source code

      -Refinement Engine

      - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      getRietveldEngineModule(self, - submodule=None)
      - build full name of the requested module, the default...
      - source code - -
      - -
      -   - - - - - - -
      setRietveldEngine(self, - module_name)
      - Set Rietveld Engine to this class.
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getRietveldEngineModule(self, - submodule=None) -

      -
      source code  -
      - -
      -
      -build full name of the requested module, the default
      -is top-level engine module
      -
      -Argument:
      -- submodule :   str/None, name of sub-module
      -
      -Return      :   Module imported
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setRietveldEngine(self, - module_name) -

      -
      source code  -
      - -
      -
      -Set Rietveld Engine to this class.  
      -No module is imported
      -
      -Argument:
      -- module_name   :   str
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides-module.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides-module.html deleted file mode 100644 index 515295b9..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides-module.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - srrietveld.refineguides - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module refineguides

      source code

      -
      -
      -refineguides.py
      -    containing various refining guides
      -    this is end-user scripts:    
      -      the end-user scripts will be build the refineguide list from what 
      -    provided here
      -    
      -RefineGuide will be
      -
      -Requirements for RefineGuide to work properly:
      -1. RefineGuide should work on a Fit object configured properly
      -2. Fit object must contain instrument information for correct
      -   guidance on instrument related parameters
      -3. Fit object must contain measurement information for correct
      -   guidance on measuremetn related parameters
      -
      -In order to guarantee SrRietveld RefineGuide work properly, 
      -it is recommended to use SrRietveld-provided scripts to build a Fit instance
      -
      -Note
      -1. the RefinementGuide is refinement engine independent!
      -2. the methods in RefinementGuide should be static
      -
      -Created:    2008.03.25  11:42 EST
      -
      -RefineGuide 
      -  |
      -  |-- MeasureGuide
      -       |-- BackgroundGuide
      -  |
      -  |-- InstrumentGuide
      -       |-- ZeroGuide
      -       |-- WavelengthGuide
      -       |-- PeakShapeGuide
      -       |-- ScaleGuide (Structure + Instrument + Measurement)
      -  |
      -  |-- SampleGuide
      -       |-- AbsorptionCorrectionGuide
      -       |-- LatticeGuide (Structure + Measurement)
      -  |-- AtomGuide
      -       |-- FractionalCoordinateGuide
      -       |-- ADPGuide
      -       |-- OccupancyGuide
      -
      -* Setup Methods
      -  -  __init__(self)
      -  -  getGuideConfig(self, fit, stage=1):  
      -       the name of this method is confusing, but it must be used before setGuideStep()
      -  -  setGuideStep(self, fit, step=1, stage=1, dry=False)
      -  -  getRefineAllConfig(self, fit, stage=1)
      -
      -* Reset Methods
      -  -  reset(self)
      -  -  turnOff(self, fit)
      -
      -Information Retrieval
      -  -  getNumStages(self)
      -  -  getRefinedVariablesList(self)
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - RefineGuide
      - Virtual base class to guide refinement semi-automatically - -Concept: - The way to use RefineGuide follows the procedure as - 1. -
      -   - - InstrumentGuide
      - Guidance for instrument related parammeters - -Assumption: -1. -
      -   - - MeasurementGuide
      - MeasurementGuide is the guidance for parameters related to -specific measurement, for example -1. -
      -   - - SampleGuide
      - SampleGuide is the guidance for parameters related to -specific sample, including -1. -
      -   - - AtomGuide
      - StructureGuide is to guide the refinement -on parameters related to structure model - -Assumption: -1. -
      -   - - AbsorptionCorrectionGuide
      - Refine guide TOF absorption correction -
      -   - - ADPGuide
      - class to guide refinement on atomic displacement factor -
      -   - - BackgroundGuide
      - Guidance for backgrounds parameters -
      -   - - ExpDecayGuide
      - Refinement guidance on exponential decay parameters -Algorithm: - the exponential decay/peak profile of different phases shouldn't interefere with each other, - because they are determining the peaks' shape belonged to different sets, - therefore, - 1. -
      -   - - FractionalCoordinateGuide
      - Class to guide refinement on atoms' fractional coordinates -
      -   - - LatticeGuide
      - Refinement guidance on lattice parameter -We allow the freedom for each Phase of each Component to -have different lattice parameter. -
      -   - - OccupancyGuide
      - Refine guide on atom's occupancy -
      -   - - PeakShapeGuide
      - Class to guide the refine of Peak-Shape -
      -   - - ScaleGuide
      - Refinement guidance on scale factor -
      -   - - WavelengthGuide
      - Guidance to refine wavelength parameters -
      -   - - ZeroGuide
      - Guidance to refine zero parameters -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: refineguides.py 2874 2009-03-12 20:43:17Z wdzho... -
      -   - - ETA = 1e-06 -
      -   - - _DEBUG = False -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: refineguides.py 2874 2009-03-12 20:43:17Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides-pysrc.html deleted file mode 100644 index 7108804a..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides-pysrc.html +++ /dev/null @@ -1,1800 +0,0 @@ - - - - - srrietveld.refineguides - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.refineguides

      -
      -   1  ############################################################################## 
      -   2  # 
      -   3  # diffpy.srrietveld by DANSE Diffraction group 
      -   4  #                   Simon J. L. Billinge 
      -   5  #                   (c) 2008 Trustees of the Columbia University 
      -   6  #                   in the City of New York.  All rights reserved. 
      -   7  # 
      -   8  # File coded by:    Wenduo Zhou 
      -   9  # 
      -  10  # See AUTHORS.txt for a list of people who contributed. 
      -  11  # See LICENSE.txt for license information. 
      -  12  # 
      -  13  ############################################################################## 
      -  14   
      -  15  """ 
      -  16   refineguides.py 
      -  17       containing various refining guides 
      -  18       this is end-user scripts:     
      -  19         the end-user scripts will be build the refineguide list from what  
      -  20       provided here 
      -  21        
      -  22   RefineGuide will be 
      -  23   
      -  24   Requirements for RefineGuide to work properly: 
      -  25   1. RefineGuide should work on a Fit object configured properly 
      -  26   2. Fit object must contain instrument information for correct 
      -  27      guidance on instrument related parameters 
      -  28   3. Fit object must contain measurement information for correct 
      -  29      guidance on measuremetn related parameters 
      -  30   
      -  31   In order to guarantee SrRietveld RefineGuide work properly,  
      -  32   it is recommended to use SrRietveld-provided scripts to build a Fit instance 
      -  33   
      -  34   Note 
      -  35   1. the RefinementGuide is refinement engine independent! 
      -  36   2. the methods in RefinementGuide should be static 
      -  37   
      -  38   Created:    2008.03.25  11:42 EST 
      -  39   
      -  40   RefineGuide  
      -  41     | 
      -  42     |-- MeasureGuide 
      -  43          |-- BackgroundGuide 
      -  44     | 
      -  45     |-- InstrumentGuide 
      -  46          |-- ZeroGuide 
      -  47          |-- WavelengthGuide 
      -  48          |-- PeakShapeGuide 
      -  49          |-- ScaleGuide (Structure + Instrument + Measurement) 
      -  50     | 
      -  51     |-- SampleGuide 
      -  52          |-- AbsorptionCorrectionGuide 
      -  53          |-- LatticeGuide (Structure + Measurement) 
      -  54     |-- AtomGuide 
      -  55          |-- FractionalCoordinateGuide 
      -  56          |-- ADPGuide 
      -  57          |-- OccupancyGuide 
      -  58   
      -  59   * Setup Methods 
      -  60     -  __init__(self) 
      -  61     -  getGuideConfig(self, fit, stage=1):   
      -  62          the name of this method is confusing, but it must be used before setGuideStep() 
      -  63     -  setGuideStep(self, fit, step=1, stage=1, dry=False) 
      -  64     -  getRefineAllConfig(self, fit, stage=1) 
      -  65   
      -  66   * Reset Methods 
      -  67     -  reset(self) 
      -  68     -  turnOff(self, fit) 
      -  69   
      -  70   Information Retrieval 
      -  71     -  getNumStages(self) 
      -  72     -  getRefinedVariablesList(self) 
      -  73   
      -  74  """ 
      -  75   
      -  76  __id__ = "$Id: refineguides.py 2874 2009-03-12 20:43:17Z wdzhou $" 
      -  77   
      -  78  from diffpy.refinementapi.errors import  FitConfigurationError 
      -  79  from diffpy.refinementapi.exceptiontools import  verifyType 
      -  80  from diffpy.rietveldapi.Fit import  Fit 
      -  81  import utilrefineguide as UR 
      -  82   
      -  83  ETA = 1.0E-6 
      -  84   
      -  85  _DEBUG = False 
      -  86   
      -
      87 -class RefineGuide: -
      88 """Virtual base class to guide refinement semi-automatically - 89 - 90 Concept: - 91 The way to use RefineGuide follows the procedure as - 92 1. use getGuideConfig(guideFit) to examine and set up - 93 the refinement strategy - 94 2. use setGuideStep(guideFit, step) to turn on some - 95 variables at a certain step - 96 3. call Fit.refine() to refine - 97 - 98 Future: - 99 It may be expanded such that some steps can be permuted - 100 - 101 Class Variables: - 102 - _lock : lock the logic usage of getGuideConfig() - 103 and setGuideStep - 104 - _guideFit : the Fit instance to guide - 105 - _variableslist : list of tuples (rietobj, parameter-name) - 106 that have been added to refined; - 107 - 108 * variables will be set to refine by this list - 109 - 110 - _refinesetupdict : dictionary, - 111 key: integer, step from 1 to infinit, - 112 *** Note *** - 113 'step' defined here is the step refinement based on - 114 RefineSetup. - 115 Each 'step' can contain a few of RefineSetup on different - 116 Rietveld objects; - 117 Each 'step' can contain more than one 'atomic' refinement step, - 118 which is defined in RefineSetup - 119 value: list of tuples, - 120 (UnitRefineSetup, RietObj, IndicesTuple), - 121 """ - 122 guideDescription = "Virtual Base Class" - 123 -
      124 - def __init__(self): -
      125 """ - 126 initialization - 127 """ - 128 if self.__class__.__name__ == "RefineGuide": - 129 errmsg = "RefineGuide is virtual class; " + \ - 130 "not allowed to be instantiated" - 131 raise NotImplementedError(errmsg) - 132 - 133 # 1. init variable index list - 134 self._variableslist = [] - 135 self._refinesetupdict = {} - 136 - 137 # 2. interlock for get refinement information and set refinement - 138 self._lock = False - 139 self._guideFit = None - 140 - 141 return -
      142 - 143 -
      144 - def __str__(self): -
      145 """ - 146 return the format reprensentation of this RefineGuide - 147 """ - 148 rstring = "RefineGuide: %-15s"% (self.guideDescription) - 149 - 150 return rstring -
      151 - 152 -
      153 - def resetVisitRecord(self): -
      154 """ Reset the visiting record (gVisit) - 155 - 156 Return : None - 157 """ - 158 for step in sorted(self._refinesetupdict.keys()): - 159 for refinesetup, rietobjectslist, indicestuple, setupstep in \ - 160 self._refinesetupdict[step]: - 161 for rietobjects in rietobjectslist: - 162 for rietobj in rietobjects: - 163 try: - 164 rietobj.resetgVisit() - 165 except AttributeError, err: - 166 wmsg = "Warning: %-15s has no g-visit setup" % \ - 167 (rietobj.__class__.__name__) - 168 print wmsg - 169 # END-TRY - 170 # LOOP-OVER - 171 # LOOP-OVER - 172 - 173 return -
      174 - 175 -
      176 - def reset(self): -
      177 """ - 178 Reset the RefineGuide set up for a certain Fit instance - 179 - 180 Argument: (None) - 181 - 182 Return : None - 183 """ - 184 # 1. Reset _gVisit - 185 for step in self._refinesetupdict.keys(): - 186 for refinesetup, rietobj, indicestuple, setupstep in \ - 187 self._refinesetupdict[step]: - 188 try: - 189 rietobj.resetgVisit() - 190 except AttributeError, err: - 191 if _DEBUG is True: - 192 errmsg = "Class %-20s has NO Attribute Method resetgVisit()"% \ - 193 (rietobj.__class__.__name__) - 194 print "Warning: %-30s"% (errmsg) - 195 # END-TRY - 196 # LOOP-OVER - 197 # LOOP-OVER - 198 - 199 # 2. delete all the step - 200 self._refinesetupdict.clear() - 201 self._variableslist[:] = [] - 202 - 203 # 3. unlock and remove guided Fit - 204 self._lock = False - 205 self._guideFit = None - 206 - 207 return -
      208 - 209 -
      210 - def getGuideConfig(self, fit, stage=1): -
      211 """ - 212 Examine a diffpy.rietveldapi.Fit instance in order to - 213 1. set up a series of RefineSetup bound to corresponding - 214 diffpy.rietveldapi objects - 215 2. return how many steps to refine parameters - 216 - 217 Virtual function - 218 - 219 Arguements: - 220 - fit : diffpy.rietveldapi.Fit instance - 221 - 222 Return : integer, number of steps for a sequence of refine - 223 """ - 224 if self.__class__.__name__ == "RefineGuide": - 225 errmsg = "RefineGuide is Virtual" - 226 raise NotImplementedError, errmsg - 227 - 228 verifyType(fit, Fit) - 229 - 230 # 1. Starting to build up a new refinement guidance - 231 self.reset() - 232 - 233 # 2. Turn on interlock and Fit - 234 self._lock = True - 235 self._guideFit = fit - 236 - 237 return -1 -
      238 - 239 -
      240 - def getRefineAllConfig(self, fit, stage=1): -
      241 """ Obtain the information to refine all the paramaters controlled by this Guide! - 242 - 243 Arguments: - 244 - fit : diffpy.rietveldapi.Fit - 245 - 246 Return : 3-tuple (constraint, rietobj, parname) - 247 """ - 248 errmsg = "Virtual Base Class and Will be Implemented In Extended Classes %-20s"% \ - 249 (self.__class__.__name__) - 250 raise NotImplementedError(errmsg) -
      251 - 252 -
      253 - def getNumRefineSteps(self): -
      254 """ - 255 Return the (maximum) number of refinement steps scheduled by - 256 this refinement guide - 257 - 258 Return : int, number of steps - 259 """ - 260 if _DEBUG is True: - 261 print "* * * * * * * * * * * * *** * * * * * *" - 262 for key in self._refinesetupdict.keys(): - 263 print self._refinesetupdict[key] - 264 print "- - - - - - - - - - - - - - - - - - - -" - 265 # END-IF - 266 - 267 return self._numsteps -
      268 - 269 -
      270 - def getNumStages(self): -
      271 """ - 272 Report the number of stages of this RefineGuide to use - 273 - 274 Return : integer, number of stages - 275 """ - 276 raise NotImplementedError("Not be clear about the purpose to use this") - 277 - 278 # 1. Validity check - 279 if self._lock is not True: - 280 errmsg = "Interlock Error! SrRietveld does not allow" + \ - 281 "to use getNumRefineSteps() to start and set up" - 282 raise RietError(errmsg) - 283 - 284 # 2. Search for the maximum step number - 285 maxstage = 1 - 286 for unitsetup, rietobj, indicestuple in self._refinesetupdict[1]: - 287 if unitsetup.getNumStages() > maxstage: - 288 maxstage = unitsetup.getNumStages() - 289 - 290 return maxstage -
      291 - 292 -
      293 - def setGuideStep(self, fit, step=1, stage=1, dry=False): -
      294 """ Turn on variables scheduled at a certain step in current - 295 refine guidance - 296 - 297 Arguements: - 298 fit : diffpy.rietveldapi.Fit instance - 299 step : int, step of refining some parameters in order - 300 stage : int, stage of refining these parameters - 301 dry : boolean, dry run means no mapVP, just return the values - 302 - 303 Return : list of tuples (constraint, rietveld-object, parname) - 304 """ - 305 # 1. check the lock and turn off the interlock - 306 if self._lock is not True: - 307 errmsg = "Interlock Error! SrRietveld does not allow " + \ - 308 "to use setGuideStep()" - 309 raise FitConfigurationError(errmsg) - 310 - 311 elif not fit == self._guideFit: - 312 errmsg = "%-15s: input Fit instance is not Fit instance " % \ - 313 (self.__class__.__name__) + "used in getNumRefineSteps()\n" - 314 errmsg = "%-20sCurrent Fit @ %-20s INput Fit @ %-20s"% \ - 315 ("", self._guideFit.__repr__(), fit.__repr__()) - 316 raise FitConfigurationError(errmsg) - 317 # END-IF=ELSE - 318 - 319 # 2. set unit refine setups - 320 if self._refinesetupdict.has_key(step): - 321 # With proper definition of this step - 322 allnewlist = [] - 323 for refinesetup, rietobjslist, indices, setupstep in self._refinesetupdict[step]: - 324 newvartuplelist = refinesetup.setToRefine(rietobjslist, indices, - 325 stage, setupstep, dry) - 326 self._variableslist.extend(newvartuplelist) - 327 allnewlist.extend(newvartuplelist) - 328 else: - 329 # Warning - 330 availablesteps = self._refinesetupdict.keys() - 331 wmsg = "Warning! Class %-20s Does Not Have Step %-5s\n" % (self.__class__.__name__, step) + \ - 332 "Available Steps Include %-30s" % (availablesteps) - 333 print wmsg - 334 allnewlist = [] - 335 # END-TRY-EXCEPT - 336 - 337 return allnewlist -
      338 - 339 -
      340 - def getRefinedVariablesList(self): -
      341 """ get the list of refined variables with necessary information, - 342 i.e., self._variableslist - 343 - 344 Return : list of 3-tuples - 345 """ - 346 return self._variableslist -
      347 - 348 -
      349 - def generateRefineSetupDictionary(self, refinesetuplist, stage = 1, refineseq = False): -
      350 """ Use temporary refinesetuplist to set up a dictionary - 351 (instance variable) to hold the RefineSetup, Rietveld Object and naming indices - 352 for each refinement procedure (step number starting from 1) - 353 - 354 Argument: - 355 - refinesetuplist : list of 3-tuples: - 356 RefineSetup, list of list of Rietveld objects, list of int (indices) - 357 - stage : int - 358 - refineseq : boolean. True: Refine all refinesetup in sequence - 359 False: Refine all refinesetup in parallel - 360 - 361 Return : None - 362 """ - 363 stagestep = 0 - 364 self._numsteps = 0 - 365 - 366 for refinesetup, rietobjects, indices in refinesetuplist: - 367 - 368 # 1. validation - 369 if not isinstance(rietobjects, list): - 370 errmsg = "Input rietobjects in refinesetuplist is not list" - 371 raise NotImplementedError, errmsg - 372 else: - 373 for rietobjs in rietobjects: - 374 if not isinstance(rietobjs, list): - 375 errmsg = "Input rietobjects' item in refinesetuplist is not list" - 376 raise NotImplementedError, errmsg - 377 # END-IF - 378 # LOOP-OVER - 379 # END-IF - 380 - 381 # 2. set up the dictionary to refine - 382 numrefinesteps = refinesetup.getNumRefineSteps(stage) - 383 - 384 for step in xrange(1, numrefinesteps + 1): - 385 # 2.1 calcualte complete-step number for this refine-setup - 386 completestep = stagestep + step - 387 - 388 # 2.2 check the dictionary setup and validate - 389 if not self._refinesetupdict.has_key(completestep): - 390 self._refinesetupdict[completestep] = [] - 391 elif refineseq is True: - 392 errmsg = "In refine-sequential mode, any step should only as one refinesetup" - 393 raise NotImplementedError, errmsg - 394 - 395 # 2.3 set up dictionary - 396 self._refinesetupdict[completestep].append( (refinesetup, rietobjects, indices, step) ) - 397 # LOOP-OVER - 398 - 399 # 3. update stage step and _numstep - 400 if refineseq is True: - 401 # Sequential-mode: accumulate refine steps number - 402 stagestep += numrefinesteps - 403 self._numsteps += numrefinesteps - 404 else: - 405 # Parallel-mode: get the max refine steps number - 406 if numrefinesteps > self._numsteps: - 407 self._numsteps = numrefinesteps - 408 # END-IF-ELSE - 409 - 410 # LOOP-OVER - 411 - 412 # 4. Clear up the setup validation - 413 self.resetVisitRecord() - 414 - 415 return self._numsteps -
      416 - 417 -
      418 - def generateRefineSetup(self, rietveldobjects, stage = 1): -
      419 """ Generate RefinementSetup for this specific RefineGuide - 420 - 421 Argument: - 422 - rietveldobjects : list, of list of Rietveld objects - 423 [ [main-rietveld-obj, help-1, ...], [main-rietveld-obj, ..], ...] - 424 - stage : int - 425 - 426 Return : RefineSetup - 427 """ - 428 errmsg = "Virtual method serving as interface" - 429 raise NotImplementedError, errmsg - 430 - 431 return -
      432 - 433 -
      434 - def turnOff(self, fit): -
      435 """ turn the parameters/variables off from refining, - 436 all the parameters/variables are turned on by this RefineGuide - 437 - 438 Arguement: - 439 - fit : diffpy.rietveldapi.Fit instance - 440 - 441 Return : None - 442 """ - 443 # turn lock and turn off - 444 self._lock = False - 445 - 446 return -
      447 - 448 # END Class: RefineGuide - 449 - 450 -
      451 -class InstrumentGuide(RefineGuide): -
      452 """ Guidance for instrument related parammeters - 453 - 454 Assumption: - 455 1. the parameters belonged to different instrument setup - 456 must be independent, i.e., they can be refined - 457 simultaneously - 458 """ -
      459 - def getComponents(self, fit): -
      460 """ Get RietveldComponents from Fit instance - 461 This function is intended to be overriden in special case - 462 - 463 Arguement: - 464 - fit : Fit instance - 465 - 466 Return : list of list RietveldComponent - 467 """ - 468 componentslist = fit.getComponentByInstrument() - 469 - 470 return componentslist -
      471 - 472 -
      473 - def getGuideConfig(self, fit, stage=1): -
      474 """ - 475 return how many steps to refine parameters - 476 - 477 Arguements: - 478 - fit : diffpy.rietveldapi Fit instance - 479 - 480 Return - integer, number of steps for a sequence of refine - 481 """ - 482 # 1. Call base class - 483 RefineGuide.getGuideConfig(self, fit, stage) - 484 - 485 # 2. Get components: list of list - 486 componentslist = self.getComponents(fit) - 487 - 488 # 3. Collect list of RietveldComponent - 489 refinesetupslist = [] - 490 cindex = 0 - 491 for components in componentslist: - 492 # 3.1 Get Rietveld objects - 493 rietobjectslist = [] - 494 for component in components: - 495 rietobjects = self.getRietveldObjects(component) - 496 rietobjectslist.append(rietobjects) - 497 # LOOP-OVER - 498 - 499 # 3.2 Generate RefineSetup for this Component - 500 refinesetup = self.generateRefineSetup(rietobjectslist, stage) - 501 - 502 # 3.3 Process and store - 503 numsteps = refinesetup.getNumRefineSteps(stage) - 504 - 505 refinesetupslist.append( (refinesetup, rietobjectslist, [cindex]) ) - 506 - 507 # 3.4 Loop control variable update - 508 cindex += 1 - 509 # LOOP-OVER - 510 - 511 # 4. Generate refinesetupdict[] - 512 self.generateRefineSetupDictionary(refinesetupslist, stage) - 513 - 514 return self._numsteps -
      515 - 516 -
      517 - def getRefineAllConfig(self, fit, stage=1): -
      518 """ - 519 Obtain the information to refine all the paramaters - 520 controlled by this Guide - 521 - 522 Arguments: - 523 - fit : diffpy.rietveldapi.Fit - 524 - stage : int - 525 - 526 Return : 3-tuple (constraint, rietobj, parname) - 527 """ - 528 # 1. Initialization - 529 rietobjectslist = [] - 530 guidedvartuplist = [] - 531 - 532 # 2. Collect list of (background, pattern) - 533 componentslist = fit.getComponentByInstrument() - 534 - 535 # 3. Obtain all Rietveld objects to refine by this guide - 536 cindex = 0 - 537 for components in componentslist: - 538 # 3.1 Get Rietveld objects - 539 rietobjectslist = [] - 540 rietobjectset = [] - 541 for component in components: - 542 rietobjects = self.getRietveldObjects(component) - 543 rietobjectslist.append(rietobjects) - 544 rietobjectset.append(rietobjects[0]) - 545 # LOOP-OVER - 546 - 547 # 3.2 Generate RefineSetup for this Component - 548 refinesetup = self.generateRefineSetup(rietobjectslist, stage) - 549 - 550 # 3.3 Set to refine-all - 551 guidedvartupe = refinesetup.getRefineInfo(rietobjectsset, cindex, - 552 step = "all", stage = stage) - 553 guidedvartuplist.extend(guidedvartup) - 554 - 555 - 556 # 3.4 Loop control variable update - 557 cindex += 1 - 558 # LOOP-OVER - 559 - 560 return guidedvartuplist -
      561 - 562 # END-DEF-CLASS InstrumentGuide - 563 - 564 -
      565 -class MeasurementGuide(RefineGuide): -
      566 """ MeasurementGuide is the guidance for parameters related to - 567 specific measurement, for example - 568 1. same instrument, same sample, same time, but different banks - 569 2. same instrument, different sample, - 570 3. different instrument, same sample, different time, - 571 - 572 Assumption: Each pattern/RietveldComponent is an individual measurement - 573 """ -
      574 - def getGuideConfig(self, fit, stage=1): -
      575 """ Examine a diffpy.rietveldapi.Fit instance in order to - 576 1. set up a series of RefineSetup bound to corresponding - 577 diffpy.rietveldapi objects - 578 2. return how many steps to refine parameters - 579 - 580 Virtual function - 581 - 582 Arguements: - 583 - fit : diffpy.rietveldapi.Fit instance - 584 - stage : int, - 585 - 586 Return : integer, number of steps for a sequence of refine - 587 """ - 588 # 1. Call Base Class - 589 RefineGuide.getGuideConfig(self, fit, stage) - 590 - 591 # 2. Collect list of (background, pattern) - 592 componentslist = fit.getComponentByMeasurement() - 593 - 594 refinesetupslist = [] - 595 cindex = 0 - 596 for components in componentslist: - 597 # Assumption: each components has one and only one component - 598 if len(components) != 1: - 599 errmsg = "MeasurmentGuide: Assumption is that each measurement " + \ - 600 "related to one individual pattern. " + \ - 601 "This assumption is violated here" - 602 raise NotImplementedError, errmsg - 603 else: - 604 component = components[0] - 605 # END-IF-ELSE - 606 - 607 # 3.1 Get Rietveld Objects (some case may require more) - 608 rietobjects = self.getRietveldObjects(component) - 609 rietobjectslist = [rietobjects] - 610 - 611 # 3.2 Generate RefineSetup for this Component - 612 refinesetup = self.generateRefineSetup(rietobjectslist, stage) - 613 - 614 # 3.3 Process and store - 615 refinesetupslist.append( (refinesetup, rietobjectslist, [cindex]) ) - 616 - 617 # 3.4 Loop control variable update - 618 cindex += 1 - 619 - 620 # LOOP-OVER - 621 - 622 # 4. Generate refinesetupdict[] - 623 self.generateRefineSetupDictionary(refinesetupslist) - 624 - 625 return self._numsteps -
      626 - 627 -
      628 - def getRefineAllConfig(self, fit, stage=1): -
      629 """ - 630 Obtain the information to refine all the paramaters - 631 controlled by this Guide - 632 - 633 Arguments: - 634 - fit : diffpy.rietveldapi.Fit - 635 - stage : int - 636 - 637 Return : 3-tuple (constraint, rietobj, parname) - 638 """ - 639 # 1. Initialization - 640 rietobjectslist = [] - 641 guidedvartuplist = [] - 642 - 643 # 2. Collect list of (background, pattern) - 644 componentslist = fit.getComponentByMeasurement() - 645 - 646 # 3. Obtain all Rietveld objects to refine by this guide - 647 cindex = 0 - 648 for components in componentslist: - 649 # Assumption: each components has one and only one component - 650 if len(components) != 1: - 651 errmsg = "MeasurmentGuide: Assumption is that each measurement " + \ - 652 "related to one individual pattern. " + \ - 653 "This assumption is violated here" - 654 raise NotImplementedError, errmsg - 655 else: - 656 component = components[0] - 657 # END-IF-ELSE - 658 - 659 # 3.1 Get Rietveld Objects (some case may require more) - 660 rietobjects = self.getRietveldObjects(component) - 661 rietobjectlist.append( (rietobjects, [cindex]) ) - 662 - 663 # LOOP-OVER - 664 - 665 # 4. set up refine guide - 666 for rietobjects, indicies in rietobjectlist: - 667 # 3.2 Generate RefineSetup for this Component - 668 refinesetup = self.generateRefineSetup(rietobjects, stage) - 669 guidedvartupe = refinesetup.getRefineInfo(rietobjects[0], indicies, - 670 step = "all", stage = stage) - 671 guidedvartuplist.extend(guidedvartup) - 672 - 673 return guidedvartuplist -
      674 - 675 -
      676 - def getRietveldObjects(self, component): -
      677 """ get the Rietveld object from RietveldComponent - 678 - 679 Argument: - 680 - component : RietveldComponent - 681 - 682 Convention : In SrRietveld, the first item in the return list - 683 is the major Rietveld object to set up refine - 684 The others are there for help. - 685 The sequence will be specified in each extended class - 686 - 687 Return : list, [rietveld-object (main), rietveld-object, ..] - 688 """ - 689 errmsg = "Virtual method serving as interface" - 690 raise NotImplementedError, errmsg - 691 - 692 return -
      693 - 694 - 695 # END-CLASS-DEFINITION: MeasurementGuide - 696 - 697 -
      698 -class SampleGuide(RefineGuide): -
      699 """ SampleGuide is the guidance for parameters related to - 700 specific sample, including - 701 1. sample property correction - 702 2. lattice size - 703 - 704 """ -
      705 - def getGuideConfig(self, fit, stage=1): -
      706 """ Examine a diffpy.rietveldapi.Fit instance in order to - 707 1. set up a series of RefineSetup bound to corresponding - 708 diffpy.rietveldapi objects - 709 2. return how many steps to refine parameters - 710 - 711 Virtual function - 712 - 713 Arguements: - 714 - fit : diffpy.rietveldapi.Fit instance - 715 - stage : int, - 716 - 717 Return : integer, number of steps for a sequence of refine - 718 """ - 719 # 1. Call Base Class - 720 RefineGuide.getGuideConfig(self, fit, stage) - 721 - 722 # 2. Collect list of (background, pattern) - 723 componentslist = fit.getComponentBySample() - 724 - 725 # 3. Set RefineSetup - 726 cindex = 0 - 727 for components in componentslist: - 728 # 3.1 Get Rietveld Objects (some case may require more) - 729 rietobjectslist = [] - 730 rietobjectset = [] - 731 for component in components: - 732 rietobjects = self.getRietveldObjects(component) - 733 rietobjectslist.extend( rietobjects ) - 734 - 735 templist = [] - 736 for rietobject in rietobjects: - 737 rietobj = rietobject[0] - 738 rietobjectset.append( rietobj ) - 739 # LOOP-OVER - 740 - 741 # 3.2 Generate RefineSetup for this Component - 742 refinesetup = self.generateRefineSetup(rietobjectset, stage) - 743 - 744 # 3.3 Process and store - 745 refinesetupslist.append( (refinesetup, rietobjectset, [cindex]) ) - 746 - 747 # 3.4 Loop control variable update - 748 cindex += 1 - 749 # LOOP-OVER - 750 - 751 # 4. Generate refinesetupdict[] - 752 self.generateRefineSetupDictionary(refinesetuplist) - 753 - 754 return self._numsteps -
      755 - 756 -
      757 - def getRefineAllConfig(self, fit, stage=1): -
      758 """ - 759 Obtain the information to refine all the paramaters - 760 controlled by this Guide - 761 - 762 Arguments: - 763 - fit : diffpy.rietveldapi.Fit - 764 - stage : int - 765 - 766 Return : 3-tuple (constraint, rietobj, parname) - 767 """ - 768 # 1. Initialization - 769 rietobjectslist = [] - 770 guidedvartuplist = [] - 771 - 772 # 2. Collect list of (background, pattern) - 773 componentslist = fit.getComponentBySample() - 774 - 775 # 3. Set RefineSetup - 776 cindex = 0 - 777 for components in componentslist: - 778 # 3.1 Get Rietveld Objects (some case may require more) - 779 rietobjectslist = [] - 780 rietobjectset = [] - 781 for component in components: - 782 rietobjects = self.getRietveldObjects(component) - 783 rietobjectslist.append( rietobjects ) - 784 rietobjectset.append( rietobjects[0] ) - 785 # LOOP-OVER - 786 - 787 # 3.2 Generate RefineSetup for this Component - 788 refinesetup = self.generateRefineSetup(rietobjectset, stage) - 789 - 790 # 3.3 Set up refine-all option - 791 guidedvartupe = refinesetup.getRefineInfo(rietobjectset, [cindex], - 792 step = "all", stage = stage) - 793 guidedvartuplist.extend(guidedvartup) - 794 - 795 # 3.4 Loop control variable update - 796 cindex += 1 - 797 # LOOP-OVER - 798 - 799 return guidedvartuplist -
      800 - 801 # END-CLASS-DEFINITION: SampleGuide - 802 - 803 -
      804 -class AtomGuide(RefineGuide): -
      805 """ StructureGuide is to guide the refinement - 806 on parameters related to structure model - 807 - 808 Assumption: - 809 1. Rietveld parameters belonged to different phases are not correlated - 810 - 811 Algorithm applied: - 812 - refine one Rietveld object, such as one atom's position (x, y, z), or - 813 one atom's Biso at each atom. - 814 - do not consider the efficiency to refine two atom's parameters - 815 simulataneously if they belonged to different phase; - 816 This may increase some unnecessary steps, but it will keep the algorithm - 817 and behavior of the codes more clear; - 818 a) In multiple-phase situation, whether refining 2 or more phases together - 819 can cause some problem is unknown - 820 b) In co-refinement on different material situation, since it is usually - 821 applied to instrument calibration, the structure of material is - 822 simple - 823 """ -
      824 - def getGuideConfig(self, fit, stage=1): -
      825 """ Examine a diffpy.rietveldapi.Fit instance in order to - 826 1. set up a series of RefineSetup bound to corresponding - 827 diffpy.rietveldapi objects - 828 2. return how many steps to refine parameters - 829 - 830 Virtual function - 831 - 832 Arguements: - 833 - fit : diffpy.rietveldapi.Fit instance - 834 - stage : int, - 835 - 836 Return : integer, number of steps for a sequence of refine - 837 """ - 838 # 1. Call Base Class - 839 RefineGuide.getGuideConfig(self, fit, stage) - 840 - 841 # 2. Initialization - 842 rietobjectlist = [] - 843 - 844 # 3. Collect list of (background, pattern) - 845 phaseslist = fit.getStructurePhaseList() - 846 - 847 # 4. Access all object: - 848 for phase in phaseslist: - 849 numatoms = phase.getNumAtoms() - 850 - 851 for aindex in xrange(numatoms): - 852 # 1. get atom - 853 atom = phase.getAtom(aindex) - 854 - 855 # 2. check this atom been visited or not - 856 # FIXME - What's the purpose? Shall I remove this? - 857 if atom.gVisit() is False: - 858 atom.setgVisit() - 859 else: - 860 errmsg = "Why this atom is visited twice? " + \ - 861 "atom is %-10s indexed as %-10s" % (atom, aindex) + \ - 862 "# of phase: %-5s In Guide %-20s" % (len(phaseslist), - 863 self.__class__.__name__) - 864 raise NotImplementedError, errmsg - 865 # END-IF-ELSE - 866 - 867 # 3. get Rietveld objects and add to dictionary - 868 rietobject = self.getRietveldObjects(atom) - 869 rietobjectlist.append( [rietobject, atom] ) - 870 # LOOP-OVER - 871 # LOOP-OVER -- phase - 872 - 873 # 5. Sort the atoms in each phase and find out the maximum refinement steps - 874 rietobjectlist = UR.sortByAtomNumber(rietobjectlist) - 875 - 876 # 5. get RefinementSetup - 877 refinesetuplist = [] - 878 step = 0 - 879 for rietobject, atom in rietobjectlist: - 880 rietobjects = [[rietobject, atom]] - 881 refinesetup = self.generateRefineSetup(rietobjects, stage) - 882 refinesetuplist.append( (refinesetup, rietobjects, [step]) ) - 883 step += 1 - 884 # LOOP-OVER - 885 - 886 # 7. Generate refinesetupdict[] - 887 self.generateRefineSetupDictionary(refinesetuplist, refineseq = True) - 888 - 889 return self._numsteps -
      890 - 891 -
      892 - def getRefineAllConfig(self, fit, stage=1): -
      893 """ - 894 Obtain the information to refine all the paramaters controlled by this Guide! - 895 - 896 Arguments: - 897 - fit : diffpy.rietveldapi.Fit - 898 - 899 Return : 3-tuple (constraint, rietobj, parname) - 900 """ - 901 # 1. Initialization - 902 guidedvartuplist = [] - 903 - 904 # 2. Initialization - 905 rietobjectslist = [] - 906 - 907 # 3. Collect list of (background, pattern) - 908 phaseslist = fit.getPhases() - 909 - 910 # 4. Access all object: - 911 rietobjectdict = {} - 912 phaseID = 0 - 913 for phase in phaseslist: - 914 raise NotImplementedError, "Check the following return can be [ [..], [..], ..]" - 915 - 916 numatoms = phase.getNumAtoms() - 917 for aindex in xrange(numatoms): - 918 # 1. get atom - 919 atom = phase.getAtom(aindex) - 920 - 921 # 2. check this atom been visited or not - 922 # FIXME - What's the purpose? Shall I remove this? - 923 if atom.gVisit() is False: - 924 rietobjectlist.append(atom) - 925 atom.setgVisit() - 926 else: - 927 errmsg = "Why this atom is visited twice?" - 928 raise NotImplementedError, errmsg - 929 # END-IF-ELSE - 930 - 931 # 3. get Rietveld objects and add to dictionary - 932 rietobject = self.getRietveldObjects(self, atom) - 933 rietobjectdict[phaseID].append( [rietobject, atom] ) - 934 - 935 # LOOP-OVER - 936 phaseID += 1 - 937 # LOOP-OVER -- phase - 938 - 939 # 5. Get UnitRefinementSetup - 940 rietid = 0 - 941 for phaseid in rietobjectdict.keys(): - 942 for rietobject, atom in rietobjectdict[phaseid]: - 943 refinesetup = self.generateRefineSetup(fit, rietobject) - 944 guidedvartup = rietunitsetup.getRefineInfo(rietobject, - 945 [rietid], step = "all") - 946 guidedvartuplist.extend(guidedvartup) - 947 # LOOP-OVER - 948 # LOOP-OVER - 949 - 950 return guidedvartuplist -
      951 - 952 # END-DEF-CLASS: StructureGuide - 953 - 954 - 955 -
      956 -class AbsorptionCorrectionGuide(RefineGuide): -
      957 """ - 958 Refine guide TOF absorption correction - 959 """ -
      960 - def getRietveldObjects(self, component): -
      961 """ get the Rietveld object from RietveldComponent - 962 - 963 Argument: - 964 - component : RietveldComponent - 965 - 966 Convention : In SrRietveld, the first item in the return list - 967 is the major Rietveld object to set up refine - 968 The others are there for help. - 969 The sequence will be specified in each extended class - 970 - 971 Return : list, [rietveld-object (main), rietveld-object, ..] - 972 """ - 973 rietobjectslist = [] - 974 - 975 numphase = component.getNumPhases() - 976 for phaseid in xrange(numphase): - 977 abscorr = comp.getPhase(phaseid).getAbsorptionCorrection() - 978 rietobjectslist.append( [abscorr] ) - 979 - 980 return rietobjectslist -
      981 - 982 -
      983 - def generateRefineSetup(self, rietveldobjects, stage = 1): -
      984 """ Generate RefinementSetup for this specific RefineGuide - 985 - 986 Argument: - 987 - rietveldobjects : list, of list, of Rietveld objects - 988 - stage : int - 989 - 990 Return : RefineSetup - 991 """ - 992 refinesetup = UR.AbsorptionCorrectionRefineSetup(self._guideFit, rietveldobjects) - 993 - 994 return refinesetup -
      995 - 996 # END CLASS AbsorptionCorrectionGuide(SampleGuide) - 997 - 998 -
      999 -class ADPGuide(AtomGuide): -
      1000 """ class to guide refinement on atomic displacement factor -1001 """ -
      1002 - def getRietveldObjects(self, atom): -
      1003 """ Get atom object of given atom object -1004 -1005 Argument: -1006 - atom : Atom -1007 -1008 Return : ADP -1009 """ -1010 rietobject = atom.getADP() -1011 -1012 return rietobject -
      1013 -1014 -
      1015 - def generateRefineSetup(self, rietobjectlist, stage = 1): -
      1016 """ Generate RefineSetup -1017 -1018 Argument: -1019 - fit : Fit object -1020 - rietobject : list, of list of Rietveld object -1021 - state : int, -1022 -1023 Return : ADPRefineSetup -1024 """ -1025 refinesetup = UR.genADPRefineSetup(self._guideFit, rietobjectlist, stage) -1026 -1027 return refinesetup -
      1028 -1029 # END -- class ADPGuide(RefineGuide) -1030 -1031 -
      1032 -class BackgroundGuide(MeasurementGuide): -
      1033 """ Guidance for backgrounds parameters -1034 """ -
      1035 - def getRietveldObjects(self, component): -
      1036 """ get the Rietveld object from RietveldComponent -1037 -1038 Argument: -1039 - component : RietveldComponent -1040 -1041 Return : list, [Background object, Pattern object] -1042 """ -1043 # 1. Get instance -1044 background = component.getBackground() -1045 pattern = component.getPattern() -1046 -1047 # 2. Validity check -1048 if pattern is None: -1049 errmsg = "No Pattern Defined with Background" -1050 raise RietError(errmsg) -1051 -1052 return ( [background, pattern] ) -
      1053 -1054 -
      1055 - def generateRefineSetup(self, rietveldobjects, stage = 1): -
      1056 """ Generate RefinementSetup for this specific RefineGuide -1057 -1058 Argument: -1059 - rietveldobjects : list, of list, of Rietveld objects -1060 - stage : int -1061 -1062 Return : RefineSetup -1063 """ -1064 refinesetup = UR.genBackgroundRefineSetup(self._guideFit, rietveldobjects, stage) -1065 -1066 return refinesetup -
      1067 -1068 # END-CLASS-DEF: BackgroundGuide -1069 -1070 -
      1071 -class ExpDecayGuide(InstrumentGuide): -
      1072 """ Refinement guidance on exponential decay parameters -1073 Algorithm: -1074 the exponential decay/peak profile of different phases shouldn't interefere with each other, -1075 because they are determining the peaks' shape belonged to different sets, -1076 therefore, -1077 1. exponential decay parameters belonged to different phases but of same Rietveld Component -1078 must be same! -1079 2. exponential decay parameters belonged to different patterns (different instruments) -1080 can be refined simultaneously -1081 From assumption 1 and 2, the conclusion is that -1082 EVERY Expoenetial Decay IS INDEPENDENT OF THE OTHERS Class to guide the refine of Peak-Shape -1083 """ -
      1084 - def getRietveldObjects(self, component): -
      1085 """ Get Pattern that holds the zero-shift parameter -1086 -1087 Argument: -1088 - component : RietveldComponent -1089 -1090 Return : list, [rietveld-object (main), rietvel] -1091 """ -1092 rietobjectslist = [] -1093 -1094 numphase = component.getNumPhases() -1095 for phaseid in xrange(numphase): -1096 expdecay = component.getPhase(phaseid).getExpDecayFunction() -1097 rietobjectslist.extend( [expdecay] ) -1098 # LOOP-OVER -1099 -1100 return rietobjectslist -
      1101 -1102 -
      1103 - def generateRefineSetup(self, rietveldobjects, stage = 1): -
      1104 """ Generate RefinementSetup for this specific RefineGuide -1105 -1106 Argument: -1107 - rietveldobjects : list of list of Rietveld objects -1108 - stage : int -1109 -1110 Return : RefineSetup -1111 """ -1112 refinesetup = UR.genTOFExpDecayRefinement(self._guideFit, rietveldobjects, stage) -1113 -1114 return refinesetup -
      1115 -1116 # END-DEF-CLASS ExpDecayGuide -1117 -1118 -
      1119 -class FractionalCoordinateGuide(AtomGuide): -
      1120 """ Class to guide refinement on atoms' fractional coordinates -1121 """ -
      1122 - def getRietveldObjects(self, atom): -
      1123 """ Get atom object of given atom object -1124 -1125 Argument: -1126 - atom : Atom -1127 -1128 Return : Atom -1129 """ -1130 return atom -
      1131 -1132 -
      1133 - def generateRefineSetup(self, rietobjectslist, stage): -
      1134 """ Generate RefineSetup -1135 -1136 Argument: -1137 - rietobjectslist : list of list of Rietveld objects -1138 - stage : int -1139 -1140 Return : AtomFractionCoordinateRefineSetup -1141 """ -1142 refinesetup = UR.genAtomFractionalPositionSetup(self._guideFit, -1143 rietobjectslist, stage) -1144 -1145 return refinesetup -
      1146 -1147 # END-DEF-CLASS: FractionalCoordinateGuide -1148 -1149 -
      1150 -class LatticeGuide(RefineGuide): -
      1151 """ Refinement guidance on lattice parameter -1152 We allow the freedom for each Phase of each Component to -1153 have different lattice parameter. -1154 For example -1155 1. MnAs is measured by both NPDF and RAPDF. A corefinement -1156 is preferred. Because the temperatures at the experiment -1157 can be different, the lattice parameters then are different -1158 between two measurement -1159 -1160 """ -
      1161 - def getGuideConfig(self, fit, stage=1): -
      1162 """ Examine a diffpy.rietveldapi.Fit instance in order to -1163 1. set up a series of RefineSetup bound to corresponding -1164 diffpy.rietveldapi objects -1165 2. return how many steps to refine parameters -1166 -1167 1. Necessary parameters includes -1168 a, b, c -1169 alpha, beta, gamma if they are not 90 -1170 -1171 2. Constraint will be set according to the space group -1172 -1173 3. extra: need to consider the case multiple patterns share phases! Arguements: -1174 - fit : diffpy.rietveldapi.Fit instance -1175 -1176 Arguements: -1177 - fit : diffpy.rietveldapi.Fit instance -1178 - stage : int, -1179 -1180 Return : integer, number of steps for a sequence of refine -1181 """ -1182 # 1. Call Base Class -1183 RefineGuide.getGuideConfig(self, fit, stage) -1184 -1185 # 2. Initialization -1186 refinesetuplist = [] -1187 -1188 # 3. Collect list of lattices -1189 latticeslist = UR.getLatticeInGroup(fit) -1190 -1191 # 4. Set up RefineSetup -1192 lindex = 0 -1193 for lattices, spcgrp in latticeslist: -1194 # 1. get refinesetup -1195 rietobjectslist = [] -1196 for lattice in lattices: -1197 rietobjectslist.append( [lattice] ) -1198 -1199 refinesetup = UR.genLatticeRefineSetup(fit, rietobjectslist, spcgrp) -1200 -1201 # 2. expand the list -1202 refinesetuplist.append( (refinesetup, rietobjectslist, [lindex]) ) -1203 -1204 # 3. update loop variable -1205 lindex += 1 -1206 # LOOP-OVER -1207 -1208 # 4. Generate refinesetupdict[] -1209 self.generateRefineSetupDictionary(refinesetuplist) -1210 -1211 return self._numsteps -
      1212 -1213 -
      1214 - def getRefineAllConfig(self, fit, stage=1): -
      1215 """ Obtain the information to refine all the paramaters -1216 controlled by this Guide -1217 -1218 Arguments: -1219 - fit : diffpy.rietveldapi.Fit -1220 - stage : int -1221 -1222 Return : 3-tuple (constraint, rietobj, parname) -1223 """ -1224 # 1. Initialization -1225 rietobjectslist = [] -1226 guidedvartuplist = [] -1227 -1228 # 2. Collect list of lattices -1229 latticeslist = UR.getLatticeInGroup(fit) -1230 -1231 # 3. Set up RefineSetup -1232 lindex = 0 -1233 for lattices, spcgrp in latticeslist: -1234 # 3.1 get refinesetup -1235 refinesetup = UR.genLatticeRefineSetup(fit, lattices, spcgrp) -1236 -1237 # 3.2 set up guidedvartup -1238 guidedvartup = refinesetup.getRefineInfo(lattices, [lindex], -1239 step="all") -1240 guidedvartuplist.extend(guidedvartup) -1241 -1242 # 3.3 Debug check -1243 if _DEBUG is True: -1244 for lattice in lattices: -1245 if lattice.gVisit is True: -1246 errmsg = "This Lattice is Visited!" -1247 raise NotImplementedError, errmsg -1248 # END-IF -1249 # LOOP-OVER -1250 # END-IF -1251 -1252 # LOOP-OVER -1253 -1254 return guidedvartuplist -
      1255 -1256 # END [ class LatticeGuide(RefineGuide)] -1257 -1258 -
      1259 -class OccupancyGuide(RefineGuide): -
      1260 """ Refine guide on atom's occupancy -1261 """ -
      1262 - def getRietveldObjects(self, atom): -
      1263 """ Get atom object of given atom object -1264 -1265 Argument: -1266 - atom : Atom -1267 -1268 Return : Atom -1269 """ -1270 rietobject = atom -1271 -1272 return rietobject -
      1273 -1274 -
      1275 - def generateRefineSetup(self, rietobject, stage): -
      1276 """ Generate RefineSetup -1277 -1278 Argument: -1279 - rietobject : Rietveld object -1280 -1281 Return : ADPRefineSetup -1282 """ -1283 errmsg = "Have not implemented setting up occupancy right" -1284 raise NotImplementedError, errmsg -
      1285 -1286 # END CLASS OccupancyGuide(RefineGuide) -1287 -1288 -
      1289 -class PeakShapeGuide(InstrumentGuide): -
      1290 """ -1291 Class to guide the refine of Peak-Shape -1292 """ -
      1293 - def getRietveldObjects(self, component): -
      1294 """ Get Pattern that holds the zero-shift parameter -1295 -1296 Argument: -1297 - component : RietveldComponent -1298 -1299 Return : list, [rietveld-object (main), rietvel] -1300 """ -1301 # FIXME multiple phases. More experiments are required! -1302 rietobjectslist = [] -1303 -1304 numphases = component.getNumPhases() -1305 for pindex in xrange(numphases): -1306 peakprofile = component.getPhase(pindex).getPeakProfile() -1307 rietobjectslist.extend( [peakprofile] ) -1308 # LOOP-OVER -1309 -1310 return rietobjectslist -
      1311 -1312 -
      1313 - def generateRefineSetup(self, rietveldobjectslist, stage = 1): -
      1314 """ Generate RefinementSetup for this specific RefineGuide -1315 -1316 Argument: -1317 - rietveldobjectslist : list of list of Rietveld objects -1318 [ [..], [...], ...] -1319 - stage : int -1320 -1321 Return : RefineSetup -1322 """ -1323 refinesetup = UR.genPeakShapeRefineSetup(self._guideFit, rietveldobjectslist, stage) -1324 -1325 return refinesetup -
      1326 -1327 # END-DEF-CLASS PeakShapeGuide -1328 -1329 -
      1330 -class ScaleGuide(InstrumentGuide): -
      1331 """ Refinement guidance on scale factor -1332 """ -1333 # FIXME - How to let it guide a refinement on multiple-phase is unknown -
      1334 - def getComponents(self, fit): -
      1335 """ Get RietveldComponents from Fit instance -1336 This function is intended to be overriden in special case -1337 -1338 Arguement: -1339 - fit : Fit instance -1340 -1341 Return : list of list RietveldComponent -1342 """ -1343 componentslist = fit.getComponentByMeasurement() -1344 -1345 return componentslist -
      1346 -1347 -
      1348 - def getRietveldObjects(self, component): -
      1349 """ Get Pattern that holds the zero-shift parameter -1350 -1351 Argument: -1352 - component : RietveldComponent -1353 -1354 Return : list, [rietveld-object (main), rietvel] -1355 """ -1356 numphases = component.getNumPhases() -1357 for pindex in xrange(numphases): -1358 rietobject = component.getPhase(pindex).getPeakProfile() -1359 -1360 # FIXME - ScaleGuide has not be compatible with multiple-phase model -1361 if numphases != 1: -1362 errmsg = "%-5 - Phase (multiple-phase) has not been handled" % \ -1363 (numphases) -1364 raise NotImplementedError, errmsg -1365 -1366 return ( [rietobject] ) -
      1367 -1368 -
      1369 - def generateRefineSetup(self, rietveldobjects, stage = 1): -
      1370 """ Generate RefinementSetup for this specific RefineGuide -1371 -1372 Argument: -1373 - rietveldobjects : list of list of Rietveld objects -1374 - stage : int -1375 -1376 Return : RefineSetup -1377 """ -1378 refinesetup = UR.genScaleRefineSetup(self._guideFit, rietveldobjects, stage) -1379 -1380 return refinesetup -
      1381 -1382 # END -- class ScaleGuide -1383 -1384 -
      1385 -class WavelengthGuide(InstrumentGuide): -
      1386 """ Guidance to refine wavelength parameters -1387 """ -
      1388 - def getRietveldObjects(self, component): -
      1389 """ Get Pattern that holds the zero-shift parameter -1390 -1391 Argument: -1392 - component : RietveldComponent -1393 -1394 Return : list, [rietveld-object (main), rietvel] -1395 """ -1396 rietobject = component.getPattern() -1397 -1398 return ( [rietobject] ) -
      1399 -1400 -
      1401 - def generateRefineSetup(self, rietveldobjects, stage = 1): -
      1402 """ Generate RefinementSetup for this specific RefineGuide -1403 -1404 Argument: -1405 - rietveldobjects : list of list of Rietveld objects -1406 - stage : int -1407 -1408 Return : RefineSetup -1409 """ -1410 refinesetup = UR.genWavelengthRefineSetup(self._guideFit, rietveldobjects, stage) -1411 -1412 return refinesetup -
      1413 -1414 # END-DEF-CLASS WavelengthGuide -1415 -1416 -
      1417 -class ZeroGuide(InstrumentGuide): -
      1418 """ Guidance to refine zero parameters -1419 """ -
      1420 - def getRietveldObjects(self, component): -
      1421 """ Get Pattern that holds the zero-shift parameter -1422 -1423 Argument: -1424 - component : RietveldComponent -1425 -1426 Return : list, [rietveld-object (main), rietvel] -1427 """ -1428 rietobject = component.getPattern() -1429 -1430 return ( [rietobject] ) -
      1431 -1432 -
      1433 - def generateRefineSetup(self, rietveldobjects, stage = 1): -
      1434 """ Generate RefinementSetup for this specific RefineGuide -1435 -1436 Argument: -1437 - rietveldobjects : list of list of Rietveld objects -1438 - stage : int -1439 -1440 Return : RefineSetup -1441 """ -1442 refinesetup = UR.genZeroRefineSetup(self._guideFit, rietveldobjects) -1443 -1444 return refinesetup -
      1445 -1446 # END -- class ZeroGuide(RefineGuide) -1447 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.ADPGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.ADPGuide-class.html deleted file mode 100644 index a26d3a80..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.ADPGuide-class.html +++ /dev/null @@ -1,514 +0,0 @@ - - - - - srrietveld.refineguides.ADPGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class ADPGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ADPGuide

      source code

      -
      -RefineGuide --+    
      -              |    
      -      AtomGuide --+
      -                  |
      -                 ADPGuide
      -
      - -
      -class to guide refinement on atomic displacement factor

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getRietveldObjects(self, - atom)
      - Get atom object of given atom object...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietobjectlist, - stage=1)
      - Generate RefineSetup...
      - source code - -
      - -
          Inherited from AtomGuide
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - Examine a diffpy.rietveldapi.Fit instance in order to -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters controlled by this Guide!...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getRietveldObjects(self, - atom) -

      -
      source code  -
      - -
      -Get atom object of given atom object
      -
      -Argument:
      -- atom  :   Atom
      -
      -Return  :   ADP
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetup(self, - rietobjectlist, - stage=1) -

      -
      source code  -
      - -
      -Generate RefineSetup
      -
      -Argument:
      -- fit           :   Fit object
      -- rietobject    :   list, of list of Rietveld object
      -- state         :   int, 
      -
      -Return          :   ADPRefineSetup
      -
      -
      -
      -
      Overrides: - RefineGuide.generateRefineSetup -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.AbsorptionCorrectionGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.AbsorptionCorrectionGuide-class.html deleted file mode 100644 index 8611186a..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.AbsorptionCorrectionGuide-class.html +++ /dev/null @@ -1,520 +0,0 @@ - - - - - srrietveld.refineguides.AbsorptionCorrectionGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class AbsorptionCorrectionGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class AbsorptionCorrectionGuide

      source code

      -
      -RefineGuide --+
      -              |
      -             AbsorptionCorrectionGuide
      -
      - -
      -Refine guide TOF absorption correction

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getRietveldObjects(self, - component)
      - get the Rietveld object from RietveldComponent - -Argument: -- component : RietveldComponent - -Convention : In SrRietveld, the first item in the return list - is the major Rietveld object to set up refine - The others are there for help.
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - Examine a diffpy.rietveldapi.Fit instance in order to -1.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters controlled by this Guide!...
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getRietveldObjects(self, - component) -

      -
      source code  -
      - -
      -get the Rietveld object from RietveldComponent
      -
      -Argument:   
      -- component :   RietveldComponent
      -
      -Convention  :   In SrRietveld, the first item in the return list
      -                is the major Rietveld object to set up refine
      -                The others are there for help.
      -                The sequence will be specified in each extended class
      -
      -Return      :   list, [rietveld-object (main), rietveld-object, ..]
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetup(self, - rietveldobjects, - stage=1) -

      -
      source code  -
      - -
      -Generate RefinementSetup for this specific RefineGuide
      -
      -Argument:
      -- rietveldobjects   :   list, of list, of Rietveld objects
      -- stage             :   int
      -
      -Return              :   RefineSetup
      -
      -
      -
      -
      Overrides: - RefineGuide.generateRefineSetup -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.AtomGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.AtomGuide-class.html deleted file mode 100644 index d52a6794..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.AtomGuide-class.html +++ /dev/null @@ -1,526 +0,0 @@ - - - - - srrietveld.refineguides.AtomGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class AtomGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class AtomGuide

      source code

      -
      -RefineGuide --+
      -              |
      -             AtomGuide
      -
      - -
      Known Subclasses:
      -
      - ADPGuide, - FractionalCoordinateGuide -
      - -
      -
      -StructureGuide is to guide the refinement
      -on parameters related to structure model
      -
      -Assumption: 
      -1. Rietveld parameters belonged to different phases are not correlated
      -
      -Algorithm applied:
      --  refine one Rietveld object, such as one atom's position (x, y, z), or
      -   one atom's Biso at each atom.
      --  do not consider the efficiency to refine two atom's parameters 
      -   simulataneously if they belonged to different phase;
      -   This may increase some unnecessary steps, but it will keep the algorithm
      -   and behavior of the codes more clear;
      -   a) In multiple-phase situation, whether refining 2 or more phases together 
      -      can cause some problem is unknown
      -   b) In co-refinement on different material situation, since it is usually
      -      applied to instrument calibration, the structure of material is
      -      simple
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - Examine a diffpy.rietveldapi.Fit instance in order to -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters controlled by this Guide!...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getGuideConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -Examine a diffpy.rietveldapi.Fit instance in order to 
      -1. set up a series of RefineSetup bound to corresponding 
      -   diffpy.rietveldapi objects
      -2. return how many steps to refine parameters 
      -
      -Virtual function
      -
      -Arguements:
      -- fit   :   diffpy.rietveldapi.Fit instance
      -- stage :   int, 
      -
      -Return  :   integer, number of steps for a sequence of refine    
      -
      -
      -
      -
      Overrides: - RefineGuide.getGuideConfig -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefineAllConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -
      -Obtain the information to refine all the paramaters controlled by this Guide!
      -
      -Arguments:
      -- fit   :   diffpy.rietveldapi.Fit
      -
      -Return  :   3-tuple (constraint, rietobj, parname)
      -
      -
      -
      -
      Overrides: - RefineGuide.getRefineAllConfig -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.BackgroundGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.BackgroundGuide-class.html deleted file mode 100644 index c1632cda..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.BackgroundGuide-class.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - - srrietveld.refineguides.BackgroundGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class BackgroundGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class BackgroundGuide

      source code

      -
      - RefineGuide --+    
      -               |    
      -MeasurementGuide --+
      -                   |
      -                  BackgroundGuide
      -
      - -
      -Guidance for backgrounds parameters

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getRietveldObjects(self, - component)
      - get the Rietveld object from RietveldComponent...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
          Inherited from MeasurementGuide
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - Examine a diffpy.rietveldapi.Fit instance in order to -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters ...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getRietveldObjects(self, - component) -

      -
      source code  -
      - -
      -get the Rietveld object from RietveldComponent
      -
      -Argument:   
      -- component :   RietveldComponent
      -
      -Return      :   list, [Background object, Pattern object]
      -
      -
      -
      -
      Overrides: - MeasurementGuide.getRietveldObjects -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetup(self, - rietveldobjects, - stage=1) -

      -
      source code  -
      - -
      -Generate RefinementSetup for this specific RefineGuide
      -
      -Argument:
      -- rietveldobjects   :   list, of list, of Rietveld objects
      -- stage             :   int
      -
      -Return              :   RefineSetup
      -
      -
      -
      -
      Overrides: - RefineGuide.generateRefineSetup -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.ExpDecayGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.ExpDecayGuide-class.html deleted file mode 100644 index 75f1ffce..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.ExpDecayGuide-class.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - - srrietveld.refineguides.ExpDecayGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class ExpDecayGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ExpDecayGuide

      source code

      -
      -RefineGuide --+    
      -              |    
      -InstrumentGuide --+
      -                  |
      -                 ExpDecayGuide
      -
      - -
      -
      -Refinement guidance on exponential decay parameters
      -Algorithm:
      -    the exponential decay/peak profile of different phases shouldn't interefere with each other, 
      -    because they are determining the peaks' shape belonged to different sets,
      -    therefore, 
      -    1. exponential decay parameters belonged to different phases but of same Rietveld Component
      -       must be same!
      -    2. exponential decay parameters belonged to different patterns (different instruments)
      -       can be refined simultaneously 
      -    From assumption 1 and 2, the conclusion is that
      -    EVERY Expoenetial Decay IS INDEPENDENT OF THE OTHERS Class to guide the refine of Peak-Shape
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getRietveldObjects(self, - component)
      - Get Pattern that holds the zero-shift parameter...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
          Inherited from InstrumentGuide
      -   - - - - - - -
      getComponents(self, - fit)
      - Get RietveldComponents from Fit instance...
      - source code - -
      - -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - return how many steps to refine parameters ...
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters ...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getRietveldObjects(self, - component) -

      -
      source code  -
      - -
      -Get Pattern that holds the zero-shift parameter
      -
      -Argument:   
      -- component :   RietveldComponent
      -
      -Return      :   list, [rietveld-object (main), rietvel]
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetup(self, - rietveldobjects, - stage=1) -

      -
      source code  -
      - -
      -Generate RefinementSetup for this specific RefineGuide
      -
      -Argument:
      -- rietveldobjects   :   list of list of Rietveld objects
      -- stage             :   int
      -
      -Return              :   RefineSetup
      -
      -
      -
      -
      Overrides: - RefineGuide.generateRefineSetup -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.FractionalCoordinateGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.FractionalCoordinateGuide-class.html deleted file mode 100644 index 2e5287c8..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.FractionalCoordinateGuide-class.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - - srrietveld.refineguides.FractionalCoordinateGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class FractionalCoordinateGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class FractionalCoordinateGuide

      source code

      -
      -RefineGuide --+    
      -              |    
      -      AtomGuide --+
      -                  |
      -                 FractionalCoordinateGuide
      -
      - -
      -Class to guide refinement on atoms' fractional coordinates

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getRietveldObjects(self, - atom)
      - Get atom object of given atom object...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietobjectslist, - stage)
      - Generate RefineSetup...
      - source code - -
      - -
          Inherited from AtomGuide
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - Examine a diffpy.rietveldapi.Fit instance in order to -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters controlled by this Guide!...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getRietveldObjects(self, - atom) -

      -
      source code  -
      - -
      -Get atom object of given atom object
      -
      -Argument:
      -- atom  :   Atom
      -
      -Return  :   Atom
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetup(self, - rietobjectslist, - stage) -

      -
      source code  -
      - -
      -Generate RefineSetup
      -
      -Argument:
      -- rietobjectslist   :   list of list of Rietveld objects
      -- stage :   int
      -
      -Return          :   AtomFractionCoordinateRefineSetup
      -
      -
      -
      -
      Overrides: - RefineGuide.generateRefineSetup -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.InstrumentGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.InstrumentGuide-class.html deleted file mode 100644 index 1bd6ca80..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.InstrumentGuide-class.html +++ /dev/null @@ -1,560 +0,0 @@ - - - - - srrietveld.refineguides.InstrumentGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class InstrumentGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class InstrumentGuide

      source code

      -
      -RefineGuide --+
      -              |
      -             InstrumentGuide
      -
      - -
      Known Subclasses:
      -
      - ExpDecayGuide, - PeakShapeGuide, - ScaleGuide, - WavelengthGuide, - ZeroGuide -
      - -
      -
      -Guidance for instrument related parammeters
      -
      -Assumption:
      -1. the parameters belonged to different instrument setup 
      -   must be independent, i.e., they can be refined 
      -   simultaneously
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getComponents(self, - fit)
      - Get RietveldComponents from Fit instance...
      - source code - -
      - -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - return how many steps to refine parameters ...
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters ...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getComponents(self, - fit) -

      -
      source code  -
      - -
      -Get RietveldComponents from Fit instance
      -This function is intended to be overriden in special case
      -
      -Arguement:
      -- fit   :   Fit instance
      -
      -Return  :   list of list RietveldComponent
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getGuideConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -
      -return how many steps to refine parameters 
      -
      -Arguements:
      -- fit       :   diffpy.rietveldapi Fit instance
      -
      -Return      -   integer, number of steps for a sequence of refine
      -
      -
      -
      -
      Overrides: - RefineGuide.getGuideConfig -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefineAllConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -
      -Obtain the information to refine all the paramaters 
      -controlled by this Guide
      -
      -Arguments:
      -- fit   :   diffpy.rietveldapi.Fit
      -- stage :   int
      -
      -Return  :   3-tuple (constraint, rietobj, parname)
      -
      -
      -
      -
      Overrides: - RefineGuide.getRefineAllConfig -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.LatticeGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.LatticeGuide-class.html deleted file mode 100644 index 9200cced..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.LatticeGuide-class.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - - srrietveld.refineguides.LatticeGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class LatticeGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class LatticeGuide

      source code

      -
      -RefineGuide --+
      -              |
      -             LatticeGuide
      -
      - -
      -
      -Refinement guidance on lattice parameter
      -We allow the freedom for each Phase of each Component to
      -have different lattice parameter. 
      -For example
      -1. MnAs is measured by both NPDF and RAPDF.  A corefinement
      -   is preferred.  Because the temperatures at the experiment
      -   can be different, the lattice parameters then are different
      -   between two measurement
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - Examine a diffpy.rietveldapi.Fit instance in order to -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters ...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getGuideConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -Examine a diffpy.rietveldapi.Fit instance in order to 
      -1. set up a series of RefineSetup bound to corresponding 
      -   diffpy.rietveldapi objects
      -2. return how many steps to refine parameters 
      -
      -1. Necessary parameters includes
      -a, b, c
      -alpha, beta, gamma if they are not 90
      -
      -2. Constraint will be set according to the space group
      -
      -3. extra: need to consider the case multiple patterns share phases!      Arguements:
      -- fit   :   diffpy.rietveldapi.Fit instance
      -
      -Arguements:
      -- fit   :   diffpy.rietveldapi.Fit instance
      -- stage :   int, 
      -
      -Return  :   integer, number of steps for a sequence of refine    
      -
      -
      -
      -
      Overrides: - RefineGuide.getGuideConfig -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefineAllConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -Obtain the information to refine all the paramaters 
      -controlled by this Guide
      -
      -Arguments:
      -- fit   :   diffpy.rietveldapi.Fit
      -- stage :   int
      -
      -Return  :   3-tuple (constraint, rietobj, parname)
      -
      -
      -
      -
      Overrides: - RefineGuide.getRefineAllConfig -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.MeasurementGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.MeasurementGuide-class.html deleted file mode 100644 index 8e2d9226..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.MeasurementGuide-class.html +++ /dev/null @@ -1,574 +0,0 @@ - - - - - srrietveld.refineguides.MeasurementGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class MeasurementGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class MeasurementGuide

      source code

      -
      -RefineGuide --+
      -              |
      -             MeasurementGuide
      -
      - -
      Known Subclasses:
      -
      - BackgroundGuide -
      - -
      -
      -MeasurementGuide is the guidance for parameters related to 
      -specific measurement, for example
      -1. same instrument, same sample, same time, but different banks
      -2. same instrument, different sample, 
      -3. different instrument, same sample, different time,
      -
      -Assumption:  Each pattern/RietveldComponent is an individual measurement
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - Examine a diffpy.rietveldapi.Fit instance in order to -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters ...
      - source code - -
      - -
      -   - - - - - - -
      getRietveldObjects(self, - component)
      - get the Rietveld object from RietveldComponent - -Argument: -- component : RietveldComponent - -Convention : In SrRietveld, the first item in the return list - is the major Rietveld object to set up refine - The others are there for help.
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getGuideConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -Examine a diffpy.rietveldapi.Fit instance in order to 
      -1. set up a series of RefineSetup bound to corresponding 
      -   diffpy.rietveldapi objects
      -2. return how many steps to refine parameters 
      -
      -Virtual function
      -
      -Arguements:
      -- fit   :   diffpy.rietveldapi.Fit instance
      -- stage :   int, 
      -
      -Return  :   integer, number of steps for a sequence of refine    
      -
      -
      -
      -
      Overrides: - RefineGuide.getGuideConfig -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefineAllConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -
      -Obtain the information to refine all the paramaters 
      -controlled by this Guide
      -
      -Arguments:
      -- fit   :   diffpy.rietveldapi.Fit
      -- stage :   int
      -
      -Return  :   3-tuple (constraint, rietobj, parname)
      -
      -
      -
      -
      Overrides: - RefineGuide.getRefineAllConfig -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRietveldObjects(self, - component) -

      -
      source code  -
      - -
      -get the Rietveld object from RietveldComponent
      -
      -Argument:   
      -- component :   RietveldComponent
      -
      -Convention  :   In SrRietveld, the first item in the return list
      -                is the major Rietveld object to set up refine
      -                The others are there for help.
      -                The sequence will be specified in each extended class
      -
      -Return      :   list, [rietveld-object (main), rietveld-object, ..]
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.OccupancyGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.OccupancyGuide-class.html deleted file mode 100644 index ff612de8..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.OccupancyGuide-class.html +++ /dev/null @@ -1,507 +0,0 @@ - - - - - srrietveld.refineguides.OccupancyGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class OccupancyGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class OccupancyGuide

      source code

      -
      -RefineGuide --+
      -              |
      -             OccupancyGuide
      -
      - -
      -Refine guide on atom's occupancy

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getRietveldObjects(self, - atom)
      - Get atom object of given atom object...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietobject, - stage)
      - Generate RefineSetup...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - Examine a diffpy.rietveldapi.Fit instance in order to -1.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters controlled by this Guide!...
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getRietveldObjects(self, - atom) -

      -
      source code  -
      - -
      -Get atom object of given atom object
      -
      -Argument:
      -- atom  :   Atom
      -
      -Return  :   Atom
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetup(self, - rietobject, - stage) -

      -
      source code  -
      - -
      -Generate RefineSetup
      -
      -Argument:
      -- rietobject    :   Rietveld object
      -
      -Return          :   ADPRefineSetup
      -
      -
      -
      -
      Overrides: - RefineGuide.generateRefineSetup -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.PeakShapeGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.PeakShapeGuide-class.html deleted file mode 100644 index 3666a757..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.PeakShapeGuide-class.html +++ /dev/null @@ -1,531 +0,0 @@ - - - - - srrietveld.refineguides.PeakShapeGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class PeakShapeGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class PeakShapeGuide

      source code

      -
      -RefineGuide --+    
      -              |    
      -InstrumentGuide --+
      -                  |
      -                 PeakShapeGuide
      -
      - -
      -Class to guide the refine of Peak-Shape

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getRietveldObjects(self, - component)
      - Get Pattern that holds the zero-shift parameter...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjectslist, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
          Inherited from InstrumentGuide
      -   - - - - - - -
      getComponents(self, - fit)
      - Get RietveldComponents from Fit instance...
      - source code - -
      - -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - return how many steps to refine parameters ...
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters ...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getRietveldObjects(self, - component) -

      -
      source code  -
      - -
      -Get Pattern that holds the zero-shift parameter
      -
      -Argument:   
      -- component :   RietveldComponent
      -
      -Return      :   list, [rietveld-object (main), rietvel]
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetup(self, - rietveldobjectslist, - stage=1) -

      -
      source code  -
      - -
      -Generate RefinementSetup for this specific RefineGuide
      -
      -Argument:
      -- rietveldobjectslist   :   list of list of Rietveld objects
      -                            [ [..], [...], ...]
      -- stage                 :   int
      -
      -Return              :   RefineSetup
      -
      -
      -
      -
      Overrides: - RefineGuide.generateRefineSetup -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.RefineGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.RefineGuide-class.html deleted file mode 100644 index 3c6e7b09..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.RefineGuide-class.html +++ /dev/null @@ -1,756 +0,0 @@ - - - - - srrietveld.refineguides.RefineGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class RefineGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class RefineGuide

      source code

      -
      Known Subclasses:
      -
      - AtomGuide, - AbsorptionCorrectionGuide, - MeasurementGuide, - InstrumentGuide, - LatticeGuide, - OccupancyGuide, - SampleGuide -
      - -
      -
      -Virtual base class to guide refinement semi-automatically
      -
      -Concept:
      -  The way to use RefineGuide follows the procedure as
      -  1. use getGuideConfig(guideFit) to examine and set up 
      -     the refinement strategy
      -  2. use setGuideStep(guideFit, step) to turn on some 
      -     variables at a certain step
      -  3. call Fit.refine() to refine
      -
      -Future:
      -  It may be expanded such that some steps can be permuted
      -
      -Class Variables:
      -- _lock             :   lock the logic usage of getGuideConfig() 
      -                        and setGuideStep
      -- _guideFit         :   the Fit instance to guide
      -- _variableslist    :   list of tuples (rietobj, parameter-name) 
      -                        that have been added to refined;
      -
      -                     *  variables will be set to refine by this list
      -
      -- _refinesetupdict  :   dictionary, 
      -                        key:    integer, step from 1 to infinit, 
      -                                *** Note ***
      -                                'step' defined here is the step refinement based on
      -                                RefineSetup. 
      -                                Each 'step' can contain a few of RefineSetup on different
      -                                Rietveld objects;
      -                                Each 'step' can contain more than one 'atomic' refinement step,
      -                                which is defined in RefineSetup
      -                        value:  list of tuples, 
      -                                (UnitRefineSetup, RietObj, IndicesTuple),
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - Examine a diffpy.rietveldapi.Fit instance in order to -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters controlled by this Guide!...
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      resetVisitRecord(self) -

      -
      source code  -
      - -

      Reset the visiting record (gVisit)

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      reset(self) -

      -
      source code  -
      - -

      Reset the RefineGuide set up for a certain Fit instance

      -

      Argument: (None)

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      getGuideConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -
      -Examine a diffpy.rietveldapi.Fit instance in order to 
      -1. set up a series of RefineSetup bound to corresponding 
      -   diffpy.rietveldapi objects
      -2. return how many steps to refine parameters 
      -
      -Virtual function
      -
      -Arguements:
      -- fit   :   diffpy.rietveldapi.Fit instance
      -
      -Return  :   integer, number of steps for a sequence of refine
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefineAllConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -Obtain the information to refine all the paramaters controlled by this Guide!
      -
      -Arguments:
      -- fit   :   diffpy.rietveldapi.Fit
      -
      -Return  :   3-tuple (constraint, rietobj, parname)
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumRefineSteps(self) -

      -
      source code  -
      - -

      Return the (maximum) number of refinement steps scheduled by this - refinement guide

      - Return : int, number of steps -
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumStages(self) -

      -
      source code  -
      - -

      Report the number of stages of this RefineGuide to use

      - Return : integer, number of stages -
      -
      -
      -
      - -
      - -
      - - -
      -

      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False) -

      -
      source code  -
      - -

      Turn on variables scheduled at a certain step in current refine - guidance

      -

      Arguements: fit : diffpy.rietveldapi.Fit instance step - : int, step of refining some parameters in order stage : int, - stage of refining these parameters dry : boolean, dry run means - no mapVP, just return the values

      - Return : list of tuples (constraint, rietveld-object, - parname) -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefinedVariablesList(self) -

      -
      source code  -
      - -

      get the list of refined variables with necessary information, i.e., - self._variableslist

      - Return : list of 3-tuples -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False) -

      -
      source code  -
      - -
      -Use temporary refinesetuplist to set up a dictionary
      -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices
      -for each refinement procedure (step number starting from 1)
      -
      -Argument:
      -- refinesetuplist   :   list of 3-tuples: 
      -                        RefineSetup, list of list of Rietveld objects, list of int (indices)
      -- stage             :   int 
      -- refineseq         :   boolean.    True:  Refine all refinesetup in sequence
      -                                    False: Refine all refinesetup in parallel
      -
      -Return              :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetup(self, - rietveldobjects, - stage=1) -

      -
      source code  -
      - -
      -Generate RefinementSetup for this specific RefineGuide
      -
      -Argument:
      -- rietveldobjects   :   list, of list of Rietveld objects
      -                        [ [main-rietveld-obj, help-1, ...], [main-rietveld-obj, ..], ...]
      -- stage             :   int
      -
      -Return              :   RefineSetup
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      turnOff(self, - fit) -

      -
      source code  -
      - -
      -turn the parameters/variables off from refining,
      -all the parameters/variables are turned on by this RefineGuide
      -
      -Arguement:
      -- fit   :   diffpy.rietveldapi.Fit instance
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.SampleGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.SampleGuide-class.html deleted file mode 100644 index 4551e786..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.SampleGuide-class.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - srrietveld.refineguides.SampleGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class SampleGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class SampleGuide

      source code

      -
      -RefineGuide --+
      -              |
      -             SampleGuide
      -
      - -
      -
      -SampleGuide is the guidance for parameters related to 
      -specific sample, including
      -1. sample property correction
      -2. lattice size
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - Examine a diffpy.rietveldapi.Fit instance in order to -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters ...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getGuideConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -Examine a diffpy.rietveldapi.Fit instance in order to 
      -1. set up a series of RefineSetup bound to corresponding 
      -   diffpy.rietveldapi objects
      -2. return how many steps to refine parameters 
      -
      -Virtual function
      -
      -Arguements:
      -- fit   :   diffpy.rietveldapi.Fit instance
      -- stage :   int, 
      -
      -Return  :   integer, number of steps for a sequence of refine    
      -
      -
      -
      -
      Overrides: - RefineGuide.getGuideConfig -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefineAllConfig(self, - fit, - stage=1) -

      -
      source code  -
      - -
      -
      -Obtain the information to refine all the paramaters 
      -controlled by this Guide
      -
      -Arguments:
      -- fit   :   diffpy.rietveldapi.Fit
      -- stage :   int
      -
      -Return  :   3-tuple (constraint, rietobj, parname)
      -
      -
      -
      -
      Overrides: - RefineGuide.getRefineAllConfig -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.ScaleGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.ScaleGuide-class.html deleted file mode 100644 index 0713b27c..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.ScaleGuide-class.html +++ /dev/null @@ -1,562 +0,0 @@ - - - - - srrietveld.refineguides.ScaleGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class ScaleGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ScaleGuide

      source code

      -
      -RefineGuide --+    
      -              |    
      -InstrumentGuide --+
      -                  |
      -                 ScaleGuide
      -
      - -
      -Refinement guidance on scale factor

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getComponents(self, - fit)
      - Get RietveldComponents from Fit instance...
      - source code - -
      - -
      -   - - - - - - -
      getRietveldObjects(self, - component)
      - Get Pattern that holds the zero-shift parameter...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
          Inherited from InstrumentGuide
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - return how many steps to refine parameters ...
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters ...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getComponents(self, - fit) -

      -
      source code  -
      - -
      -Get RietveldComponents from Fit instance
      -This function is intended to be overriden in special case
      -
      -Arguement:
      -- fit   :   Fit instance
      -
      -Return  :   list of list RietveldComponent
      -
      -
      -
      -
      Overrides: - InstrumentGuide.getComponents -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRietveldObjects(self, - component) -

      -
      source code  -
      - -
      -Get Pattern that holds the zero-shift parameter
      -
      -Argument:   
      -- component :   RietveldComponent
      -
      -Return      :   list, [rietveld-object (main), rietvel]
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetup(self, - rietveldobjects, - stage=1) -

      -
      source code  -
      - -
      -Generate RefinementSetup for this specific RefineGuide
      -
      -Argument:
      -- rietveldobjects   :   list of list of Rietveld objects
      -- stage             :   int
      -
      -Return              :   RefineSetup
      -
      -
      -
      -
      Overrides: - RefineGuide.generateRefineSetup -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.WavelengthGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.WavelengthGuide-class.html deleted file mode 100644 index d09573f0..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.WavelengthGuide-class.html +++ /dev/null @@ -1,530 +0,0 @@ - - - - - srrietveld.refineguides.WavelengthGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class WavelengthGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class WavelengthGuide

      source code

      -
      -RefineGuide --+    
      -              |    
      -InstrumentGuide --+
      -                  |
      -                 WavelengthGuide
      -
      - -
      -Guidance to refine wavelength parameters

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getRietveldObjects(self, - component)
      - Get Pattern that holds the zero-shift parameter...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
          Inherited from InstrumentGuide
      -   - - - - - - -
      getComponents(self, - fit)
      - Get RietveldComponents from Fit instance...
      - source code - -
      - -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - return how many steps to refine parameters ...
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters ...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getRietveldObjects(self, - component) -

      -
      source code  -
      - -
      -Get Pattern that holds the zero-shift parameter
      -
      -Argument:   
      -- component :   RietveldComponent
      -
      -Return      :   list, [rietveld-object (main), rietvel]
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetup(self, - rietveldobjects, - stage=1) -

      -
      source code  -
      - -
      -Generate RefinementSetup for this specific RefineGuide
      -
      -Argument:
      -- rietveldobjects   :   list of list of Rietveld objects
      -- stage             :   int
      -
      -Return              :   RefineSetup
      -
      -
      -
      -
      Overrides: - RefineGuide.generateRefineSetup -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refineguides.ZeroGuide-class.html b/static_root/doc/srrietveld/developers/srrietveld.refineguides.ZeroGuide-class.html deleted file mode 100644 index 1924049c..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refineguides.ZeroGuide-class.html +++ /dev/null @@ -1,530 +0,0 @@ - - - - - srrietveld.refineguides.ZeroGuide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refineguides :: - Class ZeroGuide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ZeroGuide

      source code

      -
      -RefineGuide --+    
      -              |    
      -InstrumentGuide --+
      -                  |
      -                 ZeroGuide
      -
      - -
      -Guidance to refine zero parameters

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      getRietveldObjects(self, - component)
      - Get Pattern that holds the zero-shift parameter...
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetup(self, - rietveldobjects, - stage=1)
      - Generate RefinementSetup for this specific RefineGuide...
      - source code - -
      - -
          Inherited from InstrumentGuide
      -   - - - - - - -
      getComponents(self, - fit)
      - Get RietveldComponents from Fit instance...
      - source code - -
      - -
      -   - - - - - - -
      getGuideConfig(self, - fit, - stage=1)
      - return how many steps to refine parameters ...
      - source code - -
      - -
      -   - - - - - - -
      getRefineAllConfig(self, - fit, - stage=1)
      - Obtain the information to refine all the paramaters ...
      - source code - -
      - -
          Inherited from RefineGuide
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - return the format reprensentation of this RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      generateRefineSetupDictionary(self, - refinesetuplist, - stage=1, - refineseq=False)
      - Use temporary refinesetuplist to set up a dictionary -(instance variable) to hold the RefineSetup, Rietveld Object and naming indices -for each refinement procedure (step number starting from 1) - -Argument: -- refinesetuplist : list of 3-tuples: - RefineSetup, list of list of Rietveld objects, list of int (indices) -- stage : int -- refineseq : boolean.
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self)
      - Return the (maximum) number of refinement steps scheduled by this - refinement guide
      - source code - -
      - -
      -   - - - - - - -
      getNumStages(self)
      - Report the number of stages of this RefineGuide to use
      - source code - -
      - -
      -   - - - - - - -
      getRefinedVariablesList(self)
      - get the list of refined variables with necessary information, - i.e., self._variableslist
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the RefineGuide set up for a certain Fit instance
      - source code - -
      - -
      -   - - - - - - -
      resetVisitRecord(self)
      - Reset the visiting record (gVisit)
      - source code - -
      - -
      -   - - - - - - -
      setGuideStep(self, - fit, - step=1, - stage=1, - dry=False)
      - Turn on variables scheduled at a certain step in current refine - guidance
      - source code - -
      - -
      -   - - - - - - -
      turnOff(self, - fit)
      - turn the parameters/variables off from refining,...
      - source code - -
      - -
      - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineGuide
      -   - - guideDescription = 'Virtual Base Class' -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      getRietveldObjects(self, - component) -

      -
      source code  -
      - -
      -Get Pattern that holds the zero-shift parameter
      -
      -Argument:   
      -- component :   RietveldComponent
      -
      -Return      :   list, [rietveld-object (main), rietvel]
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateRefineSetup(self, - rietveldobjects, - stage=1) -

      -
      source code  -
      - -
      -Generate RefinementSetup for this specific RefineGuide
      -
      -Argument:
      -- rietveldobjects   :   list of list of Rietveld objects
      -- stage             :   int
      -
      -Return              :   RefineSetup
      -
      -
      -
      -
      Overrides: - RefineGuide.generateRefineSetup -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinehistory-module.html b/static_root/doc/srrietveld/developers/srrietveld.refinehistory-module.html deleted file mode 100644 index 10e7574d..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinehistory-module.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - srrietveld.refinehistory - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinehistory - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module refinehistory

      source code

      -

      Refine-History provides the auxiliary classes and external methods for - Multiple-step refinement controller

      - Created On: 2008.09.17

      - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - RefineHistory
      - Class RefineHistory records how a multiple-step refinement - proceeds in a concise and informative manner. -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: refinehistory.py 2792 2009-03-02 15:56:43Z wdzh... -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: refinehistory.py 2792 2009-03-02 15:56:43Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinehistory-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.refinehistory-pysrc.html deleted file mode 100644 index 0e8c03a9..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinehistory-pysrc.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - srrietveld.refinehistory - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinehistory - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.refinehistory

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ 
      - 16    Refine-History provides the auxiliary classes and external methods for  
      - 17    Multiple-step refinement controller  
      - 18     
      - 19    Created On: 2008.09.17 
      - 20  """ 
      - 21  __id__ = "$Id: refinehistory.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      - 22   
      -
      23 -class RefineHistory(object): -
      24 """ - 25 Class RefineHistory records how a multiple-step refinement proceeds - 26 in a concise and informative manner. - 27 It will serve the users with insight about the refinements. - 28 - 29 Methods List: - 30 @ __init__ - 31 - 32 * Contruction: - 33 @ addInfoOfStep(self, step, reftype, residtuple, varnameslist) - 34 @ addSkipStep(self, step) - 35 - 36 * Information Retrieval: - 37 @ getResidueValues(self, step) - 38 - 39 * Internal - 40 @ getNewVariablesList(self, step) - 41 - 42 Class Variables: - 43 @ - 44 """ -
      45 - def __init__(self): -
      46 """ - 47 initialization - 48 """ - 49 self._numsteps = 0 - 50 self._refType = {} - 51 self._rp = {} - 52 self._chi2 = {} - 53 self._rwp = {} - 54 self._re = {} - 55 self._varNames = {} - 56 self._skipStepsList = [] - 57 return -
      58 - 59 -
      60 - def __str__(self): -
      61 """ - 62 Customized output - 63 """ - 64 rstring = "" - 65 rstring += "%-10s%-10s%-10s%-15s%-40s\n"%("Step", "Skip", "Type", "Rp", "New Variables") - 66 for step in xrange(self._numsteps): - 67 if self._skipStepsList.count(step) == 0: - 68 skipbool = False - 69 else: - 70 skipbool = True - 71 newvarnames = self.getNewVariablesList(step) - 72 rstring += "%-10s%-10s%-10s%-15s%-40s\n"% \ - 73 (step, skipbool, self._refType[step], self._rp[step], newvarnames) - 74 - 75 return rstring -
      76 - 77 -
      78 - def addInfoOfStep(self, step, reftype, residtuple, varnameslist): -
      79 """ - 80 Set the information of for a certain step - 81 - 82 Arguement: - 83 - step : int, step number - 84 - reftype : str, "l" or "r" for Le-Bail or Rietveld - 85 - residtuple: tuple of floats as rp, chi2, rwp, re - 86 - varnameslist: list, names of variables refined - 87 """ - 88 self._refType[step] = reftype - 89 self._rp[step], self._chi2[step], self._rwp[step], self._re[step] = residtuple - 90 self._varNames[step] = varnameslist[:] - 91 - 92 self._numsteps = step+1 - 93 - 94 return -
      95 - 96 -
      97 - def addSkipStep(self, step): -
      98 """ - 99 add a step to be step skipped -100 -101 Argument: -102 - step : int, step number -103 -104 Return : None -105 """ -106 self._skipStepsList.append(step) -107 -108 return -
      109 -110 -
      111 - def getResidueValues(self, step): -
      112 """ -113 Get all the 4 residue values of a certain step -114 -115 Arguement: -116 - step : int -117 -118 Return : 4-float-tuple (rp, chi2, rwp, rexp) -119 """ -120 rtuple = (self._rp[step], self._chi2[step], self._rp[step], self._re[step]) -121 -122 return rtuple -
      123 -124 -
      125 - def getNewVariablesList(self, step): -
      126 """ -127 Get the new added refined variables -128 -129 Arguement: -130 - step : int, step number -131 -132 Return : list of str as variables names -133 """ -134 rlist = [] -135 -136 if step == 0: -137 return rlist -138 -139 else: -140 currvarlist = self._varNames[step] -141 prevvarlist = self._varNames[step-1] -142 for varname in currvarlist: -143 if prevvarlist.count(varname) == 0: -144 rlist.append(varname) -145 # END-IF-ELSE -146 -147 return rlist -
      148 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinehistory.RefineHistory-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinehistory.RefineHistory-class.html deleted file mode 100644 index 4d1c45c7..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinehistory.RefineHistory-class.html +++ /dev/null @@ -1,473 +0,0 @@ - - - - - srrietveld.refinehistory.RefineHistory - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinehistory :: - Class RefineHistory - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class RefineHistory

      source code

      -
      -object --+
      -         |
      -        RefineHistory
      -
      - -
      -

      Class RefineHistory records how a multiple-step refinement proceeds in - a concise and informative manner. It will serve the users with insight - about the refinements.

      -

      Methods List: @ __init__

      -

      * Contruction: @ addInfoOfStep(self, step, reftype, residtuple, - varnameslist) @ addSkipStep(self, step)

      -

      * Information Retrieval: @ getResidueValues(self, step)

      -

      * Internal @ getNewVariablesList(self, step)

      - Class Variables: @

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - Customized output
      - source code - -
      - -
      -   - - - - - - -
      addInfoOfStep(self, - step, - reftype, - residtuple, - varnameslist)
      - Set the information of for a certain step...
      - source code - -
      - -
      -   - - - - - - -
      addSkipStep(self, - step)
      - add a step to be step skipped...
      - source code - -
      - -
      -   - - - - - - -
      getResidueValues(self, - step)
      - Get all the 4 residue values of a certain step...
      - source code - -
      - -
      -   - - - - - - -
      getNewVariablesList(self, - step)
      - Get the new added refined variables...
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__ -

      -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self) -
      (Constructor) -

      -
      source code  -
      - - initialization -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      __str__(self) -
      (Informal representation operator) -

      -
      source code  -
      - - Customized output -
      -
      Overrides: - object.__str__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      addInfoOfStep(self, - step, - reftype, - residtuple, - varnameslist) -

      -
      source code  -
      - -
      -
      -Set the information of for a certain step
      -
      -Arguement:
      -- step      :   int, step number
      -- reftype   :   str, "l" or "r" for Le-Bail or Rietveld
      -- residtuple:   tuple of floats as rp, chi2, rwp, re
      -- varnameslist: list, names of variables refined
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      addSkipStep(self, - step) -

      -
      source code  -
      - -
      -
      -add a step to be step skipped
      -
      -Argument:
      -- step  :   int, step number
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getResidueValues(self, - step) -

      -
      source code  -
      - -
      -
      -Get all the 4 residue values of a certain step
      -
      -Arguement:
      -- step  :   int
      -
      -Return  :   4-float-tuple (rp, chi2, rwp, rexp)
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getNewVariablesList(self, - step) -

      -
      source code  -
      - -
      -
      -Get the new added refined variables
      -
      -Arguement:
      -- step  :   int, step number
      -
      -Return  :   list of str as variables names
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinemanager-module.html b/static_root/doc/srrietveld/developers/srrietveld.refinemanager-module.html deleted file mode 100644 index 50e9cc95..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinemanager-module.html +++ /dev/null @@ -1,473 +0,0 @@ - - - - - srrietveld.refinemanager - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinemanager - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module refinemanager

      source code

      -
      -
      -Single fit control for refinement featuring
      -a. multiple-step Rietveld fitting controller
      -b. real time refinement result analysis
      -c. multiple-step refinement based on restrict order
      -d. multiple-step refinement with recommended order
      -
      -Class MultiStepRefineManager
      -
      -  * Setup & Refine Methods
      -     -  __init__(self, myfit)
      -     -  refine(self, refinestrategy)
      -     -  save(self, savefilename=None)
      -
      -  * Information Retrieval Methods
      -     -  getRefineStrategy(self)
      -     -  getCurrentFit(self)
      -     -  getBestStep(self)
      -     -  getNumSteps(self)
      -     -  getFitOfStep(self, step)
      -     -  getFitDetailOfStep(self, step)
      -     -  getHistory(self)
      -
      -  * Private Methods
      -     -  getPrevStepRefinedVariables(self, thestep)  
      -     -  leapBack(self, backstep)
      -     -  recordSolution(self, stepinfotuple, refinedetail, varnameslist)
      -
      -
      -External Functions
      --  loadMultiStepRefinements()
      -
      -a. refineguidePoolGenerator()
      -b. getPermutationList(itemlist)
      -c. getProcessID()
      -
      -
      -Created On: 2008.06.02
      -
      -


      - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - MultiStepRefineManager
      - Class to realize central controling on multiple step refinement -on a single structure refinement may covering from -Le-Bail (peak profile matching) and Rietveld Refinement - -This class is designed towards automatic refinement - -Scenario to Use: -> mm = MultiStepRefineManager(myfit) -> mm.refine(POWGENRefineControl()) -> mm.showResult() -> ... -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      getProcessID()
      - Get a number according to time
      - source code - -
      - -
      -   - - - - - - -
      loadMultiStepRefinements(picklefname)
      - Open a pickle file and load a MultiStepRefinementManager ...
      - source code - -
      - -
      -   - - - - - - -
      isSinglePatternType(myfit)
      - To find out whether a Fit instance is composed of single type of Pattern...
      - source code - -
      - -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: refinemanager.py 2918 2009-03-18 19:26:39Z wdzh... -
      -   - - _DEBUG = True -
      -   - - _DEBUG01 = False -
      -   - - _DBOUTPUT = False -
      -   - - _MEMCHECK = False -
      -   - - _SCREENOUTPUT = True -
      -   - - myEngine = <diffpy.srrietveld.refinebackend.RietveldEngine ins... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      getProcessID() -

      -
      source code  -
      - -

      Get a number according to time

      - Return : str, as ID -
      -
      -
      -
      - -
      - -
      - - -
      -

      loadMultiStepRefinements(picklefname) -

      -
      source code  -
      - -
      -
      -Open a pickle file and load a MultiStepRefinementManager 
      -
      -Arguments:
      -- picklefname:  string, pickle file name
      -
      -Return      :   MultiStepRefinementManager instance
      -
      -Exception   :
      -- Pickle file error
      -- Loaded object is not MultiStepRefinementManager
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      isSinglePatternType(myfit) -

      -
      source code  -
      - -
      -To find out whether a Fit instance is composed of single type of Pattern
      -
      -Argument:
      -- myfit :   Fit
      -
      -Return  :   boolean
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: refinemanager.py 2918 2009-03-18 19:26:39Z wdzhou $'
      -
      -
      -
      -
      -
      - -
      - -
      -

      myEngine

      - -
      -
      -
      -
      Value:
      -
      -<diffpy.srrietveld.refinebackend.RietveldEngine instance at 0xb7ac124c\
      ->
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinemanager-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.refinemanager-pysrc.html deleted file mode 100644 index 77be3150..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinemanager-pysrc.html +++ /dev/null @@ -1,1112 +0,0 @@ - - - - - srrietveld.refinemanager - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinemanager - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.refinemanager

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15    Single fit control for refinement featuring 
      - 16    a. multiple-step Rietveld fitting controller 
      - 17    b. real time refinement result analysis 
      - 18    c. multiple-step refinement based on restrict order 
      - 19    d. multiple-step refinement with recommended order 
      - 20   
      - 21    Class MultiStepRefineManager 
      - 22   
      - 23      * Setup & Refine Methods 
      - 24         -  __init__(self, myfit) 
      - 25         -  refine(self, refinestrategy) 
      - 26         -  save(self, savefilename=None) 
      - 27   
      - 28      * Information Retrieval Methods 
      - 29         -  getRefineStrategy(self) 
      - 30         -  getCurrentFit(self) 
      - 31         -  getBestStep(self) 
      - 32         -  getNumSteps(self) 
      - 33         -  getFitOfStep(self, step) 
      - 34         -  getFitDetailOfStep(self, step) 
      - 35         -  getHistory(self) 
      - 36   
      - 37      * Private Methods 
      - 38         -  getPrevStepRefinedVariables(self, thestep)   
      - 39         -  leapBack(self, backstep) 
      - 40         -  recordSolution(self, stepinfotuple, refinedetail, varnameslist) 
      - 41   
      - 42   
      - 43    External Functions 
      - 44    -  loadMultiStepRefinements() 
      - 45   
      - 46    a. refineguidePoolGenerator() 
      - 47    b. getPermutationList(itemlist) 
      - 48    c. getProcessID() 
      - 49   
      - 50   
      - 51    Created On: 2008.06.02 
      - 52  """ 
      - 53  __id__ = "$Id: refinemanager.py 2918 2009-03-18 19:26:39Z wdzhou $" 
      - 54   
      - 55  import  os 
      - 56  from    diffpy.refinementapi.exceptiontools import verifyType 
      - 57  from    diffpy.refinementapi.errors         import FitConfigurationError 
      - 58  from    diffpy.srrietveld                          import * 
      - 59  import  diffpy.rietveldapi.Fit              as     APIFit 
      - 60  from    diffpy.srrietveld                          import * 
      - 61   
      - 62  _DEBUG = True 
      - 63  _DEBUG01 = False 
      - 64  _DBOUTPUT = False 
      - 65  _MEMCHECK = False 
      - 66  _SCREENOUTPUT = True 
      - 67   
      -
      69 """ - 70 Class to realize central controling on multiple step refinement - 71 on a single structure refinement may covering from - 72 Le-Bail (peak profile matching) and Rietveld Refinement - 73 - 74 This class is designed towards automatic refinement - 75 - 76 Scenario to Use: - 77 > mm = MultiStepRefineManager(myfit) - 78 > mm.refine(POWGENRefineControl()) - 79 > mm.showResult() - 80 > ... ... - 81 - 82 Class Variable: - 83 _stepsize: integer for multiple step refinement, 1<=stepsize - 84 _rgpool: dictionary of list of RefineGuides: RefineGuidePool = rgpool - 85 like 2-D array (matrix) - 86 rgpool[i][j]: i -> refine at i-th step - 87 j -> all RefineGuides at i-th step will be refined in all permutated sequence - 88 _currFit : current Fit instance - 89 _currStep current step for current Fit - 90 _curGuidesList: current RefineGuides list (no sequence) - 91 _fitsInfoList: list of 4-tuples including: - 92 1. Fit instance - 93 2. Refine-Detail instance - 94 3. 3-tuple as Step-information - 95 4. Variable Names List - 96 _skipStepsList: list of int for steps that are skipped because of bad refinement - 97 """ -
      98 - def __init__(self, myfit): -
      99 """ Initialization -100 -101 Arguement: -102 - myfit : Fit instance -103 -104 Return : None -105 """ -106 import time -107 -108 verifyType(myfit, APIFit.Fit) -109 -110 # 1. Set up class variable -111 self._currFit = myfit -112 self._currStep = 0 -113 -114 self._fitsInfoList = [] -115 self._fitsPool = {} -116 self._skipStepsList = [] -117 -118 # 2. Memory check if necessary -119 if _MEMCHECK is True: -120 import monitormem as MM -121 mem_mon = MM.MemoryMonitor() -122 mem_mon.register(self._currFit) -123 mem_mon.register(self._currFit._srfit) -124 # END-IF -125 -126 return -
      127 -128 -
      129 - def getRefineStrategy(self): -
      130 """ -131 Give the refine strategy used now -132 """ -133 return self._refinestrategy -
      134 -135 -
      136 - def getCurrentFit(self): -
      137 """ -138 Provide the handler to the current Fit instance -139 -140 Return : Fit instance -141 """ -142 return self._currFit -
      143 -144 -
      145 - def refine(self, refinestrategy, weightscheme="standard"): -
      146 """ -147 Multiple-step refinement on starting Fitting configuration according to input -148 refinement strategy -149 -150 Automatic refinement will be based on some heuristic 'refinement strategy' -151 coupled with some algorithm with automatic judgement -152 -153 Status : coded -154 Type : basic -155 -156 Assumption: -157 1. In each Refine-Guide-Step, NO Rietveld object will be removed or replaced -158 2. In different Refine-Guide-Steps, Rietveld object may be removed or replaced -159 -160 Argument -161 - refinestrategy : RefineStrategy object -162 - weightscheme : str, refining weighting scheme, {standard, unit-weight} -163 -164 Return : 2-tuple: RefineDetail, str (process ID) -165 """ -166 import diffpy.srrietveld.refinehistory as RH -167 -168 # A. Information Process -169 self._refinestrategy = refinestrategy -170 self._prevRefineGuidesList = [] -171 self._stepMapDict = {} -172 self._refhistory = RH.RefineHistory() -173 numguidesteps = refinestrategy.getNumRefineGuideSteps() -174 overallstep = 0 # used to record over all step from 0, 0 is dry run -175 -176 # B. Backup Directory -177 processid = getProcessID() -178 self._processid = processid -179 os.mkdir(processid) -180 -181 # Step 1: A Dry Run -182 refinedetail = self._currFit.refine(cycle=5, srtype="lebail", mode="refine", signature=["dry", processid]) -183 -184 if refinedetail.getRefineStatus() is False: -185 failreason = refinedetail.getFailReason() -186 # Deal with any fail reason -187 if failreason == "Excessive Peak Overlap": -188 errmsg = "Refinement Fail Reason: %-20s; Suggest to modify Excluded Region; Refinement Stopped"% (failreason) -189 print "\n%-40s\n"% (errmsg) -190 raise FitConfigurationError(errmsg) -191 else: -192 print "Refinement Fail Reason: %-20s"% (failreason) -193 -194 self.recordSolution("dry", refinedetail, []) -195 currRwp = refinedetail.getResidueValue(-1, residname="rwp") -196 self._refhistory.addInfoOfStep(0, "lebail", refinedetail.getResidueValue(-1, residname="all"), []) -197 -198 # Loop Leve 1 -199 prevrefinetype = None -200 absstep = 0 -201 for strategystep in xrange(1, numguidesteps+1): -202 -203 # 0. Prepare -204 prevRwp = currRwp -205 self._stepMapDict[strategystep] = [] -206 -207 # 1. Add RefineGuide in Previous Guide-Step and Set up Refinement -208 # Condition (1) guidestep > 1, i.e., not 1st guide -209 # (2) discontinue between LeBail and Rietveld -210 guideslist = self._refinestrategy.getRefineGuidesOfStep(strategystep) -211 currefinetype = self._refinestrategy.getRefineTypeOfStep(strategystep) -212 if prevrefinetype != currefinetype: -213 # 1.1 Reset prevRefinedVariablesList due to a new refinement type -214 prevRefinedVariablesList = [] -215 -216 # 2. Get 'new' guide list for refine steps number and -217 # max refine steps (guideslist (new guide)) -218 maxnumrefinesteps = 0 -219 for rguide, stage in guideslist: -220 -221 rguide.getGuideConfig(self._currFit, stage) -222 -223 numrefinesteps = rguide.getNumRefineSteps() -224 if numrefinesteps > maxnumrefinesteps: -225 maxnumrefinesteps = numrefinesteps -226 -227 if _DEBUG is True: -228 msg = "Guide: %-20s Stage = %-5s Num-Refine-Steps = %-5s\n" % \ -229 (rguide.__class__.__name__, stage, maxnumrefinesteps) -230 print msg -231 # END-IF -232 # LOOP OVER - for guide in guideslist: -233 -234 # 3. refine one step by step... and output -235 # Loop Level 2 -236 for refinestep in xrange(1, maxnumrefinesteps+1): -237 -238 # Loop Level 3 -239 for gindex in xrange(len(guideslist)): -240 # 3.0 Get guide, stage; reset refine variable list -241 guide, stage = guideslist[gindex] -242 if currefinetype != prevrefinetype: -243 prevRefineVariablesList = [] -244 -245 # 3.1 Set previous setup (due to fixAll) RefineGuides ... -246 for rtuple in prevRefinedVariablesList: -247 constraint, rietobj, parname = rtuple -248 self._currFit.mapVP(constraint, rietobj, parname) -249 -250 # 3.2 Variables Set To Refine All NEW Parameters/Variables -251 # and Update current step refined variable tuple list -252 tempvartupleslist = guide.setGuideStep(self._currFit, refinestep, stage, dry=False) -253 if not self._refinestrategy.removeGuideAtStep(strategystep): -254 prevRefinedVariablesList.extend(tempvartupleslist) -255 varnameslist = self._currFit.getRefinedVariablesList() -256 -257 if _SCREENOUTPUT is True: -258 refmsg = "Guide Step = %-10s Over-all Step = %-5s Refine-Type = %-10s\n"% \ -259 (gindex, overallstep, currefinetype) -260 refmsg += "%-10sNew Variables: \n"% ("") -261 firstline = True -262 for vartuple in tempvartupleslist: -263 if firstline is True: -264 firstline = False -265 refmsg += "%-20s%-20s: %-20s\n"% ("", vartuple[0], vartuple[2]) -266 else: -267 refmsg += "%-20s%-20s: %-20s\n"% ("", vartuple[0], vartuple[2]) -268 print refmsg -269 # END-IF -270 -271 # 3.3 Refine, record and analysis -272 # 3.3.1 Prepare for controlling parameters -273 sig = str(strategystep)+"_"+str(refinestep)+"_"+str(gindex) -274 overallstep += 1 -275 -276 # 3.3.2 Refine and record -277 refinedetail = self._currFit.refine(srtype=currefinetype, weightscheme=weightscheme, mode="refine", signature=[sig, processid]) -278 self.recordSolution( (strategystep, refinestep, gindex), refinedetail, varnameslist ) -279 self._stepMapDict[strategystep].append(len(self._fitsInfoList)-1) -280 if refinedetail.getRefineStatus() is True: -281 residtuple = refinedetail.getResidueValue(-1, residname="all") -282 else: -283 residtuple = [1.0E+20, 1.0E+20, 1.0E+20, 1.0E+20] -284 self._refhistory.addInfoOfStep(overallstep, currefinetype, residtuple, varnameslist) -285 -286 # 3.3.3 Analyze result to see (1) 'leapback' is necessary or not -287 rewind = False -288 # Analysis 1: refinement error -289 if refinedetail.getRefineStatus() is False: -290 rewind = True -291 if _SCREENOUTPUT is True: -292 errmsg = "Warning! Refine Fail Reason: %-30s"% (refinedetail.getFailReason()) -293 print errmsg -294 else: -295 # Analysis 2: a worse Rwp -296 currRwp = refinedetail.getResidueValue(-1, residname="rwp") -297 if prevrefinetype == currefinetype: -298 if (rewind is False and prevRwp*1.25 < currRwp) or (currRwp< 0): -299 rewind = True -300 # END-IF: refinedetail.getRefineStatus() is False: -301 -302 # 3.3.4 Re-wind/leap back by 1 -303 if rewind is True: -304 self._refhistory.addSkipStep(overallstep) -305 prevRefinedVariablesList, prevrefinetype, newguideslist, currrefstep = self.leapBack(1) -306 if newguideslist is not None: -307 guideslist = newguideslist -308 currRwp = self._fitsInfoList[-2][1].getResidueValue(-1, residname="rwp") -309 else: -310 # update control parameter -311 prevrefinetype = currefinetype -312 -313 # 3.4 Interval Output -314 if _DBOUTPUT: -315 msg = "%-20schi2 = %-20s Refining\n"% ("", self._currFit.getChi2()) -316 sortedlist = sorted(varnameslist) -317 ct = 0 -318 for varname in sortedlist: -319 if ct == 0: -320 msg += "%-20s"% ("") -321 msg += "%-20s"% (varname) -322 if ct == 3: -323 msg += "\n" -324 ct = 0 -325 else: -326 ct += 1 -327 print msg -328 -329 # 3.5 Memory Check Flag 1239 SrRietveld -330 if _MEMCHECK is True: -331 import diffpy.srrietveld.monitormem as MM -332 MM.garbageCheck(True) -333 -334 if _SCREENOUTPUT is True: # 1446 -335 chi2 = refinedetail.getResidueValue(-1, residname="chi2") -336 rp = refinedetail.getResidueValue(-1, residname="rp") -337 re = refinedetail.getResidueValue(-1, residname="re") -338 rtyp = refinedetail.getRefineType() -339 msg = "%-10s: Chi2 = %-15s Rp = %-15s Rexp = %-15s"% (rtyp, chi2, rp, re) -340 print msg -341 # END-IF -342 -343 # LOOP OVER -- for gindex -344 -345 # LOOP OVER -- for step in xrange(1, maxnumsteps+1) -346 -347 # 3.5 automatic background selection with 'reflection list' -348 refinestrategy.offRefinementProcess(self._currFit, strategystep) -349 -350 # LOOP OVER -- for strategystep in xrange(1, 3+1) -351 -352 self._finalstep = self.getBestStep() -353 refinedetail = self._fitsInfoList[self._finalstep][1] -354 -355 return (refinedetail, processid) -
      356 -357 # END-DEF refine(self, refinestrategy) -358 -359 -
      360 - def getBestStep(self): -
      361 """ -362 Get the best step according to Rwp -363 -364 Return : int -365 """ -366 finalrefinetype = self._refinestrategy.getRefineTypeOfStep(-1) -367 -368 totalnumrefines = len(self._fitsInfoList) -369 bestrefinedetail = self._fitsInfoList[-1][1] -370 beststep = totalnumrefines-1 -371 for rn in xrange(totalnumrefines-1): -372 currstep = totalnumrefines-2-rn -373 currrefinedetail = self._fitsInfoList[currstep][1] -374 -375 bestrp = bestrefinedetail.getResidueValue(-1, residname="rp") -376 currrp = currrefinedetail.getResidueValue(-1, residname="rp") -377 curtyp = currrefinedetail.getRefineType() -378 -379 if (bestrp < 0) or ((currrp > 0) and (currrp < bestrp and finalrefinetype[0] == curtyp[0])): -380 bestrefinedetail = currrefinedetail -381 beststep = currstep -382 -383 # LOOP-OVER: for rn in xrange(totalnumrefines-1): -384 -385 return beststep -
      386 -387 -
      388 - def getNumSteps(self): -
      389 """ -390 Get the number of total refinement steps in this multiple step fit -391 -392 Return : int -393 """ -394 return len(self._fitsInfoList) -
      395 -396 -
      397 - def getFitOfStep(self, step): -
      398 """ -399 Get the Fit object as the result after a specific step -400 -401 Arguments: -402 - step : int, -403 -404 Return : Fit instance -405 """ -406 thisfit, refinedetail, indiceslist, varnameslist = self._fitsInfoList[step] -407 -408 return thisfit -
      409 -410 -
      411 - def getFitDetailOfStep(self, step): -
      412 """ -413 Get the Fit object as the result after a specific step -414 -415 Arguments: -416 - step : int, -417 -418 Return : Fit instance -419 """ -420 thisfit, refinedetail, indiceslist, varnameslist = self._fitsInfoList[step] -421 -422 return refinedetail -
      423 -424 -
      425 - def getPrevStepRefinedVariables(self, thestep): -
      426 """ -427 Get the refined variables refined in the previous refine steps -428 in a certain Refine-Strategy -429 The step here means the over-all step number -430 -431 The drawback is that at each refinement step, -432 the previously refined parameters/variables will have to be reviewed -433 in case the change of self._currFit, -434 such that the speed of the program may be affected. -435 But in all senses, comparing to refinement, this kind of review won't -436 be significant. -437 -438 Because it is possible that Rietveld objects in Curr-Fit instance -439 are replaced or changed due to some strategy/algorithm, -440 the variables should be re-guided -441 -442 Level : Basic -443 Coding : Finished -444 -445 Argument: -446 - thestep : int, step number, such that any step prior to this one, -447 including this one will be set up -448 -449 Return : 2-tuple, -450 1. list of 3-tuples as -451 (constraint/variable-name, Rietveld object, parameter-name) -452 2. str: previous-refine type -453 """ -454 # Init setup -455 numguidesteps = self._refinestrategy.getNumRefineGuideSteps() -456 overallstep = 0 -457 prevrefinetype = None -458 -459 # Loop Leve 1 -460 quitsearch = False -461 for strategystep in xrange(1, numguidesteps+1): -462 -463 # 1. Get 'new' guide list for refine steps number and -464 # max refine steps (guideslist (new guide)) -465 guideslist = self._refinestrategy.getRefineGuidesOfStep(strategystep) -466 refinetype = self._refinestrategy.getRefineTypeOfStep(strategystep) -467 -468 maxnumrefinesteps = 0 -469 for rguide, stage in guideslist: -470 numrefinesteps = rguide.getGuideConfig(self._currFit, stage) -471 if numrefinesteps > maxnumrefinesteps: -472 maxnumrefinesteps = numrefinesteps -473 # LOOP OVER - for guide in guideslist: -474 -475 # 2. Clean variables list for changing refine type -476 if prevrefinetype != refinetype: -477 prevRefinedVariablesList = [] -478 prevrefinetype = refinetype -479 -480 # Loop Level 2 -481 for refinestep in xrange(1, maxnumrefinesteps+1): -482 -483 # Loop Level 3 -484 for gindex in xrange(len(guideslist)): -485 guide, stage = guideslist[gindex] -486 overallstep += 1 -487 -488 # Variables Set To Refine All NEW Parameters/Variables -489 # and Update current step refined variable tuple list -490 if self._skipStepsList.count(overallstep) == 0: -491 tempvartupleslist = guide.setGuideStep(self._currFit, refinestep, stage, dry=True) -492 prevRefinedVariablesList.extend(tempvartupleslist) -493 -494 # Flow control -495 if overallstep == thestep: -496 quitsearch = True -497 if quitsearch is True: -498 break -499 # LOOP OVER -- for gindex -500 -501 if quitsearch is True: -502 break -503 -504 # LOOP OVER -- for step in xrange(1, maxnumrefinesteps+1) -505 -506 if quitsearch is True: -507 break -508 -509 # LOOP OVER -- for strategystep in xrange(1, 3+1) -510 -511 return ( (prevRefinedVariablesList, refinetype) ) -
      512 -513 -
      514 - def save(self, savefilename = None): -
      515 """ Save the current status to a project file for future -516 information retrieval -517 -518 Argument: -519 - savefilename : str, file name -520 -521 Return : None -522 """ -523 import pickle -524 -525 if savefilename is None: -526 savefilename = str(self._processid) -527 elif not isinstance(savefilename, str): -528 errmsg = "Input File Name %-20s Is Not String\n"% (savefilename) -529 errmsg += "Input File Name is of Type %-20s\n"% (type(savefilename)) -530 errmsg += "Input File Name is of Class %-20s\n"% (savefilename.__class__.__name__) -531 print errmsg -532 raise FitConfigurationError(savefilename) -533 -534 # Save file to a pickle file -535 pfile = open(savefilename, "w") -536 pickle.dump(self, pfile) -537 pfile.close() -538 -539 return -
      540 -541 -
      542 - def saveV2(self, savefilename=None): -
      543 """ Save the current status to a project file for future use -544 -545 Version 2.0: It will be implemented soon. -546 -547 Argument: -548 - savefilename : str, file name -549 -550 Return : None -551 """ -552 # FIXME - Multiple instrument refinement is not supported -553 -554 # 1. Validity check -555 if savefilename is None: -556 savefilename = str(self._processid) -557 elif not isinstance(savefilename, str): -558 errmsg = "Input File Name %-20s Is Not String\n"% (savefilename) -559 errmsg += "Input File Name is of Type %-20s\n"% (type(savefilename)) -560 errmsg += "Input File Name is of Class %-20s\n"% (savefilename.__class__.__name__) -561 raise FitConfigurationError, errmsg -562 else: -563 pass -564 # END-IF-ELSE -565 -566 # 2. Save file to XML nodes -567 for mefit, refinedetail, stepinfotuple, varnameslist in self._fitsInfoList: -568 -569 # 2.1 Rebuild instrument -570 if isSinglePatternType(mefit): -571 # 2.1.1 -572 testpat = mefit.getComponent(0).getPattern() -573 if isinstance(testpat, APIPattern.CWXPattern): -574 instrument = IS.XrayInstrument() -575 -576 elif isinstance(testpat, APIPattern.CWNPattern): -577 instrument = IS.NeutronCWInstrument() -578 -579 elif isinstance(testpat, APIPattern.ThermalNeutronPattern): -580 instrument = IS.ThermalNeutronTOFInstrument() -581 -582 elif isinstance(testpat, APIPattern.TOFPattern): -583 instrument = IS.TOFInstrument() -584 -585 else: -586 errmsg = "Pattern Type %-10s Is Not Supported" % \ -587 (testpat.__class__.__name__) -588 # END-IF-ELSE -589 -590 # 2.2.2 -591 instrument.importFromFit(curfit) -592 -593 else: -594 errmsg = "Multiple Instrument is not supported" -595 raise errmsg -596 -597 # END-IF-ELSE -598 -599 if gsasfname is None: -600 if insname.upper() == "POWGEN": -601 instrument = INS.ThermalNeutronTOFInstrument(name="POWGEN") -602 instrument.importFromFit(curfit) -603 xmlgen = XMLG.ThermalNeutronTOFXMLGenerator(instrument, True) -604 elif insname.upper() == "GEM": -605 instrument = INS.TOFInstrument(name="GEM") -606 instrument.importFromFit(curfit) -607 xmlgen = XMLG.TOFXMLGenerator(instrument, True) -608 elif insname.upper() == "NPDF": -609 instrument = INS.TOFInstrument(name="NPDF") -610 instrument.importFromFit(curfit) -611 xmlgen = XMLG.TOFXMLGenerator(instrument, True) -612 elif insname.upper() == "RAPDF": -613 instrument = INS.XrayInstrument(name="RAPDF") -614 instrument.importFromFit(curfit) -615 xmlgen = XMLG.XrayInstrumentXMLGenerator(instrument, True) -616 else: -617 errmsg = "Instrument Name Must Be Given! Only POWGEN and RAPDF are supported now!" -618 print errmsg -619 import sys -620 sys.exit(0) -621 -622 return -
      623 -624 -
      625 - def recordSolution(self, stepinfotuple, refinedetail, varnameslist): -
      626 """ -627 record the solution of specific refinement result -628 in a certain (outloop-step, permutation-sequence, inner-loop-step) combination -629 -630 The records will be used for further examination -631 -632 Status : Concept -633 Type : Advanced 1 -634 -635 Arguement: -636 - indicieslist : list of integers as indicies or str ("dry") -637 - stepinfotuple : 3-tuple of integers as refinement indicies or str ("dry") -638 tuple will be -639 (strategy-step, guide-step, guideindex) -640 - refinedetail : RefineDetail instance -641 - varnameslist : list of variables to be refined -642 -643 Return : None -644 """ -645 import copy -646 -647 # Dry Run? -648 if stepinfotuple == "dry": -649 dryrun = True -650 else: -651 dryrun = False -652 -653 # 1. make a copy of the Fit, and remove the pattern data -654 cpfit = copy.deepcopy(self._currFit) -655 if _MEMCHECK is True: -656 import monitormem as MM -657 mem_mon = MM.MemoryMonitor() -658 mem_mon.register(cpfit) -659 mem_mon.register(cpfit._srfit) -660 # END-IF -661 -662 if _DEBUG01: # 1436 -663 parlist = self._currFit.getRefinedParametersList() -664 print "1436 No. of Parameter Refined = %-5s" % (len(parlist)) -665 for rietobj, parname in parlist: -666 parval = rietobj.getValue(parname) -667 parsig = rietobj.getUncertainty(parname) -668 print "%-15s = %-15s +/- %-15s"% (parname, parval, parsig) -669 # END-DEBUG -670 -671 # 2. data file are unloaded -672 # Note: This stpe is deleted because it may cause exception for plotting data -673 # FIXME TISSOT-6 Will fix this part, since copy on diffraction data is waste of space -674 # The elegant solution should be if the store Fit is called for plotting -675 # Calculate the pattern on fly! -676 if 0: -677 if dryrun is False: -678 rietnum = cpfit.getNumComponents() -679 for cindex in xrange(rietnum): -680 component = cpfit.getComponent(cindex) -681 pattern = component.getPattern() -682 pattern.unloadData() -683 -684 # 3. make step information tuple -685 if dryrun is True: -686 stepinfotupe = (0, 0, 0) -687 -688 # 3. put the result to a dictionary; update currStep -689 self._fitsInfoList.append((cpfit, refinedetail, stepinfotuple, varnameslist)) -690 self._currStep = len(self._fitsInfoList)-1 -691 -692 return -
      693 -694 # END-DEF recordSolution(self, stepinfotuple, refinedetail, varnameslist) -695 -696 -
      697 - def getHistory(self): -
      698 """ -699 Provide clients with a concise and informative history for refinement -700 -701 Return : RefineHistory instance -702 """ -703 return self._refhistory -
      704 -705 -
      706 - def leapBack(self, backstep): -
      707 """ -708 Roll multiple step refinement back for a certain of steps, -709 i.e., copy the Fit instance from that step to the current Fit instance -710 -711 Arugment: -712 - backstep : int, how many steps to roll back -713 -714 Return : 4-tuple of list -715 1. prevRefinedVariablesList, -716 2. currefinedvartupleslist -717 3. list, guideslist -718 4. int, current step list -719 """ -720 import copy -721 PP = myEngine.getRietveldEngineModule("patternparsers") -722 -723 # 0. Record and Adjust backstep -724 oastep = len(self._fitsInfoList) -725 self._skipStepsList.append(oastep) -726 stop = False -727 while stop is False: -728 prevstep = oastep-backstep -729 if self._skipStepsList.count(prevstep) >= 1: -730 backstep = backstep+1 -731 else: -732 stop = True -733 -734 # 1. Reset current Fit and reload data for the copied Fit instance -735 currnumstep = len(self._fitsInfoList) -736 currefstep = (currnumstep-1)-backstep -737 try: -738 recordfit, rd, infotuple, vl = self._fitsInfoList[currefstep] -739 except IndexError, err: -740 errmsg = "Length _fitsInfoList = %-5s, backstep = %-5s, out-of-bound curr-step = %-5s"% \ -741 (currnumstep, backstep, currefstep) -742 errmsg += "\n%-60s"% (err) -743 print errmsg -744 raise IndexError(errmsg) -745 discontfit = self._currFit -746 self._currFit = copy.deepcopy(recordfit) -747 self._currStep = currefstep -748 -749 if _MEMCHECK is True: -750 import monitormem as MM -751 mem_mon = MM.MemoryMonitor() -752 mem_mon.register(self._currFit) -753 mem_mon.register(self._currFit._srfit) -754 # END-IF -755 -756 # FIXME: TISSOT-6 This part will be used again after elegant solution is made -757 if 0: -758 rietnum = self._currFit.getNumComponents() -759 for cindex in xrange(rietnum): -760 component = self._currFit.getComponent(cindex) -761 discomponent = discontfit.getComponent(cindex) -762 pattern = component.getPattern() -763 dispattern = discomponent.getPattern() -764 datafilename = dispattern.getDataFileName() -765 pattern.loadData(datafilename, PP.XYSigmaParser()) -766 -767 if _DEBUG is True: # 1243 -768 print "Refine Manager Leap Back Information" -769 try: -770 msg = "Last Refine Step = %-5s %-30s\n"% \ -771 (currnumstep-1, self._fitsInfoList[currnumstep-1][1]) -772 except KeyError, err: -773 msg = "Last Refine Step = %-5s %-30s\n"% \ -774 (currnumstep-1, "NaN") -775 msg += " Back Refine Step = %-5s %-30s"% \ -776 (currefstep, self._fitsInfoList[currefstep][1]) -777 print msg -778 -779 # 2. get the index from record and get the refine variables -780 prevRefinedVariablesList, prevrefinetype = self.getPrevStepRefinedVariables((currnumstep-1)-backstep) -781 # the extra -1 is due to the inconsistence of over-all step and refine-step -782 -783 # 3. Reset the current Guides-List -784 currstrategystep = infotuple[0] -785 prevstrategystep = self._fitsInfoList[-1][2][0] -786 -787 # 3.1 If no previos step to go, then quit -788 # FIXME - Should come up a better solution with failed refinement -789 if not isinstance(currstrategystep, int): -790 msg = "Leap back to the very beginning of the refinement (step = %-5s) \n" % \ -791 currstrategystep -792 msg += "Sequential Fitting Quit! Without Saving. Message 1807" -793 print msg -794 import sys -795 sys.exit(0) -796 -797 # 3.2 Reset -798 guideslist = self._refinestrategy.getRefineGuidesOfStep(currstrategystep) -799 for rguide, stage in guideslist: -800 numrefinesteps = rguide.getGuideConfig(self._currFit, stage) -801 -802 # 4. The refined parameters -803 if _DEBUG is True: # 1556 -804 parlist = self._currFit.getRefinedParametersList() -805 print "1556-3 No. of Parameter Refined = %-5s"% (len(parlist)) -806 print "Recorded Fit @ %-15s"% (self._currFit.__repr__()) -807 for rietobj, parname in parlist: -808 parval = rietobj.getValue(parname) -809 parsig = rietobj.getUncertainty(parname) -810 print "%-15s = %-15s +/- %-15s"% (parname, parval, parsig) -811 # END-DEBUG -812 -813 return ( (prevRefinedVariablesList, prevrefinetype, guideslist, currefstep) ) -
      814 -815 # END DEF leapBack(self, backstep) -816 -817 # END of Class CentralControl -818 -819 -
      820 -def getProcessID(): -
      821 """ Get a number according to time -822 -823 Return : str, as ID -824 """ -825 import time -826 -827 ttup = time.gmtime() -828 ts = "" -829 for i in xrange(6): -830 ts += str(ttup[i]) -831 -832 return ts -
      833 -834 -
      835 -def loadMultiStepRefinements(picklefname): -
      836 """ -837 Open a pickle file and load a MultiStepRefinementManager -838 -839 Arguments: -840 - picklefname: string, pickle file name -841 -842 Return : MultiStepRefinementManager instance -843 -844 Exception : -845 - Pickle file error -846 - Loaded object is not MultiStepRefinementManager -847 """ -848 import pickle -849 -850 # 1. Check File and Object and Import -851 try: -852 ifile = open(picklefname) -853 msobj = pickle.load(ifile) -854 ifile.close() -855 except IOError, err: -856 errmsg = "Error Reading File %-10s"% (picklefname) -857 raise IOError(err) -858 except pickle.PicklingError, err: -859 errmsg = "PickleError on File %-10s"% (picklefname) -860 raise PicklingError(errmsg) -861 -862 if not isinstance(msobj, MultiStepRefineManager): -863 errmsg = "Import Class Incorrect, Should be MultiStepRefinement, But Imported Is %-20s"% \ -864 (msobj.__class__.__name__) -865 raise FitConfigurationError -866 -867 # 2. return -868 return msobj -
      869 -870 -
      871 -def isSinglePatternType(myfit): -
      872 """ To find out whether a Fit instance is composed of single type of Pattern -873 -874 Argument: -875 - myfit : Fit -876 -877 Return : boolean -878 """ -879 complist = myfit.getComponentByMeasurement() -880 patterntype = complist[0].getPattern().__class__.__name__ -881 -882 issingle = True -883 for cindex in xrange(1, len(complist)): -884 newpatterntype = complist[cindex].getPattern().__class__.__name__ -885 if patterntype != newpatterntype: -886 issingle = False -887 break -888 # LOOP-OVER -889 -890 return issingle -
      891 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinemanager.MultiStepRefineManager-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinemanager.MultiStepRefineManager-class.html deleted file mode 100644 index 5f871141..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinemanager.MultiStepRefineManager-class.html +++ /dev/null @@ -1,846 +0,0 @@ - - - - - srrietveld.refinemanager.MultiStepRefineManager - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinemanager :: - Class MultiStepRefineManager - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class MultiStepRefineManager

      source code

      -
      -
      -Class to realize central controling on multiple step refinement
      -on a single structure refinement may covering from
      -Le-Bail (peak profile matching) and Rietveld Refinement
      -
      -This class is designed towards automatic refinement
      -
      -Scenario to Use:
      -> mm = MultiStepRefineManager(myfit)
      -> mm.refine(POWGENRefineControl())
      -> mm.showResult()
      -> ... ...
      -
      -Class Variable:
      -_stepsize:          integer for multiple step refinement, 1<=stepsize
      -_rgpool:            dictionary of list of RefineGuides:  RefineGuidePool = rgpool
      -                    like 2-D array (matrix)
      -                    rgpool[i][j]:   i -> refine at i-th step
      -                                    j -> all RefineGuides at i-th step will be refined in all permutated sequence
      -_currFit :          current Fit instance
      -_currStep           current step for current Fit 
      -_curGuidesList:     current RefineGuides list (no sequence)
      -_fitsInfoList:      list of 4-tuples including:
      -                    1. Fit instance
      -                    2. Refine-Detail instance
      -                    3. 3-tuple as Step-information
      -                    4. Variable Names List
      -_skipStepsList:     list of int for steps that are skipped because of bad refinement
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - myfit)
      - Initialization...
      - source code - -
      - -
      -   - - - - - - -
      getRefineStrategy(self)
      - Give the refine strategy used now
      - source code - -
      - -
      -   - - - - - - -
      getCurrentFit(self)
      - Provide the handler to the current Fit instance
      - source code - -
      - -
      -   - - - - - - -
      refine(self, - refinestrategy, - weightscheme='standard')
      - Multiple-step refinement on starting Fitting configuration according to input -refinement strategy - -Automatic refinement will be based on some heuristic 'refinement strategy' -coupled with some algorithm with automatic judgement - -Status : coded -Type : basic - -Assumption: -1.
      - source code - -
      - -
      -   - - - - - - -
      getBestStep(self)
      - Get the best step according to Rwp
      - source code - -
      - -
      -   - - - - - - -
      getNumSteps(self)
      - Get the number of total refinement steps in this multiple step - fit
      - source code - -
      - -
      -   - - - - - - -
      getFitOfStep(self, - step)
      - Get the Fit object as the result after a specific step...
      - source code - -
      - -
      -   - - - - - - -
      getFitDetailOfStep(self, - step)
      - Get the Fit object as the result after a specific step...
      - source code - -
      - -
      -   - - - - - - -
      getPrevStepRefinedVariables(self, - thestep)
      - Get the refined variables refined in the previous refine steps -in a certain Refine-Strategy -The step here means the over-all step number - -The drawback is that at each refinement step, -the previously refined parameters/variables will have to be reviewed -in case the change of self._currFit, -such that the speed of the program may be affected.
      - source code - -
      - -
      -   - - - - - - -
      save(self, - savefilename=None)
      - Save the current status to a project file for future ...
      - source code - -
      - -
      -   - - - - - - -
      saveV2(self, - savefilename=None)
      - Save the current status to a project file for future use - -Version 2.0: It will be implemented soon.
      - source code - -
      - -
      -   - - - - - - -
      recordSolution(self, - stepinfotuple, - refinedetail, - varnameslist)
      - record the solution of specific refinement result...
      - source code - -
      - -
      -   - - - - - - -
      getHistory(self)
      - Provide clients with a concise and informative history for - refinement
      - source code - -
      - -
      -   - - - - - - -
      leapBack(self, - backstep)
      - Roll multiple step refinement back for a certain of steps, -i.e., copy the Fit instance from that step to the current Fit instance - -Arugment: -- backstep : int, how many steps to roll back - -Return : 4-tuple of list - 1.
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - myfit) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization
      -
      -Arguement:
      -- myfit :   Fit instance
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getCurrentFit(self) -

      -
      source code  -
      - -

      Provide the handler to the current Fit instance

      - Return : Fit instance -
      -
      -
      -
      - -
      - -
      - - -
      -

      refine(self, - refinestrategy, - weightscheme='standard') -

      -
      source code  -
      - -
      -
      -Multiple-step refinement on starting Fitting configuration according to input 
      -refinement strategy
      -
      -Automatic refinement will be based on some heuristic 'refinement strategy'
      -coupled with some algorithm with automatic judgement
      -
      -Status  :   coded
      -Type    :   basic
      -
      -Assumption:
      -1. In each Refine-Guide-Step, NO Rietveld object will be removed or replaced
      -2. In different Refine-Guide-Steps, Rietveld object may be removed or replaced
      -
      -Argument
      -- refinestrategy    :   RefineStrategy object
      -- weightscheme      :   str, refining weighting scheme, {standard, unit-weight}
      -
      -Return              :   2-tuple:  RefineDetail, str (process ID)
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getBestStep(self) -

      -
      source code  -
      - -

      Get the best step according to Rwp

      - Return : int -
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumSteps(self) -

      -
      source code  -
      - -

      Get the number of total refinement steps in this multiple step fit

      - Return : int -
      -
      -
      -
      - -
      - -
      - - -
      -

      getFitOfStep(self, - step) -

      -
      source code  -
      - -
      -
      -Get the Fit object as the result after a specific step
      -
      -Arguments:
      -- step  :   int, 
      -
      -Return  :   Fit instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getFitDetailOfStep(self, - step) -

      -
      source code  -
      - -
      -
      -Get the Fit object as the result after a specific step
      -
      -Arguments:
      -- step  :   int, 
      -
      -Return  :   Fit instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getPrevStepRefinedVariables(self, - thestep) -

      -
      source code  -
      - -
      -
      -Get the refined variables refined in the previous refine steps
      -in a certain Refine-Strategy
      -The step here means the over-all step number
      -
      -The drawback is that at each refinement step, 
      -the previously refined parameters/variables will have to be reviewed
      -in case the change of self._currFit,
      -such that the speed of the program may be affected. 
      -But in all senses, comparing to refinement, this kind of review won't
      -be significant. 
      -
      -Because it is possible that Rietveld objects in Curr-Fit instance
      -are replaced or changed due to some strategy/algorithm,
      -the variables should be re-guided
      -
      -Level           :   Basic
      -Coding          :   Finished
      -
      -Argument:
      -- thestep       :   int, step number, such that any step prior to this one, 
      -                    including this one will be set up
      -
      -Return          :   2-tuple, 
      -                    1.  list of 3-tuples as 
      -                    (constraint/variable-name, Rietveld object, parameter-name)
      -                    2.  str: previous-refine type
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      save(self, - savefilename=None) -

      -
      source code  -
      - -
      -Save the current status to a project file for future 
      -information retrieval
      -
      -Argument:
      -- savefilename  :   str, file name
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      saveV2(self, - savefilename=None) -

      -
      source code  -
      - -
      -Save the current status to a project file for future use
      -
      -Version 2.0:  It will be implemented soon. 
      -
      -Argument:
      -- savefilename  :   str, file name 
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      recordSolution(self, - stepinfotuple, - refinedetail, - varnameslist) -

      -
      source code  -
      - -
      -
      -record the solution of specific refinement result
      -in a certain (outloop-step, permutation-sequence, inner-loop-step) combination
      -
      -The records will be used for further examination
      -
      -Status      :   Concept
      -Type        :   Advanced 1
      -
      -Arguement:
      -- indicieslist  :   list of integers as indicies or str ("dry")
      -- stepinfotuple :   3-tuple of integers as refinement indicies or str ("dry")
      -                    tuple will be 
      -                    (strategy-step, guide-step, guideindex)
      -- refinedetail  :   RefineDetail instance
      -- varnameslist  :   list of variables to be refined
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getHistory(self) -

      -
      source code  -
      - -

      Provide clients with a concise and informative history for - refinement

      - Return : RefineHistory instance -
      -
      -
      -
      - -
      - -
      - - -
      -

      leapBack(self, - backstep) -

      -
      source code  -
      - -
      -
      -Roll multiple step refinement back for a certain of steps, 
      -i.e., copy the Fit instance from that step to the current Fit instance
      -
      -Arugment:
      -- backstep  :   int, how many steps to roll back
      -
      -Return      :   4-tuple of list 
      -                1. prevRefinedVariablesList, 
      -                2. currefinedvartupleslist
      -                3. list, guideslist
      -                4. int,  current step list
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup-module.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup-module.html deleted file mode 100644 index 72affefa..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup-module.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - srrietveld.refinesetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module refinesetup

      source code

      -

      RefineSetup is to set up the refienemnt flag, constraint on one or - several related Rietveld objects

      - Created On : 2009.03.05

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - RefineSetup
      - Guide and set up the Rietveld/Le-Bail refinement on -(1) a single or -(2) several related -diffpy.rietveldapi objects, such as Pattern, Phase, Atom - -Each RefineSetup instance should be used to guide the refinement -of one and only one diffpy.rietveldapi objects. -
      -   - - AbsorptionCorrectionRefineSetup
      - Refinement setup for TOF absorption correction -
      -   - - AtomFractionalCoordinateRefineSetup
      - Refine set up for atom's fractional corridnates -
      -   - - IsotropicADPRefineSetup
      - Refine set up for Isotropic atomic displacement factor -
      -   - - AnisotropicADPRefineSetup
      - Refine set up for anisotropic atomic displacement -
      -   - - OccRefineSetup
      - Refine set up for Atom's occupancy -
      -   - - InterpolatedBackgroundRefineSetup
      - Refine setup for interploated background -
      -   - - PolynomialBackgroundRefineSetup
      - refine setup for Polynomial background -
      -   - - TOFExpDecayRefineSetup
      - Refinement setup for T.O.F. -
      -   - - LatticeRefineSetup
      - class to set up single Lattice to refine -
      -   - - CubicRefineSetup
      - class to set up single Lattice to refine Cubic P, F, I - Four 3-folds along space diagonal a, a, ,a, 90, 90, 90 -
      -   - - HexagonalRefineSetup
      - class to set up single Lattice to refine Hexagonal P - One 6-fold axis a, a, c, 90, 90, 120 -
      -   - - OrthorhombicRefineSetup
      - class to set up single Lattice to refine Orthorhombic - P, C One 2-fold axis, parallel b (b unique) a, b, c, 90, - 90, 90 -
      -   - - TetragonalRefineSetup
      - class to set up single Lattice to refine Orthorhombic - P, C One 2-fold axis, parallel b (b unique) a, b, c, 90, - 90, 90 -
      -   - - MonoclinicRefineSetup
      - class to set up single Lattice to refine Monoclinic P, C - One 2-fold axis, parallel b (b unique) a, b, c, 90, be, 90 -
      -   - - TrigonalRefineSetup
      - class to set up single Lattice to refine... -
      -   - - ConstantWaveSymmetricPeakShapeRefineSetup
      - Refinement setup for symmetric peak shape of constant wave peak - profile, -
      -   - - RegularPseudoVoigtRefineSetup
      - Refinement setup for symmetric peak shape of constant wave peak profile, -including -1. -
      -   - - SplitPseudoVoigRefineSetup
      - Refinement setup for split pseudo-voigt peak profile -
      -   - - TCHPseudoVoigtRefineSetup
      - Refinement setup for Thomas-Cox-H Pseudo-Voigt peak profile -
      -   - - TOFPseudoVoigtRefinement
      - Refinement setup for T.O.F. -
      -   - - PseudoVoigtExpDSpacingRefineSetup
      - Refinement setup for PseudoVoigt Expoenetial D-Spacing Peak - profile -
      -   - - ScaleFactorRefineSetup
      - Refine set up for scale-factor -
      -   - - WavelengthRefineSetup
      - Refinement set up for Zero-shift... -
      -   - - ZeroShiftRefineSetup
      - Refinement set up for Zero-shift... -
      -   - - ZeroShiftThermoRefineSetup
      - Refinement set up for Zero-shift on a Thermo-neutron instrument... -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: refinesetup.py 2918 2009-03-18 19:26:39Z wdzhou $' -
      -   - - _DEBUG_ARG = False -
      -   - - _DEBUG = False -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup-pysrc.html deleted file mode 100644 index 94cbb600..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup-pysrc.html +++ /dev/null @@ -1,1846 +0,0 @@ - - - - - srrietveld.refinesetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.refinesetup

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ RefineSetup is to set up the refienemnt flag, constraint on 
      - 16  one or several related Rietveld objects 
      - 17   
      - 18  Created On  :   2009.03.05 
      - 19  """ 
      - 20   
      - 21  __id__ = "$Id: refinesetup.py 2918 2009-03-18 19:26:39Z wdzhou $" 
      - 22   
      - 23  from diffpy.refinementapi.errors import FitConfigurationError 
      - 24  from diffpy.refinementapi.exceptiontools import verifyType 
      - 25  import utilrefineguide as UR 
      - 26   
      - 27  _DEBUG_ARG = False 
      - 28  _DEBUG = False 
      - 29   
      -
      30 -class RefineSetup: -
      31 """ Guide and set up the Rietveld/Le-Bail refinement on - 32 (1) a single or - 33 (2) several related - 34 diffpy.rietveldapi objects, such as Pattern, Phase, Atom - 35 - 36 Each RefineSetup instance should be used to guide the refinement - 37 of one and only one diffpy.rietveldapi objects. - 38 If a mismatch occurs, EXCEPTION will be thrown - 39 - 40 RefineSetup serves as an INTERFACE (Virtual) - 41 - 42 Class Variable: - 43 _NumPar : Number of parameters to refine - 44 If == None: Unavailable to turn on parameters in sequence - 45 _myFit : diffpy.rietveldapi.Fit instance - 46 _myRietObjsList: list, of list, of Rietveld objects - 47 - 48 Class Methods: - 49 1. setToRefine(fit, rietobj, varindexlist): set the parameters in - 50 1. getRefineInfo(fit, rietobj, varindexlist): set the parameters in - 51 """ -
      52 - def __init__(self, fit, rietobjslist, refinestage=1): -
      53 """ initialization - 54 - 55 Argument: - 56 - fit : Fit instance - 57 - rietobjectslist : list, of list, of Rietveld objects - 58 [ [main-object, help, ..], [main-object, help, ..], ...] - 59 - refinestage : int, - 60 """ - 61 import diffpy.rietveldapi.Fit as FitAPI - 62 - 63 if _DEBUG_ARG is True: - 64 print "RefineSetup: %-20s" % (self.__class__.__name__) - 65 for rietobjs in rietobjslist: - 66 print rietobjs - 67 # END-IF - 68 - 69 # 1. Virtual base class - 70 if self.__class__.__name__ == "RefineSetup": - 71 errmsg = "RietRefineSetup is Virtual; Cannot be initialized" - 72 raise NotImplementedError(errmsg) - 73 else: - 74 self._myFit = fit - 75 self._myRietObjsList = rietobjslist - 76 # END-IF-ELSE - 77 - 78 # 2. check: fit and rietobjslist - 79 verifyType(fit, FitAPI.Fit) - 80 if not isinstance(rietobjslist, list): - 81 errmsg = "Input Rietveld Objects List Is Not List" - 82 raise FitConfigurationError, errmsg - 83 # END-IF - 84 - 85 validinput = True - 86 if isinstance(rietobjslist, list): - 87 for rietobjs in rietobjslist: - 88 if not isinstance(rietobjs, list): - 89 validinput = False - 90 break - 91 # LOOP-OVER - 92 else: - 93 validinput = False - 94 - 95 if validinput is False: - 96 errmsg = "rietobjslist is not list of list of Rietveld objects " + \ - 97 "%-30s" % (rietobjslist) - 98 raise NotImplementedError, errmsg - 99 # END-IF -100 -101 # 3. Figure out number of steps to refine -102 self._NumSteps = 0 -103 for step in sorted( self.VarSetupDict.keys() ): -104 refinethisstage = False -105 for varname, parnameslist, stage in self.VarSetupDict[step]: -106 if _DEBUG_ARG is True: -107 print "420RS: stage-in-dict = %-5s stage-input = %-5s" % (stage, refinestage) -108 if stage == refinestage: -109 refinethisstage = True -110 break -111 # LOOP-OVER -112 if refinethisstage is True: -113 self._NumSteps += 1 -114 # LOOP-OVER -115 -116 return -
      117 -118 -
      119 - def getNumRefineSteps(self, stage=1): -
      120 """ -121 give the number of steps to refine by this unit refine guide/setup -122 -123 Return : integer, number of steps -124 """ -125 return self._NumSteps -
      126 -127 -
      128 - def getNumParameters(self): -
      129 """ -130 show number of parameters to refine -131 """ -132 raise NotImplementedError("Not a clear definition why uses this function") -133 return self._NumPar -
      134 -135 -
      136 - def setToRefine(self, rietobjslist, varindexlist, stage, step, dry=False): -
      137 """ -138 set a rietveld object to refine mode at a specific STEP -139 -140 Arguements: -141 - rietobjslist : list, diffpy.rietveldapi class instance -142 - varindexlist : list of integer for variable index -143 - step : integer/str, used to denote step number for parameters -144 to refine in multiple steps, such that -145 1. there are more than one parameters to refine in this guide -146 2. users requires them to refine in different step -147 3. default ("all") will take all parameters on in same step -148 - stage : int, stage to refine this group of parameters -149 - dry : boolean. if true, just return, but no mapVP() -150 -151 Return : list, each entry is a 3-tuple (constraint, rietobj, parameter-name) -152 """ -153 # 1. Get refinement information -154 refineinfotuplist = self.getRefineInfo(rietobjslist, varindexlist, step, stage) -155 -156 # 2. Set to refine -157 if dry is False: -158 for infotup in refineinfotuplist: -159 varname, rietobj, parname = infotup -160 self._myFit.mapVP(varname, rietobj, parname) -161 else: -162 pass -163 -164 return refineinfotuplist -
      165 -166 -
      167 - def getRefineInfo(self, rietobjslist, varindexlist, refinestep, refinestage=1): -
      168 """ -169 Gather the refinement information, including -170 the parameter name, varaible name, and Rietveld objects -171 for set up to refine -172 -173 Virtual -174 -175 Argument: -176 - rietobjslist : list of list of diffpy.rietveldapi class instance -177 - varindexlist : list of integer for variable index -178 - refinestep : integer/str, used to denote step number for parameters to refine -179 in multiple steps, such that -180 1. there are more than one parameters to refine in this guide -181 2. users requires them to refine in different step -182 3. default ("all") will take all parameters on in same step -183 -184 Return : list, each entry is a 3-tuple (constraint, rietobj, parameter-name) -185 """ -186 # 1. Check: no mismatch of _myRietObj occurs -187 if not rietobjslist == self._myRietObjsList: -188 # 1. Detailed output -189 errstr = "Input: \n" -190 for rietobj in rietobjslist: -191 errstr += "%-60s\n" % (rietobj.__class__.__name__) -192 errstr += "Self-Stored: \n" -193 for rietobj in self._myRietObjsList: -194 errstr += "%-60s\n" % (rietobj.__class__.__name__) -195 print errstr -196 -197 # 2. Raise exception -198 errmsg = "Mismatch is found for self._myRietObjsList\n" -199 errmsg += "Input RietObj is %-10s at %-10s\n"% \ -200 ( rietobjslist.__class__.__name__, rietobjslist.__repr__() ) -201 errmsg += "self RietObj is %-10s at %-10s"% \ -202 ( self._myRietObjsList.__class__.__name__, self._myRietObjsList.__repr__() ) -203 raise FitConfigurationError(errmsg) -204 else: -205 if _DEBUG is True: -206 print "258A: ", self._myRietObjsList -207 # END-IF -208 -209 # 2. Generate a list of steps to refine -210 if refinestep == "all": -211 stepslist = self.VarSetupDict.keys() -212 else: -213 stepslist = [refinestep] -214 # END-IF-ELSE -215 -216 # 2. Create parameter-variable list -217 rlist = [] -218 for step in stepslist: -219 for varnameraw, parnamelist, stage in self.VarSetupDict[step]: -220 # 2.1 Validation -221 if not isinstance(parnamelist, list): -222 errmsg = "Class %-10s VarSetupDict Is Not Defined Correctly" % \ -223 self.__class__.__name__ -224 raise NotImplementedError, errmsg -225 -226 if stage == refinestage: -227 # 1. Get Variable Name -228 varname = UR.genVarName(varnameraw, varindexlist) -229 -230 # 2. Set up to each Rietveld object -231 for rietobjs in rietobjslist: -232 rietobj = rietobjs[0] -233 for parname in parnamelist: -234 rlist.append( (varname, rietobj, parname) ) -235 # LOOP-OVER -236 # LOOP-0VER -237 # END-IF -238 # LOOP-OVER for varnameraw in self.VarSetupDict.keys() -239 # LOOP-OVER: for step in stepslist -240 -241 return rlist -
      242 -243 # END [class RietRefineSetup] -244 -245 -
      246 -class AbsorptionCorrectionRefineSetup(RefineSetup): -
      247 """ Refinement setup for TOF absorption correction -248 """ -249 VarSetupDict = { -250 1: [ ("abs1", "abs1", 1) ], -251 2: [ ("abs2", "abs2", 1) ], -252 } -
      253 -254 # END-DEF-CLASS AbsorptionCorrectionRefineSetup -255 -256 -
      257 -class AtomFractionalCoordinateRefineSetup(RefineSetup): -
      258 """ Refine set up for atom's fractional corridnates -259 """ -260 # FIXME Special position cannot be refined. The Rietveld engine (Fullprof) will handle this -261 VarSetupDict = { -262 1: [ ("x", ["x"], 1) ], -263 2: [ ("y", ["y"], 1) ], -264 3: [ ("z", ["z"], 1) ], -265 } -
      266 -267 # END-DEF-Class AtomFractionalCoordinateRefineSetup -268 -269 -
      270 -class IsotropicADPRefineSetup(RefineSetup): -
      271 """ Refine set up for Isotropic atomic displacement -272 factor -273 """ -274 VarSetupDict = { -275 1: [ ("Biso", ["Biso"], 1) ], -276 } -
      277 -278 # END-DEF-CLASS IsotropicADPRefineSetup -279 -280 -
      281 -class AnisotropicADPRefineSetup(RefineSetup): -
      282 """ Refine set up for anisotropic atomic displacement -283 """ -284 VarSetupDict = { -285 1: [ ("B11", ["B11"], 1) ], -286 2: [ ("B22", ["B22"], 1) ], -287 3: [ ("B33", ["B33"], 1) ], -288 4: [ ("B12", ["B12"], 1) ], -289 5: [ ("B13", ["B13"], 1) ], -290 6: [ ("B23", ["B23"], 1) ], -291 } -
      292 -293 # END-DEF-CLASS AnisotropicADPRefineSetup -294 -
      295 -class OccRefineSetup(RefineSetup): -
      296 """ Refine set up for Atom's occupancy -297 """ -298 # FIXME - In current data structure of phase, it is not -299 # convenient to cluster the atoms on the same position -300 # And how to pass (1.0 - occ) at RefinementAPI is not -301 # clear either -
      302 - def __init__(self, myfit, rietobjectslist): -
      303 """ Initialization -304 """ -305 errmsg = "Not Implemented! Contact Developer!" -306 raise NotImplementedError, errmsg -
      307 -308 # END-DEF-CLASS OccRefineSetup -309 -310 -
      311 -class InterpolatedBackgroundRefineSetup(RefineSetup): -
      312 """ Refine setup for interploated background -313 """ -314 _NumStages = 1 -315 -
      316 - def __init__(self, fit, rietobjslist, refinestage = 1): -
      317 """ initialization -318 -319 Argument: -320 - fit : Fit instance -321 - rietobjectslist : list, Rietveld objects -322 - refinestage : int, -323 """ -324 # 1. Input check for this specific -325 if len(rietobjslist) != 1: -326 errmsg = "%-15s assumes not constraints among two different " % \ -327 (self.__class__.__name__) + "different Background instances" -328 raise FitConfigurationError, errmsg -329 else: -330 background, pattern = rietobjslist[0] -331 # END-IF-ELSE -332 -333 # 2. Set up dynamic VarSetupDict -334 # 2. 1 Init -335 self.VarSetupDict = {} -336 self.VarSetupDict[1] = [] -337 -338 # 2.2 Refine all background points not in excluded regions -339 thebackground = rietobjslist[0][0] -340 thepattern = rietobjslist[0][1] -341 -342 numbkgdpoints = background.getNumBackgroundPoints() -343 for bindex in xrange(numbkgdpoints): -344 # a) check whether the background is in the fit range -345 inFitRange = True -346 for exclregion in thepattern.getExcludedRegion(): -347 pos = thebackground.getBackgroundPoint(bindex)[0] -348 if pos >= exclregion[0] and pos <= exclregion[1]: -349 inFitRange = False -350 break -351 # LOOP-OVER -352 -353 # b) put to refine if in the range -354 if inFitRange is True: -355 parname = "bkgdpoint"+str(bindex) -356 varname = UR.genVarName("bkgd", [bindex]) -357 self.VarSetupDict[1].append( (varname, [parname], refinestage) ) -358 # END-IF -359 # LOOP-OVER -360 -361 # 2. Call base class -362 RefineSetup.__init__(self, fit, rietobjslist, refinestage) -363 -364 return -
      365 -366 # END-DEF-CLASS InterpolatedBackgroundRefineSetup -367 -368 -
      369 -class PolynomialBackgroundRefineSetup(RefineSetup): -
      370 """ refine setup for Polynomial background -371 """ -372 _NumStages = 2 -373 _MaxOrder = 6 -374 -
      375 - def __init__(self, fit, rietobjslist, refinestage): -
      376 """ initialization -377 -378 Argument: -379 - fit : Fit instance -380 - rietobjectslist : list, of list, of Rietveld objects -381 - refinestage : int, -382 """ -383 # 1. Determine the max polynomial order to refine -384 maxpolyorder = 1000 -385 for rietobj in rietobjslist: -386 polyorder = rietobj[0].getOrder() -387 maxpolyorder = min(maxpolyorder, polyorder) -388 maxpolyorder = min(maxpolyorder, PolynomialBackgroundRefineSetup._MaxOrder) -389 -390 # 2. Set up dynamic VarSetupDict -391 self.VarSetupDict = {} -392 if refinestage == 1: -393 bs = 1 -394 be = 2 -395 elif refinestage == 2: -396 bs = 1 -397 be = maxpolyorder -398 else: -399 errmsg = "%-10s does not allow refine-stage = %-5s" % \ -400 (self.__class__.__name__, refinestage) -401 raise FitConfigurationError, errmsg -402 # END-IF -403 -404 for order in xrange(bs, be + 1): -405 self.VarSetupDict[order] = [] -406 parname = "b"+str(order) -407 varname = parname -408 self.VarSetupDict[order].append( (varname, [parname], refinestage) ) -409 # LOOP-OVER -410 -411 if _DEBUG is True: -412 for order in sorted( self.VarSetupDict.keys() ): -413 print self.VarSetupDict[order] -414 raise NotImplementedError, "3:00" -415 -416 # 2. Call base class -417 RefineSetup.__init__(self, fit, rietobjslist, refinestage) -418 -419 return -
      420 -421 # END-DEF-CLASS: PolynomialBackgroundRefineSetup -422 -423 -
      424 -class TOFExpDecayRefineSetup(RefineSetup): -
      425 """ Refinement setup for T.O.F. PseudoVoigt peak profile's -426 exponential decay -427 -428 Parameters including: alpha0, alpha1, beta0, beta1 -429 """ -430 VarSetupDict = { -431 1: [ ("alpha0", ["alpha0"], 1) ], -432 2: [ ("alpha1", ["alpha1"], 1) ], -433 3: [ ("beta0", ["beta0"], 1) ], -434 4: [ ("beta1", ["beta1"], 1) ] -435 } -
      436 -437 # END-DEF-CLASS TOFPseudoVoigtRefinement -438 -439 -
      440 -class LatticeRefineSetup(RefineSetup): -
      441 """ -442 class to set up single Lattice to refine -443 -444 Virtual base class for all specific lattice:w -445 """ -
      446 - def __init__(self, fit, rietobjslist): -
      447 """ initialization -448 """ -449 import diffpy.rietveldapi.Lattice as LatticeAPI -450 -451 # 1. validate -452 for rietobjs in rietobjslist: -453 rietobj = rietobjs[0] -454 verifyType(rietobj, LatticeAPI.Lattice) -455 -456 # 2. call base class -457 RefineSetup.__init__(self, fit, rietobjslist) -458 -459 return -
      460 -461 -
      462 - def getNumRefineSteps(self, stage=1): -
      463 """ give the number of steps to refine by this unit refine guide/setup -464 -465 Argument -466 - stage : int, -467 -468 Return : integer, number of steps -469 """ -470 steps = self.VarSetupDict.keys() -471 numsteps = len(steps) -472 -473 return numsteps -
      474 -475 # END-DEF-CLASS LatticeRefineSetup -476 -477 -
      478 -class CubicRefineSetup(LatticeRefineSetup): -
      479 """ -480 class to set up single Lattice to refine -481 Cubic P, F, I Four 3-folds along space diagonal a, a, ,a, 90, 90, 90 -482 -483 """ -484 _NumPar = 1 -485 _NumSteps = 1 -486 -487 VarSetupDict = { -488 1: [("abc", ["a", "b", "c"], 1)], -489 } -
      490 -491 # END [class CubicRefineSetup(LatticeRefineSetup)] -492 -493 -
      494 -class HexagonalRefineSetup(LatticeRefineSetup): -
      495 """ -496 class to set up single Lattice to refine -497 Hexagonal P One 6-fold axis a, a, c, 90, 90, 120 -498 """ -499 _NumPar = 2 -500 _NumSteps = 1 -501 -502 VarSetupDict = { -503 1: [("ab", ["a", "b"], 1)], -504 2: [("c" , ["c"], 1)], -505 } -
      506 -507 -508 # END [class HexagonalRefineSetup(LatticeRefineSetup)] -509 -510 -
      511 -class OrthorhombicRefineSetup(LatticeRefineSetup): -
      512 """ -513 class to set up single Lattice to refine -514 Orthorhombic P, C One 2-fold axis, parallel b (b unique) a, b, c, 90, 90, 90 -515 -516 Virtual base class -517 """ -518 _NumPar = 3 -519 _NumStep = 3 -520 -521 VarSetupDict = { -522 1: [("a", ["a"], 1)], -523 2: [("b", ["b"], 1)], -524 3: [("c", ["c"], 1)], -525 } -
      526 -527 # END [class MonoclinicRefineSetup(LatticeRefineSetup)] -528 -529 -
      530 -class TetragonalRefineSetup(LatticeRefineSetup): -
      531 """ -532 class to set up single Lattice to refine -533 Orthorhombic P, C One 2-fold axis, parallel b (b unique) a, b, c, 90, 90, 90 -534 -535 Virtual base class -536 """ -537 _NumPar = 2 -538 _NumSteps = 2 -539 -540 VarSetupDict = { -541 1: [("ab", ["a", "b"], 1)], -542 2: [("c", ["c"], 1)], -543 } -
      544 -545 # END [class TetragonalRefineSetup(LatticeRefineSetup)] -546 -547 -
      548 -class MonoclinicRefineSetup(LatticeRefineSetup): -
      549 """ -550 class to set up single Lattice to refine -551 Monoclinic P, C One 2-fold axis, parallel b (b unique) a, b, c, 90, be, 90 -552 -553 Virtual base class -554 """ -555 _NumPar = 4 -556 -557 VarSetupDict = { -558 1: [("a", ["a"], 1)], -559 2: [("b", ["b"], 1)], -560 3: [("c", ["c"], 1)], -561 4: [("beta", ["beta"], 1)], -562 } -
      563 -564 # END [class MonoclinicRefineSetup(LatticeRefineSetup)] -565 -566 -
      567 -class TrigonalRefineSetup(LatticeRefineSetup): -
      568 """ -569 class to set up single Lattice to refine -570 -571 Trigonal P, R -572 One 3-fold axis a, a, c, 90, 90, 120 -573 """ -574 _NumPar = 2 -575 VarSetupDict = { -576 1: [("ab", ["a", "b"], 1)], -577 2: [("c", ["c"], 1)], -578 } -
      579 -580 # END [class TrigonalRefineSetup(LatticeRefineSetup)] -581 -582 -
      584 """ Refinement setup for symmetric peak shape of constant wave peak profile, -585 """ -586 VarSetupDict = { -587 1: [ ("pfW", ["W"], 1) ], -588 2: [ ("pfU", ["U"], 1) ], -589 3: [ ("pfV", ["V"], 1) ], -590 } -
      591 -592 # END -- class ConstantWaveSymmetricPeakShapeRefineSetup(RefineSetup) -593 -594 -
      595 -class RegularPseudoVoigtRefineSetup(ConstantWaveSymmetricPeakShapeRefineSetup): -
      596 """ Refinement setup for symmetric peak shape of constant wave peak profile, -597 including -598 1. Pseudo-Voigt -599 2. Triple Pseudo-Voigt -600 """ -601 VarSetupDict = { -602 1: [ ("pfW", ["W"], 1), -603 ("pfX", ["X"], 2) ], -604 2: [ ("pfU", ["U"], 1) ], -605 3: [ ("pfV", ["V"], 1) ], -606 4: [ ("eta", ["eta0"], 1) ], -607 } -
      608 # END-DEF-CLASS RegularPseudoVoigtRefineSetup -609 -610 -
      611 -class SplitPseudoVoigRefineSetup(RefineSetup): -
      612 """ Refinement setup for split pseudo-voigt peak profile -613 """ -614 VarSetupDict = { -615 1: [ ("pfWL", ["WL"], 1) ], -616 2: [ ("pfWR", ["WR"], 1) ], -617 3: [ ("pfUL", ["UL"], 1) ], -618 4: [ ("pfUR", ["UR"], 1) ], -619 5: [ ("pfVL", ["VL"], 1) ], -620 6: [ ("pfVR", ["VR"], 1) ], -621 7: [ ("etaL", ["eta0L"], 1) ], -622 8: [ ("etaR", ["eta0R"], 1) ], -623 } -
      624 -625 # END -- class SplitPseudoVoigtRefineSetup -626 -627 -
      628 -class TCHPseudoVoigtRefineSetup(ConstantWaveSymmetricPeakShapeRefineSetup): -
      629 """ Refinement setup for Thomas-Cox-H Pseudo-Voigt peak profile -630 -631 Note: refining X is in stage 2 -632 """ -633 VarSetupDict = { -634 1: [ ("pfW", ["W"], 1), -635 ("pfX", ["X"], 2) ], -636 2: [ ("pfU", ["U"], 1) ], -637 3: [ ("pfV", ["V"], 1) ], -638 } -
      639 # END-DEF-CLASS TCHPseudoVoigtRefineSetup -640 -641 -
      642 -class TOFPseudoVoigtRefinement(RefineSetup): -
      643 """ Refinement setup for T.O.F. PseudoVoigt peak profile -644 -645 Parameters including: sig0, sig1, sig2, gam0, gam1, gam2, -646 -647 The sensitive parameters are refined in stage 2 -648 """ -649 VarSetupDict = { -650 1: [ ("sigma2", ["sigma2"], 1), -651 ("gamma2", ["gamma2"], 2) ], -652 2: [ ("sigma1", ["sigma1"], 1), -653 ("gamma1", ["gamma1"], 2) ], -654 3: [ ("gamma0", ["gamma0"], 2) ], -655 4: [ ("sigma0", ["sigma0"], 2) ] -656 } -
      657 -658 # END-Class-Def TOFPseudoVoigtRefinement -659 -660 -
      661 -class PseudoVoigtExpDSpacingRefineSetup(RefineSetup): -
      662 """ Refinement setup for PseudoVoigt Expoenetial D-Spacing Peak profile -663 -664 Parameters including: sig0, sig1, sig2, gam0, gam1, gam2, -665 -666 The sensitive parameters are refined in stage 2 and 3 -667 """ -668 VarSetupDict = { -669 1: [ ("sigma2", ["sigma2"], 1), -670 ("gamma2", ["gamma2"], 2), -671 ("extinc", ["extinc"], 3) ], -672 2: [ ("sigma1", ["sigma1"], 1), -673 ("gamma1", ["gamma1"], 2) ], -674 3: [ ("gamma0", ["gamma0"], 2) ], -675 4: [ ("sigma0", ["sigma0"], 2) ] -676 } -
      677 -678 # END -- class PseudoVoigtExpDSpacingRefineSetup -679 -
      680 -class ScaleFactorRefineSetup(RefineSetup): -
      681 """ Refine set up for scale-factor -682 """ -683 VarSetupDict = { -684 1: [("scale", ["scale"], 1)], -685 } -
      686 -687 # END-DEF-CLASS ScaleFactorRefineSetup -688 -689 -
      690 -class WavelengthRefineSetup(RefineSetup): -
      691 """ Refinement set up for Zero-shift -692 -693 Class Variable: -694 _NumPar : Number of parameters to refine -695 If == None: Unavailable to turn on parameters in sequence -696 -697 """ -698 VarSetupDict = { -699 1: [("Lambda", ["Lambda"], 1)], -700 } -
      701 -702 # END-DEF-CLASS WavelengthRefineSetup -703 -704 -
      705 -class ZeroShiftRefineSetup(RefineSetup): -
      706 """ Refinement set up for Zero-shift -707 -708 Class Variable: -709 _NumPar : Number of parameters to refine -710 If == None: Unavailable to turn on parameters in sequence -711 -712 """ -713 VarSetupDict = { -714 1: [("zshift", ["zshift"], 1)], -715 } -
      716 -717 # END-DEF-CLASS ZeroShiftRefineSetup -718 -719 -
      720 -class ZeroShiftThermoRefineSetup(RefineSetup): -
      721 """ Refinement set up for Zero-shift on a Thermo-neutron instrument -722 -723 Class Variable: -724 _NumPar : Number of parameters to refine -725 If == None: Unavailable to turn on parameters in sequence -726 -727 """ -728 VarSetupDict = { -729 1: [("zshift", ["zshift"])], -730 2: [("zerot", ["zerot"])], -731 } -
      732 -733 # END-DEF-CLASS ZeroShiftThermoRefineSetup -734 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.AbsorptionCorrectionRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.AbsorptionCorrectionRefineSetup-class.html deleted file mode 100644 index ebd97b29..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.AbsorptionCorrectionRefineSetup-class.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - srrietveld.refinesetup.AbsorptionCorrectionRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class AbsorptionCorrectionRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class AbsorptionCorrectionRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             AbsorptionCorrectionRefineSetup
      -
      - -
      -Refinement setup for TOF absorption correction

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('abs1', 'abs1', 1)], 2: [('abs2', 'abs2',... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('abs1', 'abs1', 1)], 2: [('abs2', 'abs2', 1)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.AnisotropicADPRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.AnisotropicADPRefineSetup-class.html deleted file mode 100644 index 61b17051..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.AnisotropicADPRefineSetup-class.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - srrietveld.refinesetup.AnisotropicADPRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class AnisotropicADPRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class AnisotropicADPRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             AnisotropicADPRefineSetup
      -
      - -
      -Refine set up for anisotropic atomic displacement

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('B11', ['B11'], 1)], 2: [('B22', ['B22'],... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('B11', ['B11'], 1)],
      - 2: [('B22', ['B22'], 1)],
      - 3: [('B33', ['B33'], 1)],
      - 4: [('B12', ['B12'], 1)],
      - 5: [('B13', ['B13'], 1)],
      - 6: [('B23', ['B23'], 1)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.AtomFractionalCoordinateRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.AtomFractionalCoordinateRefineSetup-class.html deleted file mode 100644 index 4e99020b..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.AtomFractionalCoordinateRefineSetup-class.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - srrietveld.refinesetup.AtomFractionalCoordinateRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class AtomFractionalCoordinateRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class AtomFractionalCoordinateRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             AtomFractionalCoordinateRefineSetup
      -
      - -
      -Refine set up for atom's fractional corridnates

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('x', ['x'], 1)], 2: [('y', ['y'], 1)], 3:... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('x', ['x'], 1)], 2: [('y', ['y'], 1)], 3: [('z', ['z'], 1)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ConstantWaveSymmetricPeakShapeRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ConstantWaveSymmetricPeakShapeRefineSetup-class.html deleted file mode 100644 index 41b26c37..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ConstantWaveSymmetricPeakShapeRefineSetup-class.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - srrietveld.refinesetup.ConstantWaveSymmetricPeakShapeRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class ConstantWaveSymmetricPeakShapeRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ConstantWaveSymmetricPeakShapeRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             ConstantWaveSymmetricPeakShapeRefineSetup
      -
      - -
      Known Subclasses:
      -
      - RegularPseudoVoigtRefineSetup, - TCHPseudoVoigtRefineSetup -
      - -
      -Refinement setup for symmetric peak shape of constant wave peak - profile,

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('pfW', ['W'], 1)], 2: [('pfU', ['U'], 1)]... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('pfW', ['W'], 1)],
      - 2: [('pfU', ['U'], 1)],
      - 3: [('pfV', ['V'], 1)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.CubicRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.CubicRefineSetup-class.html deleted file mode 100644 index 16ee4755..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.CubicRefineSetup-class.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - srrietveld.refinesetup.CubicRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class CubicRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CubicRefineSetup

      source code

      -
      -   RefineSetup --+    
      -                 |    
      -LatticeRefineSetup --+
      -                     |
      -                    CubicRefineSetup
      -
      - -
      -class to set up single Lattice to refine Cubic P, F, I - Four 3-folds along space diagonal a, a, ,a, 90, 90, 90

      - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from LatticeRefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine guide/setup...
      - source code - -
      - -
          Inherited from RefineSetup
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - _NumPar = 1 -
      -   - - _NumSteps = 1 -
      -   - - VarSetupDict = {1: [('abc', ['a', 'b', 'c'], 1)]} -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.HexagonalRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.HexagonalRefineSetup-class.html deleted file mode 100644 index d450454a..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.HexagonalRefineSetup-class.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - srrietveld.refinesetup.HexagonalRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class HexagonalRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class HexagonalRefineSetup

      source code

      -
      -   RefineSetup --+    
      -                 |    
      -LatticeRefineSetup --+
      -                     |
      -                    HexagonalRefineSetup
      -
      - -
      -class to set up single Lattice to refine Hexagonal P - One 6-fold axis a, a, c, 90, 90, 120

      - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from LatticeRefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine guide/setup...
      - source code - -
      - -
          Inherited from RefineSetup
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - _NumPar = 2 -
      -   - - _NumSteps = 1 -
      -   - - VarSetupDict = {1: [('ab', ['a', 'b'], 1)], 2: [('c', ['c'], 1)]} -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.InterpolatedBackgroundRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.InterpolatedBackgroundRefineSetup-class.html deleted file mode 100644 index de59e139..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.InterpolatedBackgroundRefineSetup-class.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - srrietveld.refinesetup.InterpolatedBackgroundRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class InterpolatedBackgroundRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class InterpolatedBackgroundRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             InterpolatedBackgroundRefineSetup
      -
      - -
      -Refine setup for interploated background

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
          Inherited from RefineSetup
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - _NumStages = 1 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - fit, - rietobjslist, - refinestage=1) -
      (Constructor) -

      -
      source code  -
      - -
      -initialization
      -
      -Argument:   
      -- fit               :   Fit instance
      -- rietobjectslist   :   list, Rietveld objects
      -- refinestage       :   int, 
      -
      -
      -
      -
      Overrides: - RefineSetup.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.IsotropicADPRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.IsotropicADPRefineSetup-class.html deleted file mode 100644 index 67d8d0e8..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.IsotropicADPRefineSetup-class.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - srrietveld.refinesetup.IsotropicADPRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class IsotropicADPRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class IsotropicADPRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             IsotropicADPRefineSetup
      -
      - -
      -Refine set up for Isotropic atomic displacement factor

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('Biso', ['Biso'], 1)]} -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.LatticeRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.LatticeRefineSetup-class.html deleted file mode 100644 index 48a58078..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.LatticeRefineSetup-class.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - srrietveld.refinesetup.LatticeRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class LatticeRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class LatticeRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             LatticeRefineSetup
      -
      - -
      Known Subclasses:
      -
      - CubicRefineSetup, - HexagonalRefineSetup, - MonoclinicRefineSetup, - OrthorhombicRefineSetup, - TetragonalRefineSetup, - TrigonalRefineSetup -
      - -
      -

      class to set up single Lattice to refine

      - Virtual base class for all specific lattice:w

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine guide/setup...
      - source code - -
      - -
          Inherited from RefineSetup
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - fit, - rietobjslist) -
      (Constructor) -

      -
      source code  -
      - - initialization -
      -
      Overrides: - RefineSetup.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumRefineSteps(self, - stage=1) -

      -
      source code  -
      - -
      -give the number of steps to refine by this unit refine guide/setup
      -
      -Argument    
      -- stage :   int, 
      -
      -Return  :   integer, number of steps
      -
      -
      -
      -
      Overrides: - RefineSetup.getNumRefineSteps -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.MonoclinicRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.MonoclinicRefineSetup-class.html deleted file mode 100644 index d9dc10d5..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.MonoclinicRefineSetup-class.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - srrietveld.refinesetup.MonoclinicRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class MonoclinicRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class MonoclinicRefineSetup

      source code

      -
      -   RefineSetup --+    
      -                 |    
      -LatticeRefineSetup --+
      -                     |
      -                    MonoclinicRefineSetup
      -
      - -
      -

      class to set up single Lattice to refine Monoclinic P, C - One 2-fold axis, parallel b (b unique) a, b, c, 90, be, 90

      - Virtual base class

      - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from LatticeRefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine guide/setup...
      - source code - -
      - -
          Inherited from RefineSetup
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - _NumPar = 4 -
      -   - - VarSetupDict = {1: [('a', ['a'], 1)], 2: [('b', ['b'], 1)], 3:... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('a', ['a'], 1)],
      - 2: [('b', ['b'], 1)],
      - 3: [('c', ['c'], 1)],
      - 4: [('beta', ['beta'], 1)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.OccRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.OccRefineSetup-class.html deleted file mode 100644 index d8b9e58a..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.OccRefineSetup-class.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - srrietveld.refinesetup.OccRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class OccRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class OccRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             OccRefineSetup
      -
      - -
      -Refine set up for Atom's occupancy

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - myfit, - rietobjectslist)
      - Initialization
      - source code - -
      - -
          Inherited from RefineSetup
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - myfit, - rietobjectslist) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - RefineSetup.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.OrthorhombicRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.OrthorhombicRefineSetup-class.html deleted file mode 100644 index 72bfbdd6..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.OrthorhombicRefineSetup-class.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - srrietveld.refinesetup.OrthorhombicRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class OrthorhombicRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class OrthorhombicRefineSetup

      source code

      -
      -   RefineSetup --+    
      -                 |    
      -LatticeRefineSetup --+
      -                     |
      -                    OrthorhombicRefineSetup
      -
      - -
      -

      class to set up single Lattice to refine Orthorhombic P, C - One 2-fold axis, parallel b (b unique) a, b, c, 90, 90, 90

      - Virtual base class

      - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from LatticeRefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine guide/setup...
      - source code - -
      - -
          Inherited from RefineSetup
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - _NumPar = 3 -
      -   - - _NumStep = 3 -
      -   - - VarSetupDict = {1: [('a', ['a'], 1)], 2: [('b', ['b'], 1)], 3:... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('a', ['a'], 1)], 2: [('b', ['b'], 1)], 3: [('c', ['c'], 1)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.PolynomialBackgroundRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.PolynomialBackgroundRefineSetup-class.html deleted file mode 100644 index 5b9f09d1..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.PolynomialBackgroundRefineSetup-class.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - srrietveld.refinesetup.PolynomialBackgroundRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class PolynomialBackgroundRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class PolynomialBackgroundRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             PolynomialBackgroundRefineSetup
      -
      - -
      -refine setup for Polynomial background

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage)
      - initialization...
      - source code - -
      - -
          Inherited from RefineSetup
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - _NumStages = 2 -
      -   - - _MaxOrder = 6 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - fit, - rietobjslist, - refinestage) -
      (Constructor) -

      -
      source code  -
      - -
      -initialization
      -
      -Argument:   
      -- fit               :   Fit instance
      -- rietobjectslist   :   list, of list, of Rietveld objects
      -- refinestage       :   int, 
      -
      -
      -
      -
      Overrides: - RefineSetup.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.PseudoVoigtExpDSpacingRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.PseudoVoigtExpDSpacingRefineSetup-class.html deleted file mode 100644 index b29a9ae3..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.PseudoVoigtExpDSpacingRefineSetup-class.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - srrietveld.refinesetup.PseudoVoigtExpDSpacingRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class PseudoVoigtExpDSpacingRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class PseudoVoigtExpDSpacingRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             PseudoVoigtExpDSpacingRefineSetup
      -
      - -
      -

      Refinement setup for PseudoVoigt Expoenetial D-Spacing Peak - profile

      -

      Parameters including: sig0, sig1, sig2, gam0, gam1, gam2,

      - The sensitive parameters are refined in stage 2 and 3

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('sigma2', ['sigma2'], 1), ('gamma2', ['ga... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('sigma2', ['sigma2'], 1),
      -     ('gamma2', ['gamma2'], 2),
      -     ('extinc', ['extinc'], 3)],
      - 2: [('sigma1', ['sigma1'], 1), ('gamma1', ['gamma1'], 2)],
      - 3: [('gamma0', ['gamma0'], 2)],
      - 4: [('sigma0', ['sigma0'], 2)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.RefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.RefineSetup-class.html deleted file mode 100644 index 1a3fc461..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.RefineSetup-class.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - srrietveld.refinesetup.RefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class RefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class RefineSetup

      source code

      -
      Known Subclasses:
      -
      - AbsorptionCorrectionRefineSetup, - AnisotropicADPRefineSetup, - AtomFractionalCoordinateRefineSetup, - ConstantWaveSymmetricPeakShapeRefineSetup, - LatticeRefineSetup, - InterpolatedBackgroundRefineSetup, - IsotropicADPRefineSetup, - OccRefineSetup, - PolynomialBackgroundRefineSetup, - PseudoVoigtExpDSpacingRefineSetup, - ScaleFactorRefineSetup, - SplitPseudoVoigRefineSetup, - TOFExpDecayRefineSetup, - TOFPseudoVoigtRefinement, - WavelengthRefineSetup, - ZeroShiftRefineSetup, - ZeroShiftThermoRefineSetup -
      - -
      -
      -Guide and set up the Rietveld/Le-Bail refinement on 
      -(1) a single or
      -(2) several related
      -diffpy.rietveldapi objects, such as Pattern, Phase, Atom
      -
      -Each RefineSetup instance should be used to guide the refinement 
      -of one and only one diffpy.rietveldapi objects. 
      -If a mismatch occurs, EXCEPTION will be thrown
      -
      -RefineSetup serves as an INTERFACE (Virtual)
      -
      -Class Variable:
      -_NumPar :   Number of parameters to refine  
      -            If == None:  Unavailable to turn on parameters in sequence
      -_myFit  :   diffpy.rietveldapi.Fit instance
      -_myRietObjsList: list, of list, of Rietveld objects
      -
      -Class Methods:
      -1. setToRefine(fit, rietobj, varindexlist):  set the parameters in 
      -1. getRefineInfo(fit, rietobj, varindexlist):  set the parameters in 
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - fit, - rietobjslist, - refinestage=1) -
      (Constructor) -

      -
      source code  -
      - -
      -initialization
      -
      -Argument:   
      -- fit               :   Fit instance
      -- rietobjectslist   :   list, of list, of Rietveld objects
      -                        [ [main-object, help, ..], [main-object, help, ..], ...]
      -- refinestage       :   int, 
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumRefineSteps(self, - stage=1) -

      -
      source code  -
      - -

      give the number of steps to refine by this unit refine guide/setup

      - Return : integer, number of steps -
      -
      -
      -
      - -
      - -
      - - -
      -

      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False) -

      -
      source code  -
      - -
      -
      -set a rietveld object to refine mode at a specific STEP
      -
      -Arguements:
      -- rietobjslist  :   list, diffpy.rietveldapi class instance
      -- varindexlist  :   list of integer for variable index
      -- step          :   integer/str, used to denote step number for parameters 
      -                    to refine in multiple steps, such that
      -                    1. there are more than one parameters to refine in this guide
      -                    2. users requires them to refine in different step
      -                    3. default ("all") will take all parameters on in same step
      -- stage         :   int, stage to refine this group of parameters
      -- dry           :   boolean.  if true, just return, but no mapVP()
      -
      -Return          :   list, each entry is a 3-tuple (constraint, rietobj, parameter-name)
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1) -

      -
      source code  -
      - -
      -
      -Gather the refinement information, including
      -the parameter name, varaible name, and Rietveld objects
      -for set up to refine
      -
      -Virtual
      -
      -Argument:
      -- rietobjslist  :   list of list of diffpy.rietveldapi class instance
      -- varindexlist  :   list of integer for variable index
      -- refinestep          :   integer/str, used to denote step number for parameters to refine 
      -                    in multiple steps, such that
      -                    1. there are more than one parameters to refine in this guide
      -                    2. users requires them to refine in different step
      -                    3. default ("all") will take all parameters on in same step
      -
      -Return          :   list, each entry is a 3-tuple (constraint, rietobj, parameter-name)
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.RegularPseudoVoigtRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.RegularPseudoVoigtRefineSetup-class.html deleted file mode 100644 index 12bd2530..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.RegularPseudoVoigtRefineSetup-class.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - srrietveld.refinesetup.RegularPseudoVoigtRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class RegularPseudoVoigtRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class RegularPseudoVoigtRefineSetup

      source code

      -
      -                          RefineSetup --+    
      -                                        |    
      -ConstantWaveSymmetricPeakShapeRefineSetup --+
      -                                            |
      -                                           RegularPseudoVoigtRefineSetup
      -
      - -
      -
      -Refinement setup for symmetric peak shape of constant wave peak profile,
      -including
      -1. Pseudo-Voigt
      -2. Triple Pseudo-Voigt
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('pfW', ['W'], 1), ('pfX', ['X'], 2)], 2: ... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('pfW', ['W'], 1), ('pfX', ['X'], 2)],
      - 2: [('pfU', ['U'], 1)],
      - 3: [('pfV', ['V'], 1)],
      - 4: [('eta', ['eta0'], 1)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ScaleFactorRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ScaleFactorRefineSetup-class.html deleted file mode 100644 index c0a2b6e1..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ScaleFactorRefineSetup-class.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - srrietveld.refinesetup.ScaleFactorRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class ScaleFactorRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ScaleFactorRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             ScaleFactorRefineSetup
      -
      - -
      -Refine set up for scale-factor

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('scale', ['scale'], 1)]} -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.SplitPseudoVoigRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.SplitPseudoVoigRefineSetup-class.html deleted file mode 100644 index af101cde..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.SplitPseudoVoigRefineSetup-class.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - srrietveld.refinesetup.SplitPseudoVoigRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class SplitPseudoVoigRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class SplitPseudoVoigRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             SplitPseudoVoigRefineSetup
      -
      - -
      -Refinement setup for split pseudo-voigt peak profile

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('pfWL', ['WL'], 1)], 2: [('pfWR', ['WR'],... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('pfWL', ['WL'], 1)],
      - 2: [('pfWR', ['WR'], 1)],
      - 3: [('pfUL', ['UL'], 1)],
      - 4: [('pfUR', ['UR'], 1)],
      - 5: [('pfVL', ['VL'], 1)],
      - 6: [('pfVR', ['VR'], 1)],
      - 7: [('etaL', ['eta0L'], 1)],
      - 8: [('etaR', ['eta0R'], 1)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TCHPseudoVoigtRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TCHPseudoVoigtRefineSetup-class.html deleted file mode 100644 index 87065e31..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TCHPseudoVoigtRefineSetup-class.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - srrietveld.refinesetup.TCHPseudoVoigtRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class TCHPseudoVoigtRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class TCHPseudoVoigtRefineSetup

      source code

      -
      -                          RefineSetup --+    
      -                                        |    
      -ConstantWaveSymmetricPeakShapeRefineSetup --+
      -                                            |
      -                                           TCHPseudoVoigtRefineSetup
      -
      - -
      -

      Refinement setup for Thomas-Cox-H Pseudo-Voigt peak profile

      - Note: refining X is in stage 2

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('pfW', ['W'], 1), ('pfX', ['X'], 2)], 2: ... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('pfW', ['W'], 1), ('pfX', ['X'], 2)],
      - 2: [('pfU', ['U'], 1)],
      - 3: [('pfV', ['V'], 1)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TOFExpDecayRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TOFExpDecayRefineSetup-class.html deleted file mode 100644 index f540d7f0..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TOFExpDecayRefineSetup-class.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - srrietveld.refinesetup.TOFExpDecayRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class TOFExpDecayRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class TOFExpDecayRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             TOFExpDecayRefineSetup
      -
      - -
      -

      Refinement setup for T.O.F. PseudoVoigt peak profile's exponential - decay

      - Parameters including: alpha0, alpha1, beta0, beta1

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('alpha0', ['alpha0'], 1)], 2: [('alpha1',... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('alpha0', ['alpha0'], 1)],
      - 2: [('alpha1', ['alpha1'], 1)],
      - 3: [('beta0', ['beta0'], 1)],
      - 4: [('beta1', ['beta1'], 1)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TOFPseudoVoigtRefinement-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TOFPseudoVoigtRefinement-class.html deleted file mode 100644 index adc7b610..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TOFPseudoVoigtRefinement-class.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - srrietveld.refinesetup.TOFPseudoVoigtRefinement - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class TOFPseudoVoigtRefinement - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class TOFPseudoVoigtRefinement

      source code

      -
      -RefineSetup --+
      -              |
      -             TOFPseudoVoigtRefinement
      -
      - -
      -

      Refinement setup for T.O.F. PseudoVoigt peak profile

      -

      Parameters including: sig0, sig1, sig2, gam0, gam1, gam2,

      - The sensitive parameters are refined in stage 2

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('sigma2', ['sigma2'], 1), ('gamma2', ['ga... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('sigma2', ['sigma2'], 1), ('gamma2', ['gamma2'], 2)],
      - 2: [('sigma1', ['sigma1'], 1), ('gamma1', ['gamma1'], 2)],
      - 3: [('gamma0', ['gamma0'], 2)],
      - 4: [('sigma0', ['sigma0'], 2)]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TetragonalRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TetragonalRefineSetup-class.html deleted file mode 100644 index d0144651..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TetragonalRefineSetup-class.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - srrietveld.refinesetup.TetragonalRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class TetragonalRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class TetragonalRefineSetup

      source code

      -
      -   RefineSetup --+    
      -                 |    
      -LatticeRefineSetup --+
      -                     |
      -                    TetragonalRefineSetup
      -
      - -
      -

      class to set up single Lattice to refine Orthorhombic P, C - One 2-fold axis, parallel b (b unique) a, b, c, 90, 90, 90

      - Virtual base class

      - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from LatticeRefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine guide/setup...
      - source code - -
      - -
          Inherited from RefineSetup
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - _NumPar = 2 -
      -   - - _NumSteps = 2 -
      -   - - VarSetupDict = {1: [('ab', ['a', 'b'], 1)], 2: [('c', ['c'], 1)]} -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TrigonalRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TrigonalRefineSetup-class.html deleted file mode 100644 index 4449f6b9..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.TrigonalRefineSetup-class.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - srrietveld.refinesetup.TrigonalRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class TrigonalRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class TrigonalRefineSetup

      source code

      -
      -   RefineSetup --+    
      -                 |    
      -LatticeRefineSetup --+
      -                     |
      -                    TrigonalRefineSetup
      -
      - -
      -
      -
      -class to set up single Lattice to refine
      -
      -Trigonal        P, R        
      -    One 3-fold axis  a, a, c, 90, 90, 120
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from LatticeRefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine guide/setup...
      - source code - -
      - -
          Inherited from RefineSetup
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - _NumPar = 2 -
      -   - - VarSetupDict = {1: [('ab', ['a', 'b'], 1)], 2: [('c', ['c'], 1)]} -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.WavelengthRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.WavelengthRefineSetup-class.html deleted file mode 100644 index ccc52728..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.WavelengthRefineSetup-class.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - srrietveld.refinesetup.WavelengthRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class WavelengthRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class WavelengthRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             WavelengthRefineSetup
      -
      - -
      -
      -Refinement set up for Zero-shift
      -
      -Class Variable:
      -_NumPar :   Number of parameters to refine  
      -            If == None:  Unavailable to turn on parameters in sequence
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('Lambda', ['Lambda'], 1)]} -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ZeroShiftRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ZeroShiftRefineSetup-class.html deleted file mode 100644 index 64bdbba7..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ZeroShiftRefineSetup-class.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - srrietveld.refinesetup.ZeroShiftRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class ZeroShiftRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ZeroShiftRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             ZeroShiftRefineSetup
      -
      - -
      -
      -Refinement set up for Zero-shift
      -
      -Class Variable:
      -_NumPar :   Number of parameters to refine  
      -            If == None:  Unavailable to turn on parameters in sequence
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('zshift', ['zshift'], 1)]} -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ZeroShiftThermoRefineSetup-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ZeroShiftThermoRefineSetup-class.html deleted file mode 100644 index f93fcbcb..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinesetup.ZeroShiftThermoRefineSetup-class.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - srrietveld.refinesetup.ZeroShiftThermoRefineSetup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinesetup :: - Class ZeroShiftThermoRefineSetup - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ZeroShiftThermoRefineSetup

      source code

      -
      -RefineSetup --+
      -              |
      -             ZeroShiftThermoRefineSetup
      -
      - -
      -
      -Refinement set up for Zero-shift on a Thermo-neutron instrument
      -
      -Class Variable:
      -_NumPar :   Number of parameters to refine  
      -            If == None:  Unavailable to turn on parameters in sequence
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
          Inherited from RefineSetup
      -   - - - - - - -
      __init__(self, - fit, - rietobjslist, - refinestage=1)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      getNumParameters(self)
      - show number of parameters to refine
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineSteps(self, - stage=1)
      - give the number of steps to refine by this unit refine - guide/setup
      - source code - -
      - -
      -   - - - - - - -
      getRefineInfo(self, - rietobjslist, - varindexlist, - refinestep, - refinestage=1)
      - Gather the refinement information, including -the parameter name, varaible name, and Rietveld objects -for set up to refine - -Virtual - -Argument: -- rietobjslist : list of list of diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- refinestep : integer/str, used to denote step number for parameters to refine - in multiple steps, such that - 1.
      - source code - -
      - -
      -   - - - - - - -
      setToRefine(self, - rietobjslist, - varindexlist, - stage, - step, - dry=False)
      - set a rietveld object to refine mode at a specific STEP - -Arguements: -- rietobjslist : list, diffpy.rietveldapi class instance -- varindexlist : list of integer for variable index -- step : integer/str, used to denote step number for parameters - to refine in multiple steps, such that - 1.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - VarSetupDict = {1: [('zshift', ['zshift'])], 2: [('zerot', ['z... -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      VarSetupDict

      - -
      -
      -
      -
      Value:
      -
      -{1: [('zshift', ['zshift'])], 2: [('zerot', ['zerot'])]}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy-module.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy-module.html deleted file mode 100644 index 880bb4c9..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy-module.html +++ /dev/null @@ -1,358 +0,0 @@ - - - - - srrietveld.refinestrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module refinestrategy

      source code

      -
      -
      -Refine Strategies To Refine A Structur Model 
      -
      -Created On  2008.07.22
      -
      -Level 1         RefineStrategy
      -  |
      -  |       Client Methods      * __init__
      -  |                           * getNumRefineGuideSteps(self)
      -  |                           * getRefineGuidesOfStep(self, step)
      -  |                           * getRefineGuidesRemovedOfStep(self, step)
      -  |                           * getRefineTypeOfStep(self, step)
      -  |
      -  |       Internal Methods    * _setUpGuideDict(self)     Overridable
      -  |
      -  |
      -  |- Level 2    UserDefinedRefineStrategy
      -  |
      -  |      Client Methods      * __init__(self, userdefinedstrategydict)
      -  |
      -  |- Level 2    SctrachLebailRefineStrategy
      -  |
      -  |- Level 2    CalibratedLebailRefineStrategy
      -  |
      -  |- Level 2    CalibratedXrayRietveldRefineStrategy
      -        |
      -        |- Level 3  CalibratedXrayFullProfRefineStrategy
      -  |
      -  |- Level 2    CalibrationXrayRietveldRefineStrategy
      -        |
      -        |- Level 3  CalibrationXrayFullProfRefineStrategy
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - RefineStrategy
      - Base class for a general refine strategy... -
      -   - - UserDefinedRefineStrategy
      - Extending RefineStrategy to accept user defined strategy -
      -   - - SctrachLebailRefineStrategy
      - Refine strategy only do Le-Bail refinement from scratch - (starting value can be far away from correct value) -
      -   - - CalibratedLebailRefineStrategy
      - Refine strategy only do Le-Bail refinement Start value of - instrument related parameters are calibrated and trustful -
      -   - - CalibratedRietveldRefineStrategy
      - Refine strategy only do Le-Bail refinement Start value of - instrument related parameters are calibrated and trustful -
      -   - - CloseRietveldRefineStrategy
      - Refine strategy for the starting value is very close to the - correct value -
      -   - - CalibratedXrayRietveldRefineStrategy
      - Refine strategy only do Le-Bail refinement Start value of - instrument related parameters are calibrated and trustful -
      -   - - CalibratedXrayFullProfRefineStrategy
      - Refine strategy only do Le-Bail refinement Start value of - instrument related parameters are calibrated and trustful -
      -   - - CalibratedXrayGSASRefineStrategy
      - Refine strategy only do Le-Bail refinement Start value of - instrument related parameters are calibrated and trustful -
      -   - - CalibratedTOFRietveldRefineStrategy
      - Refine strategy only do Rietveld TOF refinement Start value of - instrument related parameters are calibrated and trustful -
      -   - - CalibrationXrayRietveldRefineStrategy
      - Refining strategy for Xray instrument calibration -
      -   - - CalibrationXrayGSASRefineStrategy
      - Refine strategy only do Le-Bail refinement Start value of - instrument related parameters are calibrated and trustful -
      -   - - CalibrationXrayFullProfRefineStrategy
      - Refining strategy for Xray instrument calibration -
      -   - - CalibrationTOFRietveldRefineStrategy
      - Refining strategy for Xray instrument calibration -
      -   - - CalibrationTOFFullProfRefineStrategy
      - TOF instrument calibration refinement strategy for Fullprof - engine -
      -   - - CalibrationTOFGSASRefineStrategy
      - TOF instrument calibration refinement strategy for GSAS - engine -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: refinestrategy.py 2899 2009-03-16 19:10:09Z wdz... -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: refinestrategy.py 2899 2009-03-16 19:10:09Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy-pysrc.html deleted file mode 100644 index c107d150..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy-pysrc.html +++ /dev/null @@ -1,2364 +0,0 @@ - - - - - srrietveld.refinestrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.refinestrategy

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15  Refine Strategies To Refine A Structur Model  
      - 16   
      - 17  Created On  2008.07.22 
      - 18   
      - 19  Level 1         RefineStrategy 
      - 20    | 
      - 21    |       Client Methods      * __init__ 
      - 22    |                           * getNumRefineGuideSteps(self) 
      - 23    |                           * getRefineGuidesOfStep(self, step) 
      - 24    |                           * getRefineGuidesRemovedOfStep(self, step) 
      - 25    |                           * getRefineTypeOfStep(self, step) 
      - 26    | 
      - 27    |       Internal Methods    * _setUpGuideDict(self)     Overridable 
      - 28    | 
      - 29    | 
      - 30    |- Level 2    UserDefinedRefineStrategy 
      - 31    | 
      - 32    |      Client Methods      * __init__(self, userdefinedstrategydict) 
      - 33    | 
      - 34    |- Level 2    SctrachLebailRefineStrategy 
      - 35    | 
      - 36    |- Level 2    CalibratedLebailRefineStrategy 
      - 37    | 
      - 38    |- Level 2    CalibratedXrayRietveldRefineStrategy 
      - 39          | 
      - 40          |- Level 3  CalibratedXrayFullProfRefineStrategy 
      - 41    | 
      - 42    |- Level 2    CalibrationXrayRietveldRefineStrategy 
      - 43          | 
      - 44          |- Level 3  CalibrationXrayFullProfRefineStrategy 
      - 45   
      - 46  """ 
      - 47  __id__ = "$Id: refinestrategy.py 2899 2009-03-16 19:10:09Z wdzhou $" 
      - 48   
      - 49  from diffpy.refinementapi.errors import FitConfigurationError 
      - 50  import diffpy.srrietveld.refineguides as RG 
      - 51   
      -
      52 -class RefineStrategy: -
      53 """ Base class for a general refine strategy - 54 - 55 Class Variable - 56 - - 57 - - 58 - - 59 """ - 60 MaxNumRefineGuidesStep = 20 - 61 StepFisrtRietveld = 6 - 62 -
      63 - def __init__(self): -
      64 """ Initialization - 65 """ - 66 # 1. Initialize RefineGuides - 67 self.adpguide = RG.ADPGuide() - 68 self.bkgdguide = RG.BackgroundGuide() - 69 self.fraccoordguide = RG.FractionalCoordinateGuide() - 70 self.latticeguide = RG.LatticeGuide() - 71 self.occguide = RG.OccupancyGuide() - 72 self.peakshapeguide = RG.PeakShapeGuide() - 73 self.scaleguide = RG.ScaleGuide() - 74 self.expdecayguuide = RG.ExpDecayGuide() - 75 self.zeroguide = RG.ZeroGuide() - 76 self.absguide = RG.AbsorptionCorrectionGuide() - 77 self.wavelengthguide = RG.WavelengthGuide() - 78 - 79 self._refineGuidesList = [] - 80 - 81 self._refineGuidesList.append(self.absguide ) - 82 self._refineGuidesList.append(self.adpguide ) - 83 self._refineGuidesList.append(self.bkgdguide ) - 84 self._refineGuidesList.append(self.fraccoordguide) - 85 self._refineGuidesList.append(self.latticeguide ) - 86 self._refineGuidesList.append(self.occguide ) - 87 self._refineGuidesList.append(self.peakshapeguide) - 88 self._refineGuidesList.append(self.scaleguide ) - 89 self._refineGuidesList.append(self.wavelengthguide) - 90 self._refineGuidesList.append(self.zeroguide ) - 91 - 92 # 2. Set up RefineGuides to different steps - 93 # 2.1 Initialize dictionaries - 94 self._newGuideDict = {} - 95 self._rmvGuideDict = {} - 96 - 97 for num in xrange(1, self.MaxNumRefineGuidesStep+1): - 98 self._newGuideDict[num] = [] - 99 self._rmvGuideDict[num] = [] -100 -101 # 2.2 Set up dictionaries -102 self._setUpGuideDict() -103 -104 self.replaceBackground = True -105 -106 return -
      107 -
      108 - def __str__(self): -
      109 """ -110 Format output -111 """ -112 rstring = "" -113 rstring += "Strategy: %-20s Max Num Step = %-5s Num Step = %-5s"% \ -114 (self.__class__.__name__, self.MaxNumRefineGuidesStep, self.getNumRefineGuideSteps()) -115 -116 return rstring -
      117 -118 -
      119 - def _setUpGuideDict(self): -
      120 """ -121 Set up a dictionary for Refine Guide -122 -123 This is the base class for the guide sequence is in default -124 """ -125 -126 # Set up -127 self._newGuideDict[1] = [(self.zeroguide, 1)] -128 self._newGuideDict[2] = [(self.latticeguide, 1)] -129 self._newGuideDict[3] = [(self.bkgdguide, 1)] -130 self._newGuideDict[4] = [(self.peakshapeguide, 1)] -131 self._newGuideDict[5] = [(self.absguide, 1)] -132 -133 self._newGuideDict[6] = [(self.scaleguide, 1)] -134 self._newGuideDict[7] = [(self.zeroguide, 1)] -135 self._newGuideDict[8] = [(self.bkgdguide, 1)] -136 self._newGuideDict[9] = [(self.fraccoordguide, 1)] -137 self._newGuideDict[10] = [(self.peakshapeguide, 1)] -138 self._newGuideDict[11] = [(self.absguide, 1)] -139 self._newGuideDict[12] = [(self.bkgdguide, 2)] -140 -141 self._rmvGuideDict[4] = [(self.bkgdguide, 1)] -142 -143 return -
      144 -145 -
      146 - def getNumRefineGuideSteps(self): -
      147 """ -148 Get the number of steps of guided refinement; -149 Notice that in each guided refinement, there will be more steps -150 according to the specific RefineGuide -151 -152 Return : int -153 """ -154 numsteps = self.MaxNumRefineGuidesStep -155 for step in xrange(1, self.MaxNumRefineGuidesStep): -156 if len(self._newGuideDict[step]) == 0: -157 numsteps = step-1 -158 break -159 -160 return numsteps -
      161 -162 -
      163 - def getRefineGuidesOfStep(self, step): -
      164 """ -165 Get the refine guides at a certain step -166 -167 Exception: -168 1. if there is no RefineGuide specified at this step -169 -170 Argument: -171 - step : int -172 -173 Return : list of tuple (RefineGuides, Stage) -174 """ -175 if not isinstance(step, int): -176 errmsg = "Input argument step = %-10s. Not Allowed as an Integer!" % \ -177 step -178 raise FitConfigurationError(errmsg) -179 -180 rglist = self._newGuideDict[step] -181 stage = -1 -182 -183 if len(rglist) == 0: -184 errmsg = "No RefineGuide is set up at Step = %-5s"% (step) -185 raise FitConfigurationError(errmsg) -186 -187 return (rglist) -
      188 -189 -
      190 - def getRefineGuidesRemovedOfStep(self, step): -
      191 """ -192 Get the RefineGuides to be excluded from the current step -193 -194 Argument: -195 - step : int -196 -197 Return : list of 2-tuple (RefineGuide, int stage) -198 """ -199 rmlist = self._rmvGuideDict[step] -200 -201 return rmlist -
      202 -203 -
      204 - def getRefineTypeOfStep(self, step): -
      205 """ -206 Get the refinement type, Le-Bail or Rietveld -207 -208 Argument: -209 - step : integer, number of RefineGuide -210 -211 Return : str, 'rietveld' or 'lebail' -212 """ -213 if step < 0: -214 step = self.getNumRefineGuideSteps()+step -215 -216 if step < self.StepFisrtRietveld: -217 refinetype = "lebail" -218 else: -219 refinetype = "rietveld" -220 -221 return refinetype -
      222 -223 -
      224 - def offRefinementProcess(self, myfit, refinestep): -
      225 """ -226 Some Non-Rietveld Refinement process coming up as special treatment -227 -228 Arguments: -229 - myfit : diffpy.rietveldapi.Fit instance -230 - refinestep: integer -231 -232 Return : None -233 """ -234 import utilbackground as UBKGD -235 if self.replaceBackground is True and refinestep == 1 and self.getRefineTypeOfStep(refinestep) == "lebail": -236 # 1. replace the current background by interpolated background -237 UBKGD.replaceInterpolatedBackground(myfit) -238 -239 return -
      240 -241 -
      242 - def removeGuideAtStep(self, strategystep): -
      243 """ -244 Tell the client whether the parameters refined in this refine-strategy step -245 should be refined again in the following steps -246 -247 Arguement: -248 - strategstep : int -249 -250 Return : boolean -251 """ -252 if self._rmvGuideDict.has_key(strategystep): -253 if self._newGuideDict[strategystep] == self._rmvGuideDict[strategystep]: -254 rvalue = True -255 else: -256 rvalue = False -257 wmsg = "Guide %-20s Is Not Removed At Refine-Strategy Step %-5s. Message 0508"% \ -258 (self._rmvGuideDict[strategystep], strategystep) -259 print wmsg -260 -261 else: -262 rvalue = False -263 -264 return rvalue -
      265 -266 -
      267 - def setReplaceBackground(self, on): -
      268 """ -269 Set replace background functionality to be on/off -270 -271 Argument: -272 - on : boolean -273 -274 Return : None -275 """ -276 self.replaceBackground = on -277 -278 return -
      279 -280 -
      281 -class UserDefinedRefineStrategy(RefineStrategy): -
      282 """ -283 Extending RefineStrategy to accept user defined strategy -284 """ -
      285 - def __init__(self, userdefinedstrategydict): -
      286 """ -287 Initialization -288 -289 Argument: -290 - userdefinedstrategydict : dictionary for 2-tuple: (str, int) -291 str: refine guide's name -292 int/None: stage -293 """ -294 if isinstance(userdefinedstrategydict, dict): -295 self._userdefinedstrategydict = userdefinedstrategydict -296 else: -297 raise NotImplementedError("Input type incorrect!") -298 -299 RefineStrategy.__init__(self) -300 -301 return -
      302 -303 -
      304 - def _setUpGuideDict(self): -
      305 """ -306 Overriding base class method -307 -308 Requirement on self._userdefinedstrategydict: dictionary with value as list of strings -309 """ -310 # 1. Initialization -311 self._refineGuideTypeDict = {} -312 -313 # 2. Preparation -314 stepsnumlist = sorted(self._userdefinedstrategydict.keys()) -315 laststepnum = stepsnumlist[-1] -316 -317 # 3. Set up -318 for step in xrange(1, laststepnum+1): -319 # 1. new guide -320 rguideslist = [] -321 rguidenameslist = self._userdefinedstrategydict[step]["new"] -322 for rguidename, stage in rguidenameslist: -323 rguide = self.mapNameRefineGuide(rguidename) -324 rguideslist.append( (rguide, stage )) -325 self._newGuideDict[step] = rguideslist -326 -327 # 2. remove guide -328 rguideslist = [] -329 rguidenameslist = self._userdefinedstrategydict[step]["rm"] -330 for rguidename, stage in rguidenameslist: -331 rguide = self.mapNameRefineGuide(rguidename) -332 rguideslist.append( (rguide, stage) ) -333 self._rmvGuideDict[step] = rguideslist -334 -335 # 3. get refine type -336 rguidetype = self._userdefinedstrategydict[step]["type"] -337 self._refineGuideTypeDict[step] = rguidetype -338 -339 # LOOP-OVER: for step in xrange(1, laststepnum+1) -340 -341 return -
      342 -343 -
      344 - def getRefineTypeOfStep(self, step): -
      345 """ -346 Overriding base class method -347 """ -348 if step < 0: -349 # refine-guide step starts from 1 -350 step = self.getNumRefineGuideSteps() + 1 + step -351 -352 return self._refineGuideTypeDict[step] -
      353 -354 -
      355 - def mapNameRefineGuide(self, rguidename): -
      356 """ -357 From the RefineGuide's name to get the RefineGuide's object in this object -358 -359 Assumption all the names are the class name -360 -361 Arguments: -362 - rguidename : str -363 -364 Return : RefineGuide instance -365 """ -366 thisguide = None -367 -368 for rguide in self._refineGuidesList: -369 if rguide.__class__.__name__ == rguidename: -370 thisguide = rguide -371 break -372 -373 if thisguide is None: -374 errmsg = "Cannot Find RefineGuide %-20s Initialized"% (rguidename) -375 raise FitConfigurationError(errmsg) -376 -377 return thisguide -
      378 -379 -380 # END CLASS UserDefinedRefineStrategy(RefineStrategy) -381 -
      382 -class SctrachLebailRefineStrategy(RefineStrategy): -
      383 """ -384 Refine strategy only do Le-Bail refinement -385 from scratch (starting value can be far away from correct value) -386 """ -387 MaxNumRefineGuidesStep = 5 -388 StepFisrtRietveld = 100 -389 -
      390 - def __init__(self): -
      391 """ -392 Initialization -393 """ -394 RefineStrategy.__init__(self) -395 -396 return -
      397 -
      398 - def _setUpGuideDict(self): -
      399 """ -400 Set up a dictionary for Refine Guide -401 -402 This is the base class for the guide sequence is in default -403 """ -404 -405 # Set up -406 self._newGuideDict[1] = [self.zeroguide] -407 self._newGuideDict[2] = [self.latticeguide] -408 self._newGuideDict[3] = [self.bkgdguide] -409 self._newGuideDict[4] = [self.peakshapeguide] -410 self._newGuideDict[5] = [self.absguide] -411 -412 return -
      413 -414 # END CLASS: SctrachLebailRefineStrategy(RefineStrategy) -415 -416 -
      417 -class CalibratedLebailRefineStrategy(RefineStrategy): -
      418 """ -419 Refine strategy only do Le-Bail refinement -420 Start value of instrument related parameters are calibrated -421 and trustful -422 """ -423 MaxNumRefineGuidesStep = 5 -424 StepFisrtRietveld = 100 -425 -
      426 - def __init__(self, maxnumsteps=None): -
      427 """ -428 Initialization -429 """ -430 RefineStrategy.__init__(self) -431 -432 if maxnumsteps is not None: -433 self.MaxNumRefineGuidesStep = maxnumsteps -434 -435 return -
      436 -
      437 - def _setUpGuideDict(self): -
      438 """ -439 Set up a dictionary for Refine Guide -440 -441 This is the base class for the guide sequence is in default -442 """ -443 -444 # Set up -445 self._newGuideDict[1] = [(self.latticeguide, 1)] -446 self._newGuideDict[2] = [(self.bkgdguide , 1)] -447 self._newGuideDict[3] = [(self.zeroguide , 1)] -448 -449 return -
      450 -451 # END CLASS: CalibratedLebailRefineStrategy(RefineStrategy) -452 -453 -
      454 -class CalibratedRietveldRefineStrategy(RefineStrategy): -
      455 """ -456 Refine strategy only do Le-Bail refinement -457 Start value of instrument related parameters are calibrated -458 and trustful -459 """ -460 MaxNumRefineGuidesStep = 9 -461 StepFisrtRietveld = 3 -462 -
      463 - def __init__(self, maxnumsteps=None): -
      464 """ -465 Initialization -466 """ -467 RefineStrategy.__init__(self) -468 -469 if maxnumsteps is not None: -470 self.MaxNumRefineGuidesStep = maxnumsteps -471 -472 return -
      473 -
      474 - def _setUpGuideDict(self): -
      475 """ -476 Set up a dictionary for Refine Guide -477 -478 This is the base class for the guide sequence is in default -479 """ -480 -481 # Set up -482 self._newGuideDict[1] = [(self.latticeguide , 1)] -483 self._newGuideDict[2] = [(self.bkgdguide , 1)] -484 -485 self._newGuideDict[3] = [(self.scaleguide, 1)] -486 self._newGuideDict[4] = [(self.zeroguide, 1)] -487 self._newGuideDict[5] = [(self.bkgdguide, 1)] -488 self._newGuideDict[6] = [(self.fraccoordguide, 1)] -489 self._newGuideDict[7] = [(self.peakshapeguide, 1)] -490 self._newGuideDict[8] = [(self.adpguide, 1)] -491 self._newGuideDict[9] = [(self.bkgdguide, 2)] -492 -493 self._rmvGuideDict[5] = [(self.bkgdguide, 1)] -494 -495 return -
      496 -497 # END CLASS: CalibratedLebailRefineStrategy(RefineStrategy) -498 -499 -
      500 -class CloseRietveldRefineStrategy(RefineStrategy): -
      501 """ Refine strategy for the starting value is very close -502 to the correct value -503 -504 Start value of instrument related parameters are calibrated -505 and trustful -506 """ -507 MaxNumRefineGuidesStep = 8 -508 StepFisrtRietveld = 1 -509 -
      510 - def __init__(self, maxnumsteps=None): -
      511 """ Initialization -512 """ -513 RefineStrategy.__init__(self) -514 -515 if maxnumsteps is not None: -516 self.MaxNumRefineGuidesStep = maxnumsteps -517 -518 return -
      519 -
      520 - def _setUpGuideDict(self): -
      521 """ -522 Set up a dictionary for Refine Guide -523 -524 This is the base class for the guide sequence is in default -525 """ -526 -527 # Set up -528 self._newGuideDict[1] = [(self.scaleguide, 1)] -529 self._newGuideDict[2] = [(self.zeroguide, 1)] -530 self._newGuideDict[3] = [(self.bkgdguide, 1)] -531 self._newGuideDict[4] = [(self.latticeguide , 1)] -532 self._newGuideDict[5] = [(self.fraccoordguide, 1)] -533 self._newGuideDict[6] = [(self.peakshapeguide, 1)] -534 self._newGuideDict[7] = [(self.adpguide, 1)] -535 self._newGuideDict[8] = [(self.bkgdguide, 2)] -536 -537 self._rmvGuideDict[3] = [(self.bkgdguide, 1)] -538 -539 return -
      540 -541 # END CLASS: CalibratedLebailRefineStrategy(RefineStrategy) -542 -543 -
      544 -class CalibratedXrayRietveldRefineStrategy(RefineStrategy): -
      545 """ -546 Refine strategy only do Le-Bail refinement -547 Start value of instrument related parameters are calibrated -548 and trustful -549 """ -550 MaxNumRefineGuidesStep = 9 -551 StepFisrtRietveld = 4 -552 -
      553 - def __init__(self, maxnumsteps=None): -
      554 """ -555 Initialization -556 """ -557 RefineStrategy.__init__(self) -558 -559 if maxnumsteps is not None: -560 self.MaxNumRefineGuidesStep = maxnumsteps -561 -562 return -
      563 -
      564 - def _setUpGuideDict(self): -
      565 """ -566 Set up a dictionary for Refine Guide -567 -568 This is the base class for the guide sequence is in default -569 """ -570 -571 # Set up -572 # 1. Lebail -573 self._newGuideDict[1] = [(self.zeroguide , 1)] -574 self._newGuideDict[2] = [(self.latticeguide , 1)] -575 self._newGuideDict[3] = [(self.bkgdguide , 1)] -576 -577 self._rmvGuideDict[3] = [(self.bkgdguide, 1)] -578 -579 # 2. Rietveld -580 self._newGuideDict[4] = [(self.scaleguide, 1)] -581 self._newGuideDict[5] = [(self.zeroguide, 1)] -582 self._newGuideDict[6] = [(self.bkgdguide, 1)] -583 self._newGuideDict[7] = [(self.fraccoordguide, 1)] -584 self._newGuideDict[8] = [(self.peakshapeguide, 1)] -585 self._newGuideDict[9] = [(self.adpguide, 1)] -586 -587 self._rmvGuideDict[6] = [(self.bkgdguide, 1)] -588 -589 return -
      590 -591 # END CLASS: CalibrateXrayRietveldRefineStrategy(RefineStrategy) -592 -593 -
      594 -class CalibratedXrayFullProfRefineStrategy(CalibratedXrayRietveldRefineStrategy): -
      595 """ -596 Refine strategy only do Le-Bail refinement -597 Start value of instrument related parameters are calibrated -598 and trustful -599 """ -
      600 - def __init__(self, maxnumsteps=None): -
      601 """ -602 Initialization -603 """ -604 CalibratedXrayRietveldRefineStrategy.__init__(self, maxnumsteps) -605 -606 return -
      607 -608 # END CLASS -609 -
      610 -class CalibratedXrayGSASRefineStrategy(CalibratedXrayRietveldRefineStrategy): -
      611 """ -612 Refine strategy only do Le-Bail refinement -613 Start value of instrument related parameters are calibrated -614 and trustful -615 """ -616 MaxNumRefineGuidesStep = 7 -617 StepFisrtRietveld = 4 -618 -
      619 - def __init__(self, maxnumsteps=None): -
      620 """ -621 Initialization -622 """ -623 CalibratedXrayRietveldRefineStrategy.__init__(self) -624 -625 -626 return -
      627 -
      628 - def _setUpGuideDict(self): -
      629 """ -630 Set up a dictionary for Refine Guide -631 -632 This is the base class for the guide sequence is in default -633 """ -634 -635 # Set up -636 # 1. Lebail -637 self._newGuideDict[1] = [(self.zeroguide , 1)] -638 self._newGuideDict[2] = [(self.bkgdguide , 1)] -639 self._newGuideDict[3] = [(self.latticeguide , 1)] -640 #self._newGuideDict[4] = [(self.zeroguide , 1)] -641 -642 #self._rmvGuideDict[1] = [(self.zeroguide, 1)] -643 self._rmvGuideDict[2] = [(self.bkgdguide, 1)] -644 -645 # 2. Rietveld -646 self._newGuideDict[4] = [(self.bkgdguide, 1)] -647 self._newGuideDict[5] = [(self.scaleguide, 1)] -648 self._newGuideDict[6] = [(self.adpguide, 1)] -649 self._newGuideDict[7] = [(self.peakshapeguide, 1)] -650 self._rmvGuideDict[4] = [(self.bkgdguide, 1)] -651 -652 return -
      653 -654 -655 # END CLASS -656 -657 -658 -
      659 -class CalibratedTOFRietveldRefineStrategy(CalibratedRietveldRefineStrategy): -
      660 """ -661 Refine strategy only do Rietveld TOF refinement -662 Start value of instrument related parameters are calibrated -663 and trustful -664 """ -
      665 - def __init__(self, maxnumsteps=None): -
      666 """ -667 Initialization -668 """ -669 CalibratedRietveldRefineStrategy.__init__(self, maxnumsteps) -670 -671 return -
      672 -673 # END-DEF class CalibratedTOFRietveldRefineStrategy -674 -675 -
      676 -class CalibrationXrayRietveldRefineStrategy(RefineStrategy): -
      677 """ Refining strategy for Xray instrument calibration -678 -679 Requirement: -680 * The input structure mnodel is trustful! -681 """ -682 MaxNumRefineGuidesStep = 10 -683 StepFisrtRietveld = 4 -684 -
      685 - def __init__(self, maxnumsteps=None): -
      686 """ Initialization -687 -688 Argument: -689 - maxnumsteps : int, limit max number of step -690 -691 Return : None -692 """ -693 # 2. Call base class -694 RefineStrategy.__init__(self) -695 -696 if maxnumsteps is not None: -697 self.MaxNumRefineGuidesStep = maxnumsteps -698 -699 return -
      700 -
      701 - def _setUpGuideDict(self): -
      702 """ -703 Set up a dictionary for Refine Guide -704 -705 This is the base class for the guide sequence is in default -706 """ -707 -708 # Set up -709 # 1. Lebail -710 self._newGuideDict[1] = [(self.zeroguide , 1)] -711 self._newGuideDict[2] = [(self.bkgdguide , 1)] -712 self._newGuideDict[3] = [(self.peakshapeguide, 1)] -713 -714 self._rmvGuideDict[2] = [(self.bkgdguide, 1)] -715 -716 # 2. Rietveld -717 self._newGuideDict[4] = [(self.scaleguide, 1)] -718 self._newGuideDict[5] = [(self.zeroguide, 1)] -719 self._newGuideDict[6] = [(self.bkgdguide, 1)] -720 self._newGuideDict[7] = [(self.peakshapeguide, 1)] -721 self._newGuideDict[8] = [(self.adpguide, 1)] -722 self._newGuideDict[9] = [(self.wavelengthguide, 1)] -723 self._newGuideDict[10] = [(self.peakshapeguide, 2)] -724 -725 self._rmvGuideDict[6] = [(self.bkgdguide, 1)] -726 -727 return -
      728 -729 # END CLASS: CalibrationXrayRietveldRefineStrategy(RefineStrategy) -730 -
      731 -class CalibrationXrayGSASRefineStrategy(CalibrationXrayRietveldRefineStrategy): -
      732 """ -733 Refine strategy only do Le-Bail refinement -734 Start value of instrument related parameters are calibrated -735 and trustful -736 """ -737 #MaxNumRefineGuidesStep = 8 -738 #StepFisrtRietveld = 5 -739 -
      740 - def __init__(self, maxnumsteps=None): -
      741 """ -742 Initialization -743 """ -744 CalibrationXrayRietveldRefineStrategy.__init__(self, maxnumsteps) -745 -746 return -
      747 -
      748 -class CalibrationXrayFullProfRefineStrategy(CalibrationXrayRietveldRefineStrategy): -
      749 """ -750 Refining strategy for Xray instrument calibration -751 -752 The input structure mnodel is trustful! -753 """ -
      754 - def __init__(self, maxnumsteps=None): -
      755 """ -756 Initialization -757 """ -758 CalibrationXrayRietveldRefineStrategy.__init__(self, maxnumsteps) -759 -760 return -
      761 -762 # END-DEF Class CalibrationXryFullProfRefineStrategy -763 -764 -
      765 -class CalibrationTOFRietveldRefineStrategy(RefineStrategy): -
      766 """ -767 Refining strategy for Xray instrument calibration -768 -769 The input structure mnodel is trustful! -770 """ -771 MaxNumRefineGuidesStep = 11 -772 StepFisrtRietveld = 5 -773 -
      774 - def __init__(self, maxnumsteps=None): -
      775 """ Initialization -776 -777 Argument: -778 - maxnumstep : int, user defined maximum number of steps -779 -780 Return : None -781 """ -782 RefineStrategy.__init__(self) -783 -784 if maxnumsteps is not None: -785 self.MaxNumRefineGuidesStep = maxnumsteps -786 -787 return -
      788 -
      789 - def _setUpGuideDict(self): -
      790 """ -791 Set up a dictionary for Refine Guide -792 -793 This is the base class for the guide sequence is in default -794 """ -795 -796 # Set up -797 # 1. Lebail -798 self._newGuideDict[1] = [(self.zeroguide , 1)] -799 self._newGuideDict[2] = [(self.bkgdguide , 1)] -800 self._newGuideDict[3] = [(self.peakshapeguide, 1)] -801 self._newGuideDict[4] = [(self.expdecayguuide, 1)] -802 -803 # 2. Rietveld -804 self._newGuideDict[5] = [(self.scaleguide, 1)] -805 self._newGuideDict[6] = [(self.scaleguide, 1)] -806 self._newGuideDict[7] = [(self.scaleguide, 1)] -807 self._newGuideDict[8] = [(self.scaleguide, 1)] -808 self._newGuideDict[9] = [(self.zeroguide, 1)] -809 self._newGuideDict[10] = [(self.bkgdguide, 1)] -810 self._newGuideDict[11] = [(self.peakshapeguide, 1)] -811 self._newGuideDict[12] = [(self.adpguide, 1)] -812 -813 return -
      814 -815 # END-DEF class CalibrationTOFRietveldRefineStrategy -816 -
      817 -class CalibrationTOFFullProfRefineStrategy(CalibrationTOFRietveldRefineStrategy): -
      818 """ -819 TOF instrument calibration refinement strategy for Fullprof engine -820 """ -
      821 - def __init__(self, maxnumsteps=None): -
      822 """ -823 Initialization -824 """ -825 CalibrationTOFRietveldRefineStrategy.__init__(self, maxnumsteps) -826 -827 return -
      828 -829 # END-DEF class CalibrationTOFFullProfRefineStrategy -830 -831 -
      832 -class CalibrationTOFGSASRefineStrategy(CalibrationTOFRietveldRefineStrategy): -
      833 """ -834 TOF instrument calibration refinement strategy for GSAS engine -835 """ -
      836 - def __init__(self, maxnumsteps=None): -
      837 """ -838 Initialization -839 """ -840 CalibrationTOFRietveldRefineStrategy.__init__(self, maxnumsteps) -841 -842 return -
      843 -844 # END-DEF class CalibrationTOFGSASRefineStrategy -845 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedLebailRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedLebailRefineStrategy-class.html deleted file mode 100644 index c033c02d..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedLebailRefineStrategy-class.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibratedLebailRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibratedLebailRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibratedLebailRefineStrategy

      source code

      -
      -RefineStrategy --+
      -                 |
      -                CalibratedLebailRefineStrategy
      -
      - -
      -Refine strategy only do Le-Bail refinement Start value of instrument - related parameters are calibrated and trustful

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - MaxNumRefineGuidesStep = 5 -
      -   - - StepFisrtRietveld = 100 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - RefineStrategy.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _setUpGuideDict(self) -

      -
      source code  -
      - -

      Set up a dictionary for Refine Guide

      - This is the base class for the guide sequence is in default -
      -
      Overrides: - RefineStrategy._setUpGuideDict -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedRietveldRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedRietveldRefineStrategy-class.html deleted file mode 100644 index 81962102..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedRietveldRefineStrategy-class.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibratedRietveldRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibratedRietveldRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibratedRietveldRefineStrategy

      source code

      -
      -RefineStrategy --+
      -                 |
      -                CalibratedRietveldRefineStrategy
      -
      - -
      Known Subclasses:
      -
      - CalibratedTOFRietveldRefineStrategy -
      - -
      -Refine strategy only do Le-Bail refinement Start value of instrument - related parameters are calibrated and trustful

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - MaxNumRefineGuidesStep = 9 -
      -   - - StepFisrtRietveld = 3 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - RefineStrategy.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _setUpGuideDict(self) -

      -
      source code  -
      - -

      Set up a dictionary for Refine Guide

      - This is the base class for the guide sequence is in default -
      -
      Overrides: - RefineStrategy._setUpGuideDict -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedTOFRietveldRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedTOFRietveldRefineStrategy-class.html deleted file mode 100644 index 4f5388ef..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedTOFRietveldRefineStrategy-class.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibratedTOFRietveldRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibratedTOFRietveldRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibratedTOFRietveldRefineStrategy

      source code

      -
      -              RefineStrategy --+    
      -                               |    
      -CalibratedRietveldRefineStrategy --+
      -                                   |
      -                                  CalibratedTOFRietveldRefineStrategy
      -
      - -
      -Refine strategy only do Rietveld TOF refinement Start value of - instrument related parameters are calibrated and trustful

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization
      - source code - -
      - -
          Inherited from CalibratedRietveldRefineStrategy
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from CalibratedRietveldRefineStrategy
      -   - - MaxNumRefineGuidesStep = 9 -
      -   - - StepFisrtRietveld = 3 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - CalibratedRietveldRefineStrategy.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedXrayFullProfRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedXrayFullProfRefineStrategy-class.html deleted file mode 100644 index e019c5fe..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedXrayFullProfRefineStrategy-class.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibratedXrayFullProfRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibratedXrayFullProfRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibratedXrayFullProfRefineStrategy

      source code

      -
      -                  RefineStrategy --+    
      -                                   |    
      -CalibratedXrayRietveldRefineStrategy --+
      -                                       |
      -                                      CalibratedXrayFullProfRefineStrategy
      -
      - -
      -Refine strategy only do Le-Bail refinement Start value of instrument - related parameters are calibrated and trustful

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization
      - source code - -
      - -
          Inherited from CalibratedXrayRietveldRefineStrategy
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from CalibratedXrayRietveldRefineStrategy
      -   - - MaxNumRefineGuidesStep = 9 -
      -   - - StepFisrtRietveld = 4 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - CalibratedXrayRietveldRefineStrategy.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy-class.html deleted file mode 100644 index 40f9d2b9..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy-class.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibratedXrayGSASRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibratedXrayGSASRefineStrategy

      source code

      -
      -                  RefineStrategy --+    
      -                                   |    
      -CalibratedXrayRietveldRefineStrategy --+
      -                                       |
      -                                      CalibratedXrayGSASRefineStrategy
      -
      - -
      -Refine strategy only do Le-Bail refinement Start value of instrument - related parameters are calibrated and trustful

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - MaxNumRefineGuidesStep = 7 -
      -   - - StepFisrtRietveld = 4 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - CalibratedXrayRietveldRefineStrategy.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _setUpGuideDict(self) -

      -
      source code  -
      - -

      Set up a dictionary for Refine Guide

      - This is the base class for the guide sequence is in default -
      -
      Overrides: - CalibratedXrayRietveldRefineStrategy._setUpGuideDict -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy-class.html deleted file mode 100644 index f5ca8a26..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy-class.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibratedXrayRietveldRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibratedXrayRietveldRefineStrategy

      source code

      -
      -RefineStrategy --+
      -                 |
      -                CalibratedXrayRietveldRefineStrategy
      -
      - -
      Known Subclasses:
      -
      - CalibratedXrayFullProfRefineStrategy, - CalibratedXrayGSASRefineStrategy -
      - -
      -Refine strategy only do Le-Bail refinement Start value of instrument - related parameters are calibrated and trustful

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - MaxNumRefineGuidesStep = 9 -
      -   - - StepFisrtRietveld = 4 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - RefineStrategy.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _setUpGuideDict(self) -

      -
      source code  -
      - -

      Set up a dictionary for Refine Guide

      - This is the base class for the guide sequence is in default -
      -
      Overrides: - RefineStrategy._setUpGuideDict -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationTOFFullProfRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationTOFFullProfRefineStrategy-class.html deleted file mode 100644 index 17335a1f..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationTOFFullProfRefineStrategy-class.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibrationTOFFullProfRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibrationTOFFullProfRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibrationTOFFullProfRefineStrategy

      source code

      -
      -                  RefineStrategy --+    
      -                                   |    
      -CalibrationTOFRietveldRefineStrategy --+
      -                                       |
      -                                      CalibrationTOFFullProfRefineStrategy
      -
      - -
      -TOF instrument calibration refinement strategy for Fullprof engine

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization
      - source code - -
      - -
          Inherited from CalibrationTOFRietveldRefineStrategy
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from CalibrationTOFRietveldRefineStrategy
      -   - - MaxNumRefineGuidesStep = 11 -
      -   - - StepFisrtRietveld = 5 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - CalibrationTOFRietveldRefineStrategy.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationTOFGSASRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationTOFGSASRefineStrategy-class.html deleted file mode 100644 index c57da7cd..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationTOFGSASRefineStrategy-class.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibrationTOFGSASRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibrationTOFGSASRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibrationTOFGSASRefineStrategy

      source code

      -
      -                  RefineStrategy --+    
      -                                   |    
      -CalibrationTOFRietveldRefineStrategy --+
      -                                       |
      -                                      CalibrationTOFGSASRefineStrategy
      -
      - -
      -TOF instrument calibration refinement strategy for GSAS engine

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization
      - source code - -
      - -
          Inherited from CalibrationTOFRietveldRefineStrategy
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from CalibrationTOFRietveldRefineStrategy
      -   - - MaxNumRefineGuidesStep = 11 -
      -   - - StepFisrtRietveld = 5 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - CalibrationTOFRietveldRefineStrategy.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html deleted file mode 100644 index ae11a7a4..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy-class.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibrationTOFRietveldRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibrationTOFRietveldRefineStrategy

      source code

      -
      -RefineStrategy --+
      -                 |
      -                CalibrationTOFRietveldRefineStrategy
      -
      - -
      Known Subclasses:
      -
      - CalibrationTOFFullProfRefineStrategy, - CalibrationTOFGSASRefineStrategy -
      - -
      -

      Refining strategy for Xray instrument calibration

      - The input structure mnodel is trustful!

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization...
      - source code - -
      - -
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - MaxNumRefineGuidesStep = 11 -
      -   - - StepFisrtRietveld = 5 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization
      -
      -Argument:
      -- maxnumstep    :   int, user defined maximum number of steps
      -
      -Return          :   None
      -
      -
      -
      -
      Overrides: - RefineStrategy.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _setUpGuideDict(self) -

      -
      source code  -
      - -

      Set up a dictionary for Refine Guide

      - This is the base class for the guide sequence is in default -
      -
      Overrides: - RefineStrategy._setUpGuideDict -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationXrayFullProfRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationXrayFullProfRefineStrategy-class.html deleted file mode 100644 index e833e9de..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationXrayFullProfRefineStrategy-class.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibrationXrayFullProfRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibrationXrayFullProfRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibrationXrayFullProfRefineStrategy

      source code

      -
      -                   RefineStrategy --+    
      -                                    |    
      -CalibrationXrayRietveldRefineStrategy --+
      -                                        |
      -                                       CalibrationXrayFullProfRefineStrategy
      -
      - -
      -

      Refining strategy for Xray instrument calibration

      - The input structure mnodel is trustful!

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization
      - source code - -
      - -
          Inherited from CalibrationXrayRietveldRefineStrategy
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from CalibrationXrayRietveldRefineStrategy
      -   - - MaxNumRefineGuidesStep = 10 -
      -   - - StepFisrtRietveld = 4 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - CalibrationXrayRietveldRefineStrategy.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationXrayGSASRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationXrayGSASRefineStrategy-class.html deleted file mode 100644 index 694995fa..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationXrayGSASRefineStrategy-class.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibrationXrayGSASRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibrationXrayGSASRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibrationXrayGSASRefineStrategy

      source code

      -
      -                   RefineStrategy --+    
      -                                    |    
      -CalibrationXrayRietveldRefineStrategy --+
      -                                        |
      -                                       CalibrationXrayGSASRefineStrategy
      -
      - -
      -Refine strategy only do Le-Bail refinement Start value of instrument - related parameters are calibrated and trustful

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization
      - source code - -
      - -
          Inherited from CalibrationXrayRietveldRefineStrategy
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from CalibrationXrayRietveldRefineStrategy
      -   - - MaxNumRefineGuidesStep = 10 -
      -   - - StepFisrtRietveld = 4 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - CalibrationXrayRietveldRefineStrategy.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html deleted file mode 100644 index 01336012..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy-class.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CalibrationXrayRietveldRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CalibrationXrayRietveldRefineStrategy

      source code

      -
      -RefineStrategy --+
      -                 |
      -                CalibrationXrayRietveldRefineStrategy
      -
      - -
      Known Subclasses:
      -
      - CalibrationXrayFullProfRefineStrategy, - CalibrationXrayGSASRefineStrategy -
      - -
      -

      Refining strategy for Xray instrument calibration

      - Requirement: * The input structure mnodel is trustful!

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization...
      - source code - -
      - -
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - MaxNumRefineGuidesStep = 10 -
      -   - - StepFisrtRietveld = 4 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization
      -
      -Argument:
      -- maxnumsteps   :   int, limit max number of step
      -
      -Return          :   None
      -
      -
      -
      -
      Overrides: - RefineStrategy.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _setUpGuideDict(self) -

      -
      source code  -
      - -

      Set up a dictionary for Refine Guide

      - This is the base class for the guide sequence is in default -
      -
      Overrides: - RefineStrategy._setUpGuideDict -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CloseRietveldRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CloseRietveldRefineStrategy-class.html deleted file mode 100644 index 99641a4c..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.CloseRietveldRefineStrategy-class.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - srrietveld.refinestrategy.CloseRietveldRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class CloseRietveldRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class CloseRietveldRefineStrategy

      source code

      -
      -RefineStrategy --+
      -                 |
      -                CloseRietveldRefineStrategy
      -
      - -
      -

      Refine strategy for the starting value is very close to the correct - value

      - Start value of instrument related parameters are calibrated and - trustful

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - maxnumsteps=None)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - MaxNumRefineGuidesStep = 8 -
      -   - - StepFisrtRietveld = 1 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - maxnumsteps=None) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - RefineStrategy.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _setUpGuideDict(self) -

      -
      source code  -
      - -

      Set up a dictionary for Refine Guide

      - This is the base class for the guide sequence is in default -
      -
      Overrides: - RefineStrategy._setUpGuideDict -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.RefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.RefineStrategy-class.html deleted file mode 100644 index 710b4e30..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.RefineStrategy-class.html +++ /dev/null @@ -1,601 +0,0 @@ - - - - - srrietveld.refinestrategy.RefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class RefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class RefineStrategy

      source code

      -
      Known Subclasses:
      -
      - CalibratedLebailRefineStrategy, - CalibratedRietveldRefineStrategy, - CalibratedXrayRietveldRefineStrategy, - CalibrationTOFRietveldRefineStrategy, - CalibrationXrayRietveldRefineStrategy, - CloseRietveldRefineStrategy, - SctrachLebailRefineStrategy, - UserDefinedRefineStrategy -
      - -
      -
      -Base class for a general refine strategy
      -
      -Class Variable
      -- 
      --
      --
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - MaxNumRefineGuidesStep = 20 -
      -   - - StepFisrtRietveld = 6 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      _setUpGuideDict(self) -

      -
      source code  -
      - -

      Set up a dictionary for Refine Guide

      - This is the base class for the guide sequence is in default -
      -
      -
      -
      - -
      - -
      - - -
      -

      getNumRefineGuideSteps(self) -

      -
      source code  -
      - -

      Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide

      - Return : int -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefineGuidesOfStep(self, - step) -

      -
      source code  -
      - -
      -
      -Get the refine guides at a certain step
      -
      -Exception:
      -1. if there is no RefineGuide specified at this step
      -
      -Argument:
      -- step  :   int
      -
      -Return  :   list of tuple (RefineGuides, Stage)
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefineGuidesRemovedOfStep(self, - step) -

      -
      source code  -
      - -
      -
      -Get the RefineGuides to be excluded from the current step
      -
      -Argument:
      -- step  :   int
      -
      -Return  :   list of 2-tuple (RefineGuide, int stage)
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefineTypeOfStep(self, - step) -

      -
      source code  -
      - -
      -
      -Get the refinement type, Le-Bail or Rietveld
      -
      -Argument:
      -- step  :   integer, number of RefineGuide
      -
      -Return  :   str, 'rietveld' or 'lebail'
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      offRefinementProcess(self, - myfit, - refinestep) -

      -
      source code  -
      - -
      -
      -Some Non-Rietveld Refinement process coming up as special treatment
      -
      -Arguments:
      -- myfit     :   diffpy.rietveldapi.Fit instance
      -- refinestep:   integer
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      removeGuideAtStep(self, - strategystep) -

      -
      source code  -
      - -
      -
      -Tell the client whether the parameters refined in this refine-strategy step 
      -should be refined again in the following steps
      -
      -Arguement:
      -- strategstep   :   int
      -
      -Return          :   boolean
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setReplaceBackground(self, - on) -

      -
      source code  -
      - -
      -
      -Set replace background functionality to be on/off
      -
      -Argument:
      -- on    :   boolean
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.SctrachLebailRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.SctrachLebailRefineStrategy-class.html deleted file mode 100644 index 8ae1d271..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.SctrachLebailRefineStrategy-class.html +++ /dev/null @@ -1,415 +0,0 @@ - - - - - srrietveld.refinestrategy.SctrachLebailRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class SctrachLebailRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class SctrachLebailRefineStrategy

      source code

      -
      -RefineStrategy --+
      -                 |
      -                SctrachLebailRefineStrategy
      -
      - -
      -Refine strategy only do Le-Bail refinement from scratch (starting - value can be far away from correct value)

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      _setUpGuideDict(self)
      - Set up a dictionary for Refine Guide
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Get the refinement type, Le-Bail or Rietveld...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - MaxNumRefineGuidesStep = 5 -
      -   - - StepFisrtRietveld = 100 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - RefineStrategy.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _setUpGuideDict(self) -

      -
      source code  -
      - -

      Set up a dictionary for Refine Guide

      - This is the base class for the guide sequence is in default -
      -
      Overrides: - RefineStrategy._setUpGuideDict -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.UserDefinedRefineStrategy-class.html b/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.UserDefinedRefineStrategy-class.html deleted file mode 100644 index e226cef0..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.refinestrategy.UserDefinedRefineStrategy-class.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - - srrietveld.refinestrategy.UserDefinedRefineStrategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module refinestrategy :: - Class UserDefinedRefineStrategy - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class UserDefinedRefineStrategy

      source code

      -
      -RefineStrategy --+
      -                 |
      -                UserDefinedRefineStrategy
      -
      - -
      -Extending RefineStrategy to accept user defined strategy

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - userdefinedstrategydict)
      - Initialization...
      - source code - -
      - -
      -   - - - - - - -
      _setUpGuideDict(self)
      - Overriding base class method
      - source code - -
      - -
      -   - - - - - - -
      getRefineTypeOfStep(self, - step)
      - Overriding base class method
      - source code - -
      - -
      -   - - - - - - -
      mapNameRefineGuide(self, - rguidename)
      - From the RefineGuide's name to get the RefineGuide's object in this object...
      - source code - -
      - -
          Inherited from RefineStrategy
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      getNumRefineGuideSteps(self)
      - Get the number of steps of guided refinement; Notice that in each - guided refinement, there will be more steps according to the specific - RefineGuide
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesOfStep(self, - step)
      - Get the refine guides at a certain step - -Exception: -1.
      - source code - -
      - -
      -   - - - - - - -
      getRefineGuidesRemovedOfStep(self, - step)
      - Get the RefineGuides to be excluded from the current step...
      - source code - -
      - -
      -   - - - - - - -
      offRefinementProcess(self, - myfit, - refinestep)
      - Some Non-Rietveld Refinement process coming up as special treatment...
      - source code - -
      - -
      -   - - - - - - -
      removeGuideAtStep(self, - strategystep)
      - Tell the client whether the parameters refined in this refine-strategy step ...
      - source code - -
      - -
      -   - - - - - - -
      setReplaceBackground(self, - on)
      - Set replace background functionality to be on/off...
      - source code - -
      - -
      - - - - - - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
          Inherited from RefineStrategy
      -   - - MaxNumRefineGuidesStep = 20 -
      -   - - StepFisrtRietveld = 6 -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - userdefinedstrategydict) -
      (Constructor) -

      -
      source code  -
      - -
      -
      -Initialization
      -
      -Argument:
      -- userdefinedstrategydict   :   dictionary for 2-tuple:  (str, int)
      -                                str:        refine guide's name
      -                                int/None:   stage
      -
      -
      -
      -
      Overrides: - RefineStrategy.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _setUpGuideDict(self) -

      -
      source code  -
      - -

      Overriding base class method

      - Requirement on self._userdefinedstrategydict: dictionary with value - as list of strings -
      -
      Overrides: - RefineStrategy._setUpGuideDict -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefineTypeOfStep(self, - step) -

      -
      source code  -
      - - Overriding base class method -
      -
      Overrides: - RefineStrategy.getRefineTypeOfStep -
      -
      -
      -
      - -
      - -
      - - -
      -

      mapNameRefineGuide(self, - rguidename) -

      -
      source code  -
      - -
      -
      -From the RefineGuide's name to get the RefineGuide's object in this object
      -
      -Assumption all the names are the class name
      -
      -Arguments:
      -- rguidename    :   str
      -
      -Return          :   RefineGuide instance
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.sequentialrefinecontrol-module.html b/static_root/doc/srrietveld/developers/srrietveld.sequentialrefinecontrol-module.html deleted file mode 100644 index 61d397a8..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.sequentialrefinecontrol-module.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - srrietveld.sequentialrefinecontrol - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module sequentialrefinecontrol - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module sequentialrefinecontrol

      source code

      -
      -
      -Sequential refinement controller
      -
      -Created On  2008.08.18
      -        By  W. Zhou
      -
      -External Methods List:
      -        - loadSeqRefineController(savefilename):
      -Class   SeqRefineController
      -        * Client Methods
      -        - __init__
      -        - __str__
      -        - refine                        :   refine
      -        - resetModel
      -        - resetInstrument
      -        - resetRefineStrategy           :   
      -        - save
      -        - getFit(self, parval)          :   get Fit instance of an external parval
      -        - getParameter(self, parname)   :   post-processing
      -        - getEnvironParameterName(self)
      -        - getEnvironParameterValues(self)
      -
      -


      - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - SeqRefineController
      - Sequential refinement controller... -
      - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: sequentialrefinecontrol.py 2923 2009-03-20 15:5... -
      -   - - _MEMCHECK = False -
      -   - - _SCREENOUTPUT = True -
      -   - - _OUTPUT = True -
      -   - - myEngine = <diffpy.srrietveld.refinebackend.RietveldEngine ins... -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: sequentialrefinecontrol.py 2923 2009-03-20 15:51:25Z wdzhou $'
      -
      -
      -
      -
      -
      - -
      - -
      -

      myEngine

      - -
      -
      -
      -
      Value:
      -
      -<diffpy.srrietveld.refinebackend.RietveldEngine instance at 0xb7ac124c\
      ->
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.sequentialrefinecontrol-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.sequentialrefinecontrol-pysrc.html deleted file mode 100644 index e1941b7b..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.sequentialrefinecontrol-pysrc.html +++ /dev/null @@ -1,859 +0,0 @@ - - - - - srrietveld.sequentialrefinecontrol - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module sequentialrefinecontrol - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.sequentialrefinecontrol

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15  Sequential refinement controller 
      - 16   
      - 17  Created On  2008.08.18 
      - 18          By  W. Zhou 
      - 19   
      - 20  External Methods List: 
      - 21          - loadSeqRefineController(savefilename): 
      - 22  Class   SeqRefineController 
      - 23          * Client Methods 
      - 24          - __init__ 
      - 25          - __str__ 
      - 26          - refine                        :   refine 
      - 27          - resetModel 
      - 28          - resetInstrument 
      - 29          - resetRefineStrategy           :    
      - 30          - save 
      - 31          - getFit(self, parval)          :   get Fit instance of an external parval 
      - 32          - getParameter(self, parname)   :   post-processing 
      - 33          - getEnvironParameterName(self) 
      - 34          - getEnvironParameterValues(self) 
      - 35  """ 
      - 36  __id__ = "$Id: sequentialrefinecontrol.py 2923 2009-03-20 15:51:25Z wdzhou $" 
      - 37   
      - 38  from    diffpy.srrietveld  import * 
      - 39   
      - 40  _MEMCHECK = False 
      - 41  _SCREENOUTPUT = True 
      - 42  _OUTPUT = True 
      - 43   
      -
      45 """ Sequential refinement controller - 46 - 47 Instantiation: - 48 - SeqRefineController(instrument, filenametupleslist, environparname, - 49 structure) - 50 - 51 Class Variables: - 52 @ _startFit - 53 @ _myInstrument - 54 @ _myModel - 55 @ _dataSetTupList - 56 @ _environparname - 57 @ _fitsPool val = curfit, refinedetail, refinehistory - 58 """ -
      59 - def __init__(self, instrument, filenametupleslist, environparname, structure): -
      60 """ Initialization - 61 - 62 Argument: - 63 - instrument : Instrument instance - 64 - filenameutplelist : list of tuples for dict and parameter value - 65 dict: key = bank id (x-ray: 0). value = data file name - 66 - environparname : str, environment parameter name - 67 - structure : list, of Crystal Phase - 68 """ - 69 # 1. Get information - 70 self._myInstrument = instrument - 71 self._myModel = structure[:] - 72 self._myRefineStrategy = None - 73 self._dataSetTupList = filenametupleslist - 74 self._environparname = environparname - 75 - 76 self._refinebankidlist = [0] - 77 self._userrangedict = {} - 78 self._excludedregiondict = {} - 79 self._backgrounddict = {} - 80 - 81 self.directory = None - 82 - 83 self._fitsPool = {} - 84 self._savedfilePool = {} - 85 - 86 # 2. Generate default refine repository and sequence - 87 # sort self._dataSetTupList according to refining direction - 88 self._direction = 1 - 89 self._envvalues = [] - 90 self._envvaldatadict = {} - 91 - 92 for datafname, parval in self._dataSetTupList: - 93 self._envvalues.append(parval) - 94 self._envvaldatadict[parval] = datafname - 95 - 96 self._envvalues.sort() - 97 self._refineseqlist = self._envvalues[:] - 98 - 99 -100 return -
      101 -102 -
      103 - def __str__(self): -
      104 """ Format output -105 """ -106 rstring = "" -107 rstring = "%-10 Sequence: Range = (%-15s, %-15s)\n"% \ -108 (self._environparname, self._dataSetTupList[0][1], self._dataSetTupList[-1][1]) -109 -110 return rstring -
      111 -112 -
      113 - def reset(self): -
      114 """ Reset the data set for a new series of fittings -115 -116 Return : None -117 """ -118 self._fitsPool = {} -119 -120 return -
      121 -122 -
      123 - def setBankToRefine(self, bankidlist): -
      124 """ Set a list of bank to refine -125 -126 Argument: -127 - bankidlist : list of int -128 -129 Return : None -130 """ -131 if len(bankidlist) >= 1: -132 self._refinebankidlist[:] = [] -133 for bankid in bankidlist: -134 self._refinebankidlist.append(bankid) -135 # END-IF -136 -137 return -
      138 -139 -
      140 - def setRefineRange(self, bankid, begin, end): -
      141 """ Set the refinement range to the sequential fitting. -142 Otherwise, the default will be taken from the intersection of instrument range -143 and data range -144 -145 Argument: -146 - bankid : int -147 - begin : float -148 - end : float, begin < end -149 -150 Return : None -151 """ -152 self._userrangedict[bankid] = (begin, end) -153 -154 return -
      155 -156 -
      157 - def setBackground(self, bankid = 0, backgroundpoints = None): -
      158 """ Set the background points -159 -160 Argument -161 - bankid : int -162 - backgroundpoints : list -163 -164 Return : None -165 """ -166 self._backgrounddict[bankid] = backgroundpoints -167 -168 return -
      169 -170 -
      171 - def setExcludedRegion(self, bankid = 0, excludedregions = None): -
      172 """ Set the excluded regions to a certain bank -173 -174 Argument: -175 - bankid : int -176 - excludedregions : list of 2-tuple (begin, end) -177 -178 Return : None -179 """ -180 if not self._excludedregiondict.has_key(bankid): -181 self._excludedregiondict[bankid] = [] -182 -183 self._excludedregiondict[bankid].extend(excludedregions) -184 -185 return -
      186 -187 -
      188 - def setRefineControl(self, direction, startvalue, datasetnumber=None): -
      189 """ Set the direction of sequential refinement, increment or decrement -190 -191 Argument: -192 - direction : str, direction: I (increase), D (decrease) and B (Bidirection) -193 - startvalue : float, starting value of the environment parameter -194 - datasetnumber : int, number of data set to refine -195 -196 Return : None -197 """ -198 # 1. Set up direction -199 if isinstance(direction, int): -200 self._direction = direction -201 else: -202 errmsg = "Refine Direction %-10 Unrecogizable"% (direction) -203 raise FitConfigurationError(errmsg) -204 -205 # 2. Set up starting value -206 import bisect -207 leftindex = bisect.bisect_left(self._envvalues, startvalue) -208 if leftindex == 0: -209 startindex = 0 -210 elif leftindex == len(self._envvalues)-1: -211 startindex = leftindex -212 elif leftindex >= len(self._envvalues): -213 startindex = len(self._envvalues)-1 -214 else: -215 if (self._envvalues[leftindex]-startvalue < -216 startvalue-self._envvalues[leftindex-1]): -217 startindex = leftindex -218 else: -219 startindex = leftindex-1 -220 # END-IF-ELSE -221 # END-IF-ELSE -222 -223 # 3. Create refine list -224 if datasetnumber is None: -225 datasetnumber = len(self._envvalues) -226 -227 if direction > 0: -228 # increase list -229 endindex = startindex+datasetnumber -230 if endindex >= len(self._envvalues): -231 self._refineseqlist = self._envvalues[startindex:] -232 else: -233 self._refineseqlist = self._envvalues[startindex:endindex] -234 # END-IF-ELSE -235 -236 elif direction < 0: -237 # decrease list -238 endindex = startindex-datasetnumber -239 if endindex < 0: -240 endindex = 0 -241 self._refineseqlist = self._envvalues[endindex:startindex+1] -242 self._refineseqlist.sort(reverse=True) -243 else: -244 # Bi-direction -245 errmsg = "Case %-5s Cannot Be Handled Now! Contact Developer Pelease"% (d) -246 raise NotImplementedError, errmsg -247 # END-IF-ELSE -248 -249 return -
      250 -251 -
      252 - def refine(self, savefname="tempseq.proj"): -
      253 """ Sequential refinement with a predetermined sequence; -254 Optionally the intermediate result will be saved -255 -256 default: acsending -257 -258 Argument: -259 - savefname : str -260 -261 Return : None -262 """ -263 import copy -264 import os -265 import refinestrategy as RS -266 import refinemanager as RM -267 import midscript as MS -268 import phasescript as PU -269 import diffpy.pyfullprof.Fit as FPF -270 -271 # 1. prepare and set intermittent output -272 loopid = 0 -273 processid = RM.getProcessID() -274 self.directory = "seq"+processid -275 os.mkdir(self.directory) -276 os.mkdir(self.directory+"/FP") -277 os.mkdir(self.directory+"/Proj") -278 -279 if _MEMCHECK is True: -280 import monitormem as MM -281 memory_mon = MM.MemoryMonitor() -282 memory_mon.record(0.5) -283 # END-IF MEMCHECK -284 -285 # 2. refine -286 # 2.0 Generate starting Fit -287 self.genStartFit() -288 -289 prevfit = None -290 for parvalue in self._refineseqlist: -291 -292 # 2.0 Control-value update -293 loopid += 1 -294 -295 if _MEMCHECK is True: -296 memory_mon.record(loopid) -297 # END-IF MEMCHECK -298 -299 # 2.1 Get new Fit, map phase -300 curfit = copy.deepcopy(self._startFit) -301 if prevfit is not None: -302 MS.mapStructure(prevfit, curfit) -303 -304 if _MEMCHECK is True: -305 memory_mon.record(loopid+0.2) -306 memory_mon.register(curfit) -307 memory_mon.register(curfit._srfit) -308 # END-IF MEMCHECK -309 -310 # 2.2 Load Data -311 datafnamedict = self._envvaldatadict[parvalue] -312 for bankid in datafnamedict.keys(): -313 MS.reloadData(curfit, datafnamedict[bankid], bankid) -314 -315 if _MEMCHECK is True: -316 memory_mon.record(loopid+0.4) -317 # END-IF MEMCHECK -318 -319 # 2.3 Set up RefineManager and Refinement Strategy -320 myrefinemanager = RM.MultiStepRefineManager(curfit) -321 if self._myRefineStrategy is None: -322 # using default refine strategy -323 raise NotImplementedError("Contact developer to deal with this situation") -324 self._myRefineStrategy = RS.RefineStrategy() -325 -326 # 2.4 Refine and update current-Fit -327 refinedetail, processid = myrefinemanager.refine(self._myRefineStrategy) -328 -329 # 2.5 Save refinement result for this step -330 # 2.5.1 Export phases parameters -331 # FIXME - Assume that all patterns have the same phases -332 component = curfit.getComponent(0) -333 numphases = component.getNumPhases() -334 phasedictlist = [] -335 for pindex in xrange(numphases): -336 phase = component.getPhase(pindex) -337 phasedict = PU.genPhaseDict(phase) -338 phasedictlist.append(phasedict) -339 -340 # 2.5.2 Save refinement manager to (1) project file (2) engine file (e.g., pcr, exp) -341 refinefilename = "refine"+str(parvalue)+".proj" -342 myrefinemanager.save(refinefilename) -343 -344 enginefilename = "" -345 if isinstance(curfit, FPF.Fit): -346 enginefilename = "refine" + str(parvalue) + ".pcr" -347 curfit.saveToEngineFile(enginefilename) -348 -349 # 2.5.3 Save into Fits Pool: save the Fit instance -350 refinehistory = myrefinemanager.getHistory() -351 -352 self._fitsPool[parvalue] = (curfit, refinedetail, refinehistory, phasedictlist) -353 self._savedfilePool[parvalue] = (refinefilename, enginefilename) -354 -355 # 2.5.4 Remove data from saved Fit -356 rietnum = curfit.getNumComponents() -357 for cindex in xrange(rietnum): -358 component = curfit.getComponent(cindex) -359 pattern = component.getPattern() -360 pattern.unloadData() -361 -362 # 2.5.5 Update the loop variables -363 prevfit = curfit -364 myrefinemanager = None -365 -366 if _MEMCHECK is True: -367 memory_mon.record(loopid+0.6) -368 # END-IF MEMCHECK -369 -370 # 2.6 move directory to respository -371 cmd = "mv %-20s %-20s"% (processid, self.directory) -372 os.system(cmd) -373 cmd = "mv %-20s %-20s"% (refinefilename, self.directory+"/Proj") -374 os.system(cmd) -375 if isinstance(curfit, FPF.Fit): -376 cmd = "mv %-20s %-20s"% (enginefilename, self.directory+"/FP") -377 os.system(cmd) -378 -379 # 2.7 Optional Output -380 if _SCREENOUTPUT is True: -381 print "\n********************* Sequential Refine Summary ******************************" -382 print "%-15s %-60s"% (parvalue, refinedetail) -383 print "***********************************************************************************\n" -384 -385 if _MEMCHECK is True: -386 memory_mon.record(loopid+0.8) -387 # END-IF -388 -389 # LOOP-OVER: for tup in self._dataSetTupList -390 -391 if _MEMCHECK is True: -392 memory_mon.record(loopid+1.0) -393 # END-IF -394 -395 return -
      396 -397 # END-DEF refine(self, savefname="tempseq.proj") -398 -399 -
      400 - def getFit(self, parval): -
      401 """ Get a Fit instance related to an environment parameter value -402 if this parameter value is not found, return the one with closest parameter value -403 -404 Argument: -405 - parval : float -406 -407 Return : Fit instance -408 """ -409 if self._fitsPool.has_key(parval): -410 # 1. Easy to locate parval in fitsPool list -411 retFit = self._fitsPool[parval][0] -412 else: -413 # 2. Find the nearest one -414 import bisect -415 parvallist = sorted(self._fitsPool.keys()) -416 parindex = bisect.bisect_left(parvallist, parval) -417 if parindex == 0 or parindex == len(parvallist)-1: -418 parkey = parvallist[parindex] -419 elif parindex == len(parvallist): -420 parkey = parvallist[-1] -421 else: -422 if parvallist[parindex]-parval < parval - parvallist[parindex-1]: -423 parkey = parvallist[parindex] -424 else: -425 parkey = parvallist[parindex-1] -426 # END-IF -427 # END-IF -428 -429 retFit = self._fitsPool[parkey][0] -430 # END-IF -431 -432 return retFit -
      433 -434 -
      435 - def getParameter(self, parname): -
      436 """ Get the value of some parameter -437 -438 Return : 3-tuple, list of float, list of str, list of list of float -439 1. list of environmental parameters' values -440 2. list of parameter names in full -441 3. list of list of float, parameter values -442 4. list of list of float, uncertainty -443 """ -444 # FIXME Now it is only the solution for 1-pattern data, a more elegant solution -445 # is required especially for model only parameters -446 UT = myEngine.getRietveldEngineModule("utilities") -447 -448 parvalueslist = sorted(self._fitsPool.keys()) -449 rtuplist = [] -450 stuplist = [] -451 -452 for parval in parvalueslist: -453 parnamelow = parname.lower() -454 if ["chi2", "rp", "rwp", "re"].count(parnamelow) == 1: -455 refdetail = self._fitsPool[parval][1] -456 valslist = [refdetail.getResidueValue(-1, patno=0, residname=parnamelow)] -457 sigslist = [] -458 parnameslist = [parname] -459 -460 else: -461 thisfit = self._fitsPool[parval][0] -462 parnameslist, valslist, sigslist = UT.getParameter(thisfit, parname, mode=0) -463 -464 # END-IF -465 rtuplist.append(valslist) -466 stuplist.append(sigslist) -467 # LOOP-OVER: for parval in parvalueslist -468 -469 return (parvalueslist, parnameslist, rtuplist, stuplist) -
      470 -471 -
      472 - def resetStructureModel(self, model): -
      473 """ Set up the structure model for starting -474 -475 Argument: -476 - model : list of Rietveld.Phase instance -477 -478 Return : None -479 """ -480 errmsg = "Unit Test Required" -481 raise NotImplementedError, errmsg -482 -483 self._myModel = model -484 self.genStartFit() -485 -486 return -
      487 -488 -
      489 - def resetInstrument(self, instrument): -
      490 """ Set up the instrument parameters -491 -492 Assumption: The starting value of instrument can be trusted -493 -494 Argument: -495 - instrument : diffpy.srrietveld.Instrument instance -496 -497 Return : None -498 """ -499 self._myInstrument = instrument -500 self._genStartFit() -501 -502 return -
      503 -504 -
      505 - def setRefineStrategy(self, refstr): -
      506 """ Reset refinement strategy -507 -508 Arguments: -509 - refstr : RefineStrategy instance or None -510 -511 Return : None -512 """ -513 self._myRefineStrategy = refstr -514 -515 return -
      516 -517 -
      518 - def genStartFit(self): -
      519 """ Generate the Fit instance -520 -521 Return : None -522 """ -523 # FIXME - Only support single experiment sequential fitting -524 -525 import midscript as MS -526 -527 -528 # 1. Set starting file name and check validity -529 startfilenamedict = self._dataSetTupList[0][0] -530 if not isinstance(startfilenamedict, dict): -531 errmsg = "startfilenamedict must be a dict" -532 raise NotImplementedError, errmsg -533 -534 # 2. Generate experiement-measurement list by instrument -535 expmeasurelist = self._myInstrument.genMeasurement(refinebankidlist = self._refinebankidlist, -536 datafilenamedict = startfilenamedict, userrangedict = self._userrangedict, -537 userexcludedregiondict = self._excludedregiondict, bgpointsdict = self._backgrounddict) -538 -539 # 3. Prepare necessary value -540 self._startFit = MS.genFit(self._myInstrument,self._myModel, expmeasurelist) -541 -542 return -
      543 -544 -
      545 - def save(self, savefilename): -
      546 """ Save self to a pickle file -547 -548 Arguement -549 - savefilename : str -550 -551 Return : None -552 """ -553 import pickle -554 import xmlgenerator as XMLG -555 import os -556 -557 # 1. Process names and generate the result directory -558 savedirname = savefilename.split(".")[0].strip() -559 savexmlname = savedirname+".xml" -560 try: -561 os.mkdir(savedirname) -562 except OSError, err: -563 pass -564 -565 # 2. Pickel save -566 # FIXME It will be removed later ... -567 if savefilename is None: -568 savefilename = str(self._processid) -569 elif not isinstance(savefilename, str): -570 errmsg = "Input File Name %-20s Is Not String"% (savefilename) -571 raise FitConfigurationError(savefilename) -572 -573 pfile = open(savefilename, "w") -574 pickle.dump(self, pfile) -575 pfile.close() -576 -577 # 3. XML save -578 xmldict = {} -579 for parval in sorted(self._fitsPool.keys()): -580 curfit, refinedetail, refinehistory, phasedictlist = self._fitsPool[parval] -581 xmldict[parval] = {} -582 xmldict[parval]["Structure"] = phasedictlist -583 xmldict[parval]["RefineInfo"] = refinedetail.toDict() -584 -585 xmldict[parval]["SavedFile"] = {} -586 xmldict[parval]["SavedFile"]["Proj"] = self._savedfilePool[parval][0] -587 xmldict[parval]["SavedFile"]["FP"] = self._savedfilePool[parval][1] -588 # LOOP-OVER -589 -590 seqxmlgen = XMLG.SeqFitRecordXMLGenerator(xmldict) -591 seqxmlgen.exportXML(savexmlname) -592 -593 cmd = "mv %-10s %-10s"% (savexmlname, savedirname) -594 os.system(cmd) -595 -596 # 4. Directory save -597 -598 if self.directory is not None: -599 cmd = "mv %-15s %-15s"% (self.directory+"/FP", savedirname) -600 os.system(cmd) -601 -602 cmd = "mv %-15s %-15s"% (self.directory+"/Proj", savedirname) -603 os.system(cmd) -604 # END-IF -605 -606 return -
      607 -608 -
      609 - def getEnvironParameterName(self): -
      610 """ Get environment parameter name -611 -612 Return : str -613 """ -614 return self._environparname -
      615 -616 -
      617 - def getEnvironParameterValues(self): -
      618 """ Get all the environment parameter values, and output in a sorted list -619 -620 Return : list of float -621 """ -622 rlist = sorted(self._fitsPool.keys()) -623 -624 return rlist -
      625 -626 -
      627 - def getInfoTupleFromParValue(self, parval): -
      628 """ Get the Fit information, including Fit instance, refine information -629 and multiple-step refine history for a certain value of -630 environment parameters -631 -632 Arguement: -633 - parval : float, environment parameter value -634 -635 Return : 4-tuple: 1. Float (key value), -636 2. Fit instance, -637 3. RefineDetail instance, -638 4. RefineHistory instance -639 """ -640 # 1. Obtain list of key values -641 keyvalueslist = sorted(self._fitsPool.keys()) -642 sindex = 0 -643 findex = len(keyvalueslist)-1 -644 -645 if _OUTPUT is True: -646 print "1104: sindex = %-5s findex = %-5s"% (sindex, findex) -647 -648 # 2. Search key -649 if parval > keyvalueslist[findex]: -650 # extreme right -651 keyval = keyvalueslist[findex] -652 elif parval < keyvalueslist[sindex]: -653 # extrem left -654 keyval = keyvalueslist[sindex] -655 else: -656 keyval = parval -657 -658 # 3. Get value -659 thefit, thedetail, thehistory = self._fitsPool[keyval] -660 -661 return ( (keyval, thefit, thedetail, thehistory) ) -
      662 -663 -
      664 - def update(self): -
      665 """ Updating the database/repository after a refinement is finished -666 -667 Argument: -668 - -669 """ -670 # FIXME - It is not implemented b/c the purpose of this method is not clear -671 raise NotImplementedError("update() is not implemented") -
      672 -673 # END-CLASS SeqRefineContoller -674 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.sequentialrefinecontrol.SeqRefineController-class.html b/static_root/doc/srrietveld/developers/srrietveld.sequentialrefinecontrol.SeqRefineController-class.html deleted file mode 100644 index c86df44e..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.sequentialrefinecontrol.SeqRefineController-class.html +++ /dev/null @@ -1,1072 +0,0 @@ - - - - - srrietveld.sequentialrefinecontrol.SeqRefineController - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module sequentialrefinecontrol :: - Class SeqRefineController - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class SeqRefineController

      source code

      -
      -Sequential refinement controller
      -
      -Instantiation:
      -- SeqRefineController(instrument, filenametupleslist, environparname, 
      -                      structure)
      -
      -Class Variables:
      -@  _startFit
      -@  _myInstrument
      -@  _myModel
      -@  _dataSetTupList
      -@  _environparname
      -@  _fitsPool        val = curfit, refinedetail, refinehistory
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - instrument, - filenametupleslist, - environparname, - structure)
      - Initialization - -Argument: -- instrument : Instrument instance -- filenameutplelist : list of tuples for dict and parameter value - dict: key = bank id (x-ray: 0).
      - source code - -
      - -
      -   - - - - - - -
      __str__(self)
      - Format output
      - source code - -
      - -
      -   - - - - - - -
      reset(self)
      - Reset the data set for a new series of fittings
      - source code - -
      - -
      -   - - - - - - -
      setBankToRefine(self, - bankidlist)
      - Set a list of bank to refine...
      - source code - -
      - -
      -   - - - - - - -
      setRefineRange(self, - bankid, - begin, - end)
      - Set the refinement range to the sequential fitting.
      - source code - -
      - -
      -   - - - - - - -
      setBackground(self, - bankid=0, - backgroundpoints=None)
      - Set the background points...
      - source code - -
      - -
      -   - - - - - - -
      setExcludedRegion(self, - bankid=0, - excludedregions=None)
      - Set the excluded regions to a certain bank...
      - source code - -
      - -
      -   - - - - - - -
      setRefineControl(self, - direction, - startvalue, - datasetnumber=None)
      - Set the direction of sequential refinement, increment or decrement...
      - source code - -
      - -
      -   - - - - - - -
      refine(self, - savefname='tempseq.proj')
      - Sequential refinement with a predetermined sequence;...
      - source code - -
      - -
      -   - - - - - - -
      getFit(self, - parval)
      - Get a Fit instance related to an environment parameter value...
      - source code - -
      - -
      -   - - - - - - -
      getParameter(self, - parname)
      - Get the value of some parameter
      - source code - -
      - -
      -   - - - - - - -
      resetStructureModel(self, - model)
      - Set up the structure model for starting ...
      - source code - -
      - -
      -   - - - - - - -
      resetInstrument(self, - instrument)
      - Set up the instrument parameters...
      - source code - -
      - -
      -   - - - - - - -
      setRefineStrategy(self, - refstr)
      - Reset refinement strategy...
      - source code - -
      - -
      -   - - - - - - -
      genStartFit(self)
      - Generate the Fit instance
      - source code - -
      - -
      -   - - - - - - -
      save(self, - savefilename)
      - Save self to a pickle file...
      - source code - -
      - -
      -   - - - - - - -
      getEnvironParameterName(self)
      - Get environment parameter name
      - source code - -
      - -
      -   - - - - - - -
      getEnvironParameterValues(self)
      - Get all the environment parameter values, and output in a sorted - list
      - source code - -
      - -
      -   - - - - - - -
      getInfoTupleFromParValue(self, - parval)
      - Get the Fit information, including Fit instance, refine information -and multiple-step refine history for a certain value of -environment parameters - -Arguement: -- parval : float, environment parameter value - -Return : 4-tuple: 1.
      - source code - -
      - -
      -   - - - - - - -
      update(self)
      - Updating the database/repository after a refinement is finished...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - instrument, - filenametupleslist, - environparname, - structure) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization
      -
      -Argument:
      -- instrument        :   Instrument instance
      -- filenameutplelist :   list of tuples for dict and parameter value
      -                        dict: key = bank id (x-ray: 0).  value = data file name
      -- environparname    :   str, environment parameter name
      -- structure         :   list, of Crystal Phase
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      reset(self) -

      -
      source code  -
      - -

      Reset the data set for a new series of fittings

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      setBankToRefine(self, - bankidlist) -

      -
      source code  -
      - -
      -Set a list of bank to refine
      -
      -Argument:
      -- bankidlist    :   list of int
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setRefineRange(self, - bankid, - begin, - end) -

      -
      source code  -
      - -
      -Set the refinement range to the sequential fitting. 
      -Otherwise, the default will be taken from the intersection of instrument range
      -and data range
      -
      -Argument:
      -- bankid    :   int
      -- begin     :   float
      -- end       :   float, begin < end
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setBackground(self, - bankid=0, - backgroundpoints=None) -

      -
      source code  -
      - -
      -Set the background points
      -
      -Argument
      -- bankid            :   int
      -- backgroundpoints  :   list
      -
      -Return              :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setExcludedRegion(self, - bankid=0, - excludedregions=None) -

      -
      source code  -
      - -
      -Set the excluded regions to a certain bank
      -
      -Argument:
      -- bankid    :   int
      -- excludedregions   :   list of 2-tuple (begin, end)
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setRefineControl(self, - direction, - startvalue, - datasetnumber=None) -

      -
      source code  -
      - -
      -Set the direction of sequential refinement, increment or decrement
      -
      -Argument:
      -- direction     :   str, direction: I (increase), D (decrease) and B (Bidirection)
      -- startvalue    :   float, starting value of the environment parameter
      -- datasetnumber :   int, number of data set to refine
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      refine(self, - savefname='tempseq.proj') -

      -
      source code  -
      - -
      -Sequential refinement with a predetermined sequence;
      -Optionally the intermediate result will be saved
      -
      -default: acsending
      -
      -Argument:
      -- savefname :   str
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getFit(self, - parval) -

      -
      source code  -
      - -
      -Get a Fit instance related to an environment parameter value
      -if this parameter value is not found, return the one with closest parameter value
      -
      -Argument:
      -- parval    :   float
      -
      -Return      :   Fit instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getParameter(self, - parname) -

      -
      source code  -
      - -

      Get the value of some parameter

      - Return : 3-tuple, list of float, list of str, list of list of - float -
        -
      1. - list of environmental parameters' values -
      2. -
      3. - list of parameter names in full -
      4. -
      5. - list of list of float, parameter values -
      6. -
      7. - list of list of float, uncertainty -
      8. -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      resetStructureModel(self, - model) -

      -
      source code  -
      - -
      -Set up the structure model for starting 
      -
      -Argument:
      -- model :   list of Rietveld.Phase instance
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      resetInstrument(self, - instrument) -

      -
      source code  -
      - -
      -Set up the instrument parameters
      -
      -Assumption:  The starting value of instrument can be trusted
      -
      -Argument:
      -- instrument    :   diffpy.srrietveld.Instrument instance
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      setRefineStrategy(self, - refstr) -

      -
      source code  -
      - -
      -Reset refinement strategy
      -
      -Arguments:
      -- refstr    :   RefineStrategy instance or None
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genStartFit(self) -

      -
      source code  -
      - -

      Generate the Fit instance

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      save(self, - savefilename) -

      -
      source code  -
      - -
      -Save self to a pickle file
      -
      -Arguement
      -- savefilename  :   str
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getEnvironParameterName(self) -

      -
      source code  -
      - -

      Get environment parameter name

      - Return : str -
      -
      -
      -
      - -
      - -
      - - -
      -

      getEnvironParameterValues(self) -

      -
      source code  -
      - -

      Get all the environment parameter values, and output in a sorted - list

      - Return : list of float -
      -
      -
      -
      - -
      - -
      - - -
      -

      getInfoTupleFromParValue(self, - parval) -

      -
      source code  -
      - -
      -Get the Fit information, including Fit instance, refine information
      -and multiple-step refine history for a certain value of 
      -environment parameters
      -
      -Arguement:
      -- parval    :   float, environment parameter value
      -
      -Return      :   4-tuple:    1. Float (key value), 
      -                            2. Fit instance, 
      -                            3. RefineDetail instance, 
      -                            4. RefineHistory instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      update(self) -

      -
      source code  -
      - -
      -Updating the database/repository after a refinement is finished
      -
      -Argument:
      -- 
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.spacegroupinfo-module.html b/static_root/doc/srrietveld/developers/srrietveld.spacegroupinfo-module.html deleted file mode 100644 index 19213ff0..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.spacegroupinfo-module.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - srrietveld.spacegroupinfo - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module spacegroupinfo - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module spacegroupinfo

      source code

      - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      getCrystalSystemFromSpaceGroup(spcgrp)
      - map the space group to a crystal system, which must be ...
      - source code - -
      - -
      - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: spacegroupinfo.py 2792 2009-03-02 15:56:43Z wdz... -
      -   - - CystalStructureNameDict = {1: 'Triclinic', 2: 'Monoclinic', 3:... -
      -   - - SpacegroupIDDict = {1: ('P 1', 1), 2: ('P -1', 1), 3: ('P 2', ... -
      -   - - SpacegroupNameDict = {'A b a 2': (41, 3), 'A b m 2': (39, 3), ... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      getCrystalSystemFromSpaceGroup(spcgrp) -

      -
      source code  -
      - -
      -
      -map the space group to a crystal system, which must be 
      -one of the 7 crystla stcture
      -
      -Argument:
      -- spcgrp    :   string, space group
      -
      -Return      :   string, crystal system
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: spacegroupinfo.py 2792 2009-03-02 15:56:43Z wdzhou $'
      -
      -
      -
      -
      -
      - -
      - -
      -

      CystalStructureNameDict

      - -
      -
      -
      -
      Value:
      -
      -{1: 'Triclinic',
      - 2: 'Monoclinic',
      - 3: 'Orthorhombic',
      - 4: 'Tetragonal',
      - 5: 'Trigonal',
      - 6: 'Hexagonal',
      - 7: 'Cubic'}
      -
      -
      -
      -
      -
      - -
      - -
      -

      SpacegroupIDDict

      - -
      -
      -
      -
      Value:
      -
      -{1: ('P 1', 1),
      - 2: ('P -1', 1),
      - 3: ('P 2', 2),
      - 4: ('P 21', 2),
      - 5: ('C 2', 2),
      - 6: ('P m', 2),
      - 7: ('P c', 2),
      - 8: ('C m', 2),
      -...
      -
      -
      -
      -
      -
      - -
      - -
      -

      SpacegroupNameDict

      - -
      -
      -
      -
      Value:
      -
      -{'A b a 2': (41, 3),
      - 'A b m 2': (39, 3),
      - 'A m a 2': (40, 3),
      - 'A m m 2': (38, 3),
      - 'C 2': (5, 2),
      - 'C 2 2 2': (21, 3),
      - 'C 2 2 21': (20, 3),
      - 'C 2/c': (15, 2),
      -...
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.spacegroupinfo-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.spacegroupinfo-pysrc.html deleted file mode 100644 index c81bcbbd..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.spacegroupinfo-pysrc.html +++ /dev/null @@ -1,662 +0,0 @@ - - - - - srrietveld.spacegroupinfo - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module spacegroupinfo - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.spacegroupinfo

      -
      -  1  ################################################################################ 
      -  2  # 
      -  3  #   space group information, including 2 dictionaries with  
      -  4  #   some external functions 
      -  5  # 
      -  6  #   source from:  
      -  7  #   http://leonardo.phys.washington.edu/~ravel/software/doc/Atoms/Atoms/node17.html 
      -  8  # 
      -  9  #   Created On: 2008.06.28 
      - 10  #           By: W. Zhou 
      - 11  # 
      - 12  ################################################################################ 
      - 13   
      - 14  __id__ = "$Id: spacegroupinfo.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      - 15   
      - 16  CystalStructureNameDict = { 
      - 17      1: "Triclinic", 
      - 18      2: "Monoclinic", 
      - 19      3: "Orthorhombic",  
      - 20      4: "Tetragonal",  
      - 21      5: "Trigonal", 
      - 22      6: "Hexagonal",  
      - 23      7: "Cubic",  
      - 24  } 
      - 25   
      - 26  SpacegroupIDDict = { 
      - 27      1  :    ("P 1" ,   1),       
      - 28      2  :    ("P -1",   1),       
      - 29      3  :    ("P 2"   , 2), 
      - 30      4  :    ("P 21"  , 2), 
      - 31      5  :    ("C 2"   , 2), 
      - 32      6  :    ("P m"   , 2), 
      - 33      7  :    ("P c"   , 2), 
      - 34      8  :    ("C m"   , 2), 
      - 35      9  :    ("C c"   , 2), 
      - 36      10 :    ("P 2/m" , 2),       
      - 37      11 :    ("P 21/m", 2),       
      - 38      12 :    ("C 2/m" , 2),       
      - 39      13 :    ("P 2/c" , 2),       
      - 40      14 :    ("P 21/c", 2),       
      - 41      15 :    ("C 2/c" , 2),       
      - 42      16 :    ("P 2 2 2",   3),  
      - 43      17 :    ("P 2 2 21",  3),  
      - 44      18 :    ("P 21 21 2", 3),    
      - 45      19 :    ("P 21 21 21",3),    
      - 46      20 :    ("C 2 2 21",  3), 
      - 47      21 :    ("C 2 2 2",   3), 
      - 48      22 :    ("F 2 2 2",   3), 
      - 49      23 :    ("I 2 2 2",   3), 
      - 50      24 :    ("I 21 21 21",3),    
      - 51      25 :    ("P m m 2",   3), 
      - 52      26 :    ("P m c 21",  3), 
      - 53      27 :    ("P c c 2",   3), 
      - 54      28 :    ("P m a 2",   3), 
      - 55      29 :    ("P c a 21",  3), 
      - 56      30 :    ("P n c 2",   3), 
      - 57      31 :    ("P m n 21",  3), 
      - 58      32 :    ("P b a 2",   3), 
      - 59      33 :    ("P n a 21",  3), 
      - 60      34 :    ("P n n 2",   3), 
      - 61      35 :    ("C m m 2",   3), 
      - 62      36 :    ("C m c 21",  3), 
      - 63      37 :    ("C c c 2",   3), 
      - 64      38 :    ("A m m 2",   3), 
      - 65      39 :    ("A b m 2",   3), 
      - 66      40 :    ("A m a 2",   3), 
      - 67      41 :    ("A b a 2",   3), 
      - 68      42 :    ("F m m 2",   3), 
      - 69      43 :    ("F d d 2",   3), 
      - 70      44 :    ("I m m 2",   3), 
      - 71      45 :    ("I b a 2",   3), 
      - 72      46 :    ("I m a 2",   3), 
      - 73      47 :    ("P m m m",   3), 
      - 74      48 :    ("P n n n",   3), 
      - 75      49 :    ("P c c m",   3), 
      - 76      50 :    ("P b a n",   3), 
      - 77      51 :    ("P m m a",   3), 
      - 78      52 :    ("P n n a",   3), 
      - 79      53 :    ("P m n a",   3), 
      - 80      54 :    ("P c c a",   3), 
      - 81      55 :    ("P b a m",   3), 
      - 82      56 :    ("P c c n",   3), 
      - 83      57 :    ("P b c m",   3), 
      - 84      58 :    ("P n n m",   3), 
      - 85      59 :    ("P m m n",   3), 
      - 86      60 :    ("P b c n",   3), 
      - 87      61 :    ("P b c a",   3), 
      - 88      62 :    ("P n m a",   3), 
      - 89      63 :    ("C m c m",   3), 
      - 90      64 :    ("C m c a",   3), 
      - 91      65 :    ("C m m m",   3), 
      - 92      66 :    ("C c c m",   3), 
      - 93      67 :    ("C m m a",   3), 
      - 94      68 :    ("C c c a",   3), 
      - 95      69 :    ("F m m m",   3), 
      - 96      70 :    ("F d d d",   3), 
      - 97      71 :    ("I m m m",   3), 
      - 98      72 :    ("I b a m",   3), 
      - 99      73 :    ("I b c a",   3), 
      -100      74 :    ("I m m a",   3), 
      -101      75 :    ("P 4"      , 4), 
      -102      76 :    ("P 41"     , 4), 
      -103      77 :    ("P 42"     , 4), 
      -104      78 :    ("P 43"     , 4), 
      -105      79 :    ("I 4"      , 4), 
      -106      80 :    ("I 41"     , 4), 
      -107      81 :    ("P -4"     , 4), 
      -108      82 :    ("I -4"     , 4), 
      -109      83 :    ("P 4/m"    , 4), 
      -110      84 :    ("P 42/m"   , 4), 
      -111      85 :    ("P 4/n"    , 4), 
      -112      86 :    ("P 42/n"   , 4), 
      -113      87 :    ("I 4/m"    , 4), 
      -114      88 :    ("I 41/a"   , 4), 
      -115      89 :    ("P 4 2 2"  , 4), 
      -116      90 :    ("P 4 21 2" , 4), 
      -117      91 :    ("P 41 2 2" , 4), 
      -118      92 :    ("P 41 21 2", 4),    
      -119      93 :    ("P 42 2 2" , 4), 
      -120      94 :    ("P 42 21 2", 4),    
      -121      95 :    ("P 43 2 2" , 4), 
      -122      96 :    ("P 43 21 2", 4),    
      -123      97 :    ("I 4 2 2"  , 4), 
      -124      98 :    ("I 41 2 2" , 4), 
      -125      99 :    ("P 4 m m"  , 4), 
      -126      100:    ("P 4 b m"  , 4), 
      -127      101:    ("P 42 c m" , 4), 
      -128      102:    ("P 42 n m" , 4), 
      -129      103:    ("P 4 c c"  , 4), 
      -130      104:    ("P 4 n c"  , 4), 
      -131      105:    ("P 42 m c" , 4), 
      -132      106:    ("P 42 b c" , 4), 
      -133      107:    ("I 4 m m"  , 4), 
      -134      108:    ("I 4 c m"  , 4), 
      -135      109:    ("I 41 m d" , 4), 
      -136      110:    ("I 41 c d" , 4), 
      -137      111:    ("P -4 2 m" , 4), 
      -138      112:    ("P -4 2 c" , 4), 
      -139      113:    ("P -4 21 m", 4),    
      -140      114:    ("P -4 21 c", 4),    
      -141      115:    ("P -4 m 2" , 4), 
      -142      116:    ("P -4 c 2" , 4), 
      -143      117:    ("P -4 b 2" , 4), 
      -144      118:    ("P -4 n 2" , 4), 
      -145      119:    ("I -4 m 2" , 4), 
      -146      120:    ("I -4 c 2" , 4), 
      -147      121:    ("I -4 2 m" , 4), 
      -148      122:    ("I -4 2 d" , 4), 
      -149      123:    ("P 4/m m m", 4),    
      -150      124:    ("P 4/m c c", 4),    
      -151      125:    ("P 4/n b m", 4),    
      -152      126:    ("P 4/n n c", 4),    
      -153      127:    ("P 4/m b m", 4),    
      -154      128:    ("P 4/m n c", 4),    
      -155      129:    ("P 4/n m m", 4),    
      -156      130:    ("P 4/n c c", 4),    
      -157      131:    ("P 42/m m c", 4),   
      -158      132:    ("P 42/m c m", 4),   
      -159      133:    ("P 42/n b c", 4),   
      -160      134:    ("P 42/n n m", 4),   
      -161      135:    ("P 42/m b c", 4),   
      -162      136:    ("P 42/m n m", 4),   
      -163      137:    ("P 42/n m c", 4),   
      -164      138:    ("P 42/n c m", 4),   
      -165      139:    ("I 4/m m m" , 4),   
      -166      140:    ("I 4/m c m" , 4),   
      -167      141:    ("I 41/a m d", 4),   
      -168      142:    ("I 41/a c d", 4),   
      -169      143:    ("P 3",         5), 
      -170      144:    ("P 31",        5), 
      -171      145:    ("P 32",        5), 
      -172      146:    ("R 3",         5), 
      -173      147:    ("P -3",        5), 
      -174      148:    ("R -3",        5), 
      -175      149:    ("P 3 1 2",     5), 
      -176      150:    ("P 3 2 1",     5), 
      -177      151:    ("P 31 1 2",    5), 
      -178      152:    ("P 31 2 1",    5), 
      -179      153:    ("P 32 1 2",    5), 
      -180      154:    ("P 32 2 1",    5), 
      -181      155:    ("R 3 2",       5), 
      -182      156:    ("P 3 m 1",     5), 
      -183      157:    ("P 3 1 m",     5), 
      -184      158:    ("P 3 c 1",     5), 
      -185      159:    ("P 3 1 c",     5), 
      -186      160:    ("R 3 m",       5),        
      -187      161:    ("R 3 c",       5),        
      -188      162:    ("P -3 1 m",    5), 
      -189      163:    ("P -3 1 C",    5), 
      -190      164:    ("P -3 m 1",    5), 
      -191      165:    ("P -3 c 1",    5), 
      -192      166:    ("R -3 m",      5), 
      -193      167:    ("R -3 c",      5), 
      -194      168:    ("P 6",         6), 
      -195      169:    ("P 61",        6), 
      -196      170:    ("P 65",        6), 
      -197      171:    ("P 62",        6), 
      -198      172:    ("P 64",        6), 
      -199      173:    ("P 63",        6), 
      -200      174:    ("P -6",        6), 
      -201      175:    ("P 6/m",       6), 
      -202      176:    ("P 63/M",      6), 
      -203      177:    ("P 6 2 2",     6), 
      -204      178:    ("P 61 2 2",    6), 
      -205      179:    ("P 65 2 2",    6), 
      -206      180:    ("P 62 2 2",    6), 
      -207      181:    ("P 64 2 2",    6), 
      -208      182:    ("P 63 2 2",    6), 
      -209      183:    ("P 6 m m" ,    6), 
      -210      184:    ("P 6 c c" ,    6), 
      -211      185:    ("P 63 c m",    6), 
      -212      186:    ("P 63 m c",    6), 
      -213      187:    ("P -6 m 2",    6), 
      -214      188:    ("P -6 c 2",    6), 
      -215      189:    ("P -6 2 m",    6), 
      -216      190:    ("P -6 2 c",    6), 
      -217      191:    ("P 6/m m m",   6),        
      -218      192:    ("P 6/m c c",   6),        
      -219      193:    ("P 63/m c m",  6),  
      -220      194:    ("P 63/m m c",  6),  
      -221      195:    ("P 2 3"    ,   7),          
      -222      196:    ("F 2 3"    ,   7),          
      -223      197:    ("I 2 3"    ,   7),          
      -224      198:    ("P 21 3"   ,   7),          
      -225      199:    ("I 21 3"   ,   7),          
      -226      200:    ("P m -3"   ,   7),          
      -227      201:    ("P n -3"   ,   7),          
      -228      202:    ("F m -3"   ,   7),          
      -229      203:    ("F d -3"   ,   7),          
      -230      204:    ("I m -3"   ,   7),          
      -231      205:    ("P a -3"   ,   7),          
      -232      206:    ("I a -3"   ,   7),          
      -233      207:    ("P 4 3 2"  ,   7),          
      -234      208:    ("P 42 3 2" ,   7),          
      -235      209:    ("F 4 3 2"  ,   7),          
      -236      210:    ("F 41 3 2" ,   7), 
      -237      211:    ("I 4 3 2"  ,   7),  
      -238      212:    ("P 43 3 2" ,   7),          
      -239      213:    ("P 41 3 2" ,   7),          
      -240      214:    ("I 41 3 2" ,   7),          
      -241      215:    ("P -4 3 m" ,   7),          
      -242      216:    ("F -4 3 m" ,   7),          
      -243      217:    ("I -4 3 m" ,   7),          
      -244      218:    ("P -4 3 n" ,   7),          
      -245      219:    ("F -4 3 c" ,   7),          
      -246      220:    ("I -4 3 d" ,   7),          
      -247      221:    ("P m -3 m" ,   7),          
      -248      222:    ("P n -3 n" ,   7),          
      -249      223:    ("P m -3 n" ,   7),          
      -250      224:    ("P n -3 m" ,   7),          
      -251      225:    ("F m -3 m" ,   7),          
      -252      226:    ("F m -3 c" ,   7),          
      -253      227:    ("F d -3 m" ,   7),          
      -254      228:    ("F d -3 c" ,   7),          
      -255      229:    ("I m -3 m" ,   7),          
      -256      230:    ("I a -3 d" ,   7),          
      -257  } 
      -258  SpacegroupNameDict = { 
      -259      "P 1"             :   (1  , 1),      
      -260      "P -1"            :   (2  , 1),      
      -261      "P 2"             :   (3  , 2), 
      -262      "P 21"            :   (4  , 2), 
      -263      "C 2"             :   (5  , 2), 
      -264      "P m"             :   (6  , 2), 
      -265      "P c"             :   (7  , 2), 
      -266      "C m"             :   (8  , 2), 
      -267      "C c"             :   (9  , 2), 
      -268      "P 2/m"           :   (10 , 2),      
      -269      "P 21/m"          :   (11 , 2),      
      -270      "C 2/m"           :   (12 , 2),      
      -271      "P 2/c"           :   (13 , 2),      
      -272      "P 21/c"          :   (14 , 2),      
      -273      "C 2/c"           :   (15 , 2),      
      -274      "P 2 2 2"         :   (16 , 3),  
      -275      "P 2 2 21"        :   (17 , 3),  
      -276      "P 21 21 2"       :   (18 , 3),      
      -277      "P 21 21 21"      :   (19 , 3),      
      -278      "C 2 2 21"        :   (20 , 3), 
      -279      "C 2 2 2"         :   (21 , 3), 
      -280      "F 2 2 2"         :   (22 , 3), 
      -281      "I 2 2 2"         :   (23 , 3), 
      -282      "I 21 21 21"      :   (24 , 3),      
      -283      "P m m 2"         :   (25 , 3), 
      -284      "P m c 21"        :   (26 , 3), 
      -285      "P c c 2"         :   (27 , 3), 
      -286      "P m a 2"         :   (28 , 3), 
      -287      "P c a 21"        :   (29 , 3), 
      -288      "P n c 2"         :   (30 , 3), 
      -289      "P m n 21"        :   (31 , 3), 
      -290      "P b a 2"         :   (32 , 3), 
      -291      "P n a 21"        :   (33 , 3), 
      -292      "P n n 2"         :   (34 , 3), 
      -293      "C m m 2"         :   (35 , 3), 
      -294      "C m c 21"        :   (36 , 3), 
      -295      "C c c 2"         :   (37 , 3), 
      -296      "A m m 2"         :   (38 , 3), 
      -297      "A b m 2"         :   (39 , 3), 
      -298      "A m a 2"         :   (40 , 3), 
      -299      "A b a 2"         :   (41 , 3), 
      -300      "F m m 2"         :   (42 , 3), 
      -301      "F d d 2"         :   (43 , 3), 
      -302      "I m m 2"         :   (44 , 3), 
      -303      "I b a 2"         :   (45 , 3), 
      -304      "I m a 2"         :   (46 , 3), 
      -305      "P m m m"         :   (47 , 3), 
      -306      "P n n n"         :   (48 , 3), 
      -307      "P c c m"         :   (49 , 3), 
      -308      "P b a n"         :   (50 , 3), 
      -309      "P m m a"         :   (51 , 3), 
      -310      "P n n a"         :   (52 , 3), 
      -311      "P m n a"         :   (53 , 3), 
      -312      "P c c a"         :   (54 , 3), 
      -313      "P b a m"         :   (55 , 3), 
      -314      "P c c n"         :   (56 , 3), 
      -315      "P b c m"         :   (57 , 3), 
      -316      "P n n m"         :   (58 , 3), 
      -317      "P m m n"         :   (59 , 3), 
      -318      "P b c n"         :   (60 , 3), 
      -319      "P b c a"         :   (61 , 3), 
      -320      "P n m a"         :   (62 , 3), 
      -321      "C m c m"         :   (63 , 3), 
      -322      "C m c a"         :   (64 , 3), 
      -323      "C m m m"         :   (65 , 3), 
      -324      "C c c m"         :   (66 , 3), 
      -325      "C m m a"         :   (67 , 3), 
      -326      "C c c a"         :   (68 , 3), 
      -327      "F m m m"         :   (69 , 3), 
      -328      "F d d d"         :   (70 , 3), 
      -329      "I m m m"         :   (71 , 3), 
      -330      "I b a m"         :   (72 , 3), 
      -331      "I b c a"         :   (73 , 3), 
      -332      "I m m a"         :   (74 , 3), 
      -333      "P 4"             :   (75 , 4), 
      -334      "P 41"            :   (76 , 4), 
      -335      "P 42"            :   (77 , 4), 
      -336      "P 43"            :   (78 , 4), 
      -337      "I 4"             :   (79 , 4), 
      -338      "I 41"            :   (80 , 4), 
      -339      "P -4"            :   (81 , 4), 
      -340      "I -4"            :   (82 , 4), 
      -341      "P 4/m"           :   (83 , 4), 
      -342      "P 42/m"          :   (84 , 4), 
      -343      "P 4/n"           :   (85 , 4), 
      -344      "P 42/n"          :   (86 , 4), 
      -345      "I 4/m"           :   (87 , 4), 
      -346      "I 41/a"          :   (88 , 4), 
      -347      "P 4 2 2"         :   (89 , 4), 
      -348      "P 4 21 2"        :   (90 , 4), 
      -349      "P 41 2 2"        :   (91 , 4), 
      -350      "P 41 21 2"       :   (92 , 4),      
      -351      "P 42 2 2"        :   (93 , 4), 
      -352      "P 42 21 2"       :   (94 , 4),      
      -353      "P 43 2 2"        :   (95 , 4), 
      -354      "P 43 21 2"       :   (96 , 4),      
      -355      "I 4 2 2"         :   (97 , 4), 
      -356      "I 41 2 2"        :   (98 , 4), 
      -357      "P 4 m m"         :   (99 , 4), 
      -358      "P 4 b m"         :   (100, 4), 
      -359      "P 42 c m"        :   (101, 4), 
      -360      "P 42 n m"        :   (102, 4), 
      -361      "P 4 c c"         :   (103, 4), 
      -362      "P 4 n c"         :   (104, 4), 
      -363      "P 42 m c"        :   (105, 4), 
      -364      "P 42 b c"        :   (106, 4), 
      -365      "I 4 m m"         :   (107, 4), 
      -366      "I 4 c m"         :   (108, 4), 
      -367      "I 41 m d"        :   (109, 4), 
      -368      "I 41 c d"        :   (110, 4), 
      -369      "P -4 2 m"        :   (111, 4), 
      -370      "P -4 2 c"        :   (112, 4), 
      -371      "P -4 21 m"       :   (113, 4),      
      -372      "P -4 21 c"       :   (114, 4),      
      -373      "P -4 m 2"        :   (115, 4), 
      -374      "P -4 c 2"        :   (116, 4), 
      -375      "P -4 b 2"        :   (117, 4), 
      -376      "P -4 n 2"        :   (118, 4), 
      -377      "I -4 m 2"        :   (119, 4), 
      -378      "I -4 c 2"        :   (120, 4), 
      -379      "I -4 2 m"        :   (121, 4), 
      -380      "I -4 2 d"        :   (122, 4), 
      -381      "P 4/m m m"       :   (123, 4),      
      -382      "P 4/m c c"       :   (124, 4),      
      -383      "P 4/n b m"       :   (125, 4),      
      -384      "P 4/n n c"       :   (126, 4),      
      -385      "P 4/m b m"       :   (127, 4),      
      -386      "P 4/m n c"       :   (128, 4),      
      -387      "P 4/n m m"       :   (129, 4),      
      -388      "P 4/n c c"       :   (130, 4),      
      -389      "P 42/m m c"      :   (131, 4),      
      -390      "P 42/m c m"      :   (132, 4),      
      -391      "P 42/n b c"      :   (133, 4),      
      -392      "P 42/n n m"      :   (134, 4),      
      -393      "P 42/m b c"      :   (135, 4),      
      -394      "P 42/m n m"      :   (136, 4),      
      -395      "P 42/n m c"      :   (137, 4),      
      -396      "P 42/n c m"      :   (138, 4),      
      -397      "I 4/m m m"       :   (139, 4),      
      -398      "I 4/m c m"       :   (140, 4),      
      -399      "I 41/a m d"      :   (141, 4),      
      -400      "I 41/a c d"      :   (142, 4),      
      -401      "P 3"             :   (143, 5), 
      -402      "P 31"            :   (144, 5), 
      -403      "P 32"            :   (145, 5), 
      -404      "R 3"             :   (146, 5), 
      -405      "P -3"            :   (147, 5), 
      -406      "R -3"            :   (148, 5), 
      -407      "P 3 1 2"         :   (149, 5), 
      -408      "P 3 2 1"         :   (150, 5), 
      -409      "P 31 1 2"        :   (151, 5), 
      -410      "P 31 2 1"        :   (152, 5), 
      -411      "P 32 1 2"        :   (153, 5), 
      -412      "P 32 2 1"        :   (154, 5), 
      -413      "R 3 2"           :   (155, 5), 
      -414      "P 3 m 1"         :   (156, 5), 
      -415      "P 3 1 m"         :   (157, 5), 
      -416      "P 3 c 1"         :   (158, 5), 
      -417      "P 3 1 C"         :   (159, 5), 
      -418      "R 3 m"           :   (160, 5),        
      -419      "R 3 c"           :   (161, 5),        
      -420      "P -3 1 m"        :   (162, 5), 
      -421      "P -3 1 c"        :   (163, 5), 
      -422      "P -3 m 1"        :   (164, 5), 
      -423      "P -3 c 1"        :   (165, 5), 
      -424      "R -3 m"          :   (166, 5), 
      -425      "R -3 c"          :   (167, 5), 
      -426      "P 6"             :   (168, 6), 
      -427      "P 61"            :   (169, 6), 
      -428      "P 65"            :   (170, 6), 
      -429      "P 62"            :   (171, 6), 
      -430      "P 64"            :   (172, 6), 
      -431      "P 63"            :   (173, 6), 
      -432      "P -6"            :   (174, 6), 
      -433      "P 6/m"           :   (175, 6), 
      -434      "P 63/M"          :   (176, 6), 
      -435      "P 6 2 2"         :   (177, 6), 
      -436      "P 61 2 2"        :   (178, 6), 
      -437      "P 65 2 2"        :   (179, 6), 
      -438      "P 62 2 2"        :   (180, 6), 
      -439      "P 64 2 2"        :   (181, 6), 
      -440      "P 63 2 2"        :   (182, 6), 
      -441      "P 6 m m"         :   (183, 6), 
      -442      "P 6 c c"         :   (184, 6), 
      -443      "P 63 c m"        :   (185, 6), 
      -444      "P 63 m c"        :   (186, 6), 
      -445      "P -6 m 2"        :   (187, 6), 
      -446      "P -6 c 2"        :   (188, 6), 
      -447      "P -6 2 m"        :   (189, 6), 
      -448      "P -6 2 c"        :   (190, 6), 
      -449      "P 6/m m m"       :   (191, 6),        
      -450      "P 6/m c c"       :   (192, 6),        
      -451      "P 63/m c m"      :   (193, 6),      
      -452      "P 63/m m c"      :   (194, 6),      
      -453      "P 2 3"           :   (195, 7),      
      -454      "F 2 3"           :   (196, 7),      
      -455      "I 2 3"           :   (197, 7),      
      -456      "P 21 3"          :   (198, 7),      
      -457      "I 21 3"          :   (199, 7),      
      -458      "P m -3"          :   (200, 7),      
      -459      "P n -3"          :   (201, 7),      
      -460      "F m -3"          :   (202, 7),      
      -461      "F d -3"          :   (203, 7),      
      -462      "I m -3"          :   (204, 7),      
      -463      "P a -3"          :   (205, 7),      
      -464      "I a -3"          :   (206, 7),      
      -465      "P 4 3 2"         :   (207, 7),      
      -466      "P 42 3 2"        :   (208, 7),      
      -467      "F 4 3 2"         :   (209, 7),      
      -468      "F 41 3 2"        :   (210, 7), 
      -469      "I 4 3 2"         :   (211, 7),  
      -470      "P 43 3 2"        :   (212, 7),      
      -471      "P 41 3 2"        :   (213, 7),      
      -472      "I 41 3 2"        :   (214, 7),      
      -473      "P -4 3 m"        :   (215, 7),      
      -474      "F -4 3 m"        :   (216, 7),      
      -475      "I -4 3 m"        :   (217, 7),      
      -476      "P -4 3 n"        :   (218, 7),      
      -477      "F -4 3 c"        :   (219, 7),      
      -478      "I -4 3 d"        :   (220, 7),      
      -479      "P m -3 m"        :   (221, 7),      
      -480      "P n -3 n"        :   (222, 7),      
      -481      "P m -3 n"        :   (223, 7),      
      -482      "P n -3 m"        :   (224, 7),      
      -483      "F m -3 m"        :   (225, 7),      
      -484      "F m -3 c"        :   (226, 7),      
      -485      "F d -3 m"        :   (227, 7),      
      -486      "F d -3 c"        :   (228, 7),      
      -487      "I m -3 m"        :   (229, 7),      
      -488      "I a -3 d"        :   (230, 7),      
      -489  } 
      -490   
      -
      492 """ -493 map the space group to a crystal system, which must be -494 one of the 7 crystla stcture -495 -496 Argument: -497 - spcgrp : string, space group -498 -499 Return : string, crystal system -500 """ -501 if SpacegroupNameDict.has_key(spcgrp): -502 structureID = SpacegroupNameDict[spcgrp][1] -503 structureName = CystalStructureNameDict[structureID] -504 -505 else: -506 errmsg = "Space group %-10s is not Recoganized"% (spcgrp) -507 raise NotImplementedError(errmsg) -508 -509 return structureName -
      510 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.srrietveldconfiguration-module.html b/static_root/doc/srrietveld/developers/srrietveld.srrietveldconfiguration-module.html deleted file mode 100644 index 4dd3a9ee..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.srrietveldconfiguration-module.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - srrietveld.srrietveldconfiguration - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module srrietveldconfiguration - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module srrietveldconfiguration

      source code

      -check the configuration for diffpy.srrietveld

      - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      __main__()
      - main function to check all the required and optional package
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: srrietveldconfiguration.py 2792 2009-03-02 15:5... -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: srrietveldconfiguration.py 2792 2009-03-02 15:56:43Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.srrietveldconfiguration-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.srrietveldconfiguration-pysrc.html deleted file mode 100644 index 8bd97ace..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.srrietveldconfiguration-pysrc.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - srrietveld.srrietveldconfiguration - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module srrietveldconfiguration - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.srrietveldconfiguration

      -
      - 1  #!/usr/bin/env python 
      - 2  ############################################################################## 
      - 3  # 
      - 4  # diffpy.srrietveld by DANSE Diffraction group 
      - 5  #                   Simon J. L. Billinge 
      - 6  #                   (c) 2008 Trustees of the Columbia University 
      - 7  #                   in the City of New York.  All rights reserved. 
      - 8  # 
      - 9  # File coded by:    Wenduo Zhou 
      -10  # 
      -11  # See AUTHORS.txt for a list of people who contributed. 
      -12  # See LICENSE.txt for license information. 
      -13  # 
      -14  ############################################################################## 
      -15  """ 
      -16  check the configuration for diffpy.srrietveld  
      -17  """ 
      -18  __id__ = "$Id: srrietveldconfiguration.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      -19   
      -
      20 -def __main__(): -
      21 """ -22 main function to check all the required and optional package -23 """ -24 msgs = "" -25 msgf = "" -26 -27 # check diffpy.srrietveld Packages -28 try: -29 import SrRietUI -30 msgs += "Required package %-20s is on Python path\n"%("SrRietUI") -31 except ImportError, err: -32 msgf += "Required package %-20s can not be found on Python path\n"%("SrRietUI") -33 msgf += "Error Message: %-60s\n"%(str(err)) -34 -35 try: -36 import diffpy.srrietveld -37 msgs += "Required package %-20s is on Python path\n"%("SrRietveld") -38 except ImportError, err: -39 msgf += "Required package %-20s can not be found on Python path\n"%("SrRietveld") -40 msgf += "Error Message: %-60s\n"%(str(err)) -41 -42 try: -43 import diffpy.refinementapi -44 msgs += "Required package %-20s is on Python path\n"%("diffpy.refinementapi") -45 except ImportError, err: -46 msgf += "Required package %-20s can not be found on Python path\n"%("diffpy.refinementapi") -47 msgf += "Error Message: %-60s\n"%(str(err)) -48 -49 try: -50 import diffpy.rietveldapi -51 msgs += "Required package %-20s is on Python path\n"%("diffpy.rietveldapi") -52 except ImportError, err: -53 msgf += "Required package %-20s can not be found on Python path\n"%("diffpy.rietveldapi") -54 msgf += "Error Message: %-60s\n"%(str(err)) -55 -56 try: -57 import pylab -58 msgs += "Required package %-20s is on Python path\n"%("pylab") -59 except ImportError, err: -60 msgf += "Optional package %-20s can not be found on Python path. %30s\n"%("pylab", "No 2D plotting is supported") -61 msgf += "Error Message: %-60s\n"%(str(err)) -62 -63 try: -64 import diffpy.Structure -65 msgs += "Required package %-20s is on Python path\n"%("diffpy.Structure") -66 except ImportError, err: -67 msgf += "Optional package %-20s can not be found on Python path. \n"%("diffpy.Structure") -68 msgf += "Error Message: %-60s\n"%(str(err)) -69 -70 try: -71 import StructureViewer -72 msgs += "Required package %-20s is on Python path\n"%("StructureViewer") -73 except ImportError, err: -74 msgf += "Optional package %-20s can not be found on Python path\n"%("StructureViewer") -75 msgf += "Error Message: %-60s\n"%(str(err)) -76 -77 # Check Required external packages -78 import os -79 rlist = os.popen3("which fp2k")[1].readlines() -80 raise NotImplementedError("Not using popen(), but Python.dirList()") -81 -82 if len(rlist) == 0: -83 msgf += "Error Message: %-30s\n"%("FullProf <fp2k> cannot be found in $PATH. diffpy.srrietveld cannot be used correctly") -84 -85 print msgs -86 print msgf -87 -88 return -
      89 -90 -91 if __name__ == "__main__": -92 __main__() -93 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.stringutilfunction-module.html b/static_root/doc/srrietveld/developers/srrietveld.stringutilfunction-module.html deleted file mode 100644 index 578db45f..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.stringutilfunction-module.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - srrietveld.stringutilfunction - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module stringutilfunction - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module stringutilfunction

      source code

      -Utility functions for string operation

      - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      startWith(s, - h)
      - check with string started with a certain head ...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: stringutilfunction.py 2792 2009-03-02 15:56:43Z... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      startWith(s, - h) -

      -
      source code  -
      - -
      -
      -check with string started with a certain head 
      -
      -argument
      -- s :   string, to be checked
      -- h :   string, head
      -
      -return  --  Boolean
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: stringutilfunction.py 2792 2009-03-02 15:56:43Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.stringutilfunction-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.stringutilfunction-pysrc.html deleted file mode 100644 index dcc3abc0..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.stringutilfunction-pysrc.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - srrietveld.stringutilfunction - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module stringutilfunction - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.stringutilfunction

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2008 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Wenduo Zhou 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14  """ 
      -15    Utility functions for string operation 
      -16  """ 
      -17  __id__ = "$Id: stringutilfunction.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      -18   
      -
      19 -def startWith(s, h): -
      20 """ -21 check with string started with a certain head -22 -23 argument -24 - s : string, to be checked -25 - h : string, head -26 -27 return -- Boolean -28 """ -29 if not isinstance(s, str): -30 errmsg = "stringutilfunction.startWith(s, h): \ -31 input argument Error, s is not string, but %-10s"% (type(s)) -32 raise NotImplementedError(errmsg) -33 if not isinstance(h, str): -34 errmsg = "stringutilfunction.startWith(s, h): \ -35 input argument Error, h is not string, but %-10s"% (type(h)) -36 raise NotImplementedError(errmsg) -37 -38 lenh = len(h) -39 if len(s) < lenh: -40 return False -41 -42 for cindex in xrange(lenh): -43 if s[cindex] != h[cindex]: -44 return False -45 -46 return True -
      47 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.uisupport-module.html b/static_root/doc/srrietveld/developers/srrietveld.uisupport-module.html deleted file mode 100644 index 25a5e37c..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.uisupport-module.html +++ /dev/null @@ -1,881 +0,0 @@ - - - - - srrietveld.uisupport - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module uisupport - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module uisupport

      source code

      -
      -
      -Supporting User Interface Applications, including
      -1. Fitting
      -2. I/O
      -
      -3. Auxiliary:
      -   - convertDataFormat          convert a data file to SrRietveld compatible
      -        (datafilename, engine)  according to engine
      -
      -   - getRefinementStrategy      generate a RefineStrategy 
      -        (strategytype, strategyfname, instrumenttype, engine):
      -
      -   - genMeasurementXML
      -Using:  Standard Infomation Dictionary as Input. 
      -        The definition of the unified information dictionary will be defined in developer manual
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      singleRaPDFFit(infodict)
      - Refining a single data set against the model for RAPDF...
      - source code - -
      - -
      -   - - - - - - -
      sequentialFit(myinstrument, - infodict)
      - Sequential Fitting...
      - source code - -
      - -
      -   - - - - - - -
      independentFit(myinstrument, - infodict)
      - Fitting diffraction data with input structure model ...
      - source code - -
      - -
      -   - - - - - - -
      genFileListFromTemplate(datafiletemplate, - directory)
      - Generate data file list from template data file and...
      - source code - -
      - -
      -   - - - - - - -
      genFileListFromInfoFile(infofilename, - directory)
      - Generate a list of files by information file name...
      - source code - -
      - -
      -   - - - - - - -
      mapDataFileToStructure(structuresdict, - datafiletuplist)
      - Used in refining diffraction data in parallel -Upon input structures related to environement values and -data files related to environment values, map the structure -to data file - -Argument: -- struturesdict : dict.
      - source code - -
      - -
      -   - - - - - - -
      convertCHIDataFileFormatGSAS(infodict)
      - Convert the chi file to diffpy.srrietveld understandable XYSigma data file...
      - source code - -
      - -
      -   - - - - - - -
      convertCHIDataFileFormatFullProf(infodict)
      - Convert the chi file to diffpy.srrietveld understandable XYSigma data file...
      - source code - -
      - -
      -   - - - - - - -
      genRAPDFXMLTemplate(genxmlname)
      - Generate RAPDF sequential fitting input XML...
      - source code - -
      - -
      -   - - - - - - -
      readRAPDFXML(xmlfname)
      - Read RaPDF input XML file...
      - source code - -
      - -
      -   - - - - - - -
      convertDataFormat(datafilename, - engine, - helpdict=None, - rootfilename=None, - newdir='')
      - Conver the input data file (single file) to SrRietveld ...
      - source code - -
      - -
      -   - - - - - - -
      convertDataFilesFormat(engine, - inputinfodict, - helpdict, - rootfilename=None, - newdir='Converted/')
      - Convert multiple files data format to diffpy.srrietveld -standard XYSigma data file - -Argument: -- engine : int -- inputinfodict : dictionary as standard SrRietveld refine/ - seqeuntialfit inputinfodict -- helpdict : dictionary for helping information for - special case.
      - source code - -
      - -
      -   - - - - - - -
      isOfTemplate(fname, - template)
      - Judge a file name is conformted to a given template...
      - source code - -
      - -
      -   - - - - - - -
      getRefinementStrategy(strategytype, - strategyfname, - instrumenttype, - engine)
      - Determine the refinement strategy according to instrument type and other ...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: uisupport.py 2922 2009-03-20 15:46:57Z wdzhou $' -
      -   - - _MEMCHECK = True
      - Fitting Script Including I/O -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      singleRaPDFFit(infodict) -

      -
      source code  -
      - -
      -Refining a single data set against the model for RAPDF
      -
      -Argument:
      -- infodict  :   dictionary, with tree structure
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      sequentialFit(myinstrument, - infodict) -

      -
      source code  -
      - -
      -Sequential Fitting
      -
      -Arguments:
      -- myinstrument  :   Instrument
      -- infodict      :   dict, as standard SrRietveld inputinfodict
      -
      -Return              :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      independentFit(myinstrument, - infodict) -

      -
      source code  -
      - -
      -Fitting diffraction data with input structure model 
      -independently
      -
      -Arguments:
      -- myinstrument  :   Instrument
      -- infodict  : dict
      -
      -Return      : None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genFileListFromTemplate(datafiletemplate, - directory) -

      -
      source code  -
      - -
      -Generate data file list from template data file and
      -interpret the file name with environment parameters
      -
      -Argument:
      -- datafiletemplate  :   str
      -- directory         :   str, directory the data file located
      -
      -Return  :   list, of tuple
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genFileListFromInfoFile(infofilename, - directory) -

      -
      source code  -
      - -
      -Generate a list of files by information file name
      -with the environment parameters
      -
      -Argument:
      -- infofilename  :   str
      -- directory     :   str
      -
      -Return          :   list, of 2-tuple, (data file name, environment parameter value)
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      mapDataFileToStructure(structuresdict, - datafiletuplist) -

      -
      source code  -
      - -
      -Used in refining diffraction data in parallel
      -Upon input structures related to environement values and 
      -data files related to environment values, map the structure
      -to data file
      -
      -Argument:
      -- struturesdict :   dict.  key = environement value.  value = Crystal Structure
      -- datafiletuplelist:list.  
      -
      -Return          :   dict
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      convertCHIDataFileFormatGSAS(infodict) -

      -
      source code  -
      - -
      -Convert the chi file to diffpy.srrietveld understandable XYSigma data file
      -
      -Argument:
      -- infodict  :   dictionary
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      convertCHIDataFileFormatFullProf(infodict) -

      -
      source code  -
      - -
      -Convert the chi file to diffpy.srrietveld understandable XYSigma data file
      -
      -Argument:
      -- infodict  :   dictionary
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genRAPDFXMLTemplate(genxmlname) -

      -
      source code  -
      - -
      -Generate RAPDF sequential fitting input XML
      -
      -Argument:
      -- genxmlname    :   str, XML file name
      -
      -Return          :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      readRAPDFXML(xmlfname) -

      -
      source code  -
      - -
      -Read RaPDF input XML file
      -
      -Argument:
      -- xmlfname  :   str, XML file name
      -
      -Return      :   dictionary, information
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      convertDataFormat(datafilename, - engine, - helpdict=None, - rootfilename=None, - newdir='') -

      -
      source code  -
      - -
      -Conver the input data file (single file) to SrRietveld 
      -acceptible data file
      -
      -Argument:
      -- datafilename  :   str
      -- engine        :   str (1: Fullprof, 2: GSAS)
      -- helpfiledict  :   dictionary
      -
      -Return          :   dict, converted data file name
      -                    key = bank ID (Constant Wavelength Instrument: bank ID = 0)
      -                    value = data file name
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      convertDataFilesFormat(engine, - inputinfodict, - helpdict, - rootfilename=None, - newdir='Converted/') -

      -
      source code  -
      - -
      -Convert multiple files data format to diffpy.srrietveld 
      -standard XYSigma data file
      -
      -Argument:
      -- engine        :   int
      -- inputinfodict :   dictionary as standard SrRietveld refine/
      -                    seqeuntialfit inputinfodict
      -- helpdict      :   dictionary for helping information for
      -                    special case. 
      -                    Definition of keys refers to convertDataFormat()
      -- rootfilename  :   str, root of data file name (w/o posfix)
      -- newdir        :   str, new directory to write the data file
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      isOfTemplate(fname, - template) -

      -
      source code  -
      - -
      -Judge a file name is conformted to a given template
      -
      -Argument:
      -- fname     :   str
      -- template  :   str
      -
      -Return      :   True/False
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getRefinementStrategy(strategytype, - strategyfname, - instrumenttype, - engine) -

      -
      source code  -
      - -
      -Determine the refinement strategy according to instrument type and other 
      -information
      -
      -Argument:
      -- instrumenttype    :   str
      -
      -Return              :   RefineStrategy instance
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.uisupport-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.uisupport-pysrc.html deleted file mode 100644 index c1b4f4d7..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.uisupport-pysrc.html +++ /dev/null @@ -1,1170 +0,0 @@ - - - - - srrietveld.uisupport - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module uisupport - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.uisupport

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15  Supporting User Interface Applications, including 
      - 16  1. Fitting 
      - 17  2. I/O 
      - 18   
      - 19  3. Auxiliary: 
      - 20     - convertDataFormat          convert a data file to SrRietveld compatible 
      - 21          (datafilename, engine)  according to engine 
      - 22   
      - 23     - getRefinementStrategy      generate a RefineStrategy  
      - 24          (strategytype, strategyfname, instrumenttype, engine): 
      - 25   
      - 26     - genMeasurementXML 
      - 27  Using:  Standard Infomation Dictionary as Input.  
      - 28          The definition of the unified information dictionary will be defined in developer manual 
      - 29  """ 
      - 30  __id__ = "$Id: uisupport.py 2922 2009-03-20 15:46:57Z wdzhou $" 
      - 31   
      - 32  import diffpy.srrietveld.io            as SIO 
      - 33   
      - 34  _MEMCHECK = True 
      - 35   
      - 36  """ 
      - 37  1. Fitting Script Including I/O 
      - 38  """ 
      -
      39 -def singleRaPDFFit(infodict): -
      40 """ Refining a single data set against the model for RAPDF - 41 - 42 Argument: - 43 - infodict : dictionary, with tree structure - 44 """ - 45 import diffpy.srrietveld.xmlinterface as XMLInterface - 46 import diffpy.srrietveld.xmlgenerator as XMLG - 47 import diffpy.srrietveld.refinemanager as RM - 48 import diffpy.srrietveld.midscript as MS - 49 - 50 instrumentxml = infodict["CALIBRATION"]["InstrumentXML"] - 51 structurexml = infodict["CALIBRATION"]["StructureXML"] - 52 datafilename = infodict["CALIBRATION"]["File"] - 53 myrefinestrategy = infodict["CALIBRATION"]["RefineStrategy"] - 54 wavelength = infodict["INSTRUMENT"]["Wavelength"] - 55 bkgdfilename = infodict["CALIBRATION"]["Background"]["FileName"] - 56 - 57 # 1. Generate Measturement XML file - 58 bgpoints = None - 59 instrumenttype, instrumentname = XMLInterface.getInstrumentNameType(instrumentxml) - 60 - 61 xmlfname = "tempmeasure.xml" - 62 bgpoints = SIO.getDataFromColumnFile(bkgdfilename, 0, 1) - 63 xml = XMLG.RAPDFMeasurementXMLGenerator(datafilename, bgpoints) - 64 xml.exportXML(xmlfname) - 65 - 66 # 2. Import and fix all variable - 67 xmlparser = XMLInterface.RietXMLParser(instrument=instrumentxml, model=structurexml, measurement=xmlfname) - 68 myfit = xmlparser.getFit() - 69 - 70 # 2.1 Set wave-length - 71 if wavelength is not None: - 72 patterns = MS.getPatterns(myfit) - 73 for pat in patterns: - 74 pat.setValue("Lambda", wavelength) - 75 - 76 # 2. Use refine manager - 77 myrefinemanager = RM.MultiStepRefineManager(myfit) - 78 - 79 # 3. Refine! - 80 myrefinemanager.refine(myrefinestrategy) - 81 - 82 return myrefinemanager -
      83 - 84 -
      85 -def sequentialFit(myinstrument, infodict): -
      86 """ Sequential Fitting - 87 - 88 Arguments: - 89 - myinstrument : Instrument - 90 - infodict : dict, as standard SrRietveld inputinfodict - 91 - 92 Return : None - 93 """ - 94 import diffpy.srrietveld.refinestrategy as RS - 95 import diffpy.srrietveld.refinemanager as RM - 96 import diffpy.srrietveld.xmlinterface as XMLInterface - 97 import diffpy.srrietveld.sequentialrefinecontrol as SRC - 98 import diffpy.srrietveld.monitormem as MM - 99 -100 # 1. Set parameter right -101 structurexmllist = infodict["SAMPLE"]["Structure"] -102 mystrategy = infodict["SAMPLE"]["RefineStrategy"] -103 environparname = infodict["SAMPLE"]["EnvironmentParameterName"] -104 bkgdfilename = infodict["SAMPLE"]["Background"]["FileName"] -105 projectfname = infodict["SAMPLE"]["SaveName"] -106 datafiletuplist = infodict["SAMPLE"]["DataFileTupleList"] -107 -108 # 2. Import and fix all variable -109 instrumenttype = myinstrument.getType() -110 instrumentname = myinstrument.getName() -111 -112 # 3. Structure: assuming all phases belonged to same structure, -113 # even there are multiple inputs of XML file/CIF file -114 # FIXME - sequentialFit only supports single structure -115 structurexmls = infodict["SAMPLE"]["Structure"] -116 mystructures = [] -117 for structurexml in structurexmls: -118 mystructures.extend( XMLInterface.StructureXMLParser(structurexml).getStructure() ) -119 -120 # 3.1 Background -121 # FIXME - Should be unified with srrietveld-refine.py -122 # FIXME - Only one background file. Remember in GEM, multiple banks -123 # uses different background files as input -124 if bkgdfilename is not None: -125 bgpoints = SIO.getDataFromColumnFile(bkgdfilename, 0, 1) -126 else: -127 bgpoints = [] -128 bkgdtype = myinstrument.getBackgroundType() -129 bkgdinfodict = {} -130 if bkgdtype == "Interpolation": -131 bkgdinfodict["Type"] = bkgdtype -132 bkgdinfodict["Format"] = "Selected" -133 bkgdinfodict["Selected"] = bgpoints -134 -135 # 3.2 Excluded region -136 if infodict["SAMPLE"]["ExcludedRegionFile"] is not None: -137 exrefilename = infodict["SAMPLE"]["ExcludedRegionFile"] -138 excludedregionsdict = XMLInterface.importExcludedRegionFile(exrefilename) -139 else: -140 excludedregionsdict = None -141 # END-IF-ELSE -142 -143 # 4. Use refine manager, bank to refine (optional) refine strategy, refine direction -144 # start value, data set number -145 seqrefctrl = SRC.SeqRefineController(myinstrument, datafiletuplist, -146 environparname, mystructures) -147 # banks to refine -148 seqrefctrl.setBankToRefine( infodict["SAMPLE"]["RefineBank"] ) -149 # excluded region -150 if excludedregionsdict is not None: -151 for bankid in infodict["SAMPLE"]["RefineBank"]: -152 if excludedregionsdict.has_key(bankid): -153 seqrefctrl.setExcludedRegion(bankid, excludedregionsdict[bankid]) -154 # refine strategy -155 seqrefctrl.setRefineStrategy(mystrategy) -156 # refine direction -157 if infodict["SAMPLE"]["RefineDirection"].lower() == "up": -158 direction = 1 -159 elif infodict["SAMPLE"]["RefineDirection"].lower() == "down": -160 direction = -1 -161 else: -162 errmsg = "Direction %-10s Unacceptible"% (direction) -163 raise AttributeError(errmsg) -164 # END-IF -165 # background -166 seqrefctrl.setBackground(backgroundpoints = bgpoints) -167 # refinement setup -168 startvalue = infodict["SAMPLE"]["StartValue"] -169 datasetnumber = infodict["SAMPLE"]["DataSetNumber"] -170 seqrefctrl.setRefineControl(direction, startvalue, datasetnumber) -171 -172 # 5. Clean memory -173 myinstrument = None -174 mystructures[:] = [] -175 xmlparser = None -176 -177 if _MEMCHECK is True: -178 MM.garbageCheck(True) -179 else: -180 MM.garbageCheck(False) -181 -182 # 6. refine! -183 seqrefctrl.refine() -184 -185 # 7. save! -186 seqrefctrl.save(projectfname) -187 -188 # 8. Clean memory and Memory check -189 seqrefctrl = None -190 if _MEMCHECK is True: -191 MM.garbageCheck(True) -192 else: -193 MM.garbageCheck(False) -194 -195 return -
      196 -197 -
      198 -def independentFit(myinstrument, infodict): -
      199 """ Fitting diffraction data with input structure model -200 independently -201 -202 Arguments: -203 - myinstrument : Instrument -204 - infodict : dict -205 -206 Return : None -207 """ -208 import diffpy.srrietveld.refinestrategy as RS -209 import diffpy.srrietveld.refinemanager as RM -210 import diffpy.srrietveld.xmlinterface as XMLInterface -211 import diffpy.srrietveld.parallelrefinecontrol as PRC -212 import diffpy.srrietveld.monitormem as MM -213 import diffpy.srrietveld.utilsequentialrefine as SU -214 -215 # 1. Set parameter right -216 mystrategy = RS.CloseRietveldRefineStrategy() -217 instrumentxml = infodict["SAMPLE"]["InstrumentXML"] -218 environparname = infodict["SAMPLE"]["EnvironmentParameterName"] -219 bkgdfilename = infodict["SAMPLE"]["Background"]["FileName"] -220 projectfname = infodict["SAMPLE"]["SaveName"] -221 datafiletuplist = infodict["SAMPLE"]["DataFileTupleList"] -222 -223 # 2. Import and fix all variable -224 instrumenttype = myinstrument.getType() -225 instrumentname = myinstrument.getName() -226 -227 # 3. Background -228 bgpoints = SIO.getDataFromColumnFile(bkgdfilename, 0, 1) -229 bkgdtype = myinstrument.getBackgroundType() -230 if bkgdtype == "Interpolation": -231 bkgdinfodict = {} -232 bkgdinfodict["Type"] = bkgdtype -233 bkgdinfodict["Format"] = "Selected" -234 bkgdinfodict["Selected"] = bgpoints -235 # LOOP-OVER -236 -237 # 4. Generate structure-datanumber list -238 structuresdict = SU.parseStructureSeqXML(infodict["SAMPLE"]["XMlInputFileName"]) -239 datafilestructuredict = mapDataFileToStructure(structuresdict, datafiletuplist) -240 -241 # 5. Set up parallel refinement controller -242 indrefctrl = PRC.ParallelRefinementControl(myinstrument, datafilestructuredict, -243 environparname, bkgdinfodict) -244 -245 indrefctrl.setRefineStrategy(mystrategy) -246 -247 # 5. refine! -248 indrefctrl.refine() -249 -250 # 6. save! -251 indrefctrl.save(projectfname) -252 -253 return -
      254 -255 -
      256 -def genFileListFromTemplate(datafiletemplate, directory): -
      257 """ Generate data file list from template data file and -258 interpret the file name with environment parameters -259 -260 Argument: -261 - datafiletemplate : str -262 - directory : str, directory the data file located -263 -264 Return : list, of tuple -265 """ -266 # 1. Get list of ALL file names -267 filenameslist = SIO.listFileNamesInDirectory(directory) -268 -269 # 2. Get the names of the file to process -270 terms = datafiletemplate.strip().split("*") -271 prefix = terms[0].lower() -272 posfix = terms[1].lower() -273 -274 datafiletuplist = [] -275 for fname in filenameslist: -276 lfname = fname.lower() -277 if lfname.count(prefix) >= 1 and lfname.count(posfix) == 1 and lfname.split(posfix)[-1] == "": -278 # 2.1 generate file name -279 datafname = directory+fname -280 # 2.2 generate the parameter -281 parstr = lfname.split(prefix)[1].split(posfix)[0] -282 parval = float(parstr) -283 datafiletuplist.append( (datafname, parval) ) -284 # LOOP-OVER: for fname in filenameslist -285 -286 for fname, parval in datafiletuplist: -287 print "%-10s %-20s"% (fname, parval) -288 raise NotImplementedError("Debug Stop") -289 -290 return datafiletuplist -
      291 -292 -
      293 -def genFileListFromInfoFile(infofilename, directory): -
      294 """ Generate a list of files by information file name -295 with the environment parameters -296 -297 Argument: -298 - infofilename : str -299 - directory : str -300 -301 Return : list, of 2-tuple, (data file name, environment parameter value) -302 """ -303 # 1. Parse file -304 ifile = open(infofilename, "r") -305 rlines = ifile.readlines() -306 ifile.close() -307 -308 # 2. Parse each line to get result -309 if directory != "" and directory[-1] != "/": -310 directory = directory + "/" -311 filetuplelist = [] -312 for rline in rlines: -313 cline = rline.strip() -314 if cline != "": -315 try: -316 terms = cline.split() -317 filename = terms[0] -318 parval = float(terms[1]) -319 if filename.count(directory) == 0: -320 filename = directory+filename -321 filetuplelist.append( (filename, parval) ) -322 except IndexError, err: -323 pass -324 except ValueError, err: -325 errmsg = "File Name %-20s Of Value %-20s Is Not Recognized!"% (terms[0], terms[1]) -326 # END-IF -327 # LOOP-OVER -328 -329 return filetuplelist -
      330 -331 -
      332 -def mapDataFileToStructure(structuresdict, datafiletuplist): -
      333 """ Used in refining diffraction data in parallel -334 Upon input structures related to environement values and -335 data files related to environment values, map the structure -336 to data file -337 -338 Argument: -339 - struturesdict : dict. key = environement value. value = Crystal Structure -340 - datafiletuplelist:list. -341 -342 Return : dict -343 """ -344 # FIXME - Do not handle the case that several data files related to same environement value -345 -346 import diffpy.srrietveld.auxiliary as AXL -347 -348 # 1. Init and prepare -349 datafilestructuredict = {} -350 -351 datafiledict = {} -352 for tup in datafiletuplist: -353 filename = tup[0] -354 envvalue = tup[1] -355 datafiledict[envvalue] = filename -356 -357 # 2. Find datafile with file -358 envvaluestructurelist = sorted( structuresdict.keys() ) -359 envvaluedatafilelist = sorted( datafiledict.keys() ) -360 for envvalue in sorted( envvaluestructurelist ): -361 mapindex = AXL.getValueIndex(envvaluedatafilelist, envvalue) -362 mapvalue = envvaluedatafilelist[mapindex] -363 filename = datafiledict[mapvalue] -364 structure = structuresdict[envvalue] -365 datafilestructuredict[filename] = (structure, mapvalue) -366 # LOOP-OVER -367 -368 return datafilestructuredict -
      369 -370 -
      371 -def convertCHIDataFileFormatGSAS(infodict): -
      372 """ Convert the chi file to diffpy.srrietveld understandable XYSigma data file -373 -374 Argument: -375 - infodict : dictionary -376 -377 Return : None -378 """ -379 import diffpy.srrietveld.io as SIO -380 import diffpy.srrietveld.datafileparser as SPR -381 import os -382 # FIXME - Replaced by convertDataFiles(). Should be removed soon. -383 errmsg = "Replaced by convertDataFiles()" -384 raise NotImplementedError, errmsg -385 -386 cat = "SAMPLE" -387 -388 # 1. Retrieve information -389 chidir = infodict[cat]["Directory"] -390 chifileslist = SIO.listFileNamesInDirectory(chidir) -391 datafiletuplelist = infodict[cat]["DataFileTupleList"] -392 directory = infodict[cat]["Directory"] -393 if directory != "" and directory[-1] != "/": -394 directory += "/" -395 -396 # 2. Make new directory -397 newdir = "Converted/" -398 direxist = False -399 try: -400 os.mkdir(newdir) -401 except OSError, err: -402 errmsg = str(err) -403 if errmsg.count("File exists") == 1: -404 direxist = True -405 else: -406 selfmsg = "Cannot Make Directory %-20s. Directory %-20 Is Not Previously Made"% \ -407 (newdir, newdir) -408 raise FitConfigurationError(selfmsg) -409 # END-IF-ELSE -410 # END-TRY-EXCEPT -411 -412 -413 # 3. Convert file and make new list -414 convtuplelist = [] -415 for completefname, parval in datafiletuplelist: -416 # (1) Parse old name and generate new name -417 if directory != "": -418 fname = completefname.split(directory)[1] -419 -420 newdatname = fname.lower().split(".")[0]+".dat" -421 newgsaname = fname.lower().split(".")[0]+".gsa" -422 newdatfullname = newdir+newdatname -423 newgsafullname = newdir+newgsaname -424 -425 # (2) Convert -426 SPR.convertChiToXYSigma(completefname, newdatfullname) -427 SPR.convertChiToGSAS(completefname, newgsafullname) -428 convtuplelist.append( (newgsafullname, parval) ) -429 -430 # 4. Setup -431 infodict[cat]["Directory"] = newdir -432 infodict[cat]["DataFileTupleList"] = convtuplelist -433 -434 return -
      435 -436 -
      438 """ Convert the chi file to diffpy.srrietveld understandable XYSigma data file -439 -440 Argument: -441 - infodict : dictionary -442 -443 Return : None -444 """ -445 # FIXME - Replaced by convertDataFiles(). Should be removed soon. -446 errmsg = "Replaced by convertDataFiles()" -447 raise NotImplementedError, errmsg -448 import diffpy.srrietveld.io as SIO -449 import diffpy.srrietveld.datafileparser as SPR -450 import os -451 -452 raise NotImplementedError("Should be re-organized") -453 -454 cat = "SAMPLE" -455 -456 # 1. Retrieve information -457 chidir = infodict[cat]["Directory"] -458 datafiletuplelist = infodict[cat]["DataFileTupleList"] -459 directory = infodict[cat]["Directory"] -460 if directory != "" and directory[-1] != "/": -461 directory += "/" -462 -463 # 2. Make new directory -464 newdir = "Converted/" -465 direxist = False -466 try: -467 os.mkdir(newdir) -468 except OSError, err: -469 errmsg = str(err) -470 if errmsg.count("File exists") == 1: -471 direxist = True -472 else: -473 selfmsg = "Cannot Make Directory %-20s. Directory %-20 Is Not Previously Made"% \ -474 (newdir, newdir) -475 raise FitConfigurationError(selfmsg) -476 # END-IF-ELSE -477 # END-TRY-EXCEPT -478 -479 # 3. Convert file and make new list -480 convtuplelist = [] -481 for completefname, parval in datafiletuplelist: -482 # (1) Parse old name and generate new name -483 if directory != "": -484 fname = completefname.split(directory)[1] -485 newname = fname.lower().split(".")[0]+".dat" -486 newfullname = newdir+newname -487 -488 # (2) Convert if file does not exist -489 if direxist is False: -490 fileExist = False -491 else: -492 if os.path.isfile(newfullname) is True: -493 fileExist = True -494 else: -495 fileExist = False -496 # END-IF-ELSE -497 -498 if fileExist is False: -499 SPR.convertChiToXYSigma(completefname, newfullname) -500 -501 convtuplelist.append( (newfullname, parval) ) -502 # END-IF -503 -504 # 4. Setup -505 infodict[cat]["Directory"] = newdir -506 infodict[cat]["DataFileTupleList"] = convtuplelist -507 -508 return -
      509 -510 -
      511 -def isOfTemplate(fname, template): -
      512 """ Judge a file name is conformted to a given template -513 -514 Argument: -515 - fname : str -516 - template : str -517 -518 Return : True/False -519 """ -520 parts = template.split('*') -521 oftemp = True -522 for p in parts: -523 if p != "": -524 if fname.count(p) == 0: -525 oftemp = False -526 break -527 -528 return oftemp -
      529 -530 -531 """ -532 I/O: RAPDF -533 """ -
      534 -def genRAPDFXMLTemplate(genxmlname): -
      535 """ Generate RAPDF sequential fitting input XML -536 -537 Argument: -538 - genxmlname : str, XML file name -539 -540 Return : None -541 """ -542 import xml.dom.minidom -543 -544 rootxml = xml.dom.minidom.Document() -545 rootnode = rootxml.createElement("RAPDF-REFINE-INPUT") -546 rootxml.appendChild(rootnode) -547 -548 # 1. Instrument -549 instrumentnode = rootxml.createElement("RAPDF") -550 rootnode.appendChild(instrumentnode) -551 -552 instrumentnode.setAttribute("Wave-Length", "?") -553 -554 # 2. Calibration -555 calnode = rootxml.createElement("CALIBRATION") -556 rootnode.appendChild(calnode) -557 -558 calnode.setAttribute("Standard", "Si, Ni, ...") -559 calnode.setAttribute("FileName", "?") -560 -561 exregionnode = rootxml.createElement("EXCLUDEDREGION") -562 calnode.appendChild(exregionnode) -563 exregionnode.setAttribute("Type", "Add/Replace") -564 -565 singleregionnode = rootxml.createElement("REGION") -566 exregionnode.appendChild(singleregionnode) -567 singleregionnode.setAttribute("Begin", "?") -568 singleregionnode.setAttribute("End", "?") -569 -570 # 3. Sample -571 samplenode = rootxml.createElement("SAMPLE") -572 rootnode.appendChild(samplenode) -573 -574 samplenode.setAttribute("Directory", "?") -575 samplenode.setAttribute("Template", "?") -576 samplenode.setAttribute("SaveAs", "?") -577 samplenode.setAttribute("EnvironmentParameter", "") -578 samplenode.setAttribute("Refine-Direction", "low-to-high/high-to-low") -579 -580 structnode = rootxml.createElement("STRUCTURE") -581 samplenode.appendChild(structnode) -582 -583 structnode.setAttribute("FileName", "?") -584 -585 exregionnode = rootxml.createElement("EXCLUDEDREGION") -586 samplenode.appendChild(exregionnode) -587 exregionnode.setAttribute("Type", "Add/Replace") -588 -589 singleregionnode = rootxml.createElement("REGION") -590 exregionnode.appendChild(singleregionnode) -591 singleregionnode.setAttribute("Begin", "?") -592 singleregionnode.setAttribute("End", "?") -593 -594 s = rootxml.toprettyxml(indent=" ") -595 ofile = open(genxmlname, "w") -596 ofile.write(s) -597 ofile.close() -
      598 -599 -
      600 -def readRAPDFXML(xmlfname): -
      601 """ Read RaPDF input XML file -602 -603 Argument: -604 - xmlfname : str, XML file name -605 -606 Return : dictionary, information -607 """ -608 def getChildNodes(xmlnode, childnodenameslist): -609 """ -610 Get child nodes' local names -611 -612 Argument: -613 - xmlnode : XML node -614 - childnodenameslist: list of str -615 -616 Return : list of XML nodes -617 """ -618 # 1. Init -619 numnodes = len(childnodenameslist) -620 nodeslist = [] -621 -622 for i in xrange(numnodes): -623 nodeslist.append(None) -624 -625 # 2. Search -626 for childnode in xmlnode.childNodes: -627 for i in xrange(numnodes): -628 if childnode.localName == childnodenameslist[i]: -629 nodeslist[i] = childnode -630 break -631 -632 # 3. Return -633 return nodeslist -
      634 -635 -636 def getFloat(xmlnode, attribname): -637 """ Get a float number -638 -639 Argument: -640 - xmlnode : XML node -641 - attribname: str -642 -643 Return : float/None -644 """ -645 valstr = xmlnode.getAttribute(attribname) -646 try: -647 val = float(valstr) -648 except ValueError, err: -649 val = None -650 return val -651 -652 -653 def getString(xmlnode, attribname): -654 """ get a string -655 -656 Argument: -657 - xmlnode : XML node -658 - attribname: str -659 -660 Return : float/None -661 """ -662 valstr = xmlnode.getAttribute(attribname) -663 try: -664 val = str(valstr) -665 except ValueError, err: -666 val = None -667 return val -668 -669 -670 def getExcludedRegions(exclregionnode): -671 """ Get the excluded region from an Excluded-Region node -672 -673 Argument: -674 - exclregionnode : XML node -675 -676 Return : 2-tuple, -677 - str, type of excluded region, add or replace -678 - list of 2-tuple -679 """ -680 excludedregionlist = [] -681 for childnode in exclregionnode.childNodes: -682 if childnode.localName == "REGION": -683 begin = getFloat(childnode, "Begin") -684 end = getFloat(childnode, "End") -685 if begin is not None and end is not None: -686 excludedregionlist.append( (begin, end) ) -687 -688 type = getString(exclregionnode, "Type") -689 numadd = type.count("Add") -690 numrep = type.count("Replace") -691 if numadd+numrep == 2 or numadd+numrep == 0: -692 type = "Add" -693 elif numadd == 1: -694 type == "Replace" -695 else: -696 pass -697 -698 return ( (type, excludedregionlist) ) -699 -700 -701 import diffpy.srrietveld.xmlinterface as XMLI -702 -703 infodict = {} -704 -705 # 1. import XML -706 try: -707 rootxml = XMLI.importXML(xmlfname) -708 except Exception, err: -709 errmsg = "Input XML File Error\n" -710 print str(err) -711 raise FitConfigurationError(errmsg + str(err)) -712 -713 # 2. locate root node -714 rootnode = getChildNodes(rootxml, ["RAPDF-REFINE-INPUT"])[0] -715 -716 # 3. parse -717 calibrnode, samplenode, instrunode = getChildNodes(rootnode, ["CALIBRATION", "SAMPLE", "RAPDF"]) -718 -719 # 3.1 RAPDF node -720 infodict["INSTRUMENT"] = {} -721 infodict["INSTRUMENT"]["Wavelength"] = getFloat(instrunode, "Wave-Length") -722 -723 # 3.2 Calibration node -724 infodict["CALIBRATION"] = {} -725 infodict["CALIBRATION"]["Type"] = getString(calibrnode, "Standard") -726 infodict["CALIBRATION"]["File"] = getString(calibrnode, "FileName") -727 -728 exclregionnode, backgroundnode = getChildNodes(calibrnode, ["EXCLUDEDREGION", "BACKGROUND"]) -729 infodict["CALIBRATION"]["ExcludedRegion"] = getExcludedRegions(exclregionnode) -730 -731 infodict["CALIBRATION"]["Background"] = {} -732 infodict["CALIBRATION"]["Background"]["FileName"] = getString(backgroundnode, "File") -733 -734 # 3.3 Sample node -735 infodict["SAMPLE"] = {} -736 infodict["SAMPLE"]["Directory"] = getString(samplenode, "Directory") -737 infodict["SAMPLE"]["Direction"] = getString(samplenode, "Refine-Direction") -738 infodict["SAMPLE"]["Template"] = getString(samplenode, "Template") -739 infodict["SAMPLE"]["SaveName"] = getString(samplenode, "SaveAs") -740 infodict["SAMPLE"]["EnvironmentParameterName"] = getString(samplenode, "EnvironmentParameter") -741 -742 exclregionnode, structurenode, backgroundnode = getChildNodes(samplenode, ["EXCLUDEDREGION", "STRUCTURE", "BACKGROUND"]) -743 -744 infodict["SAMPLE"]["ExcludedRegion"] = getExcludedRegions(exclregionnode) -745 -746 infodict["SAMPLE"]["Structure"] = {} -747 infodict["SAMPLE"]["Structure"]["FileName"] = getString(structurenode, "FileName") -748 -749 infodict["SAMPLE"]["Background"] = {} -750 infodict["SAMPLE"]["Background"]["FileName"] = getString(backgroundnode, "File") -751 -752 # 3.4 Default setup -753 if infodict["SAMPLE"]["SaveName"] is None or infodict["SAMPLE"]["SaveName"] == "": -754 infodict["SAMPLE"]["SaveName"] = "default.proj" -755 -756 return infodict -757 -758 -759 # 3. Auxiliaries -
      760 -def convertDataFormat(datafilename, engine, helpdict = None, -761 rootfilename = None, newdir = ""): -
      762 """ Conver the input data file (single file) to SrRietveld -763 acceptible data file -764 -765 Argument: -766 - datafilename : str -767 - engine : str (1: Fullprof, 2: GSAS) -768 - helpfiledict : dictionary -769 -770 Return : dict, converted data file name -771 key = bank ID (Constant Wavelength Instrument: bank ID = 0) -772 value = data file name -773 """ -774 import diffpy.srrietveld.datafileconverter as SDV -775 -776 # 1. determine data -777 dataformat = SDV.dataFileFormat(datafilename) -778 -779 # 2. convert if necessary -780 if engine == 1: -781 if dataformat == "DAT": -782 datafilenamedict = {0: datafilename} -783 -784 elif dataformat == "CHI": -785 datafilename = SDV.convertChiToXYSigma(datafilename, filenameroot = rootfilename, -786 newdir = newdir) -787 datafilenamedict = {0: datafilename} -788 -789 elif dataformat == "GSA": -790 import diffpy.srrietveld.dataprocessnpdf as DN -791 -792 npdfdata = DN.NPDFData(datafilename, helpdict["iparmfile"]) -793 datafilenamedict = {} -794 if rootfilename is None: -795 rootfilename = datafilename.split(".")[0] -796 newdir = "" -797 -798 for bankid in helpdict["bankidlist"]: -799 dfname = npdfdata.exportFullprof(bankid, rootfilename, newdir) -800 datafilenamedict[bankid] = dfname -801 # LOOP-OVER -802 -803 else: -804 errmsg = "Data format %-10s is not supported by engine Fullprof" % (dataformat) -805 raise NotImplementedError, errmsg -806 # END-IF -807 -808 elif engine == 2: -809 if dataformat == "DAT": -810 chifilename = SDV.convertXYSigmaToChi(datafilename, filenameroot = rootfilename, -811 newdir = newdir) -812 newname = SDV.convertChiToGSAS(chifilename) -813 datafilename = newname -814 datafilenamedict = {0: datafielname} -815 -816 elif dataformat == "CHI": -817 XYSigmafile = datafilename.split(".")[0]+".dat" -818 SDV.convertChiToXYSigma(datafilename) -819 datafilename = SDV.convertChiToGSAS(datafilename, filenameroot = rootfilename, -820 newdir = newdir) -821 datafilenamedict = {0: datafielname} -822 -823 else: -824 errmsg = "Data format %-10s is not supported by engine GSAS" % (dataformat) -825 raise NotImplementedError, errmsg -826 # END-IF -827 -828 else: -829 errmsg = "Engine Type %-5s Is Not Supported" % (engine) -830 raise NotImplementedError, errmsg -831 -832 # END-IF-ELSE -833 -834 return datafilenamedict -
      835 -836 -
      837 -def convertDataFilesFormat(engine, inputinfodict, helpdict, -838 rootfilename = None, newdir = "Converted/"): -
      839 """ Convert multiple files data format to diffpy.srrietveld -840 standard XYSigma data file -841 -842 Argument: -843 - engine : int -844 - inputinfodict : dictionary as standard SrRietveld refine/ -845 seqeuntialfit inputinfodict -846 - helpdict : dictionary for helping information for -847 special case. -848 Definition of keys refers to convertDataFormat() -849 - rootfilename : str, root of data file name (w/o posfix) -850 - newdir : str, new directory to write the data file -851 -852 Return : None -853 """ -854 import diffpy.srrietveld.io as SIO -855 import diffpy.srrietveld.datafileconverter as SPV -856 import os -857 -858 # 1. Retrieve information -859 cat = "SAMPLE" -860 chidir = inputinfodict[cat]["Directory"] -861 datafiletuplelist = inputinfodict[cat]["DataFileTupleList"] -862 directory = inputinfodict[cat]["Directory"] -863 if directory != "" and directory[-1] != "/": -864 directory += "/" -865 -866 # 2. Make new directory -867 direxist = False -868 try: -869 os.mkdir(newdir) -870 except OSError, err: -871 errmsg = str(err) -872 if errmsg.count("File exists") == 1: -873 direxist = True -874 else: -875 selfmsg = "Cannot Make Directory %-20s. Directory %-20 Is Not "% \ -876 (newdir, newdir) + "Previously Made" -877 raise FitConfigurationError, selfmsg -878 # END-IF-ELSE -879 # END-TRY-EXCEPT -880 -881 # 3. Convert file and make new list -882 convtuplelist = [] -883 for completefname, parval in datafiletuplelist: -884 # 3.1. convert file because file name does not exist -885 if directory != "": -886 fname = completefname.split(directory)[1] -887 rootfilename = fname.lower().split(".")[0] -888 newfilename = convertDataFormat(completefname, engine, helpdict, -889 rootfilename = rootfilename, newdir = newdir) -890 # END-IF -891 -892 # 3.2 edit converted file name, parameter value tuple list -893 convtuplelist.append( (newfilename, parval) ) -894 # LOOP-OVER -895 -896 # 4. Setup -897 inputinfodict[cat]["Directory"] = newdir -898 inputinfodict[cat]["DataFileTupleList"] = convtuplelist -899 -900 return -
      901 -902 -
      903 -def isOfTemplate(fname, template): -
      904 """ Judge a file name is conformted to a given template -905 -906 Argument: -907 - fname : str -908 - template : str -909 -910 Return : True/False -911 """ -912 parts = template.split('*') -913 oftemp = True -914 for p in parts: -915 if p != "": -916 if fname.count(p) == 0: -917 oftemp = False -918 break -919 -920 return oftemp -
      921 -922 -
      923 -def getRefinementStrategy(strategytype, strategyfname, instrumenttype, engine): -
      924 """ Determine the refinement strategy according to instrument type and other -925 information -926 -927 Argument: -928 - instrumenttype : str -929 -930 Return : RefineStrategy instance -931 """ -932 import diffpy.srrietveld.refinestrategy as RS -933 import diffpy.srrietveld.xmlinterface as XMLInterface -934 -935 if strategyfname is not None: -936 # using user defined refine strategy -937 rsparser = XMLInterface.RefineStrategyXMLParser(strategyfname) -938 rsdict = rsparser.exportStdDictionary() -939 mystrategy = RS.UserDefinedRefineStrategy(rsdict) -940 -941 elif strategytype is not None: -942 # generating refinement strategy according to type -943 if strategytype.lower() == "calibrated": -944 if instrumenttype.lower() in ["xray", "neutroncw"]: -945 if engine == 1: -946 mystrategy = RS.CalibratedXrayFullProfRefineStrategy() -947 elif engine == 2: -948 mystrategy = RS.CalibratedXrayGSASRefineStrategy() -949 else: -950 mystrategy = RS.CalibratedXrayRietveldRefineStrategy() -951 elif instrumenttype.lower() == "tof": -952 if engine == 1: -953 mystrategy = RS.CalibratedTOFRietveldRefineStrategy() -954 elif engine == 2: -955 mystrategy = RS.CalibratedTOFRietveldRefineStrategy() -956 else: -957 mystrategy = RS.CalibratedTOFRietveldRefineStrategy() -958 else: -959 raise NotImplementedError("Unknown calibrated type for instrument %-10s"% (instrumenttype)) -960 # END-IF -961 elif strategytype.lower() == "calibration": -962 if instrumenttype.lower() in ["xray", "neutroncw"]: -963 if engine == 1: -964 mystrategy = RS.CalibrationXrayFullProfRefineStrategy() -965 elif engine == 2: -966 mystrategy = RS.CalibrationXrayGSASRefineStrategy() -967 else: -968 mystrategy = RS.CalibrationXrayRietveldRefineStrategy() -969 elif instrumenttype.lower() == "tof": -970 if engine == 1: -971 mystrategy = RS.CalibrationTOFFullProfRefineStrategy() -972 elif engine == 2: -973 mystrategy = RS.CalibrationTOFGSASRefineStrategy() -974 else: -975 mystrategy = RS.CalibrationTOFRietveldRefineStrategy() -976 else: -977 raise NotImplementedError("Unknown calibration type for instrument %-10s"% (instrumenttype)) -978 # END-IF -979 # END-IF -980 else: -981 # using default refine strategy -982 errmsg = "Default is not set up" -983 raise NotImplementedError, errmsg -984 -985 # END-IF -986 -987 return mystrategy -
      988 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilbackground-module.html b/static_root/doc/srrietveld/developers/srrietveld.utilbackground-module.html deleted file mode 100644 index 071c4acc..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilbackground-module.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - - srrietveld.utilbackground - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilbackground - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module utilbackground

      source code

      -

      Containing the methods designed to deal with background

      - Level 1 BackgroundProcess | |- Level 2 - XrayBackgroundProcess

      - - - - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - BackgroundProcess
      - Class to process background information -
      -   - - XrayBackgroundProcess
      - Class to process background for Xray -
      - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      genBackground(backgrounds, - xs, - ys)
      - Generate backgrounds according to a background list in same unit...
      - source code - -
      - -
      -   - - - - - - -
      convertQbackground(qbackgrounds, - wavelength)
      - Convert background points in Q to 2-theta...
      - source code - -
      - -
      -   - - - - - - -
      genStandardBackground(standardname, - wavelength, - xs, - ys)
      - Generate standard's background...
      - source code - -
      - -
      -   - - - - - - -
      replaceInterpolatedBackground(myfit)
      - Generate an interpolated background for all the Constant-Wavelength pattern ...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: utilbackground.py 2922 2009-03-20 15:46:57Z wdz... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      genBackground(backgrounds, - xs, - ys) -

      -
      source code  -
      - -
      -
      -Generate backgrounds according to a background list in same unit
      -
      -Argument:
      -- backgrounds   :   list, of float
      -- xs            :   list, of float
      -- ys            :   list, of float
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      convertQbackground(qbackgrounds, - wavelength) -

      -
      source code  -
      - -
      -
      -Convert background points in Q to 2-theta
      -
      -Argument:
      -- qbackgrounds  :   list, of float
      -- wavelength    :   float
      -
      -Return          :   list, of float
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genStandardBackground(standardname, - wavelength, - xs, - ys) -

      -
      source code  -
      - -
      -
      -Generate standard's background
      -
      -Argument:
      -- standardname  :   str, 
      -- wavelength    :   float,
      -
      -Return          :   list of background points (tuple)
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      replaceInterpolatedBackground(myfit) -

      -
      source code  -
      - -
      -
      -Generate an interpolated background for all the Constant-Wavelength pattern 
      -in an Fit instance
      -
      -Restriction:  TOF data won't be replaced at all!
      -
      -Arguments:
      -- myfit :   diffpy.rietveldapi.Fit instance
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: utilbackground.py 2922 2009-03-20 15:46:57Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilbackground-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.utilbackground-pysrc.html deleted file mode 100644 index 1954d5a2..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilbackground-pysrc.html +++ /dev/null @@ -1,509 +0,0 @@ - - - - - srrietveld.utilbackground - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilbackground - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.utilbackground

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15    Containing the methods designed to deal with background 
      - 16   
      - 17    Level 1       BackgroundProcess 
      - 18    | 
      - 19    |- Level 2    XrayBackgroundProcess 
      - 20  """ 
      - 21  __id__ = "$Id: utilbackground.py 2922 2009-03-20 15:46:57Z wdzhou $" 
      - 22   
      - 23  import diffpy.srrietveld 
      - 24   
      -
      25 -class BackgroundProcess: -
      26 """ Class to process background information - 27 """ -
      28 - def __init__(self, xs, ys): -
      29 """ - 30 initialization - 31 - 32 Argument: - 33 - xs : list of x - 34 - ys : list of y - 35 - 36 Return : None - 37 """ - 38 if self.__class__.__name__ == "BackgroundProcess": - 39 raise NotImplementedError("Virtual Base Class %-10s Cannot Be Initialized") \ - 40 %(self.__class__.__name__) - 41 - 42 self._xs = xs - 43 self._ys = ys - 44 - 45 return -
      46 - 47 -
      48 -class XrayBackgroundProcess(BackgroundProcess): -
      49 """ - 50 Class to process background for Xray - 51 """ -
      52 - def __init__(self, xs, ys): -
      53 """ - 54 initialization - 55 - 56 Argument: - 57 - xs : list of x - 58 - ys : list of y - 59 - 60 Return : None - 61 """ - 62 BackgroundProcess.__init__(self, xs, ys) - 63 - 64 return -
      65 - 66 -
      67 - def selectBackgroundPoints(self, standardname, wavelength): -
      68 """ - 69 Select the background points according to - 70 a list of input 2-theta value - 71 - 72 Argument: - 73 - twothetalist : list of float - 74 - 75 Return : list of 2-tuple - 76 """ - 77 - 78 backgroundpoints = genStandardBackground(standardname, wavelength, self._xs, self._ys) - 79 - 80 return backgroundpoints -
      81 - 82 - 83 # END-CLASS-DEF XrayBackgroundProcess(BackgroundProcess) - 84 - 85 -
      86 -def genBackground(backgrounds, xs, ys): -
      87 """ - 88 Generate backgrounds according to a background list in same unit - 89 - 90 Argument: - 91 - backgrounds : list, of float - 92 - xs : list, of float - 93 - ys : list, of float - 94 """ - 95 import bisect - 96 - 97 # 1. Prepare - 98 startindex = 0 - 99 finalindex = len(xs)-1 -100 backgrounds = sorted(backgrounds) -101 selectbkgds = [] -102 -103 # 2. -104 for bkgdvar in backgrounds: -105 index = bisect.bisect_left(xs, bkgdvar, startindex, finalindex) -106 if index <= finalindex: -107 if xs[index]-bkgdvar < bkgdvar-xs[index-1]: -108 # close to xindex -109 pass -110 else: -111 # close to xindex-1 -112 index = index-1 -113 xp = xs[index] -114 yp = ys[index] -115 selectbkgds.append( (xp, yp) ) -116 # Assume: that the background points are more sparse than data -117 startindex = index + 1 -118 # LOOP-OVER -119 -120 return selectbkgds -
      121 -122 -
      123 -def convertQbackground(qbackgrounds, wavelength): -
      124 """ -125 Convert background points in Q to 2-theta -126 -127 Argument: -128 - qbackgrounds : list, of float -129 - wavelength : float -130 -131 Return : list, of float -132 """ -133 import math -134 -135 backgrounds = [] -136 for q in qbackgrounds: -137 twotheta = 2*math.asin(q*wavelength*0.25/math.pi)*180*0.5/math.pi -138 backgrounds.append(twotheta) -139 -140 return backgrounds -141 -142 -
      143 -def genStandardBackground(standardname, wavelength, xs, ys): -
      144 """ -145 Generate standard's background -146 -147 Argument: -148 - standardname : str, -149 - wavelength : float, -150 -151 Return : list of background points (tuple) -152 """ -153 import qbackgrounds as QB -154 try: -155 qbackgroundlist = QB.Qbackground[standardname.upper()] -156 except KeyError, err: -157 errmsg = "Standard %-10s Has No Q-Background Set Up. Contact Developer"% (standardname) -158 raise NotImplementedError(errmsg) -159 -160 backgrounds = convertQbackground(qbackgroundlist, wavelength) -161 -162 selectbkgds = genBackground(backgrounds, xs, ys) -163 -164 return selectbkgds -
      165 -166 -
      168 """ -169 Generate an interpolated background for all the Constant-Wavelength pattern -170 in an Fit instance -171 -172 Restriction: TOF data won't be replaced at all! -173 -174 Arguments: -175 - myfit : diffpy.rietveldapi.Fit instance -176 -177 Return : None -178 """ -179 REBackground = diffpy.srrietveld.myEngine.getRietveldEngineModule("backgrounds") -180 import diffpy.srrietveld.autobackgroundselect as ABS -181 import diffpy.rietveldapi.patterns as APIPattern -182 -183 try: -184 isinstance(myfit._reflectionslist, list) -185 except AttributeError, err: -186 wmsg = "Warning: No Reflection List! (From utilbackground.replaceInterpolatedBackground())" -187 print wmsg -188 return -189 -190 # 1. Check whether it is necessary to replace background (TOF or CW) -191 numcomps = myfit.getNumComponents() -192 numcwpat = 0 -193 for nindex in xrange(numcomps): -194 comp = myfit.getComponent(nindex) -195 pat = comp.getPattern() -196 if isinstance(pat, APIPattern.CWPattern): -197 numcwpat += 1 -198 # LOOP-OVER: for nindex -199 -200 if numcwpat == 0: -201 # No Constant wave-length pattern, No need to replace -202 return -203 elif numcwpat == 1: -204 # FIXME - This will be cleaned later because it only applies to single pattern -205 -206 # 2. Get Exact Peaks according to Theoretic Peaks (Reflections) -207 peakposlist = [] -208 for reflectdict in myfit._reflectionslist: -209 tupleslist = reflectdict.values() -210 for tup in tupleslist: -211 peakposlist.append(tup[0]) -212 peakposlist = sorted(peakposlist) -213 -214 # 3. Generate background points automatically -215 numcomps = myfit.getNumComponents() -216 for nindex in xrange(numcomps): -217 comp = myfit.getComponent(nindex) -218 pat = comp.getPattern() -219 -220 if isinstance(pat, APIPattern.CWPattern): -221 xobs, yobs = pat.getObservedPattern() -222 -223 # 2.1 Pattern background selection -224 resolution = pat.getResolution() -225 excludedregionslist = pat.getExcludedRegion() -226 bkgdlist = ABS.autoBackgroundSelection(xobs, yobs, peakposlist, resolution) -227 bkgdlist = ABS.filterBackgroundPoints(bkgdlist, excludedregionslist) -228 -229 # 2.2 Set up the new background -230 newbkgd = REBackground.InterpolatedBackground("Linear") -231 newbkgd.addBackgroundPoints(bkgdlist) -232 comp.setBackground(newbkgd) -233 # LOOP OVER: for nindex in xrange(numcomps) -234 -235 else: -236 # Multiple-Pattern Case: Single phase or multiple phase -237 numcomps = myfit.getNumComponents() -238 for nindex in xrange(numcomps): -239 comp = myfit.getComponent(nindex) -240 pat = comp.getPattern() -241 -242 if isinstance(pat, APIPattern.CWPattern): -243 # 1. Generate peak position list: cannot be sure this is same for all patterns -244 peakposlist = [] -245 for reflectdict in pat.getReflections(): -246 tupleslist = reflectdict.values() -247 for tup in tupleslist: -248 peakposlist.append(tup[0]) -249 # LOOP-OVER -250 # LOOP-OVER -251 peakposlist = sorted(peakposlist) -252 -253 # 2. Select pattern background -254 xobs, yobs = pat.getObservedPattern() -255 -256 resolution = pat.getResolution() -257 excludedregionslist = pat.getExcludedRegion() -258 -259 bkgdlist = ABS.autoBackgroundSelection(xobs, yobs, peakposlist, resolution) -260 bkgdlist = ABS.filterBackgroundPoints(bkgdlist, excludedregionslist) -261 -262 # 2.2 Set up the new background -263 newbkgd = REBackground.InterpolatedBackground("Linear") -264 newbkgd.addBackgroundPoints(bkgdlist) -265 comp.setBackground(newbkgd) -266 # END-IF -267 # LOOP OVER: for nindex in xrange(numcomps) -268 -269 # END-IF-ELSE -270 -271 return -
      272 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilbackground.BackgroundProcess-class.html b/static_root/doc/srrietveld/developers/srrietveld.utilbackground.BackgroundProcess-class.html deleted file mode 100644 index 50c1a3cc..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilbackground.BackgroundProcess-class.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - srrietveld.utilbackground.BackgroundProcess - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilbackground :: - Class BackgroundProcess - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class BackgroundProcess

      source code

      -
      Known Subclasses:
      -
      - XrayBackgroundProcess -
      - -
      -Class to process background information

      - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - xs, - ys)
      - initialization...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - xs, - ys) -
      (Constructor) -

      -
      source code  -
      - -
      -
      -initialization
      -
      -Argument:
      -- xs    :   list of x
      -- ys    :   list of y
      -
      -Return  :   None
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilbackground.XrayBackgroundProcess-class.html b/static_root/doc/srrietveld/developers/srrietveld.utilbackground.XrayBackgroundProcess-class.html deleted file mode 100644 index 138b01ee..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilbackground.XrayBackgroundProcess-class.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - srrietveld.utilbackground.XrayBackgroundProcess - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilbackground :: - Class XrayBackgroundProcess - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class XrayBackgroundProcess

      source code

      -
      -BackgroundProcess --+
      -                    |
      -                   XrayBackgroundProcess
      -
      - -
      -Class to process background for Xray

      - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - xs, - ys)
      - initialization...
      - source code - -
      - -
      -   - - - - - - -
      selectBackgroundPoints(self, - standardname, - wavelength)
      - Select the background points according to ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - xs, - ys) -
      (Constructor) -

      -
      source code  -
      - -
      -
      -initialization
      -
      -Argument:
      -- xs    :   list of x
      -- ys    :   list of y
      -
      -Return  :   None
      -
      -
      -
      -
      Overrides: - BackgroundProcess.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      selectBackgroundPoints(self, - standardname, - wavelength) -

      -
      source code  -
      - -
      -
      -Select the background points according to 
      -a list of input 2-theta value
      -
      -Argument:
      -- twothetalist  :   list of float
      -
      -Return          :   list of 2-tuple
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilinstrument-module.html b/static_root/doc/srrietveld/developers/srrietveld.utilinstrument-module.html deleted file mode 100644 index e7843644..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilinstrument-module.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - srrietveld.utilinstrument - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilinstrument - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module utilinstrument

      source code

      -Utility methods for Instrument object

      - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      genInstrument(myfit)
      - Generate an instrument from a Fit object and set it up by myfit...
      - source code - -
      - -
      -   - - - - - - -
      genXMLGenerator(myinstrument)
      - Generate XML generator according to ...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: utilinstrument.py 2921 2009-03-20 15:43:13Z wdz... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      genInstrument(myfit) -

      -
      source code  -
      - -
      -Generate an instrument from a Fit object and set it up by myfit
      -The Fit object is assumed to have single type of Patterns, i.e.,
      -(1) multiple patterns: only TOF is allowed
      -(2) single pattern: X-ray, TOF, or NeutronCW
      -
      -Argument:
      -- myfit :   Fit
      -
      -Return  :   Instrument
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genXMLGenerator(myinstrument) -

      -
      source code  -
      - -
      -Generate XML generator according to 
      -instrument's type
      -
      -Argument:
      -- myinstrument  :   Instrument
      -
      -Return          :   XMLGenerator
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: utilinstrument.py 2921 2009-03-20 15:43:13Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilinstrument-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.utilinstrument-pysrc.html deleted file mode 100644 index a3c2ae51..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilinstrument-pysrc.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - srrietveld.utilinstrument - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilinstrument - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.utilinstrument

      -
      -  1  #!/usr/bin/env python 
      -  2  ################################################################################ 
      -  3  # 
      -  4  # diffpy.srrietveld by DANSE Diffraction group 
      -  5  #               Simon J. L. Billinge 
      -  6  #           (c) 2008 trustees of the Columbia University in the City of New York 
      -  7  # All rights reserved. 
      -  8  # 
      -  9  # File coded by:    Wenduo Zhou 
      - 10  # 
      - 11  # See AUTHORS.txt for a list of people who contributed. 
      - 12  # See LICENSE.txt for license information. 
      - 13  # 
      - 14  ################################################################################ 
      - 15   
      - 16  """ Utility methods for Instrument object 
      - 17  """ 
      - 18   
      - 19  __id__ = "$Id: utilinstrument.py 2921 2009-03-20 15:43:13Z wdzhou $" 
      - 20   
      - 21  import diffpy.srrietveld.instrument as IT 
      - 22   
      -
      23 -def genInstrument(myfit): -
      24 """ Generate an instrument from a Fit object and set it up by myfit - 25 The Fit object is assumed to have single type of Patterns, i.e., - 26 (1) multiple patterns: only TOF is allowed - 27 (2) single pattern: X-ray, TOF, or NeutronCW - 28 - 29 Argument: - 30 - myfit : Fit - 31 - 32 Return : Instrument - 33 """ - 34 import diffpy.rietveldapi.patterns as APP - 35 - 36 # 1. Analyze Fit - 37 numcomps = myfit.getNumComponents() - 38 - 39 if numcomps == 1: - 40 # 1. All instruments are possible - 41 mypattern = myfit.getComponent(0).getPattern() - 42 - 43 if isinstance(mypattern, APP.CWXPattern): - 44 myinstrument = IT.XrayInstrument() - 45 elif isinstance(mypattern, APP.CWNPattern): - 46 myinstrument = IT.NeutronCWInstrument() - 47 elif isinstance(mypattern, APP.TOFPattern): - 48 myinstrument = IT.TOFInstrument() - 49 else: - 50 errmsg = "Pattern %-10s Is Not Supported" % \ - 51 (mypattern.__class__.__name__) - 52 raise NotImplementedError, errmsg - 53 # END-IF-ELSE - 54 - 55 elif numcomps > 1: - 56 # 2. TOF multiple bank - 57 alltof = True - 58 for cindex in range(numcomps): - 59 mypattern = myfit.getComponent(cindex).getPattern() - 60 if not isinstance(mypattern, APP.TOFPattern): - 61 alltof = False - 62 break - 63 # LOOP-OVER - 64 - 65 if alltof is True: - 66 myinstrument = IT.TOFInstrument() - 67 else: - 68 errmsg = "Not every pattern is TOF. Instrument information is confused" - 69 raise errmsg - 70 - 71 else: - 72 # 3. no pattern - 73 errmsg = "No component defined in Fit" - 74 raise NotImplementedError, errmsg - 75 - 76 # 2. Set up Instrument - 77 myinstrument.importFromFit(myfit) - 78 - 79 return myinstrument -
      80 - 81 -
      82 -def genXMLGenerator(myinstrument): -
      83 """ Generate XML generator according to - 84 instrument's type - 85 - 86 Argument: - 87 - myinstrument : Instrument - 88 - 89 Return : XMLGenerator - 90 """ - 91 import diffpy.srrietveld.xmlgenerator as XMLG - 92 - 93 if isinstance(myinstrument, IT.XrayInstrument): - 94 xmlgen = XMLG.XrayInstrumentXMLGenerator(myinstrument, True) - 95 elif isinstance(myinstrument, IT.TOFInstrument): - 96 xmlgen = XMLG.TOFXMLGenerator(myinstrument, True) - 97 elif isinstance(myinstrument, IT.NeutronCWInstrument): - 98 xmlgen = XMLG.NeutronCWGenerator(myinstrument, True) - 99 else: -100 errmsg = "Instrument of type %-10s is not supported" % \ -101 myinstrument.__class__.__name__ -102 raise errmsg -103 -104 return xmlgen -
      105 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilplot-module.html b/static_root/doc/srrietveld/developers/srrietveld.utilplot-module.html deleted file mode 100644 index b4c29ea6..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilplot-module.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - srrietveld.utilplot - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilplot - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module utilplot

      source code

      -Utility functions for plotting

      - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      caldDiff()
      - Calculate difference between 2 dataset
      - source code - -
      - -
      -   - - - - - - -
      exportColumnFiles(diffoffset)
      - Export the results to column files for external 2D plotting - tool
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: utilplot.py 2899 2009-03-16 19:10:09Z wdzhou $' -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilplot-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.utilplot-pysrc.html deleted file mode 100644 index da3a15f4..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilplot-pysrc.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - srrietveld.utilplot - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilplot - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.utilplot

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2008 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Wenduo Zhou 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14   
      -15  """ Utility functions for plotting 
      -16  """ 
      -17   
      -18  __id__ = "$Id: utilplot.py 2899 2009-03-16 19:10:09Z wdzhou $" 
      -19   
      -
      20 -def caldDiff(): -
      21 """ Calculate difference between 2 dataset -22 """ -23 -24 return difflist -
      25 -26 -
      27 -def exportColumnFiles(diffoffset): -
      28 """ Export the results to column files for -29 external 2D plotting tool -30 """ -31 -32 return -
      33 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilrapdf-module.html b/static_root/doc/srrietveld/developers/srrietveld.utilrapdf-module.html deleted file mode 100644 index 8daa4c2f..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilrapdf-module.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - srrietveld.utilrapdf - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilrapdf - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module utilrapdf

      source code

      -Utility functions for RAPDF Only

      - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      getRAPDFInstrument()
      - Copy the RAPDF instrument XML file from stored location
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: utilrapdf.py 2792 2009-03-02 15:56:43Z wdzhou $' -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      getRAPDFInstrument() -

      -
      source code  -
      - -

      Copy the RAPDF instrument XML file from stored location

      -

      Argument:

      - Return : XML file name -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilrapdf-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.utilrapdf-pysrc.html deleted file mode 100644 index b1f27fe2..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilrapdf-pysrc.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - srrietveld.utilrapdf - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilrapdf - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.utilrapdf

      -
      - 1  ############################################################################## 
      - 2  # 
      - 3  # diffpy.srrietveld by DANSE Diffraction group 
      - 4  #                   Simon J. L. Billinge 
      - 5  #                   (c) 2008 Trustees of the Columbia University 
      - 6  #                   in the City of New York.  All rights reserved. 
      - 7  # 
      - 8  # File coded by:    Wenduo Zhou 
      - 9  # 
      -10  # See AUTHORS.txt for a list of people who contributed. 
      -11  # See LICENSE.txt for license information. 
      -12  # 
      -13  ############################################################################## 
      -14  """ 
      -15  Utility functions for RAPDF Only 
      -16  """ 
      -17  __id__ = "$Id: utilrapdf.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      -18   
      -
      20 """ -21 Copy the RAPDF instrument XML file from stored location -22 -23 Argument: -24 -25 Return : XML file name -26 """ -27 # 1. Parse the location of diffpy.srrietveld -28 import diffpy.srrietveld -29 s = diffpy.srrietveld.__str__() -30 terms = s.split() -31 for t in terms: -32 if t.count("__init__.pyc") == 1: -33 s = t -34 break -35 -36 location = s.split("__init__.pyc")[0].split("'")[-1]+"XMLs/Instruments/" -37 filename = "rapdf.xml" -38 -39 cmd = "cp %-30s ."% (location+filename) -40 import os -41 os.system(cmd) -42 -43 return filename -
      44 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilrefineguide-module.html b/static_root/doc/srrietveld/developers/srrietveld.utilrefineguide-module.html deleted file mode 100644 index 12fcb368..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilrefineguide-module.html +++ /dev/null @@ -1,989 +0,0 @@ - - - - - srrietveld.utilrefineguide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilrefineguide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module utilrefineguide

      source code

      -Helping (external) functions for RefineGuide

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      genVarName(rootvarname, - varindexlist)
      - Generate a varialbe name according to some rule as:...
      - source code - -
      - -
      -   - - - - - - -
      activeVariable(fit, - varname, - rietapiobj, - parname)
      - check whether a specific combination as...
      - source code - -
      - -
      -   - - - - - - -
      sortByAtomNumber(tuplist)
      - Sort a list tuples/lists started with of diffpy.rietveldapi.Atom -objects desending by atoms' atom number.
      - source code - -
      - -
      -   - - - - - - -
      sortByAtomTag(tuplist)
      - Sort a list tuples/lists started with of diffpy.rietveldapi.Atom -objects desending by atoms' atom tag.
      - source code - -
      - -
      -   - - - - - - -
      locateSharingSite(atomsdict, - atom)
      - Search in a list of atoms to see whether there is any atom ...
      - source code - -
      - -
      -   - - - - - - -
      getLatticeInGroup(thefit)
      - Read the Fit, in order to group the Lattices, which -belonged to same experiment togehter.
      - source code - -
      - -
      -   - - - - - - -
      genAbsorptionCorrectionRefineSetup(fit, - rietobjectslist, - stage)
      - Generate an appropriate absorption correction object...
      - source code - -
      - -
      -   - - - - - - -
      genADPRefineSetup(fit, - rietobjectslist, - stage)
      - Generate an appropriate ADPRefineSetup object...
      - source code - -
      - -
      -   - - - - - - -
      genAtomFractionalPositionSetup(fit, - rietobjectslist, - stage)
      - Generate an appropriate atom fractional position refinement setup...
      - source code - -
      - -
      -   - - - - - - -
      genBackgroundRefineSetup(fit, - rietobjectslist, - stage=1)
      - Generate a proper Background RefineSetup for the specific...
      - source code - -
      - -
      -   - - - - - - -
      genLatticeRefineSetup(fit, - rietobjectslist, - spcgrp, - stage=1)
      - check the space group so that can generate a proper ...
      - source code - -
      - -
      -   - - - - - - -
      genPeakShapeRefineSetup(fit, - rietobjectslist, - stage)
      - Exam the type of input Rietveld objects to generate...
      - source code - -
      - -
      -   - - - - - - -
      genScaleRefineSetup(myfit, - rietobjectslist, - stage=1)
      - Generate Scale-factor refinement setup according to input rietveld - objects
      - source code - -
      - -
      -   - - - - - - -
      genTOFExpDecayRefinement(myfit, - rietobjectslist, - stage=1)
      - Generate TOF Exponential Decay refinement setup...
      - source code - -
      - -
      -   - - - - - - -
      genWavelengthRefineSetup(myfit, - rietveldobjects, - stage)
      - Generate zero refinement setup according to ...
      - source code - -
      - -
      -   - - - - - - -
      genZeroRefineSetup(myfit, - rietveldobjects)
      - Generate zero refinement setup according to ...
      - source code - -
      - -
      - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: utilrefineguide.py 2924 2009-03-20 15:57:45Z wd... -
      -   - - _DEBUGOUTPUT = True -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      genVarName(rootvarname, - varindexlist) -

      -
      source code  -
      - -
      -Generate a varialbe name according to some rule as:
      -var_rootvarname__varindexlist
      -
      -Arguments:
      -- rootvarname   :   string, root variable name
      -- varindexlist  :   list of integer index
      -
      -return          :   string, variable name
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      activeVariable(fit, - varname, - rietapiobj, - parname) -

      -
      source code  -
      - -
      -check whether a specific combination as
      -variable name, a Rietvd object and parameter
      -is active (existing and turned on) in a Fit instance's 
      -
      -Arguements
      -- fit       :   Fit instance
      -- varname   :   string, variable name
      -- rietapiobj:   diffpy.rietveldapi object
      -- parname   :   string, parameter name
      -
      -Return      --  Boolean
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      sortByAtomNumber(tuplist) -

      -
      source code  -
      - -
      -Sort a list tuples/lists started with of diffpy.rietveldapi.Atom 
      -objects desending by atoms' atom number.
      -If some atoms are of the same atom number, they will be sorted by atom tag
      -
      -Argument:
      -- tuplist   :   list of tuples/lists, [[Rietveld object, Atom, ...], ...]
      -
      -Return      :   list of tuples/lists, [[Rietveld object, Atom, ...], ...]
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      sortByAtomTag(tuplist) -

      -
      source code  -
      - -
      -Sort a list tuples/lists started with of diffpy.rietveldapi.Atom 
      -objects desending by atoms' atom tag. 
      -
      -Argument:
      -- tuplist   :   list of tuples/lists, [[Rietveld Atom object, ...], ...]
      -
      -Return      :   list of tuples/lists, [[Rietveld Atom object, ...], ...]
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      locateSharingSite(atomsdict, - atom) -

      -
      source code  -
      - -
      -Search in a list of atoms to see whether there is any atom 
      -on the same atom of the input atom
      -
      -Argument:
      -- atomslist :   dictionary of lists of atoms
      -- atom      :   an atom object
      -
      -Return      :   integer, the ID of the atom with same location
      -                         -1 if no such atom is found in the last
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getLatticeInGroup(thefit) -

      -
      source code  -
      - -
      -Read the Fit, in order to group the Lattices, which
      -belonged to same experiment togehter.  
      -
      -The rule of lattices to be grouped is that they are:
      -1. belonged to same instrument
      -2. belonged to same phase
      -3. belonged to same experiment
      -
      -Need to consider two situations:
      -1. multiple-bank (components)
      -2. multiple-phase
      -
      -Argument:
      -- thefit    :   Fit instance
      -
      -Return      :   tuple of list of n-tuples
      -                list for group: lattice, phase, space group, index list
      -                list for unit : lattice, space group, index list
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genAbsorptionCorrectionRefineSetup(fit, - rietobjectslist, - stage) -

      -
      source code  -
      - -
      -Generate an appropriate absorption correction object
      -for input absorption correction(s)
      -
      -Argument:
      -- fit   :   diffpy.srrietveld Fit instance
      -- rietobjectslist:  list, of list
      -- stage :   int
      -
      -Return  :   AbsorptionCorrectionRefineSetup
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genADPRefineSetup(fit, - rietobjectslist, - stage) -

      -
      source code  -
      - -
      -Generate an appropriate ADPRefineSetup object
      -according to the ADP's type 
      -
      -Arguments:
      -- fit             :   diffpy.rietveldapi.Fit instance
      -- rietobjectslist :   list, of list [ [adp, ..], [adp, ..], ...]
      -
      -Return      :   one of [IsotropicADPRefineSetup, AnisotropicADPRefineSetup]
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genAtomFractionalPositionSetup(fit, - rietobjectslist, - stage) -

      -
      source code  -
      - -
      -Generate an appropriate atom fractional position refinement setup
      -
      -Arguments:
      -- fit             :   diffpy.rietveldapi.Fit instance
      -- rietobjectslist :   list, of list [ [adp, ..], [adp, ..], ...]
      -
      -Return      :   one of [IsotropicADPRefineSetup, AnisotropicADPRefineSetup]
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genBackgroundRefineSetup(fit, - rietobjectslist, - stage=1) -

      -
      source code  -
      - -
      -Generate a proper Background RefineSetup for the specific
      -background type
      -
      -Arguments:
      -- fit           :   diffpy.rietveldapi.Fit instance
      -- rietobjectslist : list, of list, 
      -- stage         :   integer, some types Background should be refined in different stages
      -
      -Return      --   BackgroundGuide instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genLatticeRefineSetup(fit, - rietobjectslist, - spcgrp, - stage=1) -

      -
      source code  -
      - -
      -check the space group so that can generate a proper 
      -LatticeRefineSetup
      -
      -Arguments:
      -- fit       :   diffpy.rietveldapi.Fit instance
      -- rietobjectslist:  list of list
      -- spcgrp    :   string, space group
      -
      -return      :   LatticeGuide instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genPeakShapeRefineSetup(fit, - rietobjectslist, - stage) -

      -
      source code  -
      - -
      -Exam the type of input Rietveld objects to generate
      -the proper RefineSetup
      -
      -Arguments:
      -- fit            : diffpy.rietveldapi.Fit instance
      -- rietobjectslist: list, of list [ [peak-profile], [peak-profile], ...]
      -- stage          : int
      -
      -Assumption: all Rietveld objects as rietobjectslist's any item's
      -first time should be of same type
      -
      -Return      --   PeakProfileGuide instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genTOFExpDecayRefinement(myfit, - rietobjectslist, - stage=1) -

      -
      source code  -
      - -
      -Generate TOF Exponential Decay refinement setup
      -according to input Rietveld objects
      -
      -Argument:
      -- myfit :   Fit
      -- rietobjectslist   :   list of list of Rietveld objects
      -- stage :   int
      -
      -Return  :   TOFExpDecayRefineSetup
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genWavelengthRefineSetup(myfit, - rietveldobjects, - stage) -

      -
      source code  -
      - -
      -Generate zero refinement setup according to 
      -input rietveldobjects
      -
      -Argument:
      -- rietveldobjects   :   list, of list [ [pattern, ...], [pattern, ...], ...]
      -
      -Return              :   RefineSetup
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      genZeroRefineSetup(myfit, - rietveldobjects) -

      -
      source code  -
      - -
      -Generate zero refinement setup according to 
      -input rietveldobjects
      -
      -Argument:
      -- rietveldobjects   :   list, of list [ [pattern, ...], [pattern, ...], ...]
      -
      -Return              :   RefineSetup
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: utilrefineguide.py 2924 2009-03-20 15:57:45Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilrefineguide-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.utilrefineguide-pysrc.html deleted file mode 100644 index e5c607a1..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilrefineguide-pysrc.html +++ /dev/null @@ -1,703 +0,0 @@ - - - - - srrietveld.utilrefineguide - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilrefineguide - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.utilrefineguide

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ Helping (external) functions for RefineGuide 
      - 16  """ 
      - 17   
      - 18  __id__ = "$Id: utilrefineguide.py 2924 2009-03-20 15:57:45Z wdzhou $" 
      - 19   
      - 20  import refinesetup as US 
      - 21  from diffpy.refinementapi.exceptiontools import verifyType 
      - 22       
      - 23  _DEBUGOUTPUT = True 
      - 24   
      -
      25 -def genVarName(rootvarname, varindexlist): -
      26 """ Generate a varialbe name according to some rule as: - 27 var_rootvarname__varindexlist - 28 - 29 Arguments: - 30 - rootvarname : string, root variable name - 31 - varindexlist : list of integer index - 32 - 33 return : string, variable name - 34 """ - 35 # 1. Input argument validity check - 36 verifyType(rootvarname, str) - 37 - 38 if varindexlist is None: - 39 varindexlist = [] - 40 else: - 41 if not (isinstance(varindexlist, list) or isinstance(varindexlist, tuple)): - 42 errmsg = "genVarName(..., varindexlist): " + \ - 43 "input varindexlist is not list or tuple: %-10s" % (varindexlist.__class__.__name__) - 44 raise FitConfigurationError(errmsg) - 45 # END-IF-ELSE - 46 - 47 # 2. get index string - 48 indstring = "" - 49 for term in varindexlist: - 50 substring = "_"+str(int(term)) - 51 indstring += substring - 52 - 53 # 3. generate varname - 54 varname = "vAr_"+rootvarname+indstring - 55 - 56 return varname -
      57 - 58 -
      59 -def activeVariable(fit, varname, rietapiobj, parname): -
      60 """ check whether a specific combination as - 61 variable name, a Rietvd object and parameter - 62 is active (existing and turned on) in a Fit instance's - 63 - 64 Arguements - 65 - fit : Fit instance - 66 - varname : string, variable name - 67 - rietapiobj: diffpy.rietveldapi object - 68 - parname : string, parameter name - 69 - 70 Return -- Boolean - 71 """ - 72 opexist = False - 73 - 74 # print "activeVariable()" - 75 # print "input variable name = %-10s, parameter name = %-10s"% (varname, parname) - 76 # print fit._refinedb - 77 - 78 if fit.getVariableStatus(varname) is True: - 79 oplist = fit.getVariableInformation(varname) - 80 opexist = False - 81 for op in oplist: - 82 if rietapiobj == op[0] and parname == op[1]: - 83 opexist = True - 84 break - 85 # End -- for op in oplist - 86 # End -- if fit.get.... - 87 - 88 return opexist -
      89 - 90 -
      91 -def sortByAtomNumber(tuplist): -
      92 """ Sort a list tuples/lists started with of diffpy.rietveldapi.Atom - 93 objects desending by atoms' atom number. - 94 If some atoms are of the same atom number, they will be sorted by atom tag - 95 - 96 Argument: - 97 - tuplist : list of tuples/lists, [[Rietveld object, Atom, ...], ...] - 98 - 99 Return : list of tuples/lists, [[Rietveld object, Atom, ...], ...] -100 """ -101 from atominfo import getAtomNumberByName -102 -103 sortedatomslist = [] -104 atomnumdict = {} -105 -106 # 1. genearte an atom dictionary for sorting by atom number -107 for tup in tuplist: -108 atom = tup[1] -109 atomname = atom.getElement() -110 atomnum = getAtomNumberByName(atomname) -111 if not atomnumdict.has_key(atomnum): -112 atomnumdict[atomnum] = [] -113 atomnumdict[atomnum].append(tup) -114 # LOOP-OVER -115 -116 # 2. sort -117 sortedatomnumslist = sorted(atomnumdict.keys()) -118 N = len(sortedatomnumslist) -119 for index in xrange(N): -120 atomnum = sortedatomnumslist[N-1-index] -121 subtuplist = atomnumdict[atomnum] -122 subatomslist = sortByAtomTag(subtuplist) -123 sortedatomslist.extend(subatomslist) -124 -125 # 3. return -126 return sortedatomslist -
      127 -128 # END -- sortByAtomNumber(atomslist) -129 -130 -
      131 -def sortByAtomTag(tuplist): -
      132 """ Sort a list tuples/lists started with of diffpy.rietveldapi.Atom -133 objects desending by atoms' atom tag. -134 -135 Argument: -136 - tuplist : list of tuples/lists, [[Rietveld Atom object, ...], ...] -137 -138 Return : list of tuples/lists, [[Rietveld Atom object, ...], ...] -139 """ -140 from atominfo import getAtomNumberByName -141 -142 sortedtuplist = [] -143 atomtagdict = {} -144 -145 # 1. genearte an atom dictionary for sorting by atom tag -146 for tup in tuplist: -147 atom = tup[1] -148 atomtag = atom.getTag() -149 if not atomtagdict.has_key(atomtag): -150 atomtagdict[atomtag] = [] -151 atomtagdict[atomtag].append( tup ) -152 # LOOP-OVER -153 -154 # 2. sort -155 sortedatomtagslist = sorted(atomtagdict.keys()) -156 N = len(sortedatomtagslist) -157 for index in xrange(N): -158 atomtag = sortedatomtagslist[index] -159 subtupslist = atomtagdict[atomtag] -160 sortedtuplist.extend(subtupslist) -161 -162 # 3. return -163 return sortedtuplist -
      164 -165 # END -- sortByAtomNumber(atomslist) -166 -167 -
      168 -def locateSharingSite(atomsdict, atom): -
      169 """ Search in a list of atoms to see whether there is any atom -170 on the same atom of the input atom -171 -172 Argument: -173 - atomslist : dictionary of lists of atoms -174 - atom : an atom object -175 -176 Return : integer, the ID of the atom with same location -177 -1 if no such atom is found in the last -178 """ -179 rid = -1 -180 -181 for id in atomsdict.keys(): -182 atomslist = atomsdict[id] -183 tempatom = atomslist[0] -184 -185 tx, ty, tz = tempatom.getFractionalCoordinates() -186 ax, ay, az = atom.getFractionalCoordinates() -187 -188 if ( abs(tx-ax) < ETA ) and ( abs(ty-ay) < ETA ) and ( abs(tz-az) < ETA ): -189 rid = id -190 break -191 -192 return rid -
      193 -194 # END -- locateSharingSite -195 -196 -
      197 -def getLatticeInGroup(thefit): -
      198 """ Read the Fit, in order to group the Lattices, which -199 belonged to same experiment togehter. -200 -201 The rule of lattices to be grouped is that they are: -202 1. belonged to same instrument -203 2. belonged to same phase -204 3. belonged to same experiment -205 -206 Need to consider two situations: -207 1. multiple-bank (components) -208 2. multiple-phase -209 -210 Argument: -211 - thefit : Fit instance -212 -213 Return : tuple of list of n-tuples -214 list for group: lattice, phase, space group, index list -215 list for unit : lattice, space group, index list -216 """ -217 import instrument as IM -218 -219 # 1. Init: components is a list of components in same experiment -220 # so the lattices under them should be constraint -221 componentslist = thefit.getComponentByExperiment() -222 groupdictlist = [] -223 for gindex in xrange( len(componentslist) ): -224 groupdict = {} -225 groupdict["Component"] = componentslist[gindex] -226 groupdict["PhaseDict"] = [] -227 groupdictlist.append( groupdict ) -228 # LOOP-OVER -229 -230 # 2. Group them -231 for groupdict in groupdictlist: -232 -233 # 2.1 Init -234 phanamelist = [] -235 -236 # 2.2 -237 for component in groupdict["Component"]: -238 numphase = component.getNumPhases() -239 for pindex in xrange(numphase): -240 # 2.2.1 read information -241 thephase = component.getPhase(pindex) -242 thespcgrp = thephase.getSpaceGroup() -243 thelattice = thephase.getLattice() -244 phasename = thephase.getName() -245 -246 # 2.2.2 see if the phase dict is set up or not -247 if not phasename in phanamelist: -248 phasedict = {} -249 phasedict["Lattice"] = [] -250 phasedict["Spacegroup"] = thespcgrp -251 phanamelist.append( phasename ) -252 # LOOP-OVER -253 groupdict["PhaseDict"].append( phasedict ) -254 -255 # 2.2.3 append -256 phasedict["Lattice"].append( thelattice) -257 # LOOP-OVER -258 # LOOP-OVER -259 -260 # LOOP-OVER -261 -262 # 3. Clean the result for return -263 rietobjectslist = [] -264 for groupdict in groupdictlist: -265 for phasedict in groupdict["PhaseDict"]: -266 rietobjects = ( phasedict["Lattice"], phasedict["Spacegroup"] ) -267 rietobjectslist.append( rietobjects ) -268 # LOOP-OVER -269 # LOOP-OVER -270 -271 return rietobjectslist -
      272 -273 -
      274 -def genAbsorptionCorrectionRefineSetup(fit, rietobjectslist, stage): -
      275 """ Generate an appropriate absorption correction object -276 for input absorption correction(s) -277 -278 Argument: -279 - fit : diffpy.srrietveld Fit instance -280 - rietobjectslist: list, of list -281 - stage : int -282 -283 Return : AbsorptionCorrectionRefineSetup -284 """ -285 import diffpy.rietveldapi.absorptioncorrections as ABC -286 -287 abscor = rietobjectslist[0][0] -288 -289 if isinstance(abscor, ABC.AbsorptionCorrection): -290 rietrefinesetup = US.AbsorptionCorrectionRefineSetup(fit, rietobjectslist, stage) -291 -292 else: -293 errmsg = "Class %-30s Is Not Supported At This Moment! Contact Developers" % \ -294 (self.__class__.__name__) -295 raise NotImplementedError(errmsg) -296 # END-IF-ELSE -297 -298 return rietrefinesetup -
      299 -300 -
      301 -def genADPRefineSetup(fit, rietobjectslist, stage): -
      302 """ Generate an appropriate ADPRefineSetup object -303 according to the ADP's type -304 -305 Arguments: -306 - fit : diffpy.rietveldapi.Fit instance -307 - rietobjectslist : list, of list [ [adp, ..], [adp, ..], ...] -308 -309 Return : one of [IsotropicADPRefineSetup, AnisotropicADPRefineSetup] -310 """ -311 import diffpy.rietveldapi.adps as ADPAPI -312 -313 rietobj = rietobjectslist[0][0] -314 -315 if isinstance(rietobj, ADPAPI.IsotropicAtomicDisplacementFactor): -316 rietunitrefinesetup = US.IsotropicADPRefineSetup(fit, rietobjectslist, stage) -317 -318 elif isinstance(rietobj, ADPAPI.AnisotropicAtomicDisplacementFactor): -319 rietunitrefinesetup = US.AnisotropicADPRefineSetup(fit, rietobjectslist, stage) -320 -321 else: -322 errmsg = "genADPRefineSetup(): Input rietobj is of type %-20s is NOT Allowed!" % \ -323 (rietobj.__class__.__name__) -324 raise FitConfigurationError, errmsg -325 # END-IF-ELSE -326 -327 return rietunitrefinesetup -
      328 -329 -
      330 -def genAtomFractionalPositionSetup(fit, rietobjectslist, stage): -
      331 """ Generate an appropriate atom fractional position refinement setup -332 -333 Arguments: -334 - fit : diffpy.rietveldapi.Fit instance -335 - rietobjectslist : list, of list [ [adp, ..], [adp, ..], ...] -336 -337 Return : one of [IsotropicADPRefineSetup, AnisotropicADPRefineSetup] -338 """ -339 import diffpy.rietveldapi.atoms as APIAtom -340 -341 testrietobj = rietobjectslist[0][0] -342 -343 if isinstance(testrietobj, APIAtom.Atom): -344 rietrefinesetup = US.AtomFractionalCoordinateRefineSetup(fit, rietobjectslist, stage) -345 else: -346 errmsg = "genADPRefineSetup(): Input rietobj is of type %-20s is NOT Allowed!" % \ -347 (rietobj.__class__.__name__) -348 raise FitConfigurationError, errmsg -349 # END-IF-ELSE -350 -351 return rietrefinesetup -
      352 -353 -
      354 -def genBackgroundRefineSetup(fit, rietobjectslist, stage=1): -
      355 """ Generate a proper Background RefineSetup for the specific -356 background type -357 -358 Arguments: -359 - fit : diffpy.rietveldapi.Fit instance -360 - rietobjectslist : list, of list, -361 - stage : integer, some types Background should be refined in different stages -362 -363 Return -- BackgroundGuide instance -364 """ -365 import diffpy.rietveldapi.backgrounds as BG -366 -367 background = rietobjectslist[0][0] -368 -369 if isinstance(background, BG.InterpolatedBackground): -370 bguide = US.InterpolatedBackgroundRefineSetup(fit, rietobjectslist, stage) -371 -372 elif isinstance(background, BG.PolynomialBackground): -373 bguide = US.PolynomialBackgroundRefineSetup(fit, rietobjectslist, stage) -374 -375 else: -376 errmsg = "genBackgroundRefineSetup(): background type = %-20s will be implemented" % \ -377 (background.__class__.__name__) -378 raise NotImplementedError(errmsg) -379 # END-IF-ELSE -380 -381 return bguide -
      382 -383 -
      384 -def genLatticeRefineSetup(fit, rietobjectslist, spcgrp, stage = 1): -
      385 """ check the space group so that can generate a proper -386 LatticeRefineSetup -387 -388 Arguments: -389 - fit : diffpy.rietveldapi.Fit instance -390 - rietobjectslist: list of list -391 - spcgrp : string, space group -392 -393 return : LatticeGuide instance -394 """ -395 verifyType(spcgrp, str) -396 -397 # 1. get lattice type (7 type) -398 import spacegroupinfo as SGI -399 lattype = SGI.getCrystalSystemFromSpaceGroup(spcgrp) -400 -401 if lattype == "Monoclinic": -402 lguide = US.MonoclinicRefineSetup(fit, rietobjectslist) -403 elif lattype == "Cubic": -404 lguide = US.CubicRefineSetup(fit, rietobjectslist) -405 elif lattype == "Orthorhombic": -406 lguide = US.OrthorhombicRefineSetup(fit, rietobjectslist) -407 elif lattype == "Trigonal": -408 lguide = US.TrigonalRefineSetup(fit, rietobjectslist) -409 elif lattype == "Hexagonal": -410 lguide = US.HexagonalRefineSetup(fit, rietobjectslist) -411 elif lattype == "Tetragonal": -412 lguide = US.TetragonalRefineSetup(fit, rietobjectslist) -413 else: -414 errmsg = "genLatticeRefineSetup(): lattice type = %-20s will be implemented"% (lattype) -415 raise NotImplementedError(errmsg) -416 # END-IF-ELSE -417 -418 return lguide -
      419 -420 -
      421 -def genPeakShapeRefineSetup(fit, rietobjectslist, stage): -
      422 """ Exam the type of input Rietveld objects to generate -423 the proper RefineSetup -424 -425 Arguments: -426 - fit : diffpy.rietveldapi.Fit instance -427 - rietobjectslist: list, of list [ [peak-profile], [peak-profile], ...] -428 - stage : int -429 -430 Assumption: all Rietveld objects as rietobjectslist's any item's -431 first time should be of same type -432 -433 Return -- PeakProfileGuide instance -434 """ -435 import diffpy.rietveldapi.peakprofiles as PP -436 -437 peakprof = rietobjectslist[0][0] -438 -439 if isinstance(peakprof, PP.CWSymmPseudoVoigtProfile): -440 pguide = US.RegularPseudoVoigtRefineSetup(fit, rietobjectslist, stage) -441 -442 elif isinstance(peakprof, PP.TCHPseudoVoigtProfile): -443 pguide = US.TCHPseudoVoigtRefineSetup(fit, rietobjectslist, stage) -444 -445 elif isinstance(peakprof, PP.SplitPseudoVoigtProfile): -446 pguide = US.SplitPseudoVoigtSetup(fit, rietobjectslist, stage) -447 -448 elif isinstance(peakprof, PP.ConstantWaveSymmetricPeakProfile): -449 pguide = US.ConstantWaveSymmetricPeakShapeRefineSetup(fit, rietobjectslist, -450 stage) -451 -452 elif isinstance(peakprof, PP.PseudoVoigtExpDSpacing): -453 pguide = US.PseudoVoigtExpDSpacingRefineSetup(fit, rietobjectslist, stage) -454 -455 elif isinstance(peakprof, PP.PseudoVoigtExp): -456 pguide = US.TOFPseudoVoigtRefinement(fit, rietobjectslist, stage) -457 -458 elif isinstance(peakprof, PP.TOFPseudoVoigtIkedaCarpenter): -459 pguide = US.TOFPseudoVoigtRefinement(fit, rietobjectslist, stage) -460 -461 else: -462 errmsg = "genPeakShapeSetup(): PeakProfile type = %-20s will be implemented"% \ -463 (peakprof.__class__.__name__) -464 raise NotImplementedError(errmsg) -465 # END-IF-ELSE -466 -467 return pguide -
      468 -469 -
      470 -def genScaleRefineSetup(myfit, rietobjectslist, stage = 1): -
      471 """ Generate Scale-factor refinement setup according to input rietveld objects -472 """ -473 refinesetup = US.ScaleFactorRefineSetup(myfit, rietobjectslist, stage) -474 -475 return refinesetup -
      476 -477 -
      478 -def genTOFExpDecayRefinement(myfit, rietobjectslist, stage = 1): -
      479 """ Generate TOF Exponential Decay refinement setup -480 according to input Rietveld objects -481 -482 Argument: -483 - myfit : Fit -484 - rietobjectslist : list of list of Rietveld objects -485 - stage : int -486 -487 Return : TOFExpDecayRefineSetup -488 """ -489 if _DEBUGOUTPUT is True: -490 print "4:04: ", rietobjectslist[0][0].__class__.__name__ -491 refinesetup = US.TOFExpDecayRefineSetup(myfit, rietobjectslist, stage) -492 -493 return refinesetup -
      494 -495 -
      496 -def genWavelengthRefineSetup(myfit, rietveldobjects, stage): -
      497 """ Generate zero refinement setup according to -498 input rietveldobjects -499 -500 Argument: -501 - rietveldobjects : list, of list [ [pattern, ...], [pattern, ...], ...] -502 -503 Return : RefineSetup -504 """ -505 import diffpy.rietveldapi.patterns as APIPattern -506 -507 testpattern = rietveldobjects[0][0] -508 -509 if isinstance(testpattern, APIPattern.CWPattern): -510 refinesetup = US.WavelengthRefineSetup(myfit, rietveldobjects, stage) -511 -512 else: -513 errmsg = "Object of Class %-10s Is Not Allowed!" % \ -514 (testpattern.__class__.__name__) -515 raise NotImplementedError, errmsg -516 # END-IF-ELSE -517 -518 return refinesetup -
      519 -520 -
      521 -def genZeroRefineSetup(myfit, rietveldobjects): -
      522 """ Generate zero refinement setup according to -523 input rietveldobjects -524 -525 Argument: -526 - rietveldobjects : list, of list [ [pattern, ...], [pattern, ...], ...] -527 -528 Return : RefineSetup -529 """ -530 import diffpy.rietveldapi.patterns as APIPattern -531 -532 testpattern = rietveldobjects[0][0] -533 -534 if isinstance(testpattern, APIPattern.ThermalNeutronTOFPattern): -535 refinesetup = US.ZeroShiftThermalRefineSetup(myfit, rietveldobjects) -536 -537 elif isinstance(testpattern, APIPattern.TOFPattern) or \ -538 isinstance(testpattern, APIPattern.CWPattern): -539 refinesetup = US.ZeroShiftRefineSetup(myfit, rietveldobjects) -540 -541 else: -542 errmsg = "Object of Class %-10s Is Not Allowed!" % \ -543 (testpattern.__class__.__name__) -544 raise NotImplementedError, errmsg -545 # END-IF-ELSE -546 -547 return refinesetup -
      548 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilsequentialrefine-module.html b/static_root/doc/srrietveld/developers/srrietveld.utilsequentialrefine-module.html deleted file mode 100644 index a2a6d9f6..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilsequentialrefine-module.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - srrietveld.utilsequentialrefine - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilsequentialrefine - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module utilsequentialrefine

      source code

      -Helping methods for sequential fitting or fit a sequence of data by - structure independently

      - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      loadSeqRefineController(savefilename)
      - Load a pickle file to recreate a SeqRefineController object...
      - source code - -
      - -
      -   - - - - - - -
      getSolutionSeqXML(xmlfilename, - searchparname, - atomname=None)
      - Get the solution from an XML file saved from sequential fitting...
      - source code - -
      - -
      -   - - - - - - -
      parseStructureSeqXML(xmlfilename)
      - Parse XML file saved from sequential fitting...
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: utilsequentialrefine.py 2899 2009-03-16 19:10:0... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      loadSeqRefineController(savefilename) -

      -
      source code  -
      - -
      -Load a pickle file to recreate a SeqRefineController object
      -
      -Argument:
      -- savefilename  :   str
      -
      -Return          :   SeqRefineController instance
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getSolutionSeqXML(xmlfilename, - searchparname, - atomname=None) -

      -
      source code  -
      - -
      -Get the solution from an XML file saved from sequential fitting
      -
      -Argument:
      -- xmlfilename   :   str, xml file name
      -- searchparname :   str, parameter name
      -- atomname      :   str, atom name
      -
      -Return          :   list
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseStructureSeqXML(xmlfilename) -

      -
      source code  -
      - -
      -Parse XML file saved from sequential fitting
      -
      -Argument:
      -- xmlfilename   :   str, xml file name
      -
      -Return          :   dictionary
      -                    key:    value of environement parameter
      -                    value:  structure
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: utilsequentialrefine.py 2899 2009-03-16 19:10:09Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilsequentialrefine-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.utilsequentialrefine-pysrc.html deleted file mode 100644 index f1528f6c..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilsequentialrefine-pysrc.html +++ /dev/null @@ -1,356 +0,0 @@ - - - - - srrietveld.utilsequentialrefine - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilsequentialrefine - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.utilsequentialrefine

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14   
      - 15  """ 
      - 16  Helping methods for sequential fitting or fit a sequence of data by structure 
      - 17  independently 
      - 18  """ 
      - 19   
      - 20  __id__ = "$Id: utilsequentialrefine.py 2899 2009-03-16 19:10:09Z wdzhou $" 
      - 21   
      -
      22 -def loadSeqRefineController(savefilename): -
      23 """ Load a pickle file to recreate a SeqRefineController object - 24 - 25 Argument: - 26 - savefilename : str - 27 - 28 Return : SeqRefineController instance - 29 """ - 30 import pickle - 31 - 32 # 1. Check File and Object and Import - 33 try: - 34 ifile = open(savefilename) - 35 msobj = pickle.load(ifile) - 36 ifile.close() - 37 except PicklingError, err: - 38 errmsg = "PickleError on File %-10s"% (picklefname) - 39 raise PickleError(errmsg) - 40 except IOError, err: - 41 errmsg = "Error Reading File %-10s"% (picklefname) - 42 raise IOError(err) - 43 - 44 if not isinstance(msobj, SeqRefineController): - 45 errmsg = "Import Class Incorrect, Should be SeqRefineController, But Imported Is %-20s"% \ - 46 (msobj.__class__.__name__) - 47 raise FitConfigurationError - 48 - 49 # 2. return - 50 return msobj -
      51 - 52 -
      53 -def getSolutionSeqXML(xmlfilename, searchparname, atomname = None): -
      54 """ Get the solution from an XML file saved from sequential fitting - 55 - 56 Argument: - 57 - xmlfilename : str, xml file name - 58 - searchparname : str, parameter name - 59 - atomname : str, atom name - 60 - 61 Return : list - 62 """ - 63 import diffpy.srrietveld.xmlinterface as XI - 64 import diffpy.srrietveld.auxiliary as AX - 65 - 66 # 1. Import XML - 67 xmlobj = XI.importXML(xmlfilename) - 68 xmldict = XI.xmlToDict(xmlobj) - 69 - 70 # 2. Interpret information dictionary - 71 infodictlist = xmldict["SEQFIT"][0]["REFINE"] - 72 searchresult = [] - 73 for infodict in infodictlist: - 74 matchlist = AX.searchdict(infodict, searchparname) - 75 searchresult.append( (infodict["Value"], matchlist) ) - 76 - 77 # 3. Process search result to solution list - 78 solutionlist = [] - 79 for parval, matchlist in searchresult: - 80 for matchtuple in matchlist: - 81 tempdict = matchtuple[0] - 82 parname = matchtuple[1] - 83 tempterms= tempdict[parname].split("+-") - 84 tempval = float(tempterms[0]) - 85 if len(tempterms) == 1: - 86 tempsigma = None - 87 else: - 88 tempsigma = float(tempterms[1]) - 89 # END-IF-ELSE - 90 - 91 # 3.2 Special treatment for atom - 92 if tempdict.has_key("Element"): - 93 if atomname is not None: - 94 # some specific atom - 95 if tempdict["Element"].lower() == atomname.lower(): - 96 solutionlist.append( [parval, tempval, tempsigma, parname, tempdict["Tag"]] ) - 97 else: - 98 # all atom - 99 solutionlist.append( [parval, tempval, tempsigma, parname, tempdict["Tag"]] ) -100 else: -101 solutionlist.append( [parval, tempval, tempsigma, parname] ) -102 # END-IF-ELSE -103 # LOOP-OVER -104 # LOOP-OVER -105 -106 # 4. Sort Information -107 solutiondict = {} -108 for sol in solutionlist: -109 parval = sol[0] -110 solval = sol[1] -111 solsig = sol[2] -112 parnam = sol[3] -113 if not solutiondict.has_key(parval): -114 solutiondict[parval] = {} -115 if len(sol) == 5: -116 # Atom case -117 atomtag = sol[4] -118 name = (parnam, atomtag) -119 else: -120 name = parnam -121 solutiondict[parval][name] = (solval, solsig) -122 # LOOP-OVER -123 -124 return solutiondict -
      125 -126 -
      127 -def parseStructureSeqXML(xmlfilename): -
      128 """ Parse XML file saved from sequential fitting -129 -130 Argument: -131 - xmlfilename : str, xml file name -132 -133 Return : dictionary -134 key: value of environement parameter -135 value: structure -136 """ -137 import diffpy.srrietveld.xmlinterface as XI -138 import diffpy.srrietveld.auxiliary as AX -139 import diffpy.srrietveld.midscript as MS -140 -141 # 0. Init -142 envstructuredict = {} -143 -144 # 1. Import XML -145 xmlobj = XI.importXML(xmlfilename) -146 xmldict = XI.xmlToDict(xmlobj) -147 rootdict = xmldict["SEQFIT"][0] -148 -149 # 2. Parse each refine -150 refinelist = rootdict["REFINE"] -151 for singlefit in refinelist: -152 # key = 'RefineInfo', 'SavedFile', 'Value', 'Structure' -153 dictstructure = singlefit["Structure"] -154 tempstructure = [] -155 for phasedict in dictstructure: -156 # key = 'a', 'c', 'b', 'Name', 'ATOM', 'beta', 'SpaceGroup', 'alpha', 'Type', 'gamma' -157 -158 # a) generate a Lattice -159 a = float(phasedict["a"].split("+-")[0]) -160 b = float(phasedict["b"].split("+-")[0]) -161 c = float(phasedict["c"].split("+-")[0]) -162 alpha = float(phasedict["alpha"].split("+-")[0]) -163 beta = float(phasedict["beta"].split("+-")[0]) -164 gamma = float(phasedict["gamma"].split("+-")[0]) -165 lattice = MS.genLattice(a, b, c, alpha, beta, gamma) -166 -167 # b) generate the phase -168 spacegroup = str(phasedict["SpaceGroup"]) -169 phasename = str(phasedict["Name"]) -170 phase = MS.initCrystalPhase(lattice, spacegroup, phasename) -171 tempstructure.append(phase) -172 -173 # c) atom -174 for atomdict in phasedict["ATOM"]: -175 # 'occ', 'Element', 'Biso', 'Tag', 'y', 'x', 'z' -176 elem = str( atomdict["Element"] ) -177 tag = str( atomdict["Tag"] ) -178 x = float( atomdict["x"].split("+-")[0] ) -179 y = float( atomdict["y"].split("+-")[0] ) -180 z = float( atomdict["z"].split("+-")[0] ) -181 occ = float( atomdict["occ"].split("+-")[0] ) -182 # specify Uiso/Biso, Biso is the internal standard -183 bisostring = str( atomdict["Biso"].split("+-")[0] ) -184 if bisostring != "": -185 biso = float(bisostring) -186 else: -187 uiso = float(atomnode.getAttribute("Uiso")) -188 biso = 8*math.pi*math.pi*uiso -189 # END-IF-ELSE -190 -191 # b. add atom -192 MS.addAtom(phase, atomtype=elem, fractcoordinate=(x, y, z), -193 occ=occ, biso=biso, atomtag=tag) -194 # LOOP-OVER: Atom -195 # LOOP-OVER for phasedict in structure -196 -197 # 3. Add to return dictionary -198 envparval = float(singlefit["Value"]) -199 envstructuredict[envparval] = tempstructure -200 -201 # LOOP OVER -- for atomnode in phasenode.childNodes: -202 -203 return envstructuredict -
      204 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilunits-module.html b/static_root/doc/srrietveld/developers/srrietveld.utilunits-module.html deleted file mode 100644 index 35a08160..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilunits-module.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - srrietveld.utilunits - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilunits - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module utilunits

      source code

      -Convert the unit between 2-theta/time-of-flight and d-spacing

      - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      convertTOFtoD(dtt1, - dtt2, - zero, - tof)
      - Convert TOF to d, as...
      - source code - -
      - -
      -   - - - - - - -
      convertDtoTOF(dtt1, - dtt2, - zero, - d)
      - Convert d to TOF as...
      - source code - -
      - -
      -   - - - - - - -
      convert2THETAtoD(wavelength, - zero, - twotheta)
      - Convert 2theta data to d-spacing data...
      - source code - -
      - -
      -   - - - - - - -
      convertDto2THETA(wavelength, - zero, - d)
      - Convert d-spacing data to 2theta unit...
      - source code - -
      - -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: utilunits.py 2798 2009-03-03 19:49:19Z wdzhou $' -
      -   - - CONST_DEGREEARC = 0.0174532925199 -
      -   - - CONST_ARCDEGREE = 57.2957795131 -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      convertTOFtoD(dtt1, - dtt2, - zero, - tof) -

      -
      source code  -
      - -
      -
      -Convert TOF to d, as
      -   TOF = Zero + Dtt1 d + Dtt2 d2
      --> Dtt2 d^2 + Dtt1 d + (Zero-TOF) = 0
      -
      -Argument:
      -- dtt1  :   float
      -- dtt2  :   float
      -- zero  :   float
      -- tof   :   float
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      convertDtoTOF(dtt1, - dtt2, - zero, - d) -

      -
      source code  -
      - -
      -
      -Convert d to TOF as
      -TOF = Zero+Dtt1 d + Dtt2 d^2
      -
      -Argument:
      -- dtt1  :   float
      -- dtt2  :   float
      -- zero  :   float
      -- tof   :   float
      -
      -Return  :   float (tof)
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      convert2THETAtoD(wavelength, - zero, - twotheta) -

      -
      source code  -
      - -
      -
      -Convert 2theta data to d-spacing data
      -d = lambda/2sin(theta)
      -
      -Argument:
      -- wavelength    :   float
      -- twotheta      :   float
      -
      -Return          :   float
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      convertDto2THETA(wavelength, - zero, - d) -

      -
      source code  -
      - -
      -
      -Convert d-spacing data to 2theta unit
      -2theta = 2*arcsin(lambda/2d)
      -
      -Argument:
      -- wavelength    :   float
      -- d             :   float
      -
      -Return          :   float
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.utilunits-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.utilunits-pysrc.html deleted file mode 100644 index 75e6c10d..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.utilunits-pysrc.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - srrietveld.utilunits - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module utilunits - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.utilunits

      -
      -  1  ############################################################################## 
      -  2  # 
      -  3  # diffpy.srrietveld by DANSE Diffraction group 
      -  4  #                   Simon J. L. Billinge 
      -  5  #                   (c) 2008 Trustees of the Columbia University 
      -  6  #                   in the City of New York.  All rights reserved. 
      -  7  # 
      -  8  # File coded by:    Wenduo Zhou 
      -  9  # 
      - 10  # See AUTHORS.txt for a list of people who contributed. 
      - 11  # See LICENSE.txt for license information. 
      - 12  # 
      - 13  ############################################################################## 
      - 14  """ 
      - 15  Convert the unit between 2-theta/time-of-flight and d-spacing 
      - 16  """ 
      - 17  __id__ = "$Id: utilunits.py 2798 2009-03-03 19:49:19Z wdzhou $" 
      - 18   
      - 19  import math 
      - 20   
      - 21  CONST_DEGREEARC = math.pi/180.0 
      - 22  CONST_ARCDEGREE = 180.0/math.pi 
      - 23   
      -
      24 -def convertTOFtoD(dtt1, dtt2, zero, tof): -
      25 """ - 26 Convert TOF to d, as - 27 TOF = Zero + Dtt1 d + Dtt2 d2 - 28 -> Dtt2 d^2 + Dtt1 d + (Zero-TOF) = 0 - 29 - 30 Argument: - 31 - dtt1 : float - 32 - dtt2 : float - 33 - zero : float - 34 - tof : float - 35 """ - 36 a = dtt2 - 37 b = dtt1 - 38 c = zero-tof - 39 - 40 p1 = b*b-4*a*c - 41 if p1 < 0: - 42 raise NotImplementedError("b^2-4ac < 0") - 43 - 44 solution1 = 1/(2*a) * (-b + math.sqrt(p1)) - 45 solution2 = 1/(2*a) * (-b - math.sqrt(p1)) - 46 - 47 if solution1 > 0 and solution2 > 2 and False: - 48 print "Input = %-15s solution1 = %-15s solution2 = %-15s"% \ - 49 (tof, solution1, solution2) - 50 - 51 if solution1 > solution2: - 52 if solution2 > 0: - 53 rsol = solution2 - 54 else: - 55 rsol = solution1 - 56 else: - 57 if solution1 > 0: - 58 rsol = solution1 - 59 else: - 60 rsol = solution2 - 61 - 62 return rsol -
      63 - 64 -
      65 -def convertDtoTOF(dtt1, dtt2, zero, d): -
      66 """ - 67 Convert d to TOF as - 68 TOF = Zero+Dtt1 d + Dtt2 d^2 - 69 - 70 Argument: - 71 - dtt1 : float - 72 - dtt2 : float - 73 - zero : float - 74 - tof : float - 75 - 76 Return : float (tof) - 77 """ - 78 tof = zero + dtt1*d + dtt2*d*2 - 79 - 80 return tof -
      81 - 82 -
      83 -def convert2THETAtoD(wavelength, zero, twotheta): -
      84 """ - 85 Convert 2theta data to d-spacing data - 86 d = lambda/2sin(theta) - 87 - 88 Argument: - 89 - wavelength : float - 90 - twotheta : float - 91 - 92 Return : float - 93 """ - 94 d = 0.5 * ( 1.0 / math.sin( (twotheta-zero) * 0.50 * CONST_DEGREEARC ) ) * wavelength - 95 - 96 return d -
      97 - 98 -
      99 -def convertDto2THETA(wavelength, zero, d): -
      100 """ -101 Convert d-spacing data to 2theta unit -102 2theta = 2*arcsin(lambda/2d) -103 -104 Argument: -105 - wavelength : float -106 - d : float -107 -108 Return : float -109 """ -110 twotheta = 2.0*math.asin(wavelength*0.5/d)*CONST_ARCDEGREE + zero -111 -112 return twotheta -
      113 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.viewer3d-module.html b/static_root/doc/srrietveld/developers/srrietveld.viewer3d-module.html deleted file mode 100644 index 45371331..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.viewer3d-module.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - srrietveld.viewer3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module viewer3d - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module viewer3d

      source code

      -This module contains the method to do 3D viewer to a Phase - instance.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      set3DViewer(viewer)
      - Set the 3d structure viewer.
      - source code - -
      - -
      -   - - - - - - -
      plotPhase(pha)
      - Plot a phase object with the selected backend.
      - source code - -
      - -
      -   - - - - - - -
      GetSpaceGroup(spcgrpfp)
      - get a diffpy.Struture.SpaceGroup from the short-name/symbol of a - space group
      - source code - -
      - -
      -   - - - - - - -
      viewer3D(phase, - flag='VMD')
      - 3D viwer of a phase
      - source code - -
      - -
      -   - - - - - - -
      startVMD()
      - starting the VMDcontrol
      - source code - -
      - -
      -   - - - - - - -
      startPyMol()
      - starting the PyMolControl()
      - source code - -
      - -
      -   - - - - - - -
      checkExternalPackage(appname)
      - check whether the external package exists in $PATH or not...
      - source code - -
      - -
      - - - - - - - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: viewer3d.py 2792 2009-03-02 15:56:43Z wdzhou $' -
      -   - - _viewer = 'vmd' -
      -   - - _viewers = ['pymol', 'vmd'] -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      set3DViewer(viewer) -

      -
      source code  -
      - -

      Set the 3d structure viewer.

      - viewer -- "pymol" or "vmd" -
      -
      -
      -
      - -
      - -
      - - -
      -

      plotPhase(pha) -

      -
      source code  -
      - -

      Plot a phase object with the selected backend.

      - FIXME - Get this working in another thread or process. -
      -
      -
      -
      - -
      - -
      - - -
      -

      GetSpaceGroup(spcgrpfp) -

      -
      source code  -
      - -

      get a diffpy.Struture.SpaceGroup from the short-name/symbol of a space - group

      -

      Arguments: spcgrpfp -- string, space group name/symbol

      - return -- diffpy.Structure.SpaceGroup instanc3 -
      -
      -
      -
      - -
      - -
      - - -
      -

      viewer3D(phase, - flag='VMD') -

      -
      source code  -
      - -

      3D viwer of a phase

      -

      Argument: phase -- diffpy.rietveldapi.Phase instance flag -- - string, flag for using vmd or pymol

      - return -- None -
      -
      -
      -
      - -
      - -
      - - -
      -

      startVMD() -

      -
      source code  -
      - -

      starting the VMDcontrol

      - return -- VMDControl instance -
      -
      -
      -
      - -
      - -
      - - -
      -

      startPyMol() -

      -
      source code  -
      - -

      starting the PyMolControl()

      - return -- PyMolControl instance -
      -
      -
      -
      - -
      - -
      - - -
      -

      checkExternalPackage(appname) -

      -
      source code  -
      - -
      -
      -check whether the external package exists in $PATH or not
      -
      -appname --  string, external package name
      -            for example: fp2k, pymol, vmd_LINUX
      -
      -return  --  True/False
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.viewer3d-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.viewer3d-pysrc.html deleted file mode 100644 index ad62711b..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.viewer3d-pysrc.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - srrietveld.viewer3d - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module viewer3d - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.viewer3d

      -
      -  1  #!/usr/bin/env python 
      -  2  ############################################################################## 
      -  3  # 
      -  4  # diffpy.srrietveld by DANSE Diffraction group 
      -  5  #                   Simon J. L. Billinge 
      -  6  #                   (c) 2008 Trustees of the Columbia University 
      -  7  #                   in the City of New York.  All rights reserved. 
      -  8  # 
      -  9  # File coded by:    Wenduo Zhou 
      - 10  # 
      - 11  # See AUTHORS.txt for a list of people who contributed. 
      - 12  # See LICENSE.txt for license information. 
      - 13  # 
      - 14  ############################################################################## 
      - 15  """ 
      - 16  This module contains the method to do 3D viewer to a Phase instance. 
      - 17  """ 
      - 18  # FIXME - Allow user to set path to visualizer 
      - 19   
      - 20  __id__ = "$Id: viewer3d.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      - 21   
      - 22  import diffpy.Structure 
      - 23  from   diffpy.refinementapi.exceptiontools import verifyType 
      - 24  from viserrors import VisualizationError 
      - 25   
      - 26  _viewer = "vmd" 
      - 27  _viewers = ["pymol", "vmd"] 
      - 28   
      -
      29 -def set3DViewer(viewer): -
      30 """Set the 3d structure viewer. - 31 - 32 viewer -- "pymol" or "vmd" - 33 """ - 34 if viewer not in _viewers: - 35 msg = "3D viewer '%s' invalid. Viewer must be one of %s" %(viewer, - 36 _viewers) - 37 raise VisualizationError(msg) - 38 global _viewer - 39 _viewer = viewer - 40 return -
      41 -
      42 -def plotPhase(pha): -
      43 """Plot a phase object with the selected backend. - 44 - 45 FIXME - Get this working in another thread or process. - 46 """ - 47 viewer3D(pha, _viewer) - 48 return -
      49 -
      50 -def GetSpaceGroup(spcgrpfp): -
      51 """ - 52 get a diffpy.Struture.SpaceGroup from the short-name/symbol of - 53 a space group - 54 - 55 Arguments: - 56 spcgrpfp -- string, space group name/symbol - 57 - 58 return -- diffpy.Structure.SpaceGroup instanc3 - 59 """ - 60 import diffpy.Structure.SpaceGroups as DiffSpaceGroup - 61 - 62 spacegroupdp = DiffSpaceGroup.GetSpaceGroup(spcgrpfp) - 63 - 64 if spcgrpfp != "P1": - 65 if spacegroupdp.number == 1: - 66 # cannot find right one, return P1.number = 1 - 67 # then insert '-' before the number - 68 newspcgrp = "" - 69 for i in xrange(len(spcgrpfp)): - 70 if spcgrpfp[i] >= '0' and spcgrpfp[i] <= '9': - 71 newspcgrp += "-" - 72 newspcgrp += spcgrpfp[i] - 73 print "new: %-15s old: %-15s"%(newspcgrp, spcgrpfp) - 74 - 75 spacegroupdp = DiffSpaceGroup.GetSpaceGroup(newspcgrp) - 76 - 77 # check - 78 if spacegroupdp.number == 1: - 79 errmsg = "viewer3d.GetSpaceGroup(): Input Space Group %-15s and Its Variation %-15s"%\ - 80 (spcgrpfp, newspcgrp) - 81 errmsg += "Not Accepted by diffpy.Structure" - 82 raise VisualizationError(errmsg) - 83 - 84 return spacegroupdp -
      85 - 86 -
      87 -def viewer3D(phase, flag="VMD"): -
      88 """ - 89 3D viwer of a phase - 90 - 91 Argument: - 92 phase -- diffpy.rietveldapi.Phase instance - 93 flag -- string, flag for using vmd or pymol - 94 - 95 return -- None - 96 """ - 97 import numpy - 98 import copy - 99 from diffpy.rietveldapi.phases import Phase -100 import diffpy.Structure.SpaceGroups as DiffSpaceGroup -101 import diffpy.Structure.atom as DiffpyAtom -102 import diffpy.Structure.lattice as DiffpyLattice -103 from diffpy.Structure.SymmetryUtilities import ExpandAsymmetricUnit -104 import diffpy.Structure as DiffpyStructure -105 -106 verifyType(phase, Phase) -107 verifyType(flag, str) -108 -109 # 1. phase group -110 spacegroupstr = phase.getSpaceGroup() -111 spcgrp = "" -112 for i in xrange(len(spacegroupstr)): -113 if spacegroupstr[i] != " ": -114 spcgrp += spacegroupstr[i] -115 spacegroupdp = GetSpaceGroup(spcgrp) -116 -117 # 2. atom -118 coreatomdplist = [] -119 corepositionlist = [] -120 for i in xrange(phase.getNumAtoms()): -121 atomrt = phase.getAtom(i) -122 element = atomrt.getElement() -123 xyzrt = atomrt.getFractionalCoordinates() -124 xyz = numpy.array([xyzrt[0], xyzrt[1], xyzrt[2]]) -125 name = atomrt.getTag() -126 occ = atomrt.getOccupancy() -127 atomdp = DiffpyAtom.Atom(element, xyz, name, occ) -128 corepositionlist.append(xyz) -129 coreatomdplist.append(atomdp) -130 -131 # 3. expanded -132 if spacegroupdp.number == 227: -133 expandedunit = ExpandAsymmetricUnit(spacegroupdp, corepositionlist, sgoffset=[0.125, 0.125, 0.125]) -134 else: -135 expandedunit = ExpandAsymmetricUnit(spacegroupdp, corepositionlist) -136 expandedpos = expandedunit.expandedpos -137 atomlist = [] -138 for i in xrange(len(coreatomdplist)): -139 positionlist = expandedpos[i] -140 coreatom = coreatomdplist[i] -141 for position in positionlist: -142 atom = copy.copy(coreatom) -143 atom.xyz = position -144 atomlist.append(atom) -145 -146 #print type(expandedpos) -147 #print type(expandedpos[0]) -148 #print len(expandedpos[0]) -149 -150 # 3. Lattice -151 latticert = phase.getLattice() -152 a = latticert.geta() -153 b = latticert.getb() -154 c = latticert.getc() -155 alpha = latticert.getalpha() -156 beta = latticert.getbeta() -157 gamma = latticert.getgamma() -158 latticedp = DiffpyLattice.Lattice(a, b, c, alpha, beta, gamma) -159 -160 # 4. Structure -161 structuredp = DiffpyStructure.Structure(atomlist, latticedp) -162 -163 print structuredp -164 -165 # start 3d viewer control -166 if flag[0].lower() == "v": -167 control3d = startVMD() -168 elif flag[0].lower() == "p": -169 control3d = startPyMol() -170 else: -171 errmsg = "3D viewer '%s' invalid. Viewer must be one of %s" %(flag, -172 _viewers) -173 raise VisualizationError(errmsg) -174 -175 if control3d is not None: -176 control3d.start() -177 plt = control3d.plot(structuredp) -178 raw_input('press any key') -179 control3d.stop() -180 -181 return -
      182 -183 -
      184 -def startVMD(): -
      185 """ -186 starting the VMDcontrol -187 -188 return -- VMDControl instance -189 """ -190 if not checkExternalPackage("vmd_LINUX"): -191 print "vmd is not available in current system" -192 return -193 -194 from StructureViewer.vmdcontrol import VMDControl -195 -196 vmd = VMDControl('vmd_LINUX') -197 -198 return vmd -
      199 -200 -
      201 -def startPyMol(): -
      202 """ -203 starting the PyMolControl() -204 -205 return -- PyMolControl instance -206 """ -207 if not checkExternalPackage("pymol"): -208 print "pymol is not available in current system" -209 return -210 -211 try: -212 from StructureViewer.pymolcontrol import PymolControl -213 pymol = PymolControl() -214 return pymol -215 except Exception, err: -216 errmsg = "view3d cannot start PyMolControl due to \n" -217 errmsg += str(err) -218 raise VisualizationError(errmsg) -219 -220 return -
      221 -222 -
      223 -def checkExternalPackage(appname): -
      224 """ -225 check whether the external package exists in $PATH or not -226 -227 appname -- string, external package name -228 for example: fp2k, pymol, vmd_LINUX -229 -230 return -- True/False -231 """ -232 import os -233 raise NotImplementedError("Need to close all popen returned file threads") -234 -235 cmd = "which "+appname -236 rlist = os.popen3(cmd)[1].readlines() -237 -238 if len(rlist) == 0: -239 return False -240 else: -241 return True -242 -243 return -
      244 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.viserrors-module.html b/static_root/doc/srrietveld/developers/srrietveld.viserrors-module.html deleted file mode 100644 index c9d56057..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.viserrors-module.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - srrietveld.viserrors - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module viserrors - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module viserrors

      source code

      -This module contains exceptions related to visualization.

      - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - VisualizationError
      - Base class for all visualization errors. -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: viserrors.py 2792 2009-03-02 15:56:43Z wdzhou $' -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.viserrors-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.viserrors-pysrc.html deleted file mode 100644 index 27f8ac39..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.viserrors-pysrc.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - srrietveld.viserrors - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module viserrors - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.viserrors

      -
      - 1  #!/usr/bin/env python 
      - 2  ############################################################################## 
      - 3  # 
      - 4  # diffpy.srrietveld by DANSE Diffraction group 
      - 5  #                   Simon J. L. Billinge 
      - 6  #                   (c) 2008 Trustees of the Columbia University 
      - 7  #                   in the City of New York.  All rights reserved. 
      - 8  # 
      - 9  # File coded by:    Wenduo Zhou 
      -10  # 
      -11  # See AUTHORS.txt for a list of people who contributed. 
      -12  # See LICENSE.txt for license information. 
      -13  # 
      -14  ############################################################################## 
      -15  """This module contains exceptions related to visualization.""" 
      -16   
      -17  __id__ = "$Id: viserrors.py 2792 2009-03-02 15:56:43Z wdzhou $" 
      -18   
      -
      19 -class VisualizationError(Exception): -
      20 """Base class for all visualization errors.""" -21 -
      22 - def __init__(self, info): -
      23 """Instantiate the error. -24 -25 Arguments -26 info -- Description of the error (string). -27 -28 Returns None -29 """ -30 Exception.__init__(self) -31 self.info = info -32 return -
      33 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.viserrors.VisualizationError-class.html b/static_root/doc/srrietveld/developers/srrietveld.viserrors.VisualizationError-class.html deleted file mode 100644 index 77341c60..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.viserrors.VisualizationError-class.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - srrietveld.viserrors.VisualizationError - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module viserrors :: - Class VisualizationError - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class VisualizationError

      source code

      -
      -              object --+        
      -                       |        
      -exceptions.BaseException --+    
      -                           |    
      -        exceptions.Exception --+
      -                               |
      -                              VisualizationError
      -
      - -
      -Base class for all visualization errors.

      - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - info)
      - Instantiate the error.
      - source code - -
      - -
      -

      Inherited from exceptions.Exception: - __new__ -

      -

      Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__ -

      -

      Inherited from object: - __hash__, - __reduce_ex__ -

      -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from exceptions.BaseException: - args, - message -

      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - info) -
      (Constructor) -

      -
      source code  -
      - -

      Instantiate the error.

      -

      Arguments info -- Description of the error (string).

      - Returns None -
      -
      Overrides: - exceptions.Exception.__init__ -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlconvertor-module.html b/static_root/doc/srrietveld/developers/srrietveld.xmlconvertor-module.html deleted file mode 100644 index 571b648f..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlconvertor-module.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - srrietveld.xmlconvertor - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlconvertor - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module xmlconvertor

      source code

      -

      xmlconvertor.py is to convert input file to xml format

      -

      Convertor will include a. cifToxml b. struToxml

      - Created on 2009.03.06

      - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - cifToxml
      - read cif file and write xml -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlconvertor-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.xmlconvertor-pysrc.html deleted file mode 100644 index 733985fc..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlconvertor-pysrc.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - srrietveld.xmlconvertor - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlconvertor - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.xmlconvertor

      -
      - 1  #!/usr/bin/env python
       
      - 2  ################################################################################
       
      - 3  #
       
      - 4  #  by DANSE Diffraction group
       
      - 5  #               Simon J. L. Billinge
       
      - 6  #           (c) 2009 trustees of the Columbia University in the City of New York
       
      - 7  # All rights reserved.
       
      - 8  #
       
      - 9  # File coded by:    Peng Tian
       
      -10  #
       
      -11  # See AUTHORS.txt for a list of people who contributed.
       
      -12  # See LICENSE.txt for license information.
       
      -13  #
       
      -14  ################################################################################
       
      -15  """xmlconvertor.py is to convert input file to xml format
       
      -16  
       
      -17     Convertor will include
       
      -18     a. cifToxml
       
      -19     b. struToxml
       
      -20  
       
      -21     Created on  2009.03.06
       
      -22  """ 
      -23  import diffpy.srrietveld.phasescript as PS 
      -24  import diffpy.srrietveld.xmlgenerator as XG 
      -25  
       
      -
      26 -class cifToxml(XG.XMLGenerator): -
      27 """read cif file and write xml""" -28 -
      29 - def __init__(self, filename, nouncertaintyoutput=False): -
      30 """initalization""" -31 self._filename = filename -32 XG.XMLGenerator.__init__(self, nouncertaintyoutput=False) -33 return -
      34 -
      35 - def generateXML(self): -
      36 """generate XML nodes""" -37 phaseinfo = PS.genPhaseCIF(self._filename) -38 # init root node -39 self._modelnode = self._rietxml.createElement("MODEL") -40 self._rietxml.appendChild(self._modelnode) -41 # assume only one phase in one cif file -42 phasenode = self._rietxml.createElement("PHASE") -43 self.setNodeFromDict(phasenode, phaseinfo) -44 self._modelnode.appendChild(phasenode) -45 return -
      46 -47 if __name__ == "__main__": -48 import sys -49 filename = sys.argv[1] -50 outfilename = sys.argv[-1].split(".")[0] + ".xml" -51 # check whether the file exists -52 try: -53 ofile = open(filename, "r") -54 ofile.close() -55 except IOError, err: -56 errmsg = "%-10s Cannot Be Found"% (filename) -57 raise IOError(errmsg) -58 -59 format = filename.split(".")[-1] -60 if format == "cif": -61 cifxml = cifToxml(filename) -62 cifxml.exportXML(outfilename) -63 else: -64 raise NotImplementedError -65 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlconvertor.cifToxml-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlconvertor.cifToxml-class.html deleted file mode 100644 index 83c8b4ae..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlconvertor.cifToxml-class.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - srrietveld.xmlconvertor.cifToxml - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlconvertor :: - Class cifToxml - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class cifToxml

      source code

      -
      -diffpy.srrietveld.xmlgenerator.XMLGenerator --+
      -                                              |
      -                                             cifToxml
      -
      - -
      -read cif file and write xml

      - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - filename, - nouncertaintyoutput=False)
      - initalization
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - generate XML nodes
      - source code - -
      - -
      -

      Inherited from diffpy.srrietveld.xmlgenerator.XMLGenerator: - exportXML, - setNodeFromDict -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - filename, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - - initalization -
      -
      Overrides: - diffpy.srrietveld.xmlgenerator.XMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - - generate XML nodes -
      -
      Overrides: - diffpy.srrietveld.xmlgenerator.XMLGenerator.generateXML -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator-module.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator-module.html deleted file mode 100644 index 38ae48f1..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator-module.html +++ /dev/null @@ -1,380 +0,0 @@ - - - - - srrietveld.xmlgenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module xmlgenerator

      source code

      -

      Task: Clean this module! and extending for RAPDF and make good - documentation Status: - XrayInstrumentXMLGenerator(InstrumentXMLGenerator) is cleaned;

      -

      Class List:

      - XMLGenerator -
        -
      • - InstrumentXMLGenerator -
          -
        • - ThermalNeutronTOFXMLGenerator -
        • -
        • - TOFXMLGenerator -
        • -
        • - XrayInstrumentXMLGenerator -
        • -
        -
      • -
      • - MeasurementXMLGenerator -
          -
        • - POWGENMeasurementXMLGenerator -
        • -
        • - XrayInstrumentMeasurementXMLGenerator ~ - RAPDFMeasurementXMLGenerator -
        • -
        -
      • -
      - XMLGenerator Methods List: -
        -
      • - External Methods: -
          -
        • - exportXML xmlfname -
        • -
        -
      • -
      • - Internal Methods: -
          -
        • - generateXML defined by extended - class -
        • -
        • - setNodeFromDict xmlnode, infodict -
        • -
        -
      • -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - XMLGenerator
      - Base class to generate an XML file -
      -   - - InstrumentXMLGenerator
      - class to generate an instrument XML file -
      -   - - XrayInstrumentXMLGenerator
      - class to generate an XRD instrument XML file, extending - InstrumentXMLGenerator -
      -   - - TOFXMLGenerator
      - class to generate an Time-of-flight neutron instrument XML - file -
      -   - - ThermalNeutronTOFXMLGenerator
      - class to generate an XRD instrument XML file -
      -   - - ModelXMLGenerator
      - Generate Model XML -
      -   - - MeasurementXMLGenerator
      - Base class to generate measurement XML -
      -   - - POWGENMeasurementXMLGenerator
      - XML generator of measurement for POWGEN only -
      -   - - TOFMeasurementXMLGenerator
      - XML generator of measurement for general TOF -
      -   - - NPDFMeasurementXMLGenerator
      - Measurement XML for NPDF -
      -   - - GEMMeasurementXMLGenerator
      - Measurement XML for GEM -
      -   - - XrayInstrumentMeasurementXMLGenerator
      - XML Measurement generator for Xray instrument -
      -   - - NeutronCWInstrumentMeasurementXMLGenerator
      - Neutron CW Instrument Measurement generator for constant wave - length neutron instrument -
      -   - - RAPDFMeasurementXMLGenerator
      - XML Generator for RAPDF -
      -   - - RefineStrategyXMLGenerator
      - Generate Refine Strategy Based On RefineGuides -
      -   - - ExcludedRegionXMLGenerator
      - Generate XML files for excluded regions -
      -   - - SeqFitRecordXMLGenerator
      - class to generate an instrument XML file -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: xmlgenerator.py 2918 2009-03-18 19:26:39Z wdzho... -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: xmlgenerator.py 2918 2009-03-18 19:26:39Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator-pysrc.html deleted file mode 100644 index f2a8699c..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator-pysrc.html +++ /dev/null @@ -1,2570 +0,0 @@ - - - - - srrietveld.xmlgenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.xmlgenerator

      -
      -   1  ############################################################################## 
      -   2  # 
      -   3  # diffpy.srrietveld by DANSE Diffraction group 
      -   4  #                   Simon J. L. Billinge 
      -   5  #                   (c) 2008 Trustees of the Columbia University 
      -   6  #                   in the City of New York.  All rights reserved. 
      -   7  # 
      -   8  # File coded by:    Wenduo Zhou 
      -   9  # 
      -  10  # See AUTHORS.txt for a list of people who contributed. 
      -  11  # See LICENSE.txt for license information. 
      -  12  # 
      -  13  ############################################################################## 
      -  14   
      -  15  """ Task:     Clean this module!  and extending for RAPDF and make good documentation 
      -  16  Status:   XrayInstrumentXMLGenerator(InstrumentXMLGenerator) is cleaned; 
      -  17   
      -  18  Class List: 
      -  19   
      -  20  XMLGenerator 
      -  21    - InstrumentXMLGenerator 
      -  22      - ThermalNeutronTOFXMLGenerator  
      -  23      - TOFXMLGenerator  
      -  24      - XrayInstrumentXMLGenerator 
      -  25    - MeasurementXMLGenerator 
      -  26      - POWGENMeasurementXMLGenerator 
      -  27      - XrayInstrumentMeasurementXMLGenerator 
      -  28        ~ RAPDFMeasurementXMLGenerator 
      -  29   
      -  30  XMLGenerator Methods List: 
      -  31    - External Methods: 
      -  32      - exportXML           xmlfname 
      -  33    - Internal Methods: 
      -  34      - generateXML                             defined by extended class 
      -  35      - setNodeFromDict     xmlnode, infodict 
      -  36  """ 
      -  37  __id__ = "$Id: xmlgenerator.py 2918 2009-03-18 19:26:39Z wdzhou $" 
      -  38   
      -  39  import xml.dom.minidom 
      -  40   
      -
      41 -class XMLGenerator: -
      42 """ - 43 Base class to generate an XML file - 44 """ -
      45 - def __init__(self, nouncertaintyoutput=False): -
      46 """ initalization - 47 """ - 48 # 1. init XML - 49 self._rietxml = xml.dom.minidom.Document() - 50 self._nouncertainty = nouncertaintyoutput - 51 - 52 # 2. generate XML - 53 self.generateXML() - 54 - 55 return -
      56 - 57 -
      58 - def exportXML(self, xmlfname): -
      59 """ Export XML nodes to the designated XML file - 60 - 61 Arguments: - 62 - xmlfname : str, XML file name to output - 63 - 64 Return : None - 65 """ - 66 s = self._rietxml.toprettyxml(indent=" ") - 67 ofile = open(xmlfname, "w") - 68 ofile.write(s) - 69 ofile.close() - 70 - 71 return -
      72 - 73 -
      74 - def generateXML(self): -
      75 """ generate XML nodes - 76 - 77 Arguments: - 78 - instrument : Instrument instance - 79 - 80 Return : None - 81 """ - 82 errmsg = "XMLGenerator is Virtual; Need to Implement generateXML of class %-20s"% \ - 83 (self.__class__.__name__) - 84 raise NotImplementedError(errmsg) -
      85 - 86 -
      87 - def setNodeFromDict(self, xmlnode, infodict): -
      88 """ Recursive method ... to set up an XML from a dictionary - 89 - 90 Rule: If a value in infodict element is tuple, it means that this is a float+/- uncertainty - 91 - 92 Argument: - 93 - xmlnode : XML node - 94 - infodict : dictionary, stanard diffpy.srrietveld definition (see developer's doc) - 95 - 96 Return : None - 97 """ - 98 for attribname in sorted(infodict.keys()): - 99 if isinstance(infodict[attribname], dict): - 100 # set child node for dictionary: recursive - 101 subnodename = attribname - 102 subnode = self._rietxml.createElement(subnodename) - 103 subinfodict = infodict[subnodename] - 104 self.setNodeFromDict(subnode, subinfodict) - 105 xmlnode.appendChild(subnode) - 106 elif isinstance(infodict[attribname], list): - 107 # set child node from list: recursive - 108 subnodename = attribname - 109 for subinfodict in infodict[attribname]: - 110 subnode = self._rietxml.createElement(subnodename) - 111 self.setNodeFromDict(subnode, subinfodict) - 112 xmlnode.appendChild(subnode) - 113 elif isinstance(infodict[attribname], tuple): - 114 # attribute, with uncertainty - 115 value = infodict[attribname][0] - 116 if self._nouncertainty is True: - 117 xmlvalue = str(value) - 118 else: - 119 sigma = infodict[attribname][1] - 120 xmlvalue = str(value)+"+-"+str(sigma) - 121 xmlnode.setAttribute(attribname, xmlvalue) - 122 else: - 123 # attribute - 124 xmlvalue = str(infodict[attribname]) - 125 xmlnode.setAttribute(attribname, xmlvalue) - 126 # LOOP-OVER: for attribname in infodict.keys() - 127 - 128 return -
      129 - 130 - 131 # END-CLASS: XMLGenerator - 132 - 133 -
      134 -class InstrumentXMLGenerator(XMLGenerator): -
      135 """ class to generate an instrument XML file - 136 """ -
      137 - def __init__(self, myinstrument, nouncertaintyoutput = False): -
      138 """ initalization - 139 - 140 Argument - 141 - myinstrument : Instrument - 142 - nouncertaintyoutput : boolean. If yes, then will put uncertainty in output - 143 XML file - 144 - 145 Return : None - 146 """ - 147 # Set class instrument - 148 self._myInstrument = myinstrument - 149 - 150 # Call base class initialization - 151 XMLGenerator.__init__(self, nouncertaintyoutput) - 152 - 153 return -
      154 - 155 -
      156 - def generateXML(self): -
      157 """ generate XML nodes including: - 158 1. root node - 159 - 160 Arguments: - 161 - 162 Return : None - 163 """ - 164 instrumentname = self._myInstrument.getName() - 165 instrumenttype = self._myInstrument.getType() - 166 - 167 self._instrumentnode = self._rietxml.createElement("INSTRUMENT") - 168 self._instrumentnode.setAttribute("Name", instrumentname) - 169 self._instrumentnode.setAttribute("Type", instrumenttype) - 170 - 171 self._rietxml.appendChild(self._instrumentnode) - 172 - 173 return -
      174 - 175 -
      176 - def genExcludedRegion(self, start, end, bankno=0): -
      177 """ generate an excluded region string with 3 attributes - 178 - 179 Arguments: - 180 - start : float, starting position of excluded region - 181 - end : float, ending position of excluded region - 182 - bankno : int, bank number index - 183 - 184 Return : XML node - 185 """ - 186 ex = self._rietxml.createElementNS("", "EXCLUDEDREGION") - 187 ex.setAttribute("start", str(start)) - 188 ex.setAttribute("end" , str(end)) - 189 ex.setAttribute("Bank" , str(bankno)) - 190 - 191 return ex -
      192 - 193 -
      194 - def genDataProperty(self): -
      195 """ generate the properties of data - 196 - 197 Return : xml element - 198 """ - 199 # FIXME - Not used now. Need clear definition of this function - 200 errmsg = "This method is not defined well... Need new definition from use case" - 201 raise NotImplementedError(errmsg) - 202 - 203 df = self._rietxml.createElement("PATTERN") - 204 - 205 df.setAttribute("DataFile", datafilename) - 206 df.setAttribute("Min", str(thmin)) - 207 df.setAttribute("Max", str(thmax)) - 208 df.setAttribute("Resolution", str(resolution)) - 209 - 210 return df -
      211 - 212 -
      213 -class XrayInstrumentXMLGenerator(InstrumentXMLGenerator): -
      214 """ class to generate an XRD instrument XML file, - 215 extending InstrumentXMLGenerator - 216 """ - 217 XMLInstrumentMapDict = { - 218 "wavelength1" : "Lambda", - 219 "peakprofiletype" : "PeakProfile", - 220 "resolution" : "Resolution", - 221 "scale" : "Scale", - 222 } - 223 -
      224 - def __init__(self, myinstrument, nouncertaintyoutput=False): -
      225 """ initalization - 226 """ - 227 import instrument as IST - 228 if not isinstance(myinstrument, IST.XrayInstrument): - 229 errmsg = "Input Type Error" - 230 raise NotImplementedError(errmsg) - 231 - 232 InstrumentXMLGenerator.__init__(self, myinstrument, nouncertaintyoutput) - 233 - 234 return -
      235 - 236 -
      237 - def generateXML(self): -
      238 """ generate an Xray instrument - 239 - 240 Return : None - 241 """ - 242 InstrumentXMLGenerator.generateXML(self) - 243 - 244 # 2.1 get information dictionary from instrument - 245 infodict = self._myInstrument._infodict - 246 - 247 # 2.2 generate bank-node - 248 self.setNodeFromDict(self._instrumentnode, infodict) - 249 - 250 # 2.3 Pretty appearance w/o lambda2 - 251 if not self._myInstrument._infodict["ENERGY"].has_key("Lambda2"): - 252 # 1. Genearte value - 253 wavelength2 = self._myInstrument._infodict["ENERGY"]["Lambda"] - 254 ratio = 0.0 - 255 # 2. get node - 256 for childnode in self._instrumentnode.childNodes: - 257 if childnode.localName == "ENERGY": - 258 energynode = childnode - 259 break - 260 # 3. set up - 261 energynode.setAttribute("Lambda2", str(wavelength2)) - 262 energynode.setAttribute("Ratio", str(ratio)) - 263 return -
      264 - 265 -
      266 - def setNodeFromDict(self, xmlnode, infodict): -
      267 """ Setting up an XML from a dictionary; - 268 It is a Recursive method - 269 Overriding the method in base class - 270 - 271 Argument: - 272 - xmlnode : XML node - 273 - infodict : dictionary, stanard diffpy.srrietveld definition (see developer's doc) - 274 - 275 Return : None - 276 """ - 277 for attribname in sorted(infodict.keys()): - 278 if isinstance(infodict[attribname], dict): - 279 # set child node for dictionary: recursive - 280 subnodename = attribname - 281 subnode = self._rietxml.createElement(subnodename) - 282 subinfodict = infodict[subnodename] - 283 self.setNodeFromDict(subnode, subinfodict) - 284 xmlnode.appendChild(subnode) - 285 - 286 elif isinstance(infodict[attribname], list): - 287 # set child node from list: recursive - 288 subnodename = attribname - 289 for subinfodict in infodict[attribname]: - 290 subnode = self._rietxml.createElement(subnodename) - 291 self.setNodeFromDict(subnode, subinfodict) - 292 xmlnode.appendChild(subnode) - 293 - 294 else: - 295 # attribute - 296 xmlvalue = str(infodict[attribname]) - 297 if self.XMLInstrumentMapDict.has_key(attribname): - 298 xmlname = self.XMLInstrumentMapDict[attribname] - 299 else: - 300 xmlname = attribname - 301 xmlnode.setAttribute(xmlname, xmlvalue) - 302 # END-IF-ELSE - 303 # LOOP-OVER: for attribname in infodict.keys() - 304 - 305 return -
      306 - 307 # END-CLASS: XrayInstrumentXMLGenerator(InstrumentXMLGenerator) - 308 - 309 -
      310 -class TOFXMLGenerator(InstrumentXMLGenerator): -
      311 """ class to generate an Time-of-flight neutron instrument XML file - 312 """ -
      313 - def __init__(self, myinstrument, nouncertaintyoutput=False): -
      314 """ initalization - 315 - 316 Argument: - 317 - myinstrument : Instrument instance - 318 - 319 Return : None - 320 """ - 321 import instrument as IST - 322 - 323 if not isinstance(myinstrument, IST.TOFInstrument): - 324 errmsg = "Input Type Error" - 325 raise NotImplementedError(errmsg) - 326 - 327 InstrumentXMLGenerator.__init__(self, myinstrument, nouncertaintyoutput) - 328 - 329 return -
      330 - 331 -
      332 - def generateXML(self): -
      333 """ Generate a Thermal-neutron instrument node - 334 - 335 Return : None - 336 """ - 337 # 1. call base class function - 338 InstrumentXMLGenerator.generateXML(self) - 339 - 340 # 2. using information dictionary generated by Instrument - 341 for bankno in sorted(self._myInstrument.getBankNumbersList()): - 342 # 2.1 get information dictionary from instrument - 343 bankinfodict = self._myInstrument.getBankInfoDict(bankno) - 344 - 345 # 2.2 generate bank-node - 346 banknode = self._rietxml.createElement("BANK") - 347 self.setNodeFromDict(banknode, bankinfodict) - 348 self._instrumentnode.appendChild(banknode) - 349 - 350 # LOOP-OVER: for bankno in sorted(instrument.getBankNumbersList) - 351 - 352 return -
      353 - 354 # END CLASS: ThermalNeutronTOFXMLGenerator(InstrumentXMLGenerator): - 355 - 356 -
      357 -class ThermalNeutronTOFXMLGenerator(InstrumentXMLGenerator): -
      358 """ class to generate an XRD instrument XML file - 359 """ -
      360 - def __init__(self, myinstrument, nouncertaintyoutput=False): -
      361 """ - 362 initalization - 363 - 364 Argument: - 365 - myinstrument : Instrument instance - 366 - 367 Return : None - 368 """ - 369 import instrument as IST - 370 - 371 if not isinstance(myinstrument, IST.ThermalNeutronTOFInstrument): - 372 errmsg = "Input Type Error" - 373 raise NotImplementedError(errmsg) - 374 - 375 InstrumentXMLGenerator.__init__(self, myinstrument, nouncertaintyoutput) - 376 - 377 return -
      378 - 379 -
      380 - def generateXML(self): -
      381 """ Generate a Thermal-neutron instrument node - 382 - 383 Return : None - 384 """ - 385 # 1. call base class function - 386 InstrumentXMLGenerator.generateXML(self) - 387 - 388 # 2. using information dictionary generated by Instrument - 389 for bankno in sorted(self._myInstrument.getBankNumbersList()): - 390 # 2.1 get information dictionary from instrument - 391 bankinfodict = self._myInstrument.getBankInfoDict(bankno) - 392 - 393 # 2.2 generate bank-node - 394 banknode = self._rietxml.createElement("BANK") - 395 self.setNodeFromDict(banknode, bankinfodict) - 396 self._instrumentnode.appendChild(banknode) - 397 - 398 # LOOP-OVER: for bankno in sorted(instrument.getBankNumbersList) - 399 - 400 return -
      401 - 402 # END CLASS: ThermalNeutronTOFXMLGenerator(InstrumentXMLGenerator): - 403 - 404 -
      405 -class ModelXMLGenerator(XMLGenerator): -
      406 """ Generate Model XML - 407 """ -
      408 - def __init__(self, phaseslist, nouncertaintyoutput=False): -
      409 """ - 410 initialization - 411 """ - 412 self._phaseslist = phaseslist - 413 - 414 XMLGenerator.__init__(self, nouncertaintyoutput) - 415 - 416 return -
      417 - 418 -
      419 - def generateXML(self): -
      420 """ Implement genearte XML - 421 """ - 422 import diffpy.srrietveld.phasescript as PU - 423 - 424 # 1. init root node - 425 self._modelnode = self._rietxml.createElement("MODEL") - 426 self._rietxml.appendChild(self._modelnode) - 427 - 428 # 2. for all phase - 429 for phase in self._phaseslist: - 430 phaseinfodict = PU.genPhaseDict(phase) - 431 phasenode = self._rietxml.createElement("PHASE") - 432 self.setNodeFromDict(phasenode, phaseinfodict) - 433 self._modelnode.appendChild(phasenode) - 434 - 435 return -
      436 - 437 # END-CLASS - 438 - 439 -
      440 -class MeasurementXMLGenerator(XMLGenerator): -
      441 """ Base class to generate measurement XML - 442 """ -
      443 - def __init__(self, datafilename, nouncertaintyoutput=False): -
      444 """ Initialization - 445 """ - 446 self._datafilename = datafilename - 447 - 448 XMLGenerator.__init__(self, nouncertaintyoutput) - 449 - 450 return -
      451 - 452 -
      453 - def generateXML(self): -
      454 """ Implement genearte XML - 455 """ - 456 self._measurementnode = self._rietxml.createElement("MEASUREMENT") - 457 - 458 self._rietxml.appendChild(self._measurementnode) - 459 - 460 return -
      461 - 462 -
      463 -class POWGENMeasurementXMLGenerator(MeasurementXMLGenerator): -
      464 """ XML generator of measurement for POWGEN only - 465 """ -
      466 - def __init__(self, datafilename, nouncertaintyoutput=False): -
      467 """ - 468 Initialization - 469 """ - 470 MeasurementXMLGenerator.__init__(self, datafilename, nouncertaintyoutput) - 471 - 472 return -
      473 - 474 -
      475 - def generateXML(self): -
      476 """ Implement genearte XML - 477 """ - 478 import diffpy.srrietveld.io as SIO - 479 - 480 MeasurementXMLGenerator.generateXML(self) - 481 - 482 banknumber = SIO.readPOWGENDataFile(self._datafilename) - 483 - 484 # Set bank, single bank is different from multiple bank - 485 if banknumber == 1: - 486 self.setBank(0) - 487 else: - 488 for bankno in xrange(1, banknumber+1): - 489 self.setBank(bankno) - 490 - 491 return -
      492 - 493 -
      494 - def setBank(self, banknumber): -
      495 """ set data file to a POWGEN measurement - 496 - 497 Argument: - 498 - banknumber : int - 499 - 500 Return : None - 501 """ - 502 banknode = self._rietxml.createElement("BANK") - 503 - 504 banknode.setAttribute("BankNumber", str(banknumber)) - 505 banknode.setAttribute("DiffractionFileName", self._datafilename) - 506 - 507 self._measurementnode.appendChild(banknode) - 508 - 509 return -
      510 - 511 -
      512 -class TOFMeasurementXMLGenerator(MeasurementXMLGenerator): -
      513 """ XML generator of measurement for general TOF - 514 """ - 515 # FIXME Later POWGEN will be merged to this case! -
      516 - def __init__(self, datafilename, excludedregionsdict, refinerangedict=None, - 517 nouncertaintyoutput=False): -
      518 """ Initialization of TOFMeasurementXMLGenerator - 519 - 520 Argument: - 521 - datafilename : str - 522 - excludedregionsdict: dict, key = banid, value = list of 2-tuples - 523 - refinerangedict : dict, key=bankid, value=(begin, end) - 524 - 525 Return : None - 526 """ - 527 if not self.__dict__.has_key("_bankIDs"): - 528 self._bankIDs = [] - 529 - 530 if not self.__dict__.has_key("_excludedRegions"): - 531 self._excludedRegions = {} - 532 - 533 # 1. Set excluded region - 534 for bankid in sorted(excludedregionsdict.keys()): - 535 self._excludedRegions[bankid] = excludedregionsdict[bankid][:] - 536 - 537 # 2. Refine range if not none! (just pass) - 538 self._refinerangedict = {} - 539 if refinerangedict is not None: - 540 for bankid in refinerangedict.keys(): - 541 self._refinerangedict[bankid] = refinerangedict[bankid] - 542 - 543 # 3. Call base class - 544 MeasurementXMLGenerator.__init__(self, datafilename, nouncertaintyoutput) - 545 - 546 # 4. Set type - 547 self._measurementnode.setAttribute("Type", "TOF") - 548 - 549 return -
      550 - 551 -
      552 - def generateXML(self): -
      553 """ Implement genearte XML - 554 """ - 555 import diffpy.srrietveld.io as SIO - 556 - 557 # 1. Base class - 558 MeasurementXMLGenerator.generateXML(self) - 559 - 560 # 2. Import data file - 561 self._parseDataFile() - 562 - 563 # 3. Build up XML Hierachial: using bank-ID for discontinued bank IDs - 564 self._banknodes = {} - 565 for bankid in self._bankIDs: - 566 banknode = self._rietxml.createElement("BANK") - 567 self._measurementnode.appendChild(banknode) - 568 self._banknodes[bankid] = banknode - 569 - 570 # 4. Set bank - 571 for bankid in self._bankIDs: - 572 self.setBank(bankid) - 573 - 574 return -
      575 - 576 -
      577 - def addExcludedRegion(self, bankid, begin, end): -
      578 """ Add excluded region to bank in TOF - 579 - 580 Argument: - 581 - bankid : int - 582 - begin : float - 583 - end : float - 584 - 585 Return : None - 586 """ - 587 if not self._excludedRegions.has_key(bankid): - 588 self._excludedRegions[bankid] = [] - 589 - 590 self._excludedRegions[bankid].append( (begin, end) ) - 591 - 592 return -
      593 - 594 -
      595 - def setBank(self, bankid): -
      596 """ Set the experiement information to a TOF bank - 597 - 598 Argument: - 599 - bankid : int - 600 - 601 Return : None - 602 """ - 603 minval = self._xs[bankid][0] - 604 maxval = self._xs[bankid][-1] - 605 res = (maxval-minval)/(len(self._xs[bankid])-1) - 606 - 607 banknode = self._banknodes[bankid] - 608 - 609 banknode.setAttribute("ID", str(bankid)) - 610 banknode.setAttribute("DiffractionFileName", self._datafilename) - 611 banknode.setAttribute("Min", str(minval)) - 612 banknode.setAttribute("Max", str(maxval)) - 613 banknode.setAttribute("Resolution", str(res)) - 614 - 615 # 2. Combine Excluded Regions and Refine Range - 616 if self._excludedRegions.has_key(bankid): - 617 excludedregionslist = sorted(self._excludedRegions[bankid]) - 618 else: - 619 excludedregionslist = [] - 620 - 621 if self._refinerangedict.has_key(bankid): - 622 x_begin, x_end = self._refinerangedict[bankid] - 623 if x_begin < minval: - 624 region = (minval-0.1, x_begin) - 625 excludedregionslist.insert(0, region) - 626 if x_end > maxval: - 627 region = (x_end, maxval+0.1) - 628 excludedregionslist.append(region) - 629 - 630 # 3. Write out Excluded regions - 631 setupnode = self._rietxml.createElement("SETUP") - 632 banknode.appendChild(setupnode) - 633 - 634 for region in excludedregionslist: - 635 regionnode = self._rietxml.createElement("EXCLUDEDREGION") - 636 setupnode.appendChild(regionnode) - 637 regionnode.setAttribute("Begin", str(region[0])) - 638 regionnode.setAttribute("End", str(region[1])) - 639 # LOOP-OVER - 640 - 641 return -
      642 - 643 -
      644 -class NPDFMeasurementXMLGenerator(TOFMeasurementXMLGenerator): -
      645 """ Measurement XML for NPDF - 646 """ -
      647 - def __init__(self, datafilenames, bankidlist, excludedregions, rangedict, - 648 nouncertaintyoutput=False): -
      649 """ Initialization - 650 - 651 Requirement: - 652 1. datafilename and bandid must be on the same position in the list - 653 - 654 Argument: - 655 - datafilenames : dict, key - bank ID, value - file name - 656 - bankidlist : list, bank ids - 657 - excludedregions: dict, key: bank ID; Value: list of 2-tupel (begin, end) - 658 - rangedict : dict, key: bank ID: Value: 2-tuple - 659 - 660 Return : None - 661 """ - 662 if not isinstance(datafilenames, dict): - 663 raise NotImplementedError("Input datafilenames is not dict") - 664 - 665 self._datafilenames = datafilenames - 666 self._bankIDs = bankidlist - 667 - 668 TOFMeasurementXMLGenerator.__init__(self, datafilenames, excludedregions, - 669 rangedict, nouncertaintyoutput) - 670 - 671 return -
      672 - 673 -
      674 - def setBank(self, bankid): -
      675 """ Set the experiement information to a TOF-NPDF bank - 676 - 677 Argument: - 678 - bankid : int - 679 - 680 Return : None - 681 """ - 682 minval = self._xs[bankid][0] - 683 maxval = self._xs[bankid][-1] - 684 res = (maxval-minval)/(len(self._xs[bankid])-1) - 685 - 686 banknode = self._banknodes[bankid] - 687 - 688 banknode.setAttribute("ID", str(bankid)) - 689 banknode.setAttribute("DiffractionFileName", self._datafilenames[bankid]) - 690 banknode.setAttribute("Min", str(minval)) - 691 banknode.setAttribute("Max", str(maxval)) - 692 banknode.setAttribute("Resolution", str(res)) - 693 - 694 # 2. Combine Excluded Regions and Refine Range - 695 if self._excludedRegions.has_key(bankid): - 696 excludedregionslist = sorted(self._excludedRegions[bankid]) - 697 else: - 698 excludedregionslist = [] - 699 - 700 if self._refinerangedict.has_key(bankid): - 701 x_begin, x_end = self._refinerangedict[bankid] - 702 if x_begin > minval: - 703 region = (minval-0.1, x_begin) - 704 excludedregionslist.insert(0, region) - 705 if x_end < maxval: - 706 region = (x_end, maxval+0.1) - 707 excludedregionslist.append(region) - 708 - 709 # 3. Write out Excluded regions - 710 setupnode = self._rietxml.createElement("SETUP") - 711 banknode.appendChild(setupnode) - 712 - 713 for region in excludedregionslist: - 714 regionnode = self._rietxml.createElement("EXCLUDEDREGION") - 715 setupnode.appendChild(regionnode) - 716 regionnode.setAttribute("Begin", str(region[0])) - 717 regionnode.setAttribute("End", str(region[1])) - 718 # LOOP-OVER - 719 - 720 return -
      721 - 722 -
      723 - def _parseDataFile(self): -
      724 """ Parse NPDF data file (Fullprof XYSigma) file - 725 - 726 Return : None - 727 """ - 728 import diffpy.srrietveld.datafileconverter as DFP - 729 - 730 self._xs = {} - 731 self._ys = {} - 732 self._ss = {} - 733 - 734 for bankid in self._bankIDs: - 735 p = DFP.NPDFDataParser(self._datafilenames[bankid]) - 736 self._xs[bankid], self._ys[bankid], self._ss[bankid] = p.getData() - 737 - 738 return -
      739 - 740 -
      741 -class GEMMeasurementXMLGenerator(TOFMeasurementXMLGenerator): -
      742 """ Measurement XML for GEM - 743 """ -
      744 - def __init__(self, datafilename, nouncertaintyoutput=False): -
      745 """ - 746 Initialization - 747 """ - 748 TOFMeasurementXMLGenerator.__init__(self, datafilename, nouncertaintyoutput) - 749 - 750 return -
      751 - 752 -
      753 - def _parseDataFile(self): -
      754 """ Parse GEM data file (gss) file - 755 - 756 Return : None - 757 """ - 758 import diffpy.srrietveld.datafileconvert as DFP - 759 - 760 p = DFP.GEMDataParser(self._datafilename) - 761 self._xs, self._ys, self._ss = p.getData() - 762 - 763 for bankid in self._xs.keys(): - 764 self._bankIDs.append(bankid) - 765 - 766 return -
      767 - 768 -
      769 -class XrayInstrumentMeasurementXMLGenerator(MeasurementXMLGenerator): -
      770 """ XML Measurement generator for Xray instrument - 771 """ -
      772 - def __init__(self, datafilename, backgroundpoints, nouncertaintyoutput = False, - 773 crystalname = None, wavelength = None): -
      774 """ Initialization of Xray Instrument Measurement XML file generator - 775 - 776 if the background points is not give but crystal name is given, - 777 the code will generate a background from the wavelength and stored - 778 information - 779 - 780 Argument: - 781 - datafilename : str - 782 - backgroundpoints : list of floats - 783 - crytalname : str - 784 - wavelength : float - 785 - nouncertaintyoutput: boolean, output float with uncertainty or not - 786 """ - 787 # 1. Set up start value - 788 MeasurementXMLGenerator.__init__(self, datafilename, nouncertaintyoutput) - 789 self._crystalname = crystalname - 790 self._wavelength = wavelength - 791 - 792 # 2. Import data file - 793 self._xs, self._ys, self._ss = self._parseDataFile() - 794 self._backgroundpoints = backgroundpoints - 795 - 796 # 3. Build up XML Hierachial - 797 self._expnode = self._rietxml.createElement("EXPERIMENT") - 798 self._measurementnode.appendChild(self._expnode) - 799 - 800 # 4. Set background and data set information - 801 self._measurementnode.setAttribute("Type", "Xray") - 802 self.setBackground() - 803 self.setInstrumentInformation() - 804 - 805 return -
      806 - 807 -
      808 - def setInstrumentInformation(self): -
      809 """ Set instrument information from data file including - 810 1. resolution - 811 2. max value - 812 3. min value - 813 - 814 Assuming that the step is of constant value - 815 - 816 Return : None - 817 """ - 818 xs = self._xs - 819 - 820 minval = xs[0] - 821 maxval = xs[-1] - 822 stepsize = (maxval-minval)/(len(xs)-1) - 823 - 824 self._expnode.setAttribute("DiffractionFileName", self._datafilename) - 825 self._expnode.setAttribute("Resolution", str(stepsize)) - 826 self._expnode.setAttribute("Min", str(minval)) - 827 self._expnode.setAttribute("Max", str(maxval)) - 828 - 829 return -
      830 - 831 -
      832 - def setBackground(self): -
      833 """ Set the XML node for background: - 834 1. if needed, read data file and select the backgrounds points automatically - 835 2. generate the nodes - 836 - 837 Return : None - 838 """ - 839 # 1. Generate background points - 840 if self._backgroundpoints is None and self._crystalname is not None: - 841 # a) if needed, read data file and select the backgrounds points automatically - 842 errmsg = "Algorithm is not matured. Need more consideration" - 843 raise NotImplementedError, errmsg - 844 # 1. - 845 xs = self._xs - 846 ys = self._ys - 847 ss = self._ss - 848 - 849 # 2. Select background - 850 import diffpy.srrietveld.utilbackground as SUBG - 851 bkgdprocess = SUBG.XrayBackgroundProcess(xs, ys) - 852 bkgdlist = bkgdprocess.selectBackgroundPoints(crystname, wavelength) - 853 - 854 elif self._backgroundpoints is not None: - 855 # b) Use user input - 856 bkgdlist = self._backgroundpoints - 857 else: - 858 # c) default - 859 bkgdlist = [] - 860 # END-IF-ELSE - 861 - 862 # 2. generate the nodes - 863 bkgdnode = self._rietxml.createElement("BACKGROUND") - 864 self._expnode.appendChild(bkgdnode) - 865 bkgdnode.setAttribute("Type", "Interpolated") - 866 bkgdnode.setAttribute("FORMAT", "Selected") - 867 for p in bkgdlist: - 868 x = p[0] - 869 y = p[1] - 870 pnode = self._rietxml.createElement("SELECTED") - 871 bkgdnode.appendChild(pnode) - 872 pnode.setAttribute("x", str(x)) - 873 pnode.setAttribute("y", str(y)) - 874 # LOOP-OVER: for p in bkgdlist - 875 - 876 return -
      877 - 878 -
      879 - def _parseDataFile(self): -
      880 """ Paser data file - 881 - 882 Return : 3-tuple, lists of float - 883 """ - 884 # FIXME - Use XYSigma Paser as default. Should recognize it automatically - 885 - 886 import diffpy.srrietveld.datafileconverter as SDV - 887 - 888 p = SDV.RAPDFDataParser(self._datafilename) - 889 - 890 xs, ys, ss = p.getData() - 891 - 892 return (xs, ys, ss) -
      893 - 894 - 895 -
      896 -class NeutronCWInstrumentMeasurementXMLGenerator(MeasurementXMLGenerator): -
      897 """ - 898 Neutron CW Instrument Measurement generator for constant wave length neutron instrument - 899 """ -
      900 - def __init__(self, datafilename, backgroundpoints = None, wavelength = None, - 901 nouncertaintyoutput = False): -
      902 """ Initialization - 903 - 904 Arguments: - 905 - datafilename : str - 906 - backgroundpoints : list of 2-tuple - 907 - wavelength : float - 908 - nouncertaintyoutput: boolean - 909 """ - 910 # 1. Set up start value - 911 MeasurementXMLGenerator.__init__(self, datafilename, nouncertaintyoutput) - 912 self._wavelength = wavelength - 913 self._backgroundpoints = backgroundpoints - 914 - 915 # 2. Import data file - 916 self._xs, self._ys, self._ss = self._parseDataFile() - 917 - 918 # 3. Build up XML Hierachial - 919 self._expnode = self._rietxml.createElement("EXPERIMENT") - 920 self._measurementnode.appendChild(self._expnode) - 921 - 922 # 4. Set background and data set information - 923 self._measurementnode.setAttribute("Type", "NeutronCW") - 924 if self._backgroundpoints is not None: - 925 self.setBackground() - 926 self.setInstrumentInformation() - 927 - 928 return -
      929 - 930 -
      931 - def setInstrumentInformation(self): -
      932 """ Set instrument information from data file including - 933 1. resolution - 934 2. max value - 935 3. min value - 936 - 937 Assuming that the step is of constant value - 938 - 939 Return : None - 940 """ - 941 xs = self._xs - 942 - 943 minval = xs[0] - 944 maxval = xs[-1] - 945 stepsize = (maxval-minval)/(len(xs)-1) - 946 - 947 self._expnode.setAttribute("DiffractionFileName", self._datafilename) - 948 self._expnode.setAttribute("Resolution", str(stepsize)) - 949 self._expnode.setAttribute("Min", str(minval)) - 950 self._expnode.setAttribute("Max", str(maxval)) - 951 - 952 return -
      953 - 954 -
      955 - def _parseDataFile(self): -
      956 """ Paser data file - 957 - 958 Return : 3-tuple, lists of float - 959 """ - 960 import diffpy.srrietveld.datafileconverter as SDV - 961 - 962 p = SDV.RAPDFDataParser(self._datafilename) - 963 - 964 xs, ys, ss = p.getData() - 965 - 966 return (xs, ys, ss) -
      967 - 968 -
      969 - def setBackground(self, crystname = "", wavelength = None): -
      970 """ Set the background. - 971 The procedure is: - 972 1. read data file and select the backgrounds points automatically, - 973 if necessary - 974 2. generate the nodes - 975 - 976 Return : None - 977 """ - 978 # 1. if needed, read data file and select the backgrounds points automatically - 979 if self._backgroundpoints is None: - 980 # 1. - 981 xs = self._xs - 982 ys = self._ys - 983 ss = self._ss - 984 - 985 # 2. Select background - 986 import diffpy.srrietveld.utilbackground as SUBG - 987 bkgdprocess = SUBG.XrayBackgroundProcess(xs, ys) - 988 bkgdlist = bkgdprocess.selectBackgroundPoints(crystname, wavelength) - 989 - 990 else: - 991 bkgdlist = self._backgroundpoints - 992 - 993 # 2. generate the nodes - 994 bkgdnode = self._rietxml.createElement("BACKGROUND") - 995 self._expnode.appendChild(bkgdnode) - 996 bkgdnode.setAttribute("Type", "Interpolated") - 997 bkgdnode.setAttribute("FORMAT", "Selected") - 998 for p in bkgdlist: - 999 x = p[0] -1000 y = p[1] -1001 pnode = self._rietxml.createElement("SELECTED") -1002 bkgdnode.appendChild(pnode) -1003 pnode.setAttribute("x", str(x)) -1004 pnode.setAttribute("y", str(y)) -1005 # LOOP-OVER: for p in bkgdlist -1006 -1007 return -
      1008 -1009 -
      1010 -class RAPDFMeasurementXMLGenerator(XrayInstrumentMeasurementXMLGenerator): -
      1011 """ -1012 XML Generator for RAPDF -1013 """ -
      1014 - def _parseDataFile(self): -
      1015 """ Paser data file -1016 -1017 Return : 3-tuple, lists of float -1018 """ -1019 import diffpy.srrietveld.datafileconverter as SDV -1020 -1021 p = SDV.RAPDFDataParser(self._datafilename) -1022 -1023 xs, ys, ss = p.getData() -1024 -1025 return (xs, ys, ss) -
      1026 -1027 # END-CLASS-DEF class RAPDFMeasurementXMLGenerator(XrayInstrumentMeasurementXMLGenerator) -1028 -1029 -
      1030 -class RefineStrategyXMLGenerator(XMLGenerator): -
      1031 """ Generate Refine Strategy Based On RefineGuides -1032 """ -
      1033 - def __init__(self, refinestrategy, nouncertaintyoutput=False): -
      1034 """ -1035 Initialization -1036 """ -1037 self._refinestrategy = refinestrategy -1038 -1039 XMLGenerator.__init__(self, nouncertaintyoutput=False) -1040 -1041 return -
      1042 -1043 -
      1044 - def generateXML(self): -
      1045 """ generate XML nodes -1046 -1047 Arguments: -1048 - instrument : Instrument instance -1049 -1050 Return : None -1051 """ -1052 # 1. root node -1053 self._rsnode = self._rietxml.createElement("REFINESTRATEGY") -1054 self._rietxml.appendChild(self._rsnode) -1055 -1056 # 2. set up child nodes per step -1057 numsteps = self._refinestrategy.getNumRefineGuideSteps() -1058 -1059 for step in xrange(1, numsteps+1): -1060 # 2.1 get all guides for add or remove -1061 newguideslist = self._refinestrategy.getRefineGuidesOfStep(step) -1062 rmvguideslist = self._refinestrategy.getRefineGuidesRemovedOfStep(step) -1063 refinetype = self._refinestrategy.getRefineTypeOfStep(step) -1064 -1065 # 2.2. generate STEP node -1066 stage = 1 -1067 stepnode = self._rietxml.createElement("STEP") -1068 self._rsnode.appendChild(stepnode) -1069 stepnode.setAttribute("Step-Number", str(step)) -1070 stepnode.setAttribute("Stage", str(stage)) -1071 stepnode.setAttribute("Refine-Type", refinetype) -1072 -1073 # 2.3 generate new guides -1074 for rguide in newguideslist: -1075 rguidenode = self._rietxml.createElement("ADDGUIDE") -1076 rguidenode.setAttribute("Guide", rguide[0].__class__.__name__) -1077 rguidenode.setAttribute("Stage", str(rguide[1])) -1078 stepnode.appendChild(rguidenode) -1079 -1080 for rguide in rmvguideslist: -1081 rguidenode = self._rietxml.createElement("REMOVEGUIDE") -1082 rguidenode.setAttribute("Guide", rguide[0].__class__.__name__) -1083 rguidenode.setAttribute("Stage", str(rguide[1])) -1084 stepnode.appendChild(rguidenode) -1085 -1086 # END-LOOP: for step in xrange(1, numsteps+1) -1087 -1088 return -
      1089 -1090 # END CLASS: RefineStrategyXMLGenerator(XMLGenerator) -1091 -1092 -
      1093 -class ExcludedRegionXMLGenerator(XMLGenerator): -
      1094 """ Generate XML files for excluded regions -1095 """ -
      1096 - def __init__(self, mode, nouncertaintyoutput=False): -
      1097 """ Initialization -1098 """ -1099 self._mode = mode -1100 self._excludedregions = [] -1101 -1102 XMLGenerator.__init__(self, nouncertaintyoutput) -1103 -1104 return -
      1105 -1106 -
      1107 - def generateXML(self): -
      1108 """ generate XML nodes -1109 -1110 Arguments: -1111 - instrument : Instrument instance -1112 -1113 Return : None -1114 """ -1115 # 1. Root node -1116 self._stnode = self._rietxml.createElement("SETUP") -1117 self._rietxml.appendChild(self._stnode) -1118 -1119 # 2. Set up excluded regions -1120 if self._mode == "t": -1121 # template mode -1122 excludedregions = [ [0.0, 10000.0, -1] ] -1123 else: -1124 # export mode -1125 excludedregions = self._excludedregions -1126 -1127 for region in excludedregions: -1128 regionnode = self._rietxml.createElement("EXCLUDEDREGION") -1129 regionnode.setAttribute("Begin", str(region[0])) -1130 regionnode.setAttribute("End", str(region[1])) -1131 if len(region) > 2: -1132 bankid = region[2] -1133 else: -1134 bankid = -1 -1135 regionnode.setAttribute("Bank", str(bankid)) -1136 self._stnode.appendChild(regionnode) -1137 -1138 return -
      1139 -1140 -
      1141 -class SeqFitRecordXMLGenerator(XMLGenerator): -
      1142 """ class to generate an instrument XML file -1143 """ -
      1144 - def __init__(self, seqinfodict, nouncertaintyoutput=False): -
      1145 """ initalization -1146 """ -1147 self._seqinfodict = seqinfodict -1148 -1149 # Call base class initialization -1150 XMLGenerator.__init__(self, nouncertaintyoutput) -1151 -1152 return -
      1153 -1154 -
      1155 - def generateXML(self): -
      1156 """ generate XML nodes including: -1157 1. root node -1158 -1159 Return : None -1160 """ -1161 import time -1162 -1163 # 1. Setup Root -1164 self._rootnode = self._rietxml.createElement("SEQFIT") -1165 self._rootnode.setAttribute("Time", str(time.ctime())) -1166 -1167 self._rietxml.appendChild(self._rootnode) -1168 -1169 # 2. Set all node -1170 for parval in sorted(self._seqinfodict.keys()): -1171 fitinfodict = self._seqinfodict[parval] -1172 # a. set up the single-fit root node -1173 fitinfonode = self._rietxml.createElement("REFINE") -1174 self._rootnode.appendChild(fitinfonode) -1175 fitinfonode.setAttribute("Value", str(parval)) -1176 # b. set detailed info -1177 self.setNodeFromDict(fitinfonode, fitinfodict) -1178 # END-IF -1179 -1180 return -
      1181 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.ExcludedRegionXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.ExcludedRegionXMLGenerator-class.html deleted file mode 100644 index c0bf3595..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.ExcludedRegionXMLGenerator-class.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - srrietveld.xmlgenerator.ExcludedRegionXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class ExcludedRegionXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ExcludedRegionXMLGenerator

      source code

      -
      -XMLGenerator --+
      -               |
      -              ExcludedRegionXMLGenerator
      -
      - -
      -Generate XML files for excluded regions

      - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - mode, - nouncertaintyoutput=False)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - generate XML nodes
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - mode, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - XMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - -

      generate XML nodes

      - Arguments: -
        -
      • - instrument : Instrument instance -
      • -
      - Return : None -
      -
      Overrides: - XMLGenerator.generateXML -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.GEMMeasurementXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.GEMMeasurementXMLGenerator-class.html deleted file mode 100644 index b51ec338..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.GEMMeasurementXMLGenerator-class.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - srrietveld.xmlgenerator.GEMMeasurementXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class GEMMeasurementXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class GEMMeasurementXMLGenerator

      source code

      -
      -       XMLGenerator --+        
      -                      |        
      -MeasurementXMLGenerator --+    
      -                          |    
      - TOFMeasurementXMLGenerator --+
      -                              |
      -                             GEMMeasurementXMLGenerator
      -
      - -
      -Measurement XML for GEM

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename, - nouncertaintyoutput=False)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      _parseDataFile(self)
      - Parse GEM data file (gss) file
      - source code - -
      - -
          Inherited from TOFMeasurementXMLGenerator
      -   - - - - - - -
      addExcludedRegion(self, - bankid, - begin, - end)
      - Add excluded region to bank in TOF
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - Implement genearte XML
      - source code - -
      - -
      -   - - - - - - -
      setBank(self, - bankid)
      - Set the experiement information to a TOF bank
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - TOFMeasurementXMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      _parseDataFile(self) -

      -
      source code  -
      - -

      Parse GEM data file (gss) file

      - Return : None -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html deleted file mode 100644 index 888c20b3..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.InstrumentXMLGenerator-class.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - srrietveld.xmlgenerator.InstrumentXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class InstrumentXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class InstrumentXMLGenerator

      source code

      -
      -XMLGenerator --+
      -               |
      -              InstrumentXMLGenerator
      -
      - -
      Known Subclasses:
      -
      - TOFXMLGenerator, - ThermalNeutronTOFXMLGenerator, - XrayInstrumentXMLGenerator -
      - -
      -class to generate an instrument XML file

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - myinstrument, - nouncertaintyoutput=False)
      - initalization
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - generate XML nodes including:
      - source code - -
      - -
      -   - - - - - - -
      genExcludedRegion(self, - start, - end, - bankno=0)
      - generate an excluded region string with 3 attributes
      - source code - -
      - -
      -   - - - - - - -
      genDataProperty(self)
      - generate the properties of data
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - myinstrument, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - -

      initalization

      - Argument -
        -
      • - myinstrument : Instrument -
      • -
      • - nouncertaintyoutput : boolean. If yes, then will put - uncertainty in output XML file -
      • -
      - Return : None -
      -
      Overrides: - XMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - - generate XML nodes including: -
        -
      1. - root node -
      2. -
      -

      Arguments:

      - Return : None -
      -
      Overrides: - XMLGenerator.generateXML -
      -
      -
      -
      - -
      - -
      - - -
      -

      genExcludedRegion(self, - start, - end, - bankno=0) -

      -
      source code  -
      - -

      generate an excluded region string with 3 attributes

      - Arguments: -
        -
      • - start : float, starting position of excluded region -
      • -
      • - end : float, ending position of excluded region -
      • -
      • - bankno : int, bank number index -
      • -
      - Return : XML node -
      -
      -
      -
      - -
      - -
      - - -
      -

      genDataProperty(self) -

      -
      source code  -
      - -

      generate the properties of data

      - Return : xml element -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.MeasurementXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.MeasurementXMLGenerator-class.html deleted file mode 100644 index 38ec870b..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.MeasurementXMLGenerator-class.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - srrietveld.xmlgenerator.MeasurementXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class MeasurementXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class MeasurementXMLGenerator

      source code

      -
      -XMLGenerator --+
      -               |
      -              MeasurementXMLGenerator
      -
      - -
      Known Subclasses:
      -
      - TOFMeasurementXMLGenerator, - NeutronCWInstrumentMeasurementXMLGenerator, - POWGENMeasurementXMLGenerator, - XrayInstrumentMeasurementXMLGenerator -
      - -
      -Base class to generate measurement XML

      - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename, - nouncertaintyoutput=False)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - Implement genearte XML
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - XMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - - Implement genearte XML -
      -
      Overrides: - XMLGenerator.generateXML -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.ModelXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.ModelXMLGenerator-class.html deleted file mode 100644 index 5e3636cf..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.ModelXMLGenerator-class.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - srrietveld.xmlgenerator.ModelXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class ModelXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ModelXMLGenerator

      source code

      -
      -XMLGenerator --+
      -               |
      -              ModelXMLGenerator
      -
      - -
      -Generate Model XML

      - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - phaseslist, - nouncertaintyoutput=False)
      - initialization
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - Implement genearte XML
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - phaseslist, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - - initialization -
      -
      Overrides: - XMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - - Implement genearte XML -
      -
      Overrides: - XMLGenerator.generateXML -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator-class.html deleted file mode 100644 index ccc139d8..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator-class.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class NPDFMeasurementXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class NPDFMeasurementXMLGenerator

      source code

      -
      -       XMLGenerator --+        
      -                      |        
      -MeasurementXMLGenerator --+    
      -                          |    
      - TOFMeasurementXMLGenerator --+
      -                              |
      -                             NPDFMeasurementXMLGenerator
      -
      - -
      -Measurement XML for NPDF

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilenames, - bankidlist, - excludedregions, - rangedict, - nouncertaintyoutput=False)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      setBank(self, - bankid)
      - Set the experiement information to a TOF-NPDF bank
      - source code - -
      - -
      -   - - - - - - -
      _parseDataFile(self)
      - Parse NPDF data file (Fullprof XYSigma) file
      - source code - -
      - -
          Inherited from TOFMeasurementXMLGenerator
      -   - - - - - - -
      addExcludedRegion(self, - bankid, - begin, - end)
      - Add excluded region to bank in TOF
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - Implement genearte XML
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilenames, - bankidlist, - excludedregions, - rangedict, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization

      - Requirement: -
        -
      1. - datafilename and bandid must be on the same position in the - list -
      2. -
      - Argument: -
        -
      • - datafilenames : dict, key - bank ID, value - file name -
      • -
      • - bankidlist : list, bank ids -
      • -
      • - excludedregions: dict, key: bank ID; Value: list of 2-tupel - (begin, end) -
      • -
      • - rangedict : dict, key: bank ID: Value: 2-tuple -
      • -
      - Return : None -
      -
      Overrides: - TOFMeasurementXMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      setBank(self, - bankid) -

      -
      source code  -
      - -

      Set the experiement information to a TOF-NPDF bank

      - Argument: -
        -
      • - bankid : int -
      • -
      - Return : None -
      -
      Overrides: - TOFMeasurementXMLGenerator.setBank -
      -
      -
      -
      - -
      - -
      - - -
      -

      _parseDataFile(self) -

      -
      source code  -
      - -

      Parse NPDF data file (Fullprof XYSigma) file

      - Return : None -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator-class.html deleted file mode 100644 index 81dea9fd..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator-class.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class NeutronCWInstrumentMeasurementXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class NeutronCWInstrumentMeasurementXMLGenerator

      source code

      -
      -       XMLGenerator --+    
      -                      |    
      -MeasurementXMLGenerator --+
      -                          |
      -                         NeutronCWInstrumentMeasurementXMLGenerator
      -
      - -
      -Neutron CW Instrument Measurement generator for constant wave length - neutron instrument

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename, - backgroundpoints=None, - wavelength=None, - nouncertaintyoutput=False)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      setInstrumentInformation(self)
      - Set instrument information from data file including
      - source code - -
      - -
      -   - - - - - - -
      _parseDataFile(self)
      - Paser data file
      - source code - -
      - -
      -   - - - - - - -
      setBackground(self, - crystname='', - wavelength=None)
      - Set the background.
      - source code - -
      - -
          Inherited from MeasurementXMLGenerator
      -   - - - - - - -
      generateXML(self)
      - Implement genearte XML
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename, - backgroundpoints=None, - wavelength=None, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization

      - Arguments: -
        -
      • - datafilename : str -
      • -
      • - backgroundpoints : list of 2-tuple -
      • -
      • - wavelength : float -
      • -
      • - nouncertaintyoutput: boolean -
      • -
      -
      -
      Overrides: - MeasurementXMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      setInstrumentInformation(self) -

      -
      source code  -
      - - Set instrument information from data file including -
        -
      1. - resolution -
      2. -
      3. - max value -
      4. -
      5. - min value -
      6. -
      -

      Assuming that the step is of constant value

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      _parseDataFile(self) -

      -
      source code  -
      - -

      Paser data file

      - Return : 3-tuple, lists of float -
      -
      -
      -
      - -
      - -
      - - -
      -

      setBackground(self, - crystname='', - wavelength=None) -

      -
      source code  -
      - - Set the background. The procedure is: -
        -
      1. - read data file and select the backgrounds points automatically, if - necessary -
      2. -
      3. - generate the nodes -
      4. -
      - Return : None -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator-class.html deleted file mode 100644 index 5f0f11e7..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator-class.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class POWGENMeasurementXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class POWGENMeasurementXMLGenerator

      source code

      -
      -       XMLGenerator --+    
      -                      |    
      -MeasurementXMLGenerator --+
      -                          |
      -                         POWGENMeasurementXMLGenerator
      -
      - -
      -XML generator of measurement for POWGEN only

      - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename, - nouncertaintyoutput=False)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - Implement genearte XML
      - source code - -
      - -
      -   - - - - - - -
      setBank(self, - banknumber)
      - set data file to a POWGEN measurement
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - MeasurementXMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - - Implement genearte XML -
      -
      Overrides: - MeasurementXMLGenerator.generateXML -
      -
      -
      -
      - -
      - -
      - - -
      -

      setBank(self, - banknumber) -

      -
      source code  -
      - -

      set data file to a POWGEN measurement

      - Argument: -
        -
      • - banknumber : int -
      • -
      - Return : None -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.RAPDFMeasurementXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.RAPDFMeasurementXMLGenerator-class.html deleted file mode 100644 index 8ebb0973..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.RAPDFMeasurementXMLGenerator-class.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - srrietveld.xmlgenerator.RAPDFMeasurementXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class RAPDFMeasurementXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class RAPDFMeasurementXMLGenerator

      source code

      -
      -                 XMLGenerator --+        
      -                                |        
      -          MeasurementXMLGenerator --+    
      -                                    |    
      -XrayInstrumentMeasurementXMLGenerator --+
      -                                        |
      -                                       RAPDFMeasurementXMLGenerator
      -
      - -
      -XML Generator for RAPDF

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      _parseDataFile(self)
      - Paser data file
      - source code - -
      - -
          Inherited from XrayInstrumentMeasurementXMLGenerator
      -   - - - - - - -
      __init__(self, - datafilename, - backgroundpoints, - nouncertaintyoutput=False, - crystalname=None, - wavelength=None)
      - Initialization of Xray Instrument Measurement XML file - generator
      - source code - -
      - -
      -   - - - - - - -
      setBackground(self)
      - Set the XML node for background:
      - source code - -
      - -
      -   - - - - - - -
      setInstrumentInformation(self)
      - Set instrument information from data file including
      - source code - -
      - -
          Inherited from MeasurementXMLGenerator
      -   - - - - - - -
      generateXML(self)
      - Implement genearte XML
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      _parseDataFile(self) -

      -
      source code  -
      - -

      Paser data file

      - Return : 3-tuple, lists of float -
      -
      Overrides: - XrayInstrumentMeasurementXMLGenerator._parseDataFile -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.RefineStrategyXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.RefineStrategyXMLGenerator-class.html deleted file mode 100644 index a8cd93d4..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.RefineStrategyXMLGenerator-class.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - srrietveld.xmlgenerator.RefineStrategyXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class RefineStrategyXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class RefineStrategyXMLGenerator

      source code

      -
      -XMLGenerator --+
      -               |
      -              RefineStrategyXMLGenerator
      -
      - -
      -Generate Refine Strategy Based On RefineGuides

      - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - refinestrategy, - nouncertaintyoutput=False)
      - Initialization
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - generate XML nodes
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - refinestrategy, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - - Initialization -
      -
      Overrides: - XMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - -

      generate XML nodes

      - Arguments: -
        -
      • - instrument : Instrument instance -
      • -
      - Return : None -
      -
      Overrides: - XMLGenerator.generateXML -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.SeqFitRecordXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.SeqFitRecordXMLGenerator-class.html deleted file mode 100644 index fbd5a60f..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.SeqFitRecordXMLGenerator-class.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - srrietveld.xmlgenerator.SeqFitRecordXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class SeqFitRecordXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class SeqFitRecordXMLGenerator

      source code

      -
      -XMLGenerator --+
      -               |
      -              SeqFitRecordXMLGenerator
      -
      - -
      -class to generate an instrument XML file

      - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - seqinfodict, - nouncertaintyoutput=False)
      - initalization
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - generate XML nodes including:
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - seqinfodict, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - - initalization -
      -
      Overrides: - XMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - - generate XML nodes including: -
        -
      1. - root node -
      2. -
      - Return : None -
      -
      Overrides: - XMLGenerator.generateXML -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html deleted file mode 100644 index c3a683dc..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.TOFMeasurementXMLGenerator-class.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - srrietveld.xmlgenerator.TOFMeasurementXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class TOFMeasurementXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class TOFMeasurementXMLGenerator

      source code

      -
      -       XMLGenerator --+    
      -                      |    
      -MeasurementXMLGenerator --+
      -                          |
      -                         TOFMeasurementXMLGenerator
      -
      - -
      Known Subclasses:
      -
      - GEMMeasurementXMLGenerator, - NPDFMeasurementXMLGenerator -
      - -
      -XML generator of measurement for general TOF

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename, - excludedregionsdict, - refinerangedict=None, - nouncertaintyoutput=False)
      - Initialization of TOFMeasurementXMLGenerator
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - Implement genearte XML
      - source code - -
      - -
      -   - - - - - - -
      addExcludedRegion(self, - bankid, - begin, - end)
      - Add excluded region to bank in TOF
      - source code - -
      - -
      -   - - - - - - -
      setBank(self, - bankid)
      - Set the experiement information to a TOF bank
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename, - excludedregionsdict, - refinerangedict=None, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization of TOFMeasurementXMLGenerator

      - Argument: -
        -
      • - datafilename : str -
      • -
      • - excludedregionsdict: dict, key = banid, value = list of - 2-tuples -
      • -
      • - refinerangedict : dict, key=bankid, value=(begin, end) -
      • -
      - Return : None -
      -
      Overrides: - MeasurementXMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - - Implement genearte XML -
      -
      Overrides: - MeasurementXMLGenerator.generateXML -
      -
      -
      -
      - -
      - -
      - - -
      -

      addExcludedRegion(self, - bankid, - begin, - end) -

      -
      source code  -
      - -

      Add excluded region to bank in TOF

      - Argument: -
        -
      • - bankid : int -
      • -
      • - begin : float -
      • -
      • - end : float -
      • -
      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      setBank(self, - bankid) -

      -
      source code  -
      - -

      Set the experiement information to a TOF bank

      - Argument: -
        -
      • - bankid : int -
      • -
      - Return : None -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.TOFXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.TOFXMLGenerator-class.html deleted file mode 100644 index 3f4a6fef..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.TOFXMLGenerator-class.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - srrietveld.xmlgenerator.TOFXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class TOFXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class TOFXMLGenerator

      source code

      -
      -      XMLGenerator --+    
      -                     |    
      -InstrumentXMLGenerator --+
      -                         |
      -                        TOFXMLGenerator
      -
      - -
      -class to generate an Time-of-flight neutron instrument XML file

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - myinstrument, - nouncertaintyoutput=False)
      - initalization
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - Generate a Thermal-neutron instrument node
      - source code - -
      - -
          Inherited from InstrumentXMLGenerator
      -   - - - - - - -
      genDataProperty(self)
      - generate the properties of data
      - source code - -
      - -
      -   - - - - - - -
      genExcludedRegion(self, - start, - end, - bankno=0)
      - generate an excluded region string with 3 attributes
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - myinstrument, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - -

      initalization

      - Argument: -
        -
      • - myinstrument : Instrument instance -
      • -
      - Return : None -
      -
      Overrides: - InstrumentXMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - -

      Generate a Thermal-neutron instrument node

      - Return : None -
      -
      Overrides: - InstrumentXMLGenerator.generateXML -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.ThermalNeutronTOFXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.ThermalNeutronTOFXMLGenerator-class.html deleted file mode 100644 index 126240d3..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.ThermalNeutronTOFXMLGenerator-class.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - srrietveld.xmlgenerator.ThermalNeutronTOFXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class ThermalNeutronTOFXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class ThermalNeutronTOFXMLGenerator

      source code

      -
      -      XMLGenerator --+    
      -                     |    
      -InstrumentXMLGenerator --+
      -                         |
      -                        ThermalNeutronTOFXMLGenerator
      -
      - -
      -class to generate an XRD instrument XML file

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - myinstrument, - nouncertaintyoutput=False)
      - initalization
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - Generate a Thermal-neutron instrument node
      - source code - -
      - -
          Inherited from InstrumentXMLGenerator
      -   - - - - - - -
      genDataProperty(self)
      - generate the properties of data
      - source code - -
      - -
      -   - - - - - - -
      genExcludedRegion(self, - start, - end, - bankno=0)
      - generate an excluded region string with 3 attributes
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - myinstrument, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - -

      initalization

      - Argument: -
        -
      • - myinstrument : Instrument instance -
      • -
      - Return : None -
      -
      Overrides: - InstrumentXMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - -

      Generate a Thermal-neutron instrument node

      - Return : None -
      -
      Overrides: - InstrumentXMLGenerator.generateXML -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.XMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.XMLGenerator-class.html deleted file mode 100644 index 2e752ed1..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.XMLGenerator-class.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - srrietveld.xmlgenerator.XMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class XMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class XMLGenerator

      source code

      -
      Known Subclasses:
      -
      - ExcludedRegionXMLGenerator, - MeasurementXMLGenerator, - InstrumentXMLGenerator, - ModelXMLGenerator, - RefineStrategyXMLGenerator, - SeqFitRecordXMLGenerator -
      - -
      -Base class to generate an XML file

      - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - nouncertaintyoutput=False)
      - initalization
      - source code - -
      - -
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - generate XML nodes
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      exportXML(self, - xmlfname) -

      -
      source code  -
      - -

      Export XML nodes to the designated XML file

      - Arguments: -
        -
      • - xmlfname : str, XML file name to output -
      • -
      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - -

      generate XML nodes

      - Arguments: -
        -
      • - instrument : Instrument instance -
      • -
      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      setNodeFromDict(self, - xmlnode, - infodict) -

      -
      source code  -
      - -

      Recursive method ... to set up an XML from a dictionary

      -

      Rule: If a value in infodict element is tuple, it means that this is a - float+/- uncertainty

      - Argument: -
        -
      • - xmlnode : XML node -
      • -
      • - infodict : dictionary, stanard diffpy.srrietveld definition - (see developer's doc) -
      • -
      - Return : None -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator-class.html deleted file mode 100644 index 460d0f55..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator-class.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class XrayInstrumentMeasurementXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class XrayInstrumentMeasurementXMLGenerator

      source code

      -
      -       XMLGenerator --+    
      -                      |    
      -MeasurementXMLGenerator --+
      -                          |
      -                         XrayInstrumentMeasurementXMLGenerator
      -
      - -
      Known Subclasses:
      -
      - RAPDFMeasurementXMLGenerator -
      - -
      -XML Measurement generator for Xray instrument

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - datafilename, - backgroundpoints, - nouncertaintyoutput=False, - crystalname=None, - wavelength=None)
      - Initialization of Xray Instrument Measurement XML file - generator
      - source code - -
      - -
      -   - - - - - - -
      setInstrumentInformation(self)
      - Set instrument information from data file including
      - source code - -
      - -
      -   - - - - - - -
      setBackground(self)
      - Set the XML node for background:
      - source code - -
      - -
      -   - - - - - - -
      _parseDataFile(self)
      - Paser data file
      - source code - -
      - -
          Inherited from MeasurementXMLGenerator
      -   - - - - - - -
      generateXML(self)
      - Implement genearte XML
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Recursive method ...
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - datafilename, - backgroundpoints, - nouncertaintyoutput=False, - crystalname=None, - wavelength=None) -
      (Constructor) -

      -
      source code  -
      - -

      Initialization of Xray Instrument Measurement XML file generator

      -

      if the background points is not give but crystal name is given, the - code will generate a background from the wavelength and stored - information

      - Argument: -
        -
      • - datafilename : str -
      • -
      • - backgroundpoints : list of floats -
      • -
      • - crytalname : str -
      • -
      • - wavelength : float -
      • -
      • - nouncertaintyoutput: boolean, output float with uncertainty or - not -
      • -
      -
      -
      Overrides: - MeasurementXMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      setInstrumentInformation(self) -

      -
      source code  -
      - - Set instrument information from data file including -
        -
      1. - resolution -
      2. -
      3. - max value -
      4. -
      5. - min value -
      6. -
      -

      Assuming that the step is of constant value

      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      setBackground(self) -

      -
      source code  -
      - - Set the XML node for background: -
        -
      1. - if needed, read data file and select the backgrounds points - automatically -
      2. -
      3. - generate the nodes -
      4. -
      - Return : None -
      -
      -
      -
      - -
      - -
      - - -
      -

      _parseDataFile(self) -

      -
      source code  -
      - -

      Paser data file

      - Return : 3-tuple, lists of float -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.XrayInstrumentXMLGenerator-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.XrayInstrumentXMLGenerator-class.html deleted file mode 100644 index 33db23a9..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlgenerator.XrayInstrumentXMLGenerator-class.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - srrietveld.xmlgenerator.XrayInstrumentXMLGenerator - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlgenerator :: - Class XrayInstrumentXMLGenerator - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class XrayInstrumentXMLGenerator

      source code

      -
      -      XMLGenerator --+    
      -                     |    
      -InstrumentXMLGenerator --+
      -                         |
      -                        XrayInstrumentXMLGenerator
      -
      - -
      -class to generate an XRD instrument XML file, extending - InstrumentXMLGenerator

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - myinstrument, - nouncertaintyoutput=False)
      - initalization
      - source code - -
      - -
      -   - - - - - - -
      generateXML(self)
      - generate an Xray instrument
      - source code - -
      - -
      -   - - - - - - -
      setNodeFromDict(self, - xmlnode, - infodict)
      - Setting up an XML from a dictionary; It is a Recursive method - Overriding the method in base class
      - source code - -
      - -
          Inherited from InstrumentXMLGenerator
      -   - - - - - - -
      genDataProperty(self)
      - generate the properties of data
      - source code - -
      - -
      -   - - - - - - -
      genExcludedRegion(self, - start, - end, - bankno=0)
      - generate an excluded region string with 3 attributes
      - source code - -
      - -
          Inherited from XMLGenerator
      -   - - - - - - -
      exportXML(self, - xmlfname)
      - Export XML nodes to the designated XML file
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Class Variables[hide private]
      -
      -   - - XMLInstrumentMapDict = {'peakprofiletype': 'PeakProfile', 'res... -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - myinstrument, - nouncertaintyoutput=False) -
      (Constructor) -

      -
      source code  -
      - - initalization -
      -
      Overrides: - InstrumentXMLGenerator.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      generateXML(self) -

      -
      source code  -
      - -

      generate an Xray instrument

      - Return : None -
      -
      Overrides: - InstrumentXMLGenerator.generateXML -
      -
      -
      -
      - -
      - -
      - - -
      -

      setNodeFromDict(self, - xmlnode, - infodict) -

      -
      source code  -
      - -

      Setting up an XML from a dictionary; It is a Recursive method - Overriding the method in base class

      - Argument: -
        -
      • - xmlnode : XML node -
      • -
      • - infodict : dictionary, stanard diffpy.srrietveld definition - (see developer's doc) -
      • -
      - Return : None -
      -
      Overrides: - XMLGenerator.setNodeFromDict -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Class Variable Details[hide private]
      -
      - -
      - -
      -

      XMLInstrumentMapDict

      - -
      -
      -
      -
      Value:
      -
      -{'peakprofiletype': 'PeakProfile',
      - 'resolution': 'Resolution',
      - 'scale': 'Scale',
      - 'wavelength1': 'Lambda'}
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface-module.html b/static_root/doc/srrietveld/developers/srrietveld.xmlinterface-module.html deleted file mode 100644 index 8e21aacc..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface-module.html +++ /dev/null @@ -1,830 +0,0 @@ - - - - - srrietveld.xmlinterface - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlinterface - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Module xmlinterface

      source code

      -
      -Interface to interpret XML input
      -
      - Created On: 2008.07.03  Version 2.0 [2009.01.28]
      -
      - External XML Utility Methods:
      -
      --  importXML(filename)
      --  getXMLNodeAttributes(xmlnode, attrdict)
      --  getAttributeValue(elementnode, key)
      --  xmlToString(xmlobj, level, childno)
      -
      - Class   RietXMLParser
      - * Client Methods
      - - __init__()
      - - parseXMLInstrument()
      - - parseXMLMeasurement()
      - - parseXMLModel()
      - - getInstrument()
      - - getModel()
      - - getMeasurement()
      -
      - Class InstrumentParser
      -
      - Class MeasurmentParser
      -
      - Class StructureParser
      -
      - Class RefineStrategyXMLParser
      -
      -  - __init__(self, refinestrategyxmlfilename)
      -  - 
      -
      - External Method List:
      - * getXMLNodeAttributes(xmlnode, attrdict):  attribute -> dictionary
      -
      -


      - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Classes[hide private]
      -
      -   - - InstrumentXMLParser
      - XML Parser to parse an instrument XML file... -
      -   - - StructureXMLParser
      - XML parser for structure XML file defined in SrRietveld... -
      -   - - MeasurementXMLParser
      - Parsing measurement XML file -
      -   - - RefineStrategyXMLParser
      - Parse a RefineStrategy provided by users. -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Functions[hide private]
      -
      -   - - - - - - -
      parseRange(rangenode)
      - Status: being coded
      - source code - -
      - -
      -   - - - - - - -
      parseExcludedRegion(excludedregionnode)
      - Status: being coded
      - source code - -
      - -
      -   - - - - - - -
      parseBackground(backgroundnode)
      - Interpret a Background Node
      - source code - -
      - -
      -   - - - - - - -
      xmlFilter(xmlobj)
      - Filter an xml.dom.mini.dom object...
      - source code - -
      - -
      -   - - - - - - -
      importXML(filename)
      - Parse an XML file for quick-Rietveld-configuration...
      - source code - -
      - -
      -   - - - - - - -
      xmlToString(xmlobj, - level, - childno)
      - Export an XML object to string
      - source code - -
      - -
      -   - - - - - - -
      xmlToDict(xmlnode)
      - Convert an XML object to a dictionary...
      - source code - -
      - -
      -   - - - - - - -
      getAttributeValue(elementnode, - key)
      - Get the value of an attribute in an element node...
      - source code - -
      - -
      -   - - - - - - -
      getXMLNodeAttributes(xmlnode, - attrdict)
      - Retrieve the attributes (float) of an XML node and store in a dictionary...
      - source code - -
      - -
      -   - - - - - - -
      getInstrumentInformation(xmlfilename)
      - Get the instrument name from an XML instrument file...
      - source code - -
      - -
      -   - - - - - - -
      getStructureInformation(xmlfilename)
      - Get the instrument name from an XML instrument file...
      - source code - -
      - -
      -   - - - - - - -
      importExcludedRegionFile(xmlfilename)
      - Reading the standard Excluded-Region input file, -and export the excludedregion-list - -Argument: -- xmlfilename : str - -Return : dict.
      - source code - -
      - -
      - - - - - - - - - -
      - - - - - -
      Variables[hide private]
      -
      -   - - __id__ = '$Id: xmlinterface.py 2921 2009-03-20 15:43:13Z wdzho... -
      - - - - - - -
      - - - - - -
      Function Details[hide private]
      -
      - -
      - -
      - - -
      -

      parseRange(rangenode) -

      -
      source code  -
      - -

      Status: being coded

      -

      Interpret a Range Node to For Min, Max, Step/Resolution

      - Return : 3-float-tuple: thmin, thmax, resolution -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseExcludedRegion(excludedregionnode) -

      -
      source code  -
      - -

      Status: being coded

      -

      Interpret an Excluded Region XML node

      - Return : 3-tuple (float, float, int): start, end, bankno -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseBackground(backgroundnode) -

      -
      source code  -
      - -

      Interpret a Background Node

      -

      Used by both Measurement XML and Instrument XML

      - Return : dictionary: parameters of background, keys including -
        -
      • - Type str -
      • -
      • - Bkpos flaot -
      • -
      • - Format str -
      • -
      • - Select list -
      • -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      xmlFilter(xmlobj) -

      -
      source code  -
      - -
      -Filter an xml.dom.mini.dom object
      -
      -Argument    
      -  xmlobj    :   xml.dom.minidom.Document object (Element)
      -
      -Return      :   xml
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      importXML(filename) -

      -
      source code  -
      - -
      -Parse an XML file for quick-Rietveld-configuration
      -
      -Argument:
      -  filename  :   string, XML file name
      -
      -Return      :   an xml.dom.minidom.Document object
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      xmlToString(xmlobj, - level, - childno) -

      -
      source code  -
      - -

      Export an XML object to string

      -

      Argument

      - return : string -
      -
      -
      -
      - -
      - -
      - - -
      -

      xmlToDict(xmlnode) -

      -
      source code  -
      - -
      -Convert an XML object to a dictionary
      -
      -Argument:
      -  xmlboj    :   xml.dom.minidom.Document object
      -
      -Return      :   dict
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getAttributeValue(elementnode, - key) -

      -
      source code  -
      - -
      -Get the value of an attribute in an element node
      -
      -Argument:
      -  elementnode   :   an Dom element node instance
      -  key           :   string, key/name of an attribute
      -
      -Return          :   string, value of instrument
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getXMLNodeAttributes(xmlnode, - attrdict) -

      -
      source code  -
      - -
      -Retrieve the attributes (float) of an XML node and store in a dictionary
      -
      -Arguments:
      -- xmlnode   :   XML node
      -- attribdict:   dictionary 
      -
      -Return      :   None
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getInstrumentInformation(xmlfilename) -

      -
      source code  -
      - -
      -Get the instrument name from an XML instrument file
      -
      -Argument:
      -  xmlfilename   :   str
      -
      -Return          :   dictionary
      -                    - str, type of instrument
      -                    - str, name of instrument
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      getStructureInformation(xmlfilename) -

      -
      source code  -
      - -
      -Get the instrument name from an XML instrument file
      -
      -Argument:
      -- xmlfilename   :   str
      -
      -Return          :   dictionary
      -                    - str, type of instrument
      -                    - str, name of instrument
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      importExcludedRegionFile(xmlfilename) -

      -
      source code  -
      - -
      -Reading the standard Excluded-Region input file,
      -and export the excludedregion-list
      -
      -Argument:
      -- xmlfilename   :   str
      -
      -Return          :   dict. key = Bank ID (default = 0).  value = list
      -
      -
      -
      -
      -
      -
      -
      - - - - - - -
      - - - - - -
      Variables Details[hide private]
      -
      - -
      - -
      -

      __id__

      - -
      -
      -
      -
      Value:
      -
      -'$Id: xmlinterface.py 2921 2009-03-20 15:43:13Z wdzhou $'
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface-pysrc.html b/static_root/doc/srrietveld/developers/srrietveld.xmlinterface-pysrc.html deleted file mode 100644 index dcf2be0c..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface-pysrc.html +++ /dev/null @@ -1,1293 +0,0 @@ - - - - - srrietveld.xmlinterface - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlinterface - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      -

      Source Code for Module srrietveld.xmlinterface

      -
      -   1  #!/usr/bin/python 
      -   2  ############################################################################## 
      -   3  # 
      -   4  # diffpy.srrietveld by DANSE Diffraction group 
      -   5  #                   Simon J. L. Billinge 
      -   6  #                   (c) 2008 Trustees of the Columbia University 
      -   7  #                   in the City of New York.  All rights reserved. 
      -   8  # 
      -   9  # File coded by:    Wenduo Zhou 
      -  10  # 
      -  11  # See AUTHORS.txt for a list of people who contributed. 
      -  12  # See LICENSE.txt for license information. 
      -  13  # 
      -  14  ############################################################################## 
      -  15   
      -  16  """ Interface to interpret XML input 
      -  17   
      -  18    Created On: 2008.07.03  Version 2.0 [2009.01.28] 
      -  19   
      -  20    External XML Utility Methods: 
      -  21   
      -  22   -  importXML(filename) 
      -  23   -  getXMLNodeAttributes(xmlnode, attrdict) 
      -  24   -  getAttributeValue(elementnode, key) 
      -  25   -  xmlToString(xmlobj, level, childno) 
      -  26   
      -  27    Class   RietXMLParser 
      -  28    * Client Methods 
      -  29    - __init__() 
      -  30    - parseXMLInstrument() 
      -  31    - parseXMLMeasurement() 
      -  32    - parseXMLModel() 
      -  33    - getInstrument() 
      -  34    - getModel() 
      -  35    - getMeasurement() 
      -  36   
      -  37    Class InstrumentParser 
      -  38   
      -  39    Class MeasurmentParser 
      -  40   
      -  41    Class StructureParser 
      -  42   
      -  43    Class RefineStrategyXMLParser 
      -  44   
      -  45     - __init__(self, refinestrategyxmlfilename) 
      -  46     -  
      -  47   
      -  48    External Method List: 
      -  49    * getXMLNodeAttributes(xmlnode, attrdict):  attribute -> dictionary 
      -  50   
      -  51  """ 
      -  52  __id__ = "$Id: xmlinterface.py 2921 2009-03-20 15:43:13Z wdzhou $" 
      -  53   
      -  54  import  xml.dom.minidom 
      -  55  from    diffpy.refinementapi.errors            import  FitConfigurationError 
      -  56   
      -  57   
      -
      58 -class InstrumentXMLParser(object): -
      59 """ XML Parser to parse an instrument XML file - 60 - 61 Instantiate: - 62 InstrumentXMLParser(instrumentfilename) - 63 """ -
      64 - def __init__(self, instrumentfilename): -
      65 """ Initialization of InstrumentXMLParser - 66 - 67 Argument: - 68 - instrumentfilename : str, xml input file - 69 """ - 70 self._instrumentxml = importXML(instrumentfilename) - 71 - 72 self.parseXMLInstrument() - 73 - 74 return -
      75 - 76 -
      77 - def getInstrument(self): -
      78 """ Get the Instrument of this XML file - 79 - 80 Return : Instrument - 81 """ - 82 return self._instrument -
      83 - 84 - 85 # Level 1 -
      86 - def parseXMLInstrument(self): -
      87 """ Parse instrument XML file to instrument node to Instrument - 88 - 89 Return : diffpy.srrietveld.Instrument instance - 90 """ - 91 # 1. Import instrument - 92 instrumentnode = None - 93 for childnode in self._instrumentxml.childNodes: - 94 if childnode.localName == "INSTRUMENT": - 95 instrumentnode = childnode - 96 - 97 # 2. Validate & Further Process - 98 if instrumentnode is None: - 99 errmsg = "No INSTRUMENT Node" - 100 raise FitConfigurationError(errmsg) - 101 - 102 # 3. parse instrument - 103 self._instrument = self.parseInstrumentNode(instrumentnode) - 104 - 105 return self._instrument -
      106 - 107 - 108 # II. Level 2: Instrument and Pattern -
      109 - def parseInstrumentNode(self, instrumentnode): -
      110 """ Intepret an instrument and set up the following - 111 - 112 Return : 2-tuple, Instrument object, list of dictionary as dataset - 113 """ - 114 import instrument as IS - 115 - 116 # 1. parse and generate instrument - 117 iname = str(getAttributeValue(instrumentnode, "Name")) - 118 itype = str(getAttributeValue(instrumentnode, "Type")) - 119 peakprof= str(getAttributeValue(instrumentnode, "PeakProfileType")) - 120 - 121 if itype == "Database": - 122 # Instrument Information From Database - 123 instrument = IS.getInstrument(iname) - 124 - 125 elif itype == "Xray" or itype == "NeutronCW": - 126 # Generate User-defined Instrument of Constant Wavelength - 127 peakprofilesetup = False - 128 - 129 # a. Read Child Nodes - 130 for childnode in instrumentnode.childNodes: - 131 if childnode.localName == "ENERGY": - 132 # Get ENERGY Node - 133 val1 = getAttributeValue(childnode, "Lambda") - 134 val2 = getAttributeValue(childnode, "Lambda2") - 135 val3 = getAttributeValue(childnode, "Ratio") - 136 val4 = getAttributeValue(childnode, "Resolution") - 137 lambda1 = float(val1) - 138 resolut = float(val4) - 139 try: - 140 lambda2 = float(val2) - 141 ratio = float(val3) - 142 except TypeError, err: - 143 lambda2 = None - 144 ratio = 0.0 - 145 except ValueError, err: - 146 lambda2 = None - 147 ratio = 0.0 - 148 - 149 elif childnode.localName == "SETUP": - 150 # Get SETUP node - 151 patterninfodict = self.parsePattern(childnode) - 152 - 153 elif childnode.localName == "PEAKPROFILE": - 154 # Set up peak profile - 155 # 1. Individual-check - 156 if peakprofilesetup is True: - 157 raise FitConfigurationError(errmsg) - 158 # 2. import and set flag - 159 peakprofiledict = self.parsePeakProfile(childnode) - 160 peakprofilesetup = True - 161 - 162 elif childnode.localName == "BACKGROUND": - 163 bkgdinfodict = parseBackground(childnode) - 164 - 165 else: - 166 # Undefined Node - 167 errmsg = "Unrecognized Node! Node name = <%-5s>"% (childnode.localName) - 168 print errmsg - 169 # END-IF childnode.localName == "ENERGY" - 170 # LOOP-OVER: for childnode in instrumentnode.childNodes: - 171 - 172 # b. Set up 'Instrument' - 173 if itype == "Xray": - 174 # Xray - 175 instrument = IS.XrayInstrument(name=iname, wavelength=lambda1, wavelength2=lambda2, - 176 ratio=ratio, resolution=resolut, peakprofiledict=peakprofiledict, backgroundinfodict=bkgdinfodict) - 177 elif itype == "NeutronCW": - 178 # Neutron C.W. - 179 instrument = IS.NeutronCWInstrument(name=iname, wavelength=lambda1, wavelength2=lambda2, - 180 ratio=ratio, resolution=resolut, peakprofiledict=peakprofiledict, backgroundinfodict=bkgdinfodict) - 181 else: - 182 raise NotImplementedError("Instrument %-10s Is Not Supported" % (itype)) - 183 # END-IF itype - 184 - 185 instrument.setZero(patterninfodict["Zero"]) - 186 - 187 # c. Set up Instrument's Optional: peak profile, excluded region - 188 instrument.setPeakProfileInfo(parameterdict = peakprofiledict) - 189 for region in patterninfodict["ExcludedRegion"]: - 190 instrument.addExcludedRegion(region[0], region[1]) - 191 - 192 elif itype == "TOF": - 193 curbkgdtype = getAttributeValue(instrumentnode, "BackgroundType") - 194 - 195 instrument = IS.TOFInstrument(name=iname, backgroundtype=curbkgdtype) - 196 - 197 for childnode in instrumentnode.childNodes: - 198 if childnode.localName == "BANK": - 199 # a) read attribute - 200 bankid = int(getAttributeValue(childnode, "Bank")) - 201 - 202 # b) get sub-attributes - 203 for grandchildnode in childnode.childNodes: - 204 if grandchildnode.localName == "GEOMETRY": - 205 # Geometry - 206 dtt1 = float(getAttributeValue(grandchildnode, "Dtt1") ) - 207 dtt2 = float(getAttributeValue(grandchildnode, "Dtt2") ) - 208 twothetabank = float(getAttributeValue(grandchildnode, "TwoThetaBank")) - 209 xcross = float(getAttributeValue(grandchildnode, "Xcross") ) - 210 width = float(getAttributeValue(grandchildnode, "Width") ) - 211 resolution = float(getAttributeValue(grandchildnode, "Resolution") ) - 212 zshift = getAttributeValue(childnode, "zshift") - 213 if zshift is not None: - 214 zshift = float(zshift) - 215 - 216 elif grandchildnode.localName == "SETUP": - 217 # Excluded region - 218 setupdict = self.parsePattern(grandchildnode) - 219 excludedregionslist = setupdict["ExcludedRegion"] - 220 myrange = setupdict["Range"] - 221 - 222 elif grandchildnode.localName == "PEAKPROFILE": - 223 # Peak shape - 224 peakprofiledict = self.parsePeakProfile(grandchildnode) - 225 - 226 elif grandchildnode.localName == "BACKGROUND": - 227 backgrounddict = parseBackground(grandchildnode) - 228 # LOOP-OVER: for grandchildnode in childnode.childNodes: - 229 - 230 if backgrounddict is None: - 231 backgrounddict = {} - 232 backgrounddict["Type"] = curbkgdtype[0] - 233 backgrounddict["Points"] = [bkpos] - 234 - 235 rangetuple = (myrange[0], myrange[1], resolution) - 236 - 237 # c) add bank information - 238 instrument.setBankInfo(bankid=bankid, dtt1=dtt1, dtt2=dtt2, twothetabank=twothetabank, \ - 239 xcross=xcross, width=width, range=rangetuple, \ - 240 excludedregions=excludedregionslist, peakprofile=peakprofiledict, \ - 241 backgroundinfo=backgrounddict) - 242 instrument.setZero(zshift=zshift) - 243 - 244 # END-IF if childnode.localName == "BANK": - 245 # LOOP-OVER for childnode in instrumentnode.childNodes - 246 - 247 elif itype == "ThermalNeutronTOF": - 248 curbkgdtype = getAttributeValue(instrumentnode, "BackgroundType") - 249 - 250 instrument = IS.ThermalNeutronTOFInstrument(name=iname, backgroundtype=curbkgdtype) - 251 - 252 for childnode in instrumentnode.childNodes: - 253 if childnode.localName == "BANK": - 254 # a) read attribute - 255 bankno = int(getAttributeValue(childnode, "Bank")) - 256 dtt1 = float(getAttributeValue(childnode, "Dtt1") ) - 257 dtt2 = float(getAttributeValue(childnode, "Dtt2") ) - 258 twothetabank = float(getAttributeValue(childnode, "TwoThetaBank")) - 259 dtt1t = float(getAttributeValue(childnode, "Dtt1t") ) - 260 dtt2t = float(getAttributeValue(childnode, "Dtt2t") ) - 261 xcross = float(getAttributeValue(childnode, "Xcross") ) - 262 width = float(getAttributeValue(childnode, "Width") ) - 263 - 264 zshift = getAttributeValue(childnode, "zshift") - 265 if zshift is not None: - 266 zshift = float(zshift) - 267 zerot = getAttributeValue(childnode, "zerot") - 268 if zerot is not None: - 269 zerot = float(zerot) - 270 - 271 # b) get sub-attributes - 272 excludedregionslist = [] - 273 backgrounddict = None - 274 for grandchildnode in childnode.childNodes: - 275 if grandchildnode.localName == "RANGE": - 276 # Default range - 277 rangetuple = self.parseRange(grandchildnode) - 278 - 279 elif grandchildnode.localName == "EXCLUDEDREGION": - 280 # Excluded region - 281 exclregiontuple = parseExcludedRegion(grandchildnode) - 282 excludedregionslist.append(exclregiontuple) - 283 - 284 elif grandchildnode.localName == "PEAKPROFILE": - 285 # Peak shape - 286 peakprofiledict = self.parsePeakProfile(grandchildnode) - 287 - 288 elif grandchildnode.localName == "BACKGROUND": - 289 bkgdtype, backgrounddict = self.parseBackground(grandchildnode) - 290 # LOOP-OVER: for grandchildnode in childnode.childNodes: - 291 - 292 if backgrounddict is None: - 293 if 1: # Debug 1645, if pass, remove this branch - 294 raise NotImplementedError("1645: Not Tested for Points (bkpos)") - 295 - 296 backgrounddict = {} - 297 backgrounddict["Type"] = curbkgdtype[0] - 298 backgrounddict["Points"] = [bkpos] - 299 - 300 # c) add bank information - 301 instrument.setBankInfo(bankno, dtt1=dtt1, dtt2=dtt2, dtt1t=dtt1t, dtt2t=dtt2t,\ - 302 twothetabank=twothetabank, xcross=xcross, width=width, range=rangetuple, \ - 303 excludedregions=excludedregionslist, peakprofile=peakprofiledict, - 304 backgroundinfo=backgrounddict) - 305 instrument.setZero(zshift=zshift, zerot=zerot) - 306 - 307 # END-IF if childnode.localName == "BANK": - 308 # LOOP-OVER for childnode in instrumentnode.childNodes - 309 - 310 else: - 311 errmsg = "Instrument Type %-10s has NOT been Implemented!"% (itype) - 312 raise NotImplementedError(errmsg) - 313 - 314 # 3. retrun - 315 return instrument -
      316 - 317 -
      318 - def parsePattern(self, patnode): -
      319 """ interpret a Pattern node - 320 including: - 321 (1) Pattern file name - 322 (2) background file (optional) or background polynomials - 323 (3) excluded region (optional) - 324 - 325 Return : dictionary dataset - 326 """ - 327 # 1. init - 328 dataset = {} - 329 - 330 # 2. data file, min, max, zero - 331 patfilename = str(getAttributeValue(patnode, "DiffractionFileName")) - 332 try: - 333 thmin = float(patnode.getAttribute("Min")) - 334 except ValueError, err: - 335 thmin = 0.0 - 336 try: - 337 thmax = float(patnode.getAttribute("Max")) - 338 except ValueError, err: - 339 thmax = 0.0 - 340 myrange = (thmin, thmax) - 341 - 342 sz = patnode.getAttribute("Zero") - 343 if sz == "": - 344 zero = 0.0 - 345 else: - 346 zero = float(sz) - 347 - 348 # 3. background and excluded regions list - 349 bkgdnodecount = False - 350 backgroundtuple = None - 351 excludedregionslist = [] - 352 for childnode in patnode.childNodes: - 353 if childnode.localName == "BACKGROUND": - 354 # Background - 355 # 1. check for individuality - 356 if bkgdnodecount is True: - 357 errmsg = "More than 1 Background Node Is Given In XML" - 358 raise FitConfigurationError(msg) - 359 else: - 360 bkgdnodecount = True - 361 # 2. get Background - 362 bkgdtype, backgroundtuple = self.parseBackground(childnode) - 363 - 364 elif childnode.localName == "EXCLUDEDREGION": - 365 # excluded region - 366 start, end, bankno = parseExcludedRegion(childnode) - 367 excludedregionslist.append( (start, end, bankno) ) - 368 - 369 elif childnode.localName == "RANGE": - 370 minval = float(getAttributeValue(childnode, "Min")) - 371 maxval = float(getAttributeValue(childnode, "Max")) - 372 myrange = (minval, maxval) - 373 - 374 # END LOOP -- for childnode in patnode.childNodes - 375 - 376 # 4. build return - 377 dataset["DiffractionFileName"] = patfilename - 378 dataset["Range"] = myrange - 379 dataset["BackgroundFileName"] = backgroundtuple - 380 dataset["ExcludedRegion"] = excludedregionslist - 381 dataset["Zero"] = zero - 382 - 383 return dataset -
      384 - 385 - 386 # IV Instrument/Sample Corrections! -
      387 - def parsePeakProfile(self, peakprofilenode): -
      388 """ Construct a PeakProfile parameter value dictionary - 389 - 390 Argument: - 391 - peakprofilenode : XML node - 392 - 393 Return : dictionary of parameters - 394 """ - 395 # 1. Init - 396 peakattrdict = {} - 397 - 398 # 2. Peak Profile - 399 getXMLNodeAttributes(peakprofilenode, peakattrdict) - 400 - 401 # 3. Child nodes - 402 for childnode in peakprofilenode.childNodes: - 403 lname = childnode.localName - 404 if lname == "DECAY" or lname == "ABSORPTION": - 405 # FIXME More valid local name will come upon further development - 406 peakattrdict[lname.lower()] = {} - 407 getXMLNodeAttributes(childnode, peakattrdict[lname.lower()]) - 408 # LOOP-OVER: for childnode in peakprofilenode.childNodes: - 409 - 410 return peakattrdict -
      411 - 412 # END-CLASS InstrumentXMLParser - 413 - 414 -
      415 -class StructureXMLParser(object): -
      416 """ XML parser for structure XML file defined in SrRietveld - 417 - 418 Instantiate: - 419 StructureXMLParser(structurefilename) - 420 """ -
      421 - def __init__(self, structurefilename): -
      422 """ Initialization of StructureXMLParser - 423 - 424 Argument: - 425 - structurefilename : str - 426 """ - 427 self._modelxml = importXML(structurefilename) - 428 - 429 self.parseXMLModel() - 430 - 431 return -
      432 - 433 -
      434 - def getStructure(self): -
      435 """ - 436 Get the model/list of phases - 437 - 438 Return : List of Phases - 439 """ - 440 return self._curmodel -
      441 - 442 -
      443 - def parseXMLModel(self): -
      444 """ Parse model XML file to model nodes list - 445 - 446 Return : list of diffpy.srrietveld.Phase instances - 447 """ - 448 # 1. Import model - 449 modelnode = None - 450 for childnode in self._modelxml.childNodes: - 451 if childnode.localName == "MODEL": - 452 modelnode = childnode - 453 - 454 # 2. Modle node => phase nodes list - 455 if modelnode is None: - 456 errmsg = "No MODEL Node" - 457 raise FitConfigurationError(errmsg) - 458 else: - 459 phasenodeslist = [] - 460 for grandchildnode in modelnode.childNodes: - 461 if grandchildnode.localName == "PHASE": - 462 phasenodeslist.append(grandchildnode) - 463 if len(phasenodeslist) == 0: - 464 errmsg = "No PHASE Node Defined in MODEL-XML" - 465 raise FitConfigurationError(errmsg) - 466 - 467 # 3. Parse XML nodes to diffpy.rietveldapi/Middle-level objects - 468 self._curmodel = [] - 469 for phasenode in phasenodeslist: - 470 phase = self.parsePhaseNode(phasenode) - 471 self._curmodel.append(phase) - 472 - 473 return self._curmodel -
      474 - 475 -
      476 - def parsePhaseNode(self, phasenode): -
      477 """ Construct a Phase objects from a MODEL note - 478 - 479 Return : list of Phase objects - 480 """ - 481 import midscript as MS - 482 import math - 483 - 484 # 1. get type - 485 phasetype = phasenode.getAttribute("Type") - 486 - 487 if phasetype == "User": - 488 - 489 # 2.1 lattice - 490 a = float(phasenode.getAttribute("a")) - 491 b = float(phasenode.getAttribute("b")) - 492 c = float(phasenode.getAttribute("c")) - 493 alpha = float(phasenode.getAttribute("alpha")) - 494 beta = float(phasenode.getAttribute("beta")) - 495 gamma = float(phasenode.getAttribute("gamma")) - 496 lattice = MS.genLattice(a, b, c, alpha, beta, gamma) - 497 - 498 # 2.2 others - 499 spacegroup = str(phasenode.getAttribute("SpaceGroup")) - 500 phasename = str(phasenode.getAttribute("Name")) - 501 - 502 # 2.3 generate - 503 phase = MS.initCrystalPhase(lattice, spacegroup, phasename) - 504 - 505 # 2.2 atom - 506 for atomnode in phasenode.childNodes: - 507 # a. parse each atom's parameter - 508 elem = str(atomnode.getAttribute("Element")) - 509 tag = str(atomnode.getAttribute("Tag")) - 510 x = float(atomnode.getAttribute("x")) - 511 y = float(atomnode.getAttribute("y")) - 512 z = float(atomnode.getAttribute("z")) - 513 occ = float(atomnode.getAttribute("occ")) - 514 # specify Uiso/Biso, Biso is the internal standard - 515 bisostring = str(atomnode.getAttribute("Biso")) - 516 if bisostring != "": - 517 biso = float(bisostring) - 518 else: - 519 uiso = float(atomnode.getAttribute("Uiso")) - 520 biso = 8*math.pi*math.pi*uiso - 521 - 522 # b. add atom - 523 MS.addAtom(phase, atomtype=elem, fractcoordinate=(x, y, z), occ=occ, biso=biso, atomtag=tag) - 524 - 525 # LOOP OVER -- for atomnode in phasenode.childNodes: - 526 - 527 elif phasetype == "CIF": - 528 # read from CIF file - 529 cifname = getAttributeValue(phasenode, "CIFName") - 530 phase = importPhaseFromCIF() - 531 - 532 else: - 533 raise FitConfigurationError(errmsg) - 534 - 535 # 2. return - 536 return phase -
      537 - 538 -
      539 -class MeasurementXMLParser(object): -
      540 """ - 541 Parsing measurement XML file - 542 """ -
      543 - def __init__(self, measurementfilenamelist): -
      544 """ Initialization - 545 - 546 Assumption: - 547 1. one measurement XML file stands for one experiment - 548 - 549 Argument: - 550 - measurementfilenamelist : list of str, - 551 measurment XML file name - 552 - 553 Return : None - 554 """ - 555 if not isinstance(measurementfilenamelist, list): - 556 errmsg = "Type Error! Not List" - 557 raise NotImplementedError, errmsg - 558 - 559 # 1. Init - 560 self._expmeasurelist = [] - 561 self._measurements = [] - 562 - 563 # 2. Import and parse - 564 for measurefname in measurementfilenamelist: - 565 tempxml = importXML(measurefname) - 566 tempmeasurements = self.parseXMLMeasurement(tempxml) - 567 self._expmeasurelist.append( tempmeasurements ) - 568 # LOOP-OVER - 569 - 570 return -
      571 - 572 -
      573 - def getMeasurements(self): -
      574 """ Get the measurements/list of Measurment due to experiement - 575 - 576 Return : list of list of Measurement - 577 """ - 578 return self._expmeasurelist[:] -
      579 - 580 -
      581 - def parseXMLMeasurement(self, measurementxml): -
      582 """ Parse measurement XML file to measurement nodes list - 583 - 584 Argument: - 585 - measurementxml : str, XML node - 586 - 587 Return : list, diffpy.srrietveld.Measurement - 588 """ - 589 # 1. Locate MEASUREMENT node - 590 measurementnode = None - 591 for childnode in measurementxml.childNodes: - 592 if childnode.localName == "MEASUREMENT": - 593 measurementnode = childnode - 594 - 595 if measurementnode is None: - 596 errmsg = "Mesurement XML File Format Error: " + \ - 597 "MEASUREMENT Node Cannot Be Located" - 598 raise FigConfigurationError(errmsg) - 599 else: - 600 measuretype = str(getAttributeValue(measurementnode, "Type")) - 601 - 602 # 2. Measurement node => Bank nodes list - 603 banknodeslist = [] - 604 for grandchildnode in measurementnode.childNodes: - 605 if grandchildnode.localName == "BANK": - 606 banknodeslist.append(grandchildnode) - 607 elif grandchildnode.localName == "EXPERIMENT": - 608 exepnode = grandchildnode - 609 # LOOP-OVER: for grandchildnode in measurementnode.childNodes: - 610 - 611 # 3. Bank nodes list => measurement - 612 tempmeasurements = [] - 613 if measuretype.upper() == "XRAY" or measuretype.upper() == "NEUTRONCW": - 614 # Xray - 615 measurement = self.parseMeasurementNode(exepnode, measuretype) - 616 tempmeasurements.append(measurement) - 617 - 618 else: - 619 # TOF Multiple Bank - 620 for banknode in banknodeslist: - 621 measurement = self.parseMeasurementNode(banknode, 'TOF') - 622 tempmeasurements.append(measurement) - 623 # END-IF-ELSE - 624 - 625 self._measurements.extend( tempmeasurements ) - 626 - 627 return tempmeasurements -
      628 - 629 -
      630 - def parseMeasurementNode(self, measurementnode, instrumenttype): -
      631 """ Parse and set up and Measurement Object for a single Bank - 632 - 633 Arguments: - 634 - measurementnode : XML node for a single bank measurement - 635 - measurementtype : str, - 636 - 637 Return : Measurement instance - 638 """ - 639 import measurements as MSR - 640 - 641 # 1. Get All Attributes of the 'EXPERIMENT' Node - 642 measuredict = {} - 643 getXMLNodeAttributes(measurementnode, measuredict) - 644 - 645 # 2. Create a Measurement instance - 646 measure = MSR.Measurement() - 647 - 648 # 2.1 Required - 649 if measuredict.has_key("ID"): - 650 banknumber = measuredict["ID"] - 651 measure.setBankNumber(banknumber) - 652 - 653 filename = measuredict["DiffractionFileName"] - 654 measure.setDataFileName(filename) - 655 - 656 thmin = measuredict["Min"] - 657 thmax = measuredict["Max"] - 658 resol = measuredict["Resolution"] - 659 measure.setMeasureRange( (thmin, thmax) ) - 660 - 661 # 2.2 Optional - 662 backgroundnode = None - 663 setupnode = None - 664 for childnode in measurementnode.childNodes: - 665 if childnode.localName == "BACKGROUND": - 666 backgroundnode = childnode - 667 elif childnode.localName == "SETUP": - 668 setupnode = childnode - 669 - 670 # 2.2.1 Background - 671 if backgroundnode is not None: - 672 bkgddict = parseBackground(backgroundnode) - 673 bkgdtype = bkgddict["Type"] - 674 measure.setBackground(bkgdtype, bkgddict) - 675 - 676 # 2.2.2 Excluded region - 677 if setupnode is not None: - 678 for childnode in setupnode.childNodes: - 679 if childnode.localName == "EXCLUDEDREGION": - 680 start, end, bankno = parseExcludedRegion(childnode) - 681 measure.addExcludedRegion(banknumber, start, end) - 682 else: - 683 print childnode.localName - 684 - 685 return measure -
      686 - 687 -
      688 -def parseRange(rangenode): -
      689 """ Status: being coded - 690 - 691 Interpret a Range Node to For Min, Max, Step/Resolution - 692 - 693 Return : 3-float-tuple: thmin, thmax, resolution - 694 """ - 695 thmin = float(getAttributeValue(rangenode, "Thmin")) - 696 thmax = float(getAttributeValue(rangenode, "Thmax")) - 697 resol = float(getAttributeValue(rangenode, "Resolution")) - 698 - 699 return ( (thmin, thmax, resol) ) -
      700 - 701 -
      702 -def parseExcludedRegion(excludedregionnode): -
      703 """ Status: being coded - 704 - 705 Interpret an Excluded Region XML node - 706 - 707 Return : 3-tuple (float, float, int): start, end, bankno - 708 """ - 709 try: - 710 bankno = int(getAttributeValue(excludedregionnode, "Bank")) - 711 except TypeError, err: - 712 bankno = -1 - 713 start = float(getAttributeValue(excludedregionnode, "Begin")) - 714 end = float(getAttributeValue(excludedregionnode, "End")) - 715 - 716 return ( (start, end, bankno) ) -
      717 - 718 -
      719 -def parseBackground(backgroundnode): -
      720 """ Interpret a Background Node - 721 - 722 Used by both Measurement XML and Instrument XML - 723 - 724 Return : dictionary: parameters of background, keys including - 725 - Type str - 726 - Bkpos flaot - 727 - Format str - 728 - Select list - 729 """ - 730 # 1. type - 731 bkgdtype = str(backgroundnode.getAttribute("Type")) - 732 bkgdattrdict = {} - 733 - 734 # 2. get parameters: Bkpos - 735 try: - 736 bkpos = float(getAttributeValue(backgroundnode, "Bkpos")) - 737 bkgdattrdict["Bkpos"] = bkpos - 738 except TypeError, err: - 739 pass - 740 - 741 # 3. get background points, file or polynomial - 742 if bkgdtype == "Interpolated": - 743 bkgdattrdict["Type"] = "I" - 744 xmlbkgdfile = getAttributeValue(backgroundnode, "BackgroundFileName") - 745 bkgdpoints = [] - 746 - 747 if xmlbkgdfile is None: - 748 # Put background in XML file - 749 bkgdattrdict["Format"] = "Selected" - 750 for childnode in backgroundnode.childNodes: - 751 if childnode.localName == "SELECTED": - 752 x = float(childnode.getAttribute("x")) - 753 y = float(childnode.getAttribute("y")) - 754 bkgdpoints.append( (x, y) ) - 755 # LOOP-OVER: for childnode in backgroundnode.childNodes - 756 bkgdattrdict["Selected"] = bkgdpoints - 757 else: - 758 # Using background file - 759 bkgdattrdict["Format"] = "File" - 760 backgroundfile = str(xmlbkgdfile) - 761 bkgdattrdict["File"] = backgroundfile - 762 - 763 elif bkgdtype == "Polynomial": - 764 bkgdattrdict["Format"] = "Points" - 765 coefflist = [] - 766 try: - 767 terms = str(backgroundnode.getAttribute("Coefficients")).split() - 768 for term in terms: - 769 coefflist.append( float(term) ) - 770 except ValueError, err: - 771 pass - 772 bkgdattrdict["Type"] = "P" - 773 # default order value is 12, the max possibility - 774 try: - 775 order = int(backgroundnode.getAttribute("Order")) - 776 except ValueError, err: - 777 order = 12 - 778 bkgdattrdict["Order"] = order - 779 bkgdattrdict["Points"] = coefflist - 780 - 781 else: - 782 errmsg = "Background Type = %-10s Is Not Supported In XML Layer"% (bkgdtype) - 783 raise FitConfigurationError(errmsg) - 784 - 785 return bkgdattrdict -
      786 - 787 # END: Shared Methods - 788 - 789 -
      791 """ Parse a RefineStrategy provided by users. - 792 The XML files are in diffpy.srrietveld defined format - 793 """ -
      794 - def __init__(self, refinestrategyxmlfilename): -
      795 """ Initialization - 796 - 797 Argument: - 798 - refinestrategyxmlfilename : string, input file - 799 """ - 800 # 1. initialization of object-scope variables - 801 self._infodict = {} - 802 - 803 # 2. import file - 804 self._rietxml = importXML(refinestrategyxmlfilename) - 805 - 806 # 3. parse - 807 self.parseXML() - 808 - 809 return -
      810 - 811 -
      812 - def exportStdDictionary(self): -
      813 """ Export the standard information dictionary for RefineStrategy to import - 814 - 815 Return : dict - 816 """ - 817 return self._infodict -
      818 - 819 -
      820 - def parseXML(self): -
      821 """ Parsing XML file and import to an information dictionary - 822 - 823 Return : None - 824 """ - 825 # 1. Import Root and file check - 826 rguidenode = None - 827 for childnode in self._rietxml.childNodes: - 828 if childnode.localName == "REFINESTRATEGY": - 829 if rguidenode is None: - 830 rguidenode = childnode - 831 else: - 832 errmsg = "XML File Structure Error, More than 1 REFINESTRATEGY Node" - 833 raise NotImplementedError(errmsg) - 834 # LOOP-OVER: for childnode in self._rietxml.childNodes - 835 if rguidenode is None: - 836 errmsg = "XML File Structure Error, More than 1 REFINESTRATEGY Node" - 837 raise NotImplementedError(errmsg) - 838 - 839 # 2. Get STEP Node - 840 for childnode in rguidenode.childNodes: - 841 if childnode.localName == "STEP": - 842 step = int(getAttributeValue(childnode, "Step-Number")) - 843 if not self._infodict.has_key(step): - 844 self._infodict[step] = {} - 845 self._infodict[step]["new"] = [] - 846 self._infodict[step]["rm"] = [] - 847 self._infodict[step]["type"] = getAttributeValue(childnode, "Refine-Type") - 848 - 849 for grandchildnode in childnode.childNodes: - 850 # 2.1 add guide - 851 guidename = getAttributeValue(grandchildnode, "Guide") - 852 stage = getAttributeValue(grandchildnode, "Stage") - 853 if stage is None: - 854 stage = 1 - 855 else: - 856 stage = int(stage) - 857 if grandchildnode.localName == "ADDGUIDE": - 858 self._infodict[step]["new"].append( (guidename, stage) ) - 859 # 2.2 remove guide - 860 elif grandchildnode.localName == "REMOVEGUIDE": - 861 self._infodict[step]["rm"].append( (guidename, stage) ) - 862 # LOOP-OVER: for grandchildnode in childnode.childNodes: - 863 # LOOP-OVER: for childnode in rguidenode.childNodes - 864 - 865 return -
      866 - 867 # END-CLASS: RefineStrategyXMLParser - 868 - 869 - 870 # External and Static Methods for XML - 871 -
      872 -def xmlFilter(xmlobj): -
      873 """ Filter an xml.dom.mini.dom object - 874 - 875 Argument - 876 xmlobj : xml.dom.minidom.Document object (Element) - 877 - 878 Return : xml - 879 """ - 880 for childnode in xmlobj.childNodes[:]: - 881 if childnode.nodeType == xmlobj.TEXT_NODE: - 882 if childnode.nodeValue.strip() == "": - 883 xmlobj.removeChild(childnode) - 884 # else: - 885 # print "Value = <"+childnode.nodeValue+">" - 886 else: - 887 xmlFilter(childnode) - 888 - 889 return xmlobj -
      890 - 891 -
      892 -def importXML(filename): -
      893 """ Parse an XML file for quick-Rietveld-configuration - 894 - 895 Argument: - 896 filename : string, XML file name - 897 - 898 Return : an xml.dom.minidom.Document object - 899 """ - 900 - 901 # 1. import in - 902 try: - 903 ofile = open(filename, "r") - 904 rietxml = xml.dom.minidom.parse(ofile) - 905 ofile.close() - 906 except IOError, err: - 907 errmsg = "%-10s Cannot Be Found"% (filename) - 908 raise IOError(errmsg) - 909 - 910 # 2. import - 911 rietxml = xmlFilter(rietxml) - 912 - 913 return rietxml -
      914 - 915 -
      916 -def xmlToString(xmlobj, level, childno): -
      917 """ Export an XML object to string - 918 - 919 Argument - 920 - 921 return : string - 922 """ - 923 indentspace = "" - 924 for lindex in xrange(level): - 925 indentspace += " " - 926 wbuf = indentspace+"%-2s Type: %-10s Name: %-10s Value: %-10s"% \ - 927 (childno, xmlobj.nodeType, xmlobj.localName, xmlobj.nodeValue) - 928 numchildren = len(xmlobj.childNodes) - 929 for cindex in xrange(numchildren): - 930 wbuf += "\n%-60s"% (xmlToString(xmlobj.childNodes[cindex], level+1, cindex)) - 931 - 932 return wbuf -
      933 - 934 -
      935 -def xmlToDict(xmlnode): -
      936 """ Convert an XML object to a dictionary - 937 - 938 Argument: - 939 xmlboj : xml.dom.minidom.Document object - 940 - 941 Return : dict - 942 """ - 943 rdict = {} - 944 - 945 # 1. Attribution - 946 if xmlnode.attributes is not None: - 947 for index in xrange(xmlnode.attributes.length): - 948 attrname = xmlnode.attributes.item(index).name - 949 attrval = xmlnode.attributes.getNamedItem(attrname).value - 950 rdict[str(attrname)] = str(attrval) - 951 - 952 # 2. Recursive to call child nodes - 953 for child in xmlnode.childNodes: - 954 if not rdict.has_key(str(child.localName)): - 955 rdict[str(child.localName)] = [] - 956 rdict[child.localName].append( xmlToDict(child) ) - 957 - 958 return rdict -
      959 - 960 -
      961 -def getAttributeValue(elementnode, key): -
      962 """ Get the value of an attribute in an element node - 963 - 964 Argument: - 965 elementnode : an Dom element node instance - 966 key : string, key/name of an attribute - 967 - 968 Return : string, value of instrument - 969 """ - 970 try: - 971 value = elementnode.attributes.getNamedItem(key).value - 972 value = str(value) - 973 except AttributeError, err: - 974 value = None - 975 - 976 return value -
      977 - 978 -
      979 -def getXMLNodeAttributes(xmlnode, attrdict): -
      980 """ Retrieve the attributes (float) of an XML node and store in a dictionary - 981 - 982 Arguments: - 983 - xmlnode : XML node - 984 - attribdict: dictionary - 985 - 986 Return : None - 987 """ - 988 # 1. Get All Keys - 989 tempkeys = xmlnode.attributes.keys() - 990 - 991 # 2. Build Dictionary - 992 for tempkey in tempkeys: - 993 key = str(tempkey) - 994 val = str(xmlnode.getAttribute(tempkey)) - 995 try: - 996 attrdict[key] = float(val) - 997 if val.count(".") == 0: - 998 attrdict[key] = int(val) - 999 except ValueError: -1000 attrdict[key] = val -1001 -1002 return -
      1003 -1004 -
      1005 -def getInstrumentInformation(xmlfilename): -
      1006 """ Get the instrument name from an XML instrument file -1007 -1008 Argument: -1009 xmlfilename : str -1010 -1011 Return : dictionary -1012 - str, type of instrument -1013 - str, name of instrument -1014 """ -1015 # 1. Import instrument -1016 instrumentxml = importXML(xmlfilename) -1017 instrumentnode = None -1018 for childnode in instrumentxml.childNodes: -1019 if childnode.localName == "INSTRUMENT": -1020 instrumentnode = childnode -1021 -1022 # 2. Validate & Further Process -1023 infodict = {} -1024 if instrumentnode is None: -1025 errmsg = "No INSTRUMENT Node, Not A Valid Instrument XML File" -1026 raise FitConfigurationError(errmsg) -1027 -1028 iname = str(getAttributeValue(instrumentnode, "Name")) -1029 itype = str(getAttributeValue(instrumentnode, "Type")) -1030 -1031 infodict["Name"] = iname -1032 infodict["Type"] = itype -1033 -1034 # 3. parse instrument -1035 if itype.lower() == "xray": -1036 energynode = None -1037 for childnode in instrumentnode.childNodes: -1038 if childnode.localName == "ENERGY": -1039 energynode = childnode -1040 # LOOP-OVER -1041 -1042 # 3.1 energy node information -1043 if energynode is not None: -1044 wavelength = float(energynode.getAttribute("Lambda")) -1045 infodict["Lambda"] = wavelength -1046 -1047 # END-IF -1048 -1049 return infodict -
      1050 -1051 -
      1052 -def getStructureInformation(xmlfilename): -
      1053 """ Get the instrument name from an XML instrument file -1054 -1055 Argument: -1056 - xmlfilename : str -1057 -1058 Return : dictionary -1059 - str, type of instrument -1060 - str, name of instrument -1061 """ -1062 # 1. Import instrument -1063 structurexml = importXML(xmlfilename) -1064 structurenode = None -1065 for childnode in structurexml.childNodes: -1066 if childnode.localName == "MODEL": -1067 structurenode = childnode -1068 -1069 # 2. Validate & Further Process -1070 infodict = {} -1071 if structurenode is None: -1072 errmsg = "No MODEL Node, Not A Valid Instrument XML File" -1073 raise FitConfigurationError(errmsg) -1074 -1075 iname = str(getAttributeValue(structurenode, "Name")) -1076 -1077 infodict["Name"] = iname -1078 # END-IF -1079 -1080 return infodict -
      1081 -1082 -1083 -
      1084 -def importExcludedRegionFile(xmlfilename): -
      1085 """ Reading the standard Excluded-Region input file, -1086 and export the excludedregion-list -1087 -1088 Argument: -1089 - xmlfilename : str -1090 -1091 Return : dict. key = Bank ID (default = 0). value = list -1092 """ -1093 # 1. Import XML -1094 exregionxml = importXML(xmlfilename) -1095 setupnode = None -1096 for childnode in exregionxml.childNodes: -1097 if childnode.localName == "SETUP": -1098 setupnode = childnode -1099 -1100 # 2. Validate & Further Process -1101 if setupnode is None: -1102 errmsg = "No SETUP Node, Not A Valid Instrument XML File" -1103 raise FitConfigurationError(errmsg) -1104 -1105 # 3. parse instrument -1106 excludedregions = {} -1107 for childnode in setupnode.childNodes: -1108 if childnode.localName == "EXCLUDEDREGION": -1109 # 3.1 Read value -1110 begin = float(getAttributeValue(childnode, "Begin")) -1111 end = float(getAttributeValue(childnode, "End")) -1112 bankid = int(getAttributeValue(childnode, "Bank")) -1113 -1114 # 3.2 Set up -1115 if not excludedregions.has_key(bankid): -1116 excludedregions[bankid] = [] -1117 excludedregions[bankid].append( (begin, end) ) -1118 # END-IF -1119 # LOOP-OVER -1120 -1121 return excludedregions -
      1122 -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.InstrumentXMLParser-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.InstrumentXMLParser-class.html deleted file mode 100644 index 9d2c2dea..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.InstrumentXMLParser-class.html +++ /dev/null @@ -1,448 +0,0 @@ - - - - - srrietveld.xmlinterface.InstrumentXMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlinterface :: - Class InstrumentXMLParser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class InstrumentXMLParser

      source code

      -
      -object --+
      -         |
      -        InstrumentXMLParser
      -
      - -
      -
      -XML Parser to parse an instrument XML file
      -
      -Instantiate: 
      -  InstrumentXMLParser(instrumentfilename)
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - instrumentfilename)
      - Initialization of InstrumentXMLParser...
      - source code - -
      - -
      -   - - - - - - -
      getInstrument(self)
      - Get the Instrument of this XML file
      - source code - -
      - -
      -   - - - - - - -
      parseXMLInstrument(self)
      - Parse instrument XML file to instrument node to Instrument
      - source code - -
      - -
      -   - - - - - - -
      parseInstrumentNode(self, - instrumentnode)
      - Intepret an instrument and set up the following
      - source code - -
      - -
      -   - - - - - - -
      parsePattern(self, - patnode)
      - interpret a Pattern node including: (1) Pattern file name (2) - background file (optional) or background polynomials (3) excluded - region (optional)
      - source code - -
      - -
      -   - - - - - - -
      parsePeakProfile(self, - peakprofilenode)
      - Construct a PeakProfile parameter value dictionary...
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __str__ -

      -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - instrumentfilename) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization of InstrumentXMLParser
      -
      -Argument:
      -- instrumentfilename    :   str, xml input file
      -
      -
      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getInstrument(self) -

      -
      source code  -
      - -

      Get the Instrument of this XML file

      - Return : Instrument -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseXMLInstrument(self) -

      -
      source code  -
      - -

      Parse instrument XML file to instrument node to Instrument

      - Return : diffpy.srrietveld.Instrument instance -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseInstrumentNode(self, - instrumentnode) -

      -
      source code  -
      - -

      Intepret an instrument and set up the following

      - Return : 2-tuple, Instrument object, list of dictionary as - dataset -
      -
      -
      -
      - -
      - -
      - - -
      -

      parsePattern(self, - patnode) -

      -
      source code  -
      - -

      interpret a Pattern node including: (1) Pattern file name (2) - background file (optional) or background polynomials (3) excluded region - (optional)

      - Return : dictionary dataset -
      -
      -
      -
      - -
      - -
      - - -
      -

      parsePeakProfile(self, - peakprofilenode) -

      -
      source code  -
      - -
      -Construct a PeakProfile parameter value dictionary
      -
      -Argument:
      -- peakprofilenode   :   XML node
      -
      -Return  :   dictionary of parameters
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.MeasurementXMLParser-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.MeasurementXMLParser-class.html deleted file mode 100644 index 71ef2af3..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.MeasurementXMLParser-class.html +++ /dev/null @@ -1,380 +0,0 @@ - - - - - srrietveld.xmlinterface.MeasurementXMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlinterface :: - Class MeasurementXMLParser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class MeasurementXMLParser

      source code

      -
      -object --+
      -         |
      -        MeasurementXMLParser
      -
      - -
      -Parsing measurement XML file

      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - measurementfilenamelist)
      - Initialization - -Assumption: -1.
      - source code - -
      - -
      -   - - - - - - -
      getMeasurements(self)
      - Get the measurements/list of Measurment due to experiement
      - source code - -
      - -
      -   - - - - - - -
      parseXMLMeasurement(self, - measurementxml)
      - Parse measurement XML file to measurement nodes list...
      - source code - -
      - -
      -   - - - - - - -
      parseMeasurementNode(self, - measurementnode, - instrumenttype)
      - Parse and set up and Measurement Object for a single Bank...
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __str__ -

      -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - measurementfilenamelist) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization
      -
      -Assumption: 
      -1. one measurement XML file stands for one experiment
      -
      -Argument:
      -- measurementfilenamelist   :   list of str, 
      -                                measurment XML file name
      -
      -Return  :   None
      -
      -
      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getMeasurements(self) -

      -
      source code  -
      - -

      Get the measurements/list of Measurment due to experiement

      - Return : list of list of Measurement -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseXMLMeasurement(self, - measurementxml) -

      -
      source code  -
      - -
      -Parse measurement XML file to measurement nodes list
      -
      -Argument:
      -- measurementxml    :   str, XML node
      -
      -Return  :   list, diffpy.srrietveld.Measurement
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseMeasurementNode(self, - measurementnode, - instrumenttype) -

      -
      source code  -
      - -
      -Parse and set up and Measurement Object for a single Bank
      -
      -Arguments:
      -- measurementnode   :   XML node for a single bank measurement
      -- measurementtype   :   str, 
      -
      -Return              :   Measurement instance
      -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.RefineStrategyXMLParser-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.RefineStrategyXMLParser-class.html deleted file mode 100644 index 58aecf0e..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.RefineStrategyXMLParser-class.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - srrietveld.xmlinterface.RefineStrategyXMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlinterface :: - Class RefineStrategyXMLParser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class RefineStrategyXMLParser

      source code

      -Parse a RefineStrategy provided by users. The XML files are in - diffpy.srrietveld defined format

      - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - refinestrategyxmlfilename)
      - Initialization...
      - source code - -
      - -
      -   - - - - - - -
      exportStdDictionary(self)
      - Export the standard information dictionary for RefineStrategy to - import
      - source code - -
      - -
      -   - - - - - - -
      parseXML(self)
      - Parsing XML file and import to an information dictionary
      - source code - -
      - -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - refinestrategyxmlfilename) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization
      -
      -Argument:
      -- refinestrategyxmlfilename :   string, input file
      -
      -
      -
      -
      -
      -
      - -
      - -
      - - -
      -

      exportStdDictionary(self) -

      -
      source code  -
      - -

      Export the standard information dictionary for RefineStrategy to - import

      - Return : dict -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseXML(self) -

      -
      source code  -
      - -

      Parsing XML file and import to an information dictionary

      - Return : None -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.StructureXMLParser-class.html b/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.StructureXMLParser-class.html deleted file mode 100644 index 39a0c3c5..00000000 --- a/static_root/doc/srrietveld/developers/srrietveld.xmlinterface.StructureXMLParser-class.html +++ /dev/null @@ -1,358 +0,0 @@ - - - - - srrietveld.xmlinterface.StructureXMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - Package srrietveld :: - Module xmlinterface :: - Class StructureXMLParser - - - - - - -
      [hide private]
      [frames] | no frames]
      -
      - -

      Class StructureXMLParser

      source code

      -
      -object --+
      -         |
      -        StructureXMLParser
      -
      - -
      -
      -XML parser for structure XML file defined in SrRietveld
      -
      -Instantiate:
      -  StructureXMLParser(structurefilename)
      -
      -


      - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - -
      Instance Methods[hide private]
      -
      -   - - - - - - -
      __init__(self, - structurefilename)
      - Initialization of StructureXMLParser...
      - source code - -
      - -
      -   - - - - - - -
      getStructure(self)
      - Get the model/list of phases
      - source code - -
      - -
      -   - - - - - - -
      parseXMLModel(self)
      - Parse model XML file to model nodes list
      - source code - -
      - -
      -   - - - - - - -
      parsePhaseNode(self, - phasenode)
      - Construct a Phase objects from a MODEL note
      - source code - -
      - -
      -

      Inherited from object: - __delattr__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __str__ -

      -
      - - - - - - - - - -
      - - - - - -
      Properties[hide private]
      -
      -

      Inherited from object: - __class__ -

      -
      - - - - - - -
      - - - - - -
      Method Details[hide private]
      -
      - -
      - -
      - - -
      -

      __init__(self, - structurefilename) -
      (Constructor) -

      -
      source code  -
      - -
      -Initialization of StructureXMLParser
      -
      -Argument:
      -- structurefilename :   str
      -
      -
      -
      -
      Overrides: - object.__init__ -
      -
      -
      -
      - -
      - -
      - - -
      -

      getStructure(self) -

      -
      source code  -
      - -

      Get the model/list of phases

      - Return : List of Phases -
      -
      -
      -
      - -
      - -
      - - -
      -

      parseXMLModel(self) -

      -
      source code  -
      - -

      Parse model XML file to model nodes list

      - Return : list of diffpy.srrietveld.Phase instances -
      -
      -
      -
      - -
      - -
      - - -
      -

      parsePhaseNode(self, - phasenode) -

      -
      source code  -
      - -

      Construct a Phase objects from a MODEL note

      - Return : list of Phase objects -
      -
      -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - - - -
      - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-everything.html b/static_root/doc/srrietveld/developers/toc-everything.html deleted file mode 100644 index 5d24d18c..00000000 --- a/static_root/doc/srrietveld/developers/toc-everything.html +++ /dev/null @@ -1,434 +0,0 @@ - - - - - Everything - - - - - -

      Everything

      -
      -

      All Classes

      - srrietveld.atominfo.AtomDicts
      srrietveld.datafileconverter.DataFileParser
      srrietveld.datafileconverter.FullProfFreeFormatParser
      srrietveld.datafileconverter.GEMDataParser
      srrietveld.datafileconverter.NPDFDataParser
      srrietveld.datafileconverter.RAPDFDataParser
      srrietveld.datafileconverter.XYSigmaFileParser
      srrietveld.datamanager.DataManager
      srrietveld.dataprocessnpdf.NPDFData
      srrietveld.instrument.ConstWavelengthInstrument
      srrietveld.instrument.Instrument
      srrietveld.instrument.NeutronCWInstrument
      srrietveld.instrument.TOFInstrument
      srrietveld.instrument.ThermalNeutronTOFInstrument
      srrietveld.instrument.XrayInstrument
      srrietveld.mar_utilities.ChiFile
      srrietveld.mar_utilities.MarImage
      srrietveld.mar_utilities.MarSetup
      srrietveld.mar_utilities.SpecMarExposure
      srrietveld.measurements.Measurement
      srrietveld.modelrw.CifRW
      srrietveld.modelrw.ModelRW
      srrietveld.monitormem.MemoryMonitor
      srrietveld.parallelrefinecontrol.ParallelRefinementControl
      srrietveld.plot2d.Plot2D
      srrietveld.plot2d.PlotInfo2D
      srrietveld.plot2d.PlotMatLib
      srrietveld.refinebackend.RietveldEngine
      srrietveld.refineguides.ADPGuide
      srrietveld.refineguides.AbsorptionCorrectionGuide
      srrietveld.refineguides.AtomGuide
      srrietveld.refineguides.BackgroundGuide
      srrietveld.refineguides.ExpDecayGuide
      srrietveld.refineguides.FractionalCoordinateGuide
      srrietveld.refineguides.InstrumentGuide
      srrietveld.refineguides.LatticeGuide
      srrietveld.refineguides.MeasurementGuide
      srrietveld.refineguides.OccupancyGuide
      srrietveld.refineguides.PeakShapeGuide
      srrietveld.refineguides.RefineGuide
      srrietveld.refineguides.SampleGuide
      srrietveld.refineguides.ScaleGuide
      srrietveld.refineguides.WavelengthGuide
      srrietveld.refineguides.ZeroGuide
      srrietveld.refinehistory.RefineHistory
      srrietveld.refinemanager.MultiStepRefineManager
      srrietveld.refinesetup.AbsorptionCorrectionRefineSetup
      srrietveld.refinesetup.AnisotropicADPRefineSetup
      srrietveld.refinesetup.AtomFractionalCoordinateRefineSetup
      srrietveld.refinesetup.ConstantWaveSymmetricPeakShapeRefineSetup
      srrietveld.refinesetup.CubicRefineSetup
      srrietveld.refinesetup.HexagonalRefineSetup
      srrietveld.refinesetup.InterpolatedBackgroundRefineSetup
      srrietveld.refinesetup.IsotropicADPRefineSetup
      srrietveld.refinesetup.LatticeRefineSetup
      srrietveld.refinesetup.MonoclinicRefineSetup
      srrietveld.refinesetup.OccRefineSetup
      srrietveld.refinesetup.OrthorhombicRefineSetup
      srrietveld.refinesetup.PolynomialBackgroundRefineSetup
      srrietveld.refinesetup.PseudoVoigtExpDSpacingRefineSetup
      srrietveld.refinesetup.RefineSetup
      srrietveld.refinesetup.RegularPseudoVoigtRefineSetup
      srrietveld.refinesetup.ScaleFactorRefineSetup
      srrietveld.refinesetup.SplitPseudoVoigRefineSetup
      srrietveld.refinesetup.TCHPseudoVoigtRefineSetup
      srrietveld.refinesetup.TOFExpDecayRefineSetup
      srrietveld.refinesetup.TOFPseudoVoigtRefinement
      srrietveld.refinesetup.TetragonalRefineSetup
      srrietveld.refinesetup.TrigonalRefineSetup
      srrietveld.refinesetup.WavelengthRefineSetup
      srrietveld.refinesetup.ZeroShiftRefineSetup
      srrietveld.refinesetup.ZeroShiftThermoRefineSetup
      srrietveld.refinestrategy.CalibratedLebailRefineStrategy
      srrietveld.refinestrategy.CalibratedRietveldRefineStrategy
      srrietveld.refinestrategy.CalibratedTOFRietveldRefineStrategy
      srrietveld.refinestrategy.CalibratedXrayFullProfRefineStrategy
      srrietveld.refinestrategy.CalibratedXrayGSASRefineStrategy
      srrietveld.refinestrategy.CalibratedXrayRietveldRefineStrategy
      srrietveld.refinestrategy.CalibrationTOFFullProfRefineStrategy
      srrietveld.refinestrategy.CalibrationTOFGSASRefineStrategy
      srrietveld.refinestrategy.CalibrationTOFRietveldRefineStrategy
      srrietveld.refinestrategy.CalibrationXrayFullProfRefineStrategy
      srrietveld.refinestrategy.CalibrationXrayGSASRefineStrategy
      srrietveld.refinestrategy.CalibrationXrayRietveldRefineStrategy
      srrietveld.refinestrategy.CloseRietveldRefineStrategy
      srrietveld.refinestrategy.RefineStrategy
      srrietveld.refinestrategy.SctrachLebailRefineStrategy
      srrietveld.refinestrategy.UserDefinedRefineStrategy
      srrietveld.sequentialrefinecontrol.SeqRefineController
      srrietveld.utilbackground.BackgroundProcess
      srrietveld.utilbackground.XrayBackgroundProcess
      srrietveld.viserrors.VisualizationError
      srrietveld.xmlconvertor.cifToxml
      srrietveld.xmlgenerator.ExcludedRegionXMLGenerator
      srrietveld.xmlgenerator.GEMMeasurementXMLGenerator
      srrietveld.xmlgenerator.InstrumentXMLGenerator
      srrietveld.xmlgenerator.MeasurementXMLGenerator
      srrietveld.xmlgenerator.ModelXMLGenerator
      srrietveld.xmlgenerator.NPDFMeasurementXMLGenerator
      srrietveld.xmlgenerator.NeutronCWInstrumentMeasurementXMLGenerator
      srrietveld.xmlgenerator.POWGENMeasurementXMLGenerator
      srrietveld.xmlgenerator.RAPDFMeasurementXMLGenerator
      srrietveld.xmlgenerator.RefineStrategyXMLGenerator
      srrietveld.xmlgenerator.SeqFitRecordXMLGenerator
      srrietveld.xmlgenerator.TOFMeasurementXMLGenerator
      srrietveld.xmlgenerator.TOFXMLGenerator
      srrietveld.xmlgenerator.ThermalNeutronTOFXMLGenerator
      srrietveld.xmlgenerator.XMLGenerator
      srrietveld.xmlgenerator.XrayInstrumentMeasurementXMLGenerator
      srrietveld.xmlgenerator.XrayInstrumentXMLGenerator
      srrietveld.xmlinterface.InstrumentXMLParser
      srrietveld.xmlinterface.MeasurementXMLParser
      srrietveld.xmlinterface.RefineStrategyXMLParser
      srrietveld.xmlinterface.StructureXMLParser

      All Functions

      - srrietveld.atominfo.getAtomNumberByName
      srrietveld.autobackgroundselect.autoBackgroundSelection
      srrietveld.autobackgroundselect.filterBackgroundPoints
      srrietveld.auxiliary.getHomeValueIndex
      srrietveld.auxiliary.getValueIndex
      srrietveld.auxiliary.optionToString
      srrietveld.auxiliary.readOption
      srrietveld.auxiliary.searchdict
      srrietveld.auxiliary.testmain
      srrietveld.datafileconverter.convertChiToGSAS
      srrietveld.datafileconverter.convertChiToXYSigma
      srrietveld.datafileconverter.convertXYSigmaToChi
      srrietveld.datafileconverter.dataFileFormat
      srrietveld.datamanager.duplicateModel
      srrietveld.datamanager.isGoodFit
      srrietveld.datamanager.loadFit
      srrietveld.datamanager.searchClosestValue
      srrietveld.dataprocessnpdf.exportRawGSA
      srrietveld.enduserscripts.plot2D
      srrietveld.enduserscripts.refineByScript
      srrietveld.enduserscripts.simpleFit
      srrietveld.gsasfileparser.MapKey
      srrietveld.gsasfileparser.genTOFInstrument
      srrietveld.gsasfileparser.importFromGSASexp
      srrietveld.gsasfileparser.parseGSASiparm
      srrietveld.instrument.getInstrument
      srrietveld.instrument.isPatternOneBank
      srrietveld.io.getDataFromColumnFile
      srrietveld.io.listFileNamesInDirectory
      srrietveld.io.writeToColumnFile
      srrietveld.mar_utilities.defineMarSetup
      srrietveld.mar_utilities.getSpecMarExposures
      srrietveld.midscript.Cubic
      srrietveld.midscript.addAtom
      srrietveld.midscript.addComponent
      srrietveld.midscript.checkMust
      srrietveld.midscript.genFit
      srrietveld.midscript.genLattice
      srrietveld.midscript.genPeakProfile
      srrietveld.midscript.getPatterns
      srrietveld.midscript.initBackground
      srrietveld.midscript.initCWNeutronPattern
      srrietveld.midscript.initCWXrayPattern
      srrietveld.midscript.initCrystalPhase
      srrietveld.midscript.initCylindricalAbsorptionCorrection
      srrietveld.midscript.initExponentialDecay
      srrietveld.midscript.initInterpolatedBackground
      srrietveld.midscript.initPolynomialBackground
      srrietveld.midscript.initProfileGaussian
      srrietveld.midscript.initProfilePseudoVoigt
      srrietveld.midscript.initProfilePseudoVoigtIkedaCarpenter
      srrietveld.midscript.initProfileSplitPseudoVoigt
      srrietveld.midscript.initProfileTCHPseudoVoigt
      srrietveld.midscript.initPseudoVoigtExp
      srrietveld.midscript.initPseudoVoigtExpDSpacing
      srrietveld.midscript.initTOFPattern
      srrietveld.midscript.initThermalExponentialDecay
      srrietveld.midscript.initThermalTOFPattern
      srrietveld.midscript.locateRefinableParameter
      srrietveld.midscript.mapStructure
      srrietveld.midscript.reloadData
      srrietveld.midscript.replaceStructureModel
      srrietveld.midscript.set2ThetaSymmetricPeakProfile
      srrietveld.midscript.setCWPattern
      srrietveld.midscript.setExcludedRegion
      srrietveld.midscript.setPattern
      srrietveld.midscript.setRefineRegion
      srrietveld.mixedphaseanalyzer.searchPeaks
      srrietveld.modelrw.importCIF
      srrietveld.monitormem.garbageCheck
      srrietveld.phasescript.genPhaseCIF
      srrietveld.phasescript.genPhaseDict
      srrietveld.phasescript.getTuple
      - - - - - - srrietveld.plot2d.plot2D
      srrietveld.plot2d.plotFit
      srrietveld.plot2d.plotObservedPattern
      srrietveld.plot2d.plotPattern
      srrietveld.plot2d.removeRegion
      srrietveld.refinemanager.getProcessID
      srrietveld.refinemanager.isSinglePatternType
      srrietveld.refinemanager.loadMultiStepRefinements
      srrietveld.setBackend
      srrietveld.spacegroupinfo.getCrystalSystemFromSpaceGroup
      srrietveld.srrietveldconfiguration.__main__
      srrietveld.stringutilfunction.startWith
      srrietveld.uisupport.convertCHIDataFileFormatFullProf
      srrietveld.uisupport.convertCHIDataFileFormatGSAS
      srrietveld.uisupport.convertDataFilesFormat
      srrietveld.uisupport.convertDataFormat
      srrietveld.uisupport.genFileListFromInfoFile
      srrietveld.uisupport.genFileListFromTemplate
      srrietveld.uisupport.genRAPDFXMLTemplate
      srrietveld.uisupport.getRefinementStrategy
      srrietveld.uisupport.independentFit
      srrietveld.uisupport.isOfTemplate
      srrietveld.uisupport.mapDataFileToStructure
      srrietveld.uisupport.readRAPDFXML
      srrietveld.uisupport.sequentialFit
      srrietveld.uisupport.singleRaPDFFit
      srrietveld.utilbackground.convertQbackground
      srrietveld.utilbackground.genBackground
      srrietveld.utilbackground.genStandardBackground
      srrietveld.utilbackground.replaceInterpolatedBackground
      srrietveld.utilinstrument.genInstrument
      srrietveld.utilinstrument.genXMLGenerator
      srrietveld.utilplot.caldDiff
      srrietveld.utilplot.exportColumnFiles
      srrietveld.utilrapdf.getRAPDFInstrument
      srrietveld.utilrefineguide.activeVariable
      srrietveld.utilrefineguide.genADPRefineSetup
      srrietveld.utilrefineguide.genAbsorptionCorrectionRefineSetup
      srrietveld.utilrefineguide.genAtomFractionalPositionSetup
      srrietveld.utilrefineguide.genBackgroundRefineSetup
      srrietveld.utilrefineguide.genLatticeRefineSetup
      srrietveld.utilrefineguide.genPeakShapeRefineSetup
      srrietveld.utilrefineguide.genScaleRefineSetup
      srrietveld.utilrefineguide.genTOFExpDecayRefinement
      srrietveld.utilrefineguide.genVarName
      srrietveld.utilrefineguide.genWavelengthRefineSetup
      srrietveld.utilrefineguide.genZeroRefineSetup
      srrietveld.utilrefineguide.getLatticeInGroup
      srrietveld.utilrefineguide.locateSharingSite
      srrietveld.utilrefineguide.sortByAtomNumber
      srrietveld.utilrefineguide.sortByAtomTag
      srrietveld.utilsequentialrefine.getSolutionSeqXML
      srrietveld.utilsequentialrefine.loadSeqRefineController
      srrietveld.utilsequentialrefine.parseStructureSeqXML
      srrietveld.utilunits.convert2THETAtoD
      srrietveld.utilunits.convertDto2THETA
      srrietveld.utilunits.convertDtoTOF
      srrietveld.utilunits.convertTOFtoD
      srrietveld.viewer3d.GetSpaceGroup
      srrietveld.viewer3d.checkExternalPackage
      srrietveld.viewer3d.plotPhase
      srrietveld.viewer3d.set3DViewer
      srrietveld.viewer3d.startPyMol
      srrietveld.viewer3d.startVMD
      srrietveld.viewer3d.viewer3D
      srrietveld.xmlinterface.getAttributeValue
      srrietveld.xmlinterface.getInstrumentInformation
      srrietveld.xmlinterface.getStructureInformation
      srrietveld.xmlinterface.getXMLNodeAttributes
      srrietveld.xmlinterface.importExcludedRegionFile
      srrietveld.xmlinterface.importXML
      srrietveld.xmlinterface.parseBackground
      srrietveld.xmlinterface.parseExcludedRegion
      srrietveld.xmlinterface.parseRange
      srrietveld.xmlinterface.xmlFilter
      srrietveld.xmlinterface.xmlToDict
      srrietveld.xmlinterface.xmlToString

      All Variables

      - srrietveld.__id__
      srrietveld.atominfo.__id__
      srrietveld.autobackgroundselect.__id__
      - srrietveld.auxiliary.__id__
      srrietveld.datafileconverter.__id__
      srrietveld.datamanager.MAXRP
      srrietveld.datamanager.__id__
      srrietveld.dataprocessnpdf.__id__
      srrietveld.enduserscripts.All
      srrietveld.enduserscripts.ETA
      srrietveld.enduserscripts.__id__
      srrietveld.enduserscripts.fracCoords
      srrietveld.enduserscripts.latParms
      srrietveld.enduserscripts.scale
      srrietveld.enduserscripts.zeroShift
      srrietveld.gsasfileparser.__id__
      srrietveld.instrument.__id__
      srrietveld.instrument.myEngine
      srrietveld.io.__id__
      srrietveld.mar_utilities.__id__
      - srrietveld.measurements.__id__
      srrietveld.midscript.__id__
      srrietveld.midscript.myEngine
      srrietveld.mixedphaseanalyzer.__id__
      srrietveld.modelrw.__id__
      srrietveld.monitormem.__id__
      srrietveld.myEngine
      - srrietveld.parallelrefinecontrol.__id__
      srrietveld.phasescript.__id__
      srrietveld.plot2d.__id__
      - srrietveld.qbackgrounds.Qbackground
      srrietveld.qbackgrounds.__id__
      srrietveld.refinebackend.__id__
      srrietveld.refineguides.ETA
      - srrietveld.refineguides.__id__
      srrietveld.refinehistory.__id__
      - - - - - srrietveld.refinemanager.__id__
      srrietveld.refinemanager.myEngine
      - - srrietveld.refinesetup.__id__
      srrietveld.refinestrategy.__id__
      - - - srrietveld.sequentialrefinecontrol.__id__
      srrietveld.sequentialrefinecontrol.myEngine
      srrietveld.spacegroupinfo.CystalStructureNameDict
      srrietveld.spacegroupinfo.SpacegroupIDDict
      srrietveld.spacegroupinfo.SpacegroupNameDict
      srrietveld.spacegroupinfo.__id__
      srrietveld.srrietveldconfiguration.__id__
      srrietveld.stringutilfunction.__id__
      - srrietveld.uisupport.__id__
      srrietveld.utilbackground.__id__
      srrietveld.utilinstrument.__id__
      srrietveld.utilplot.__id__
      srrietveld.utilrapdf.__id__
      - srrietveld.utilrefineguide.__id__
      srrietveld.utilsequentialrefine.__id__
      srrietveld.utilunits.CONST_ARCDEGREE
      srrietveld.utilunits.CONST_DEGREEARC
      srrietveld.utilunits.__id__
      srrietveld.viewer3d.__id__
      - - srrietveld.viserrors.__id__
      srrietveld.xmlgenerator.__id__
      srrietveld.xmlinterface.__id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld-module.html deleted file mode 100644 index 12d92740..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld-module.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - srrietveld - - - - - -

      Module srrietveld

      -
      -

      Functions

      - setBackend

      Variables

      - __id__
      myEngine

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.atominfo-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.atominfo-module.html deleted file mode 100644 index a009d4a1..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.atominfo-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - atominfo - - - - - -

      Module atominfo

      -
      -

      Classes

      - AtomDicts

      Functions

      - getAtomNumberByName

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.autobackgroundselect-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.autobackgroundselect-module.html deleted file mode 100644 index facefa10..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.autobackgroundselect-module.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - autobackgroundselect - - - - - -

      Module autobackgroundselect

      -
      -

      Functions

      - autoBackgroundSelection
      filterBackgroundPoints

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.auxiliary-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.auxiliary-module.html deleted file mode 100644 index ea8b2308..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.auxiliary-module.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - auxiliary - - - - - -

      Module auxiliary

      -
      -

      Functions

      - getHomeValueIndex
      getValueIndex
      optionToString
      readOption
      searchdict
      testmain

      Variables

      - - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.datafileconverter-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.datafileconverter-module.html deleted file mode 100644 index 3412e799..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.datafileconverter-module.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - datafileconverter - - - - - -

      Module datafileconverter

      -
      -

      Classes

      - DataFileParser
      FullProfFreeFormatParser
      GEMDataParser
      NPDFDataParser
      RAPDFDataParser
      XYSigmaFileParser

      Functions

      - convertChiToGSAS
      convertChiToXYSigma
      convertXYSigmaToChi
      dataFileFormat

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.datamanager-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.datamanager-module.html deleted file mode 100644 index 9c0b501a..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.datamanager-module.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - datamanager - - - - - -

      Module datamanager

      -
      -

      Classes

      - DataManager

      Functions

      - duplicateModel
      isGoodFit
      loadFit
      searchClosestValue

      Variables

      - MAXRP
      __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.dataprocessnpdf-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.dataprocessnpdf-module.html deleted file mode 100644 index 3e9269c7..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.dataprocessnpdf-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - dataprocessnpdf - - - - - -

      Module dataprocessnpdf

      -
      -

      Classes

      - NPDFData

      Functions

      - exportRawGSA

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.enduserscripts-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.enduserscripts-module.html deleted file mode 100644 index 8f33b6f1..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.enduserscripts-module.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - enduserscripts - - - - - -

      Module enduserscripts

      -
      -

      Functions

      - plot2D
      refineByScript
      simpleFit

      Variables

      - All
      ETA
      __id__
      fracCoords
      latParms
      scale
      zeroShift

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.gsasfileparser-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.gsasfileparser-module.html deleted file mode 100644 index 764e2a77..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.gsasfileparser-module.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - gsasfileparser - - - - - -

      Module gsasfileparser

      -
      -

      Functions

      - MapKey
      genTOFInstrument
      importFromGSASexp
      parseGSASiparm

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.instrument-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.instrument-module.html deleted file mode 100644 index 841fec33..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.instrument-module.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - instrument - - - - - -

      Module instrument

      -
      -

      Classes

      - ConstWavelengthInstrument
      Instrument
      NeutronCWInstrument
      TOFInstrument
      ThermalNeutronTOFInstrument
      XrayInstrument

      Functions

      - getInstrument
      isPatternOneBank

      Variables

      - __id__
      myEngine

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.io-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.io-module.html deleted file mode 100644 index a57b0167..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.io-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - io - - - - - -

      Module io

      -
      -

      Functions

      - getDataFromColumnFile
      listFileNamesInDirectory
      writeToColumnFile

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.mar_utilities-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.mar_utilities-module.html deleted file mode 100644 index 21792dda..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.mar_utilities-module.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - mar_utilities - - - - - -

      Module mar_utilities

      -
      -

      Classes

      - ChiFile
      MarImage
      MarSetup
      SpecMarExposure

      Functions

      - defineMarSetup
      getSpecMarExposures

      Variables

      - __id__
      -
      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.measurements-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.measurements-module.html deleted file mode 100644 index e2eda929..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.measurements-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - measurements - - - - - -

      Module measurements

      -
      -

      Classes

      - Measurement

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.midscript-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.midscript-module.html deleted file mode 100644 index a6d34b2b..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.midscript-module.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - midscript - - - - - -

      Module midscript

      -
      -

      Functions

      - Cubic
      addAtom
      addComponent
      checkMust
      genFit
      genLattice
      genPeakProfile
      getPatterns
      initBackground
      initCWNeutronPattern
      initCWXrayPattern
      initCrystalPhase
      initCylindricalAbsorptionCorrection
      initExponentialDecay
      initInterpolatedBackground
      initPolynomialBackground
      initProfileGaussian
      initProfilePseudoVoigt
      initProfilePseudoVoigtIkedaCarpenter
      initProfileSplitPseudoVoigt
      initProfileTCHPseudoVoigt
      initPseudoVoigtExp
      initPseudoVoigtExpDSpacing
      initTOFPattern
      initThermalExponentialDecay
      initThermalTOFPattern
      locateRefinableParameter
      mapStructure
      reloadData
      replaceStructureModel
      set2ThetaSymmetricPeakProfile
      setCWPattern
      setExcludedRegion
      setPattern
      setRefineRegion

      Variables

      - __id__
      myEngine

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.mixedphaseanalyzer-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.mixedphaseanalyzer-module.html deleted file mode 100644 index 712e7704..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.mixedphaseanalyzer-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - mixedphaseanalyzer - - - - - -

      Module mixedphaseanalyzer

      -
      -

      Functions

      - searchPeaks

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.modelrw-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.modelrw-module.html deleted file mode 100644 index a3518808..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.modelrw-module.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - modelrw - - - - - -

      Module modelrw

      -
      -

      Classes

      - CifRW
      ModelRW

      Functions

      - importCIF

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.monitormem-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.monitormem-module.html deleted file mode 100644 index ca3045e5..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.monitormem-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - monitormem - - - - - -

      Module monitormem

      -
      -

      Classes

      - MemoryMonitor

      Functions

      - garbageCheck

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.parallelrefinecontrol-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.parallelrefinecontrol-module.html deleted file mode 100644 index 21b337fa..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.parallelrefinecontrol-module.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - parallelrefinecontrol - - - - - -

      Module parallelrefinecontrol

      -
      -

      Classes

      - ParallelRefinementControl

      Variables

      - - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.phasescript-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.phasescript-module.html deleted file mode 100644 index c20d78c5..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.phasescript-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - phasescript - - - - - -

      Module phasescript

      -
      -

      Functions

      - genPhaseCIF
      genPhaseDict
      getTuple

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.plot2d-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.plot2d-module.html deleted file mode 100644 index 68605cac..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.plot2d-module.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - plot2d - - - - - -

      Module plot2d

      -
      -

      Classes

      - Plot2D
      PlotInfo2D
      PlotMatLib

      Functions

      - - -
      - _isInt
      - - - - plot2D
      plotFit
      plotObservedPattern
      plotPattern
      removeRegion

      Variables

      - __id__
      -
      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.qbackgrounds-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.qbackgrounds-module.html deleted file mode 100644 index 004b381e..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.qbackgrounds-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - qbackgrounds - - - - - -

      Module qbackgrounds

      -
      -

      Variables

      - Qbackground
      __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.refinebackend-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.refinebackend-module.html deleted file mode 100644 index f60229e4..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.refinebackend-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - refinebackend - - - - - -

      Module refinebackend

      -
      -

      Classes

      - RietveldEngine

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.refineguides-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.refineguides-module.html deleted file mode 100644 index 7e9dce24..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.refineguides-module.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - refineguides - - - - - -

      Module refineguides

      -
      -

      Classes

      - ADPGuide
      AbsorptionCorrectionGuide
      AtomGuide
      BackgroundGuide
      ExpDecayGuide
      FractionalCoordinateGuide
      InstrumentGuide
      LatticeGuide
      MeasurementGuide
      OccupancyGuide
      PeakShapeGuide
      RefineGuide
      SampleGuide
      ScaleGuide
      WavelengthGuide
      ZeroGuide

      Variables

      - ETA
      - _DEBUG
      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.refinehistory-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.refinehistory-module.html deleted file mode 100644 index 74980555..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.refinehistory-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - refinehistory - - - - - -

      Module refinehistory

      -
      -

      Classes

      - RefineHistory

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.refinemanager-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.refinemanager-module.html deleted file mode 100644 index 2169c676..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.refinemanager-module.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - refinemanager - - - - - -

      Module refinemanager

      -
      -

      Classes

      - MultiStepRefineManager

      Functions

      - getProcessID
      isSinglePatternType
      loadMultiStepRefinements

      Variables

      - -
      - _DEBUG
      - - - - __id__
      myEngine

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.refinesetup-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.refinesetup-module.html deleted file mode 100644 index 08b070fb..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.refinesetup-module.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - refinesetup - - - - - -

      Module refinesetup

      -
      -

      Classes

      - AbsorptionCorrectionRefineSetup
      AnisotropicADPRefineSetup
      AtomFractionalCoordinateRefineSetup
      ConstantWaveSymmetricPeakShapeRefineSetup
      CubicRefineSetup
      HexagonalRefineSetup
      InterpolatedBackgroundRefineSetup
      IsotropicADPRefineSetup
      LatticeRefineSetup
      MonoclinicRefineSetup
      OccRefineSetup
      OrthorhombicRefineSetup
      PolynomialBackgroundRefineSetup
      PseudoVoigtExpDSpacingRefineSetup
      RefineSetup
      RegularPseudoVoigtRefineSetup
      ScaleFactorRefineSetup
      SplitPseudoVoigRefineSetup
      TCHPseudoVoigtRefineSetup
      TOFExpDecayRefineSetup
      TOFPseudoVoigtRefinement
      TetragonalRefineSetup
      TrigonalRefineSetup
      WavelengthRefineSetup
      ZeroShiftRefineSetup
      ZeroShiftThermoRefineSetup

      Variables

      -
      - _DEBUG
      - - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.refinestrategy-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.refinestrategy-module.html deleted file mode 100644 index 68be1179..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.refinestrategy-module.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - refinestrategy - - - - - -

      Module refinestrategy

      -
      -

      Classes

      - CalibratedLebailRefineStrategy
      CalibratedRietveldRefineStrategy
      CalibratedTOFRietveldRefineStrategy
      CalibratedXrayFullProfRefineStrategy
      CalibratedXrayGSASRefineStrategy
      CalibratedXrayRietveldRefineStrategy
      CalibrationTOFFullProfRefineStrategy
      CalibrationTOFGSASRefineStrategy
      CalibrationTOFRietveldRefineStrategy
      CalibrationXrayFullProfRefineStrategy
      CalibrationXrayGSASRefineStrategy
      CalibrationXrayRietveldRefineStrategy
      CloseRietveldRefineStrategy
      RefineStrategy
      SctrachLebailRefineStrategy
      UserDefinedRefineStrategy

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.sequentialrefinecontrol-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.sequentialrefinecontrol-module.html deleted file mode 100644 index 16f01254..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.sequentialrefinecontrol-module.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - sequentialrefinecontrol - - - - - -

      Module sequentialrefinecontrol

      -
      -

      Classes

      - SeqRefineController

      Variables

      - - - - __id__
      myEngine

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.spacegroupinfo-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.spacegroupinfo-module.html deleted file mode 100644 index 7264404d..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.spacegroupinfo-module.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - spacegroupinfo - - - - - -

      Module spacegroupinfo

      -
      -

      Functions

      - getCrystalSystemFromSpaceGroup

      Variables

      - CystalStructureNameDict
      SpacegroupIDDict
      SpacegroupNameDict
      __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.srrietveldconfiguration-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.srrietveldconfiguration-module.html deleted file mode 100644 index a7a6a9da..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.srrietveldconfiguration-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - srrietveldconfiguration - - - - - -

      Module srrietveldconfiguration

      -
      -

      Functions

      - __main__

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.stringutilfunction-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.stringutilfunction-module.html deleted file mode 100644 index 10870071..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.stringutilfunction-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - stringutilfunction - - - - - -

      Module stringutilfunction

      -
      -

      Functions

      - startWith

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.uisupport-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.uisupport-module.html deleted file mode 100644 index b1d155f5..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.uisupport-module.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - uisupport - - - - - -

      Module uisupport

      -
      -

      Functions

      - convertCHIDataFileFormatFullProf
      convertCHIDataFileFormatGSAS
      convertDataFilesFormat
      convertDataFormat
      genFileListFromInfoFile
      genFileListFromTemplate
      genRAPDFXMLTemplate
      getRefinementStrategy
      independentFit
      isOfTemplate
      mapDataFileToStructure
      readRAPDFXML
      sequentialFit
      singleRaPDFFit

      Variables

      - - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.utilbackground-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.utilbackground-module.html deleted file mode 100644 index 8b9f26d8..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.utilbackground-module.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - utilbackground - - - - - -

      Module utilbackground

      -
      -

      Classes

      - BackgroundProcess
      XrayBackgroundProcess

      Functions

      - convertQbackground
      genBackground
      genStandardBackground
      replaceInterpolatedBackground

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.utilinstrument-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.utilinstrument-module.html deleted file mode 100644 index 8922779f..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.utilinstrument-module.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - utilinstrument - - - - - -

      Module utilinstrument

      -
      -

      Functions

      - genInstrument
      genXMLGenerator

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.utilplot-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.utilplot-module.html deleted file mode 100644 index 4820e1aa..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.utilplot-module.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - utilplot - - - - - -

      Module utilplot

      -
      -

      Functions

      - caldDiff
      exportColumnFiles

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.utilrapdf-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.utilrapdf-module.html deleted file mode 100644 index 510f02f8..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.utilrapdf-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - utilrapdf - - - - - -

      Module utilrapdf

      -
      -

      Functions

      - getRAPDFInstrument

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.utilrefineguide-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.utilrefineguide-module.html deleted file mode 100644 index 694ddbd3..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.utilrefineguide-module.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - utilrefineguide - - - - - -

      Module utilrefineguide

      -
      -

      Functions

      - activeVariable
      genADPRefineSetup
      genAbsorptionCorrectionRefineSetup
      genAtomFractionalPositionSetup
      genBackgroundRefineSetup
      genLatticeRefineSetup
      genPeakShapeRefineSetup
      genScaleRefineSetup
      genTOFExpDecayRefinement
      genVarName
      genWavelengthRefineSetup
      genZeroRefineSetup
      getLatticeInGroup
      locateSharingSite
      sortByAtomNumber
      sortByAtomTag

      Variables

      - - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.utilsequentialrefine-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.utilsequentialrefine-module.html deleted file mode 100644 index 80512139..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.utilsequentialrefine-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - utilsequentialrefine - - - - - -

      Module utilsequentialrefine

      -
      -

      Functions

      - getSolutionSeqXML
      loadSeqRefineController
      parseStructureSeqXML

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.utilunits-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.utilunits-module.html deleted file mode 100644 index 79129bae..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.utilunits-module.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - utilunits - - - - - -

      Module utilunits

      -
      -

      Functions

      - convert2THETAtoD
      convertDto2THETA
      convertDtoTOF
      convertTOFtoD

      Variables

      - CONST_ARCDEGREE
      CONST_DEGREEARC
      __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.viewer3d-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.viewer3d-module.html deleted file mode 100644 index f82c6118..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.viewer3d-module.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - viewer3d - - - - - -

      Module viewer3d

      -
      -

      Functions

      - GetSpaceGroup
      checkExternalPackage
      plotPhase
      set3DViewer
      startPyMol
      startVMD
      viewer3D

      Variables

      - __id__
      - -
      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.viserrors-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.viserrors-module.html deleted file mode 100644 index 08ab5fe1..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.viserrors-module.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - viserrors - - - - - -

      Module viserrors

      -
      -

      Classes

      - VisualizationError

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.xmlconvertor-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.xmlconvertor-module.html deleted file mode 100644 index 2ccda67e..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.xmlconvertor-module.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - xmlconvertor - - - - - -

      Module xmlconvertor

      -
      -

      Classes

      - cifToxml

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.xmlgenerator-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.xmlgenerator-module.html deleted file mode 100644 index 83413425..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.xmlgenerator-module.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - xmlgenerator - - - - - -

      Module xmlgenerator

      -
      -

      Classes

      - ExcludedRegionXMLGenerator
      GEMMeasurementXMLGenerator
      InstrumentXMLGenerator
      MeasurementXMLGenerator
      ModelXMLGenerator
      NPDFMeasurementXMLGenerator
      NeutronCWInstrumentMeasurementXMLGenerator
      POWGENMeasurementXMLGenerator
      RAPDFMeasurementXMLGenerator
      RefineStrategyXMLGenerator
      SeqFitRecordXMLGenerator
      TOFMeasurementXMLGenerator
      TOFXMLGenerator
      ThermalNeutronTOFXMLGenerator
      XMLGenerator
      XrayInstrumentMeasurementXMLGenerator
      XrayInstrumentXMLGenerator

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc-srrietveld.xmlinterface-module.html b/static_root/doc/srrietveld/developers/toc-srrietveld.xmlinterface-module.html deleted file mode 100644 index 9776bce3..00000000 --- a/static_root/doc/srrietveld/developers/toc-srrietveld.xmlinterface-module.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - xmlinterface - - - - - -

      Module xmlinterface

      -
      -

      Classes

      - InstrumentXMLParser
      MeasurementXMLParser
      RefineStrategyXMLParser
      StructureXMLParser

      Functions

      - getAttributeValue
      getInstrumentInformation
      getStructureInformation
      getXMLNodeAttributes
      importExcludedRegionFile
      importXML
      parseBackground
      parseExcludedRegion
      parseRange
      xmlFilter
      xmlToDict
      xmlToString

      Variables

      - __id__

      -[hide private] - - - - - diff --git a/static_root/doc/srrietveld/developers/toc.html b/static_root/doc/srrietveld/developers/toc.html deleted file mode 100644 index e049a706..00000000 --- a/static_root/doc/srrietveld/developers/toc.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - Table of Contents - - - - - -

      Table of Contents

      -
      - Everything -
      -

      Modules

      - srrietveld
      srrietveld.atominfo
      srrietveld.autobackgroundselect
      srrietveld.auxiliary
      srrietveld.datafileconverter
      srrietveld.datamanager
      srrietveld.dataprocessnpdf
      srrietveld.enduserscripts
      srrietveld.gsasfileparser
      srrietveld.instrument
      srrietveld.io
      srrietveld.mar_utilities
      srrietveld.measurements
      srrietveld.midscript
      srrietveld.mixedphaseanalyzer
      srrietveld.modelrw
      srrietveld.monitormem
      srrietveld.parallelrefinecontrol
      srrietveld.phasescript
      srrietveld.plot2d
      srrietveld.qbackgrounds
      srrietveld.refinebackend
      srrietveld.refineguides
      srrietveld.refinehistory
      srrietveld.refinemanager
      srrietveld.refinesetup
      srrietveld.refinestrategy
      srrietveld.sequentialrefinecontrol
      srrietveld.spacegroupinfo
      srrietveld.srrietveldconfiguration
      srrietveld.stringutilfunction
      srrietveld.uisupport
      srrietveld.utilbackground
      srrietveld.utilinstrument
      srrietveld.utilplot
      srrietveld.utilrapdf
      srrietveld.utilrefineguide
      srrietveld.utilsequentialrefine
      srrietveld.utilunits
      srrietveld.viewer3d
      srrietveld.viserrors
      srrietveld.xmlconvertor
      srrietveld.xmlgenerator
      srrietveld.xmlinterface

      - [hide private] - - - - - diff --git a/static_root/doc/srrietveld/faq.html b/static_root/doc/srrietveld/faq.html deleted file mode 100644 index 77b8c816..00000000 --- a/static_root/doc/srrietveld/faq.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - Frequently Asked Questions — SrRietveld v1.0 documentation - - - - - - - - - - -
      -
      -

      Table Of Contents

      - - -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Frequently Asked Questions

      -
      -

      How to add the application path to PYTHONPATH?

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/genindex-all.html b/static_root/doc/srrietveld/genindex-all.html deleted file mode 100644 index d28028a5..00000000 --- a/static_root/doc/srrietveld/genindex-all.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - Index — SrRietveld v1.0 documentation - - - - - - - - - - -
      -
      - -

      Index

      -

      - -

      Full index on one page

      - - - - - -
      -
      - -
      -
      -
      -
      - - -

      Index

      - -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/genindex.html b/static_root/doc/srrietveld/genindex.html deleted file mode 100644 index 0f428c5d..00000000 --- a/static_root/doc/srrietveld/genindex.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - Index — SrRietveld v1.0 documentation - - - - - - - - - - -
      -
      - -

      Index

      -

      - -

      Full index on one page

      - - - - - -
      -
      - -
      -
      -
      -
      - - -

      Index

      - -

      Index pages by letter:

      - - - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/index.html b/static_root/doc/srrietveld/index.html deleted file mode 100644 index 2828e6a9..00000000 --- a/static_root/doc/srrietveld/index.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - - - Welcome to SrRietveld documentation! — SrRietveld 1.0-r6875 documentation - - - - - - - - - - - - - -
      -
      -

      Table Of Contents

      - - -

      Next topic

      -

      Introduction

      - - -
      -
      - -
      -
      -
      -
      - -
      -

      Welcome to SrRietveld documentation!

      -

      Welcome to the SrRietveld documentation!

      -

      Software version 1.0-r6875.

      -
      -

      Disclaimer

      -

      Copyright 2009-2013 Trustees of Columbia University in the City of New York.

      -

      The program is distributed under the BSD License.

      -
        -
      • 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:

        -
        -
          -
        • P. Tian, W. Zhou, J. Liu, Y. Shang, C. L. Farrow, P. Juhas, and -S. J. L. Billinge, SrRietveld: A program for automating -Rietveld refinements for high throughput studies, -arXiv:1006 (2010).
        • -
        -
        -

        Current version of SrRietveld makes use of the FullProf and GSAS Rietveld refinement engines. If you use this program, please also kindly acknowledge use of FullProf and/or GSAS by citing the following:

        -

        If you use GSAS as the refinement engine, please cite the paper:

        -
        -
          -
        • A. C. Larson and R. B. Von Dreele, General Structure Analysis System (GSAS), Los Alamos National Laboratory Report, LAUR 86-748, (2004).
        • -
        -
        -

        If you use FullProf as the refinement engine, please cite the paper:

        -
        -
          -
        • J. Rodriguez-Carvajal, Recent advances in magnetic structure determination by neutron powder diffraction, Physica B, 192, 55-69 (1993).
        • -
        -
        -
      • -
      -
      -

      Redistribution

      -

      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -Redistributions of source code must retain the above disclaimer, this list of conditions and the following copyright notice. -Redistributions 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. -Neither the name of COLUMBIA UNIVERSITY nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.

      -
      - -
      -
      -

      Acknowledgements

      -
      -

      Developers

      -

      SrRietveld is developed as an application of the DiffPy package. -Currently, the DiffPy team is Simon Billinge, Emil Božin, Timur Davis, Chris -Farrow, Pavol Juhás, Peng Tian, and Yingrui Shang. Former members of the project -are Dmitriy Bryndin, Wenduo Zhou, and Jiwu Liu. The project was started at the -Department of Physics and Astronomy, Michigan State University and is now centered -at the Department of Applied Physics and Applied Mathematics at Columbia University -in the city of New York

      -

      SrRietveld is developed and maintained by:

      -
      Peng Tian
      -Wenduo Zhou
      -Jiwu Liu
      -Yingrui Shang
      -Pavol Juhas
      -Simon Billinge
      -
      -
      -
      -

      Funding

      -

      This software was developed as part of the Distributed Data Analysis of Neutron -Scattering Experiments (DANSE) project funded by the US 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 respective funding bodies.

      -
      -
      -
      -

      SrRietveld Manual

      -
      - -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/install.html b/static_root/doc/srrietveld/install.html deleted file mode 100644 index f6108297..00000000 --- a/static_root/doc/srrietveld/install.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - - - - - Installation — SrRietveld 1.0-r6875 documentation - - - - - - - - - - - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Introduction

      -

      Next topic

      -

      Tutorial and Example

      - - -
      -
      - -
      -
      -
      -
      - -
      -

      Installation

      -
      -

      Note

      -

      SrRietveld is written in Python and is a cross platform program. Users can install and use SrRietveld on Windows, Linux/Unix, and Mac, on both 32-bit and 64-bit systems.

      -
      -
      -

      Install GSAS and FullProf

      -

      GSAS and FullProf have to be installed since SrRietveld uses them as backend refinement engines. SrRietveld runs with either engine; however for the greatest functionality we recommend you install both programs.

      -

      If you already have them installed you can use your existing installation. Otherwise you they can be separately downloaded and installed by going to the respective download websites. Follow the instructions on the following websites for a standard installation of FullProf and GSAS:

      -
      -
      -

      Please make sure GSAS and FullProf can run correctly on your -computer. For example, under Linux, tcsh is needed to run the gsas -command. On Ubuntu/Debian system, the tcsh shell can be installed with -the following command:

      -
      sudo apt-get install tcsh
      -
      -

      GSAS requires the libg2c.so.0 shared library, which may not be -included with the recent system version. This library can be -obtained from a previous Ubuntu release at -http://packages.ubuntu.com/hardy/libg2c0/.

      -

      More details about the GSAS installation can be found -here.

      -
      -
      -

      Installation and Setup on Windows

      -

      Windows users can install SrRietveld with a binary installer -SrRietveld-VERSION.exe. Double click the file and follow -the steps in the installation wizard.

      -

      The SrRietveld program short cut icon will be placed on the desktop after the installation is finished. Double click the desktop icon the SrRietveld program should start. SrRietveld may prompt a setup dialog to initialize the setups, such as the GSAS / FullProf installation paths.

      -

      As mentioned before, to start a refinement with SrRietveld, users have to specify the paths of refinement engines (GSAS or FullProf) in SrRietveld. SrRietveld will try to find the GSAS and FullProf executables in the computer, but user can always go to the menu Edit->Settings dialog to specify another location.

      -
      -

      Note

      -

      During the installation, the Microsoft Virtual C++ Redistributable -package will also be installed to provide the necessary dynamic-link -libraries.

      -
      -
      -
      -

      Installation and Setup on Linux, Mac, and Unix

      -
      -

      Install SrRietveld

      -

      SrRietveld is distributed in a source archive SrRietveld-VERSION.tar.gz.

      -

      SrRietveld requires a number of dependencies (other programs) to run. -Many of these are bundled with common Linux distributions such as -Ubuntu. However, you will have to verify that you have the dependencies -installed before SrRietveld can run. The dependencies are described in -dependencies. SrRietveld can be run with GSAS -and/or FullProf as the refinement engine. Either one or the other must -be installed; however it is recommended to instal both.

      -
      -

      Note

      -

      Please make sure all the dependencies are -installed before proceeding further.

      -
      -

      SrRietveld can be installed with the following steps:

      -
      -
        -
      1. Unpack the source archive file

        -
        tar -zxf SrRietveld-VERSION.tar.gz
        -
        -
      2. -
      3. Change to the extracted distribution directory

        -
        cd SrRietveld-VERSION
        -
        -
      4. -
      5. Run the included installation script

        -
        sudo ./install_srrietveld.py
        -
        -

        This checks for required Python libraries and if present, -it installs SrRietveld to default system location. This requires -root privileges as granted by the sudo command. If sudo is not -available, you can install to the user-writable directories by -passing --prefix or --install-dir options to -the installation script.

        -
        -

        Note

        -

        With the --prefix=PREFIXDIR option one needs to -create directories for programs and Python files under the -PREFIXDIR and add them to the PATH and PYTHONPATH environment -variables. These directories can be created as:

        -
        mkdir -p PREFIXDIR/bin
        -mkdir -p PREFIXDIR/lib/pythonX.Y/site-packages
        -
        -

        where X.Y must be replaced with the actual Python version, for -example 2.6 for Python 2.6.

        -

        The directories need to be added to the appropriate environment -variables by adding the following lines to the .bashrc -(or .profile, .zshenv as appropriate for your system shell):

        -
        export PATH="PREFIXDIR/bin:${PATH}"
        -export PYTHONPATH="PREFIXDIR/lib/pythonX.Y/site-packages:${PYTHONPATH}"
        -
        -

        After all changes to the shell setup file are made, open a new -terminal, if you work in the same termial, run the command:

        -
        source ~/.bashrc
        -
        -

        which will take the environment changes into effect.

        -
        -
      6. -
      7. Test you installation by running

        -
        srrietveld
        -
        -
        -

        If it is correctly installed then the SrRietveld GUI window should -open. If the program fails to run, a detailed error message will -appear which may help solve the problem. You may also look for -information from other users at, or post your error message to, -our support group at -srrietveld-dev -to ask for help.

        -

        Please note that GSAS and FullProf have to be installed before -SrRietveld can run any refinement. Details of how to use -SrRietveld can be found in the Tutorial -section.

        -
      8. -
      -
      -
      -
      -

      Dependencies

      -

      SrRietveld require some dependencies when running on Linux/Mac. Most of these dependencies come in many standard Linux installations such as Ubuntu. Please check if they are pre-installed in your computer.

      -

      Otherwise, they can be easily installed by going to the listed websites, downloading and following the installation instructions. If your Linux installation is Ubuntu, see the note below to rapidly download and install all the dependencies.

      -
      -
      -
      Python 2.6 or later
      -
      Python is installed by default on most Linux systems and can be -also fetched from http://www.python.org/download/.
      -
      Python development files
      -
      Headers and other files for building Python extensions with C. -This is usually available as python-dev package in the system -package repository.
      -
      setuptools
      -
      Utility for installing other Python packages. -Available as python-setuptools or python-distribute system -package. Also available at -http://pypi.python.org/pypi/distribute/.
      -
      NumPy 1.1 or later
      -
      functions for scientific computing in Python. -Available as python-numpy system package or from http://www.numpy.org/.
      -
      Matplotlib 0.90 or later
      -
      Python plotting library. -Available as python-matplotlib system package or from -http://matplotlib.org/.
      -
      wxPython 2.8
      -
      graphical user interface toolkit in Python. -Available as python-wxtools system package or from http://wxpython.org/.
      -
      tables 1.6.8 or later
      -
      library for manipulating hierarchical data in HDF5 format. -Available as python-tables system package or from -http://www.pytables.org/.
      -
      -
      -

      On Ubuntu Linux the required dependencies can be all installed with a single -command

      -
      sudo apt-get install \
      -   python-dev python-distribute python-numpy \
      -   python-matplotlib python-wxtools python-tables
      -
      -

      On a Fedora Linux the dependencies could be installed with

      -
      sudo yum install \
      -   python-devel python-setuptools numpy \
      -   python-matplotlib-wx wxPython python-tables
      -
      -

      Other Linux distributions may use different software management tools, -but the package names should be similar to those above.

      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/install_wz.html b/static_root/doc/srrietveld/install_wz.html deleted file mode 100644 index 4b6f67f4..00000000 --- a/static_root/doc/srrietveld/install_wz.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - Installation — SrRietveld v1.0 documentation - - - - - - - - - -
      -
      -

      Table Of Contents

      - - -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -

      Module Index

      -
      -

      Installation

      -

      The easist way to setup SrRietveld in your computer is to use the easy_install tool kit with Python.

      -

      SrRietveld will use several Diffpy libraries, including:

      -
        -
      1. diffpy.refinementapi
      2. -
      3. diffpy.rietveldapi
      4. -
      5. diffpy.Structure: this package need not be installed again if you have PDFgui installed.
      6. -
      7. diffpy.pyfullprof
      8. -
      9. diffpy.pygsas
      10. -
      11. diffpy.srrietveld
      12. -
      -
      -

      Linux

      -

      For detailed installation instruments, see below.

      -

      Prerequisite

      -
        -
      1. Python: you must have python 2.3 or later installed
      2. -
      3. numpy
      4. -
      5. scipy
      6. -
      7. Fullprof: fp2k must be in PATH
      8. -
      9. GSAS: gsas/exec must be in PATH
      10. -
      11. pexpect: without this package, SrRietveld is not able to use GSAS as refinement engine.
      12. -
      -

      Installation Procedure

      -
        -
      1. Unzip and untar (e.g., tar -xzvf diffpy.package.gz) the downloaded tar balls
      2. -
      3. In the order of diffpy.refinemenapi, diffpy.rietveldapi, diffpy.pyfullprof, -diffpy.pygsas, diffpy.srrietveld, install the package as
      4. -
      -
      -
        -
      1. enter the directory unpacked from the tar ball

        -
      2. -
      3. -
        execute only::
        -

        > sudo ./setup.py install

        -
        -
        -
      4. -
      -
      -

      SrRietveld will be deployed to the analysis computer of SNS’ POWGEN.

      -

      The enthusiastic testers can download the diffpy libraries from DANSE’s repository at: -svn@@danse.us/diffraction

      -
      -
      -

      Mac OSX

      -

      Prerequisite

      -
        -
      1. Python: you must have python 2.3 or later installed on Linux
      2. -
      3. numpy
      4. -
      5. scipy
      6. -
      7. Fullprof: fp2k must be in PATH
      8. -
      9. GSAS: gsas/exec must be in PATH
      10. -
      11. pexpect: without this package, SrRietveld is not able to use GSAS as refinement engine.
      12. -
      -

      Installation Procedure

      -
        -
      1. Unzip and untar (e.g., tar -xzvf diffpy.package.gz) the downloaded tar balls
      2. -
      3. In the order of diffpy.refinemenapi, diffpy.rietveldapi, diffpy.pyfullprof, -diffpy.pygsas, diffpy.srrietveld, install the package as
      4. -
      -
      -
        -
      1. enter the directory unpacked from the tar ball
      2. -
      3. execute: -> sudo ./setup.py install
      4. -
      -
      -

      SrRietveld is able to work on Mac computers using Intel processors -because Fullprof has a release only to Mac with Intel processors. -The installation of SrRietveld on Mac OSX is exactly the same as the procedure for Linux. -We suggest users to download and use MacPython in Bash shell, -rather than the Python package coming with the operating system.

      -

      The enthusiastic testers can download the diffpy libraries from DANSE’s repository at: -svn@danse.us/diffraction

      -
      -
      -

      Windows

      -

      Windows is not currently supported.

      -
      -
      -

      Required third party packages:

      - -
      -

      Community

      -

      There are several Google groups for support and development of SrRietveld -and other DiffPy software. Visit the links below for message archives -or instructions on subscription and posting.

      -

      srrietveld-dev -Please share your comments, desires and suggestions with the developers -by posting to the Diffpy developers’ forum, or by emailing Simon Billinge (sb2896@columbia.edu). -Since we are in the alpha-testing phase there are no user community pages.

      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/intro.html b/static_root/doc/srrietveld/intro.html deleted file mode 100644 index da40fc31..00000000 --- a/static_root/doc/srrietveld/intro.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - - - Introduction — SrRietveld 1.0-r6875 documentation - - - - - - - - - - - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Welcome to SrRietveld documentation!

      -

      Next topic

      -

      Installation

      - - -
      -
      - -
      -
      -
      -
      - -
      -

      Introduction

      -
      -

      What is SrRietveld?

      -

      SrRietveld is a highly automated software toolkit designed to simplify Rietveld -refinement using neutron and x-ray powder diffraction data. It is designed to simplify -and automate the refinement of large numbers of datasets, such as are becoming available -from modern high-throughput powder diffractometers. SrRietveld takes the -existing Rietveld programs, GSAS and FullProf, and wraps them in a Python -layer allowing the Rietveld refinement process to be automated in -creative ways. The Python wrapping allows tasks to be automated, such as the -strategy (which parameters are switched on in which order) for a single -dataset, and the automation and visualization of refinements of large numbers of datasets.

      -

      SrRietveld is the Rietveld refinement application of the NSF DMR funded -DANSE (Distributed Data Analysis for Neutron Scattering -Experiments) software project.

      -
      -
      -

      Design Principles

      -

      SrRietveld is developed in the Python language using object -oriented programming (OOP) concepts. Python is extensively used in -scientific software development. It is cross-platform and suitable for fast -development. Also there are many well designed packages for scientific -programming and modeling, such as Matplotlib, Numpy and Scipy. The OOP design -enables SrRietveld to be easily maintained and extended.

      -

      The philosophy of the SrRietveld design is to improve the efficiency of a -typical work flow by controlling existing Rietveld refinement engines. A uniform -data structure is implemented in SrRietveld so that the differences in input and -output in different refinement engines will not be noticeable to the users; -i.e., the same data can be refined using either GSAS or FullProf. Pre-written -scripts are provided for automating common tasks, such as refining from coarse -guesses of initial parameters, sequential refinement, etc.. It is also possible -for advanced users to develop their own macro scripts and contribute to the -development of SrRietveld.

      -
      -
      -

      What can SrRietveld do?

      -

      The functions of SrRietveld include:

      -
        -
      • Automatic and user-guided Le-Bail and Rietveld refinements

        -
        -

        Perform multi-step refinement on single experiment data sets

        -
        -
      • -
      • Sequential Rietveld refinement

        -
        -

        Sequentially fit related data sets from a series of experiments

        -
        -
      • -
      • Examine the refinement results

        -
        -

        Plot refinement parameters or calculated patterns at each refinement step

        -
        -
      • -
      • Work with different diffraction types

        -
        -

        Analyze data from time-of-flight neutron, constant wavelength neutron, and constant wavelength X-ray diffraction experiments

        -
        -
      • -
      -
      -
      -

      Merits

      -
        -
      • Highly automated Rietveld execution
      • -
      • User-friendly and easy to learn
      • -
      • Automated analysis of large data sets
      • -
      • Uses conventional refinement engines, such as GSAS and FullProf
      • -
      • Modular software design allowing extension by expert users
      • -
      -
      -
      -

      Community

      -

      SrRietveld-dev Google groups – -Please share your comments, desires and suggestions with the developers by -posting to the DiffPy developers’ forum.

      -
      -
      -

      Contact Us

      -
      -
      -
      Professor Simon Billinge
      -
      Applied Physics and Applied Mathematics Department
      -
      The Fu Foundation School of Engineering and Applied Science
      -
      200 S. W. Mudd Building
      -
      MC 4701, 500 W. 120th Street
      -
      New York, NY 10027
      - -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/intro_wz.html b/static_root/doc/srrietveld/intro_wz.html deleted file mode 100644 index 4cf724ba..00000000 --- a/static_root/doc/srrietveld/intro_wz.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - - Introduction — SrRietveld v1.0 documentation - - - - - - - - - -
      -
      -

      Table Of Contents

      - - -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Introduction

      -
      -

      What can SrRietveld Do?

      -
        -
      • Diffraction data Rietveld refinement
      • -
      -

      Multiple step refinement on single experiment or co-refinement on several data sets.

      -
        -
      • Sequential Rietveld refinement
      • -
      -

      Sequential fitting on data sets from a series of experiments

      -
        -
      • Calculate theoretical pattern
      • -
      -

      Calculate the line profile from known structure parameters and instrument parameters

      -
        -
      • Examine the refinement results
      • -
      -

      Easily view the results from single / sequential refinements and pattern calculation.

      -
      -
      -

      Merits

      -
        -
      • Highly automated computation
      • -
      • User friendly and easy to learn
      • -
      • Capability to process enormous amount of data in a timely basis
      • -
      • Analysis on sequential data sets
      • -
      • Compatible with main stream Rietveld refinement engines
      • -
      • Designed in modules connected with application programming interfaces (APIs), extensible to work with more engines and able to work as a module with other applications.
      • -
      -

      Rietveld refinement is a process of determining accurate atomic structural -information about crystalline materials from neutron or x-ray powder diffraction. -There are a number of Rietveld computer programs available, both freeware and -commercial. What they have in common is that they require extensive interactions -with the scientist operating them because of the difficulty in converging fits of -the models to the data. They have poor convergence and there is a sharp learning -curve for using them. The codes were mostly written beginning in the 1980’s and -1990’s and are monolithic Fortran programs and it is very difficult to automate -and extend them.

      -

      The goal of the SrRietveld project is to mitigate these problems and make a -Rietveld program that is highly automated, easy to use, and can handle the high -data-rates at POWGEN, and other high throughput neutron and X-ray diffractometers. -There is insufficient time -and resources to write completely new, modular, Rietveld codes -within the DANSE project, so the approach in the SrRietveld project was to wrap -existing Rietveld legacy codes in Python wrappers, allowing -scripts written in Python to automate and control the execution of the existing codes. -In the SrRietveld 3.0a release we have implemented the two most popular Rietveld -programs, Fullprof and GSAS, as engines running in the Python environment. -The design includes a Rietveld API (application programming interface) which -allows users to write scripts in Python that can execute different refinement -engines. In the current release this means that the same data can be refined with -either Fullprof or GSAS, or both. In the future it will allow us to change out -the Rietveld engine with any other Rietveld legacy code, or newly written code, -and users’ scripts will still be operable.

      -
      -
      -

      SrRietveld

      -

      SrRietveld is an open-source crystal structure refinement user-interface (UI) for -reciprocal-space fitting of powder data, or Rietveld analysis.

      -

      SrRietveld is being developed as part of the DANSE software project that is -building data analysis and modeling software to make optimal use of neutron -diffraction data coming from the Spallation Neutron Source.

      -

      SrRietveld is reliable. It will provide the expected features of Rietveld -analysis software, such as that provided by FullProf or GSAS, as well as features -that simplify typical and advanced usage.

      -

      SrRietveld is easy to use. It will provide users with tools to set up Rietveld -refinement in relatively trivial time and launch a series of Rietveld refinement -automatically or semi-automatically until convergence, allowing complex refinement -tasks to be automated and simplified. Meanwhile, SrRietveld provides users tools -to analyze the refinement result visually.

      -

      In addition to providing users with ease-of-use, we wish to enable new science. -In order to satisfy ever-changing user community, extensible, non-proprietary and -supported software, such as SrRietveld, will enable innovation and empower users.

      -

      SrRietveld is fully extensible. It will work by allowing the user to write -scripts in a Python-based scripting language that control and automate the -refinement process It is also then straightforward for a developer to build -simple gui’s on top of the scripts. A library of helper functions is available -to simplify common tasks.

      -

      The major commands available in the current release are listed below

      -
        -
      • supporting diffraction pattern calculation
          -
        1. applied to neutron time-of-flight (multiple banks), neutron constant wavelength, X-ray diffraction data;
        2. -
        -
      • -
      • supporting both FullProf and GSAS as refinement engines. -Exchanging underlying refinement engine is seamless to users
      • -
      • supporting automatic/semi-automatic launched Le-Bail and Rietveld refinements on -single measurements toward final convergence
          -
        1. applied to neutron time-of-flight (multiple banks), neutron constant wavelength, X-ray diffraction data;
        2. -
        3. allowing the user to trace each parameter’s value at each refinement step for further analysis;
        4. -
        5. allowing the user to plot patterns of each refinement step after refinement is finished for further analysis.
        6. -
        -
      • -
      • supporting sequential fitting on a series of measurements from in-situ diffraction experiment, -applied to neutron time-of-flight (multiple banks), neutron constant wavelength, X-ray diffraction data;
          -
        1. providing user with fast access to refined parameters and refinement result (residuals);
        2. -
        3. allowing user to access the refinement detail of each single measurement for further analysis;
        4. -
        -
      • -
      -
      -

      Design principles

      -

      SrRietveld has been designed to provide users with an easy-to-use yet powerful -interface for fitting structure models to powder diffraction data. -It makes use of an object oriented, component based architecture, -which makes it highly extensible and maintainable.

      -

      SrRietveld is written in the Python programming language. Python features a -relaxed and friendly syntax, supports write once, run anywhere -portability, and has extensive libraries and modules for virtually every -task. Software codes written in a variety of programming languages can be -bound into Python, which allows them to be used together. Python is becoming -a popular choice in the scientific computation community.

      -

      SrRietveld is built upon RietveldAPI, which is a library of python scripts to set up, -manage and analyze Rietveld refinements.

      -

      General users can use pre-built scripts to quickly and easily carry out -refinements that are offered as part of the SrRietveld application. In the future, -these will be controlled through a graphical user interface, though currently -they are executed from the command line.

      -

      Power users can build their customized Rietveld refinements by writing high-level -scripts using SrRietveld and rietveldAPI library modules.

      -

      In the 1.0 Beta release, SrRietveld provides the users with a series of -command line scripts to set up, launch and analyze Rietveld refinements.

      -
      -
      -

      Capabilities

      -

      SrRietveld will allow users to perform powerful refinement tasks with little effort. -Python has a friendly and powerful scripting interface that enables -SrRietveld to interact with other Python modules such as matplotlib for -plotting and pymol for structure visualization. The scripting interface to -SrRietveld allows one to easily string together a series of related Rietveld -refinements, analyze the refinement results and optionally feed the results -into other Python-enabled programs. -SrRietveld will soon be enabled to run distributed on a computer cluster -in order to deal with computationally intensive tasks -such as the analysis of data flow high throughput instruments. -Once-difficult refinement strategies, such as -parametric optimization and global optimization are also planned for a -future release. Users can also look forward to automatic Rietveld refinement -that requires a minimal amount of prior knowledge about a crystal structure.

      -

      SrRietveld can manage multiple fits at once. -Each fit can have multiple experimental data sets and structure models. -Fits in a sequence can call upon other fits for their starting parameters, -and configured fits can be queued to run while the user is away. All the -initial, final, and intermediate data are stored in a platform independent -project file that can be loaded on any computer.

      -

      SrRietveld uses the matplotlib -Python package for 2D plotting of data and results. -Matplotlib has a friendly interface so the user can quickly and easily view the -results of a fitting. -SrRietveld lets users plot data from a series of fits and plot it against -selected meta-data (temperature, doping, etc.).

      -
      -
      -
      -

      Fullprof and GSAS

      -

      The FullProf and GSAS programs have been mainly developed for Rietveld analysis -(structure profile refinement) of -neutron (constant wavelength, time of flight, nuclear and magnetic scattering) -or X-ray powder diffraction data -collected at constant or variable step in scattering angle 2theta. -The programs can also be used as a Profile Matching -(or pattern decomposition using Le Bail method) tool, -without knowledge of the structure. -Not all the functionalities of Fullprof and GSAS are available in SrRietveld -as the ??? functions must be implemented in the API. -Currently most of the powder diffraction functionalities, except magnetic scattering, -are implemented. -There is no support for single crystal diffraction in SrRietveld.

      -

      The Fullprof engine and GSAS engine wrappers, called PyFullProf and PyGSAS respectively, -can be used either directly from the Python -command line, or as part of larger and more complex software -applications.

      -
      -
      -

      Availability

      -

      SrRietveld, FullProf and GSAS are open source. -SrRietveld is distributed under a BSD license. -They run on Linux, and all major Unix systems. The source -code is freely available. For more information please contact Professor -Simon Billinge (sb2896@columbia.edu) -or consult the web-page -http://www.diffpy.org. -News of updates and releases will be posted at this website -and on the SrRietveld-users group at -http://groups.google.com/group/SrRietveld-users.

      -
      - -
      -

      Acknowledgement

      -

      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:

      -
        -
      1. Wenduo Zhou, Peng Tian, Christopher L. Farrow, P. Juhas and S. J. L. Billinge, -To be published.
      2. -
      -

      Copyright 2008, Trustees of Columbia University in the City of New York.

      -

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

      -

      This version of SrRietveld makes use of the FullProf and GSAS Rietveld refinement engine. -If you use this program, as well as citing the paper above, you should acknowledge -use of FullProf and/or GSAS by citing the paper describing the FullProf and/or GSAS:

      -
        -
      1. J. Rodriguez-Carvajal, Recent advances in magnetic structure determination by neutron -powder diffraction, Physica B, 192, 55-69 (1993).
      2. -
      3. Larson A C and von Dreele R B 2000 General structure analysis system(GSAS) -Los Alamos National Laboratory Report No. LAUR 87-748 unpublished
      4. -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/license.html b/static_root/doc/srrietveld/license.html deleted file mode 100644 index 0d95ccd6..00000000 --- a/static_root/doc/srrietveld/license.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - License — SrRietveld v1.0 documentation - - - - - - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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:

      -
      P. Tian, W. Zhou, J. Liu, Y. Shang, C. L. Farrow, P. Juhas, and S. J. L. Billinge, SrRietveld: A program for automating Rietveld refinements for high throughput studies, arXiv:1006.0435 (2010)
      -
      -

      Current version of SrRietveld makes use of the FullProf and GSAS Rietveld refinement engines. If you use this program, as well as citing the paper above, please kindly acknowledge use of FullProf and/or GSAS by citing the following to instruction paper FullProf and/or GSAS:

      -
      J. Rodriguez-Carvajal, Recent advances in magnetic structure determination by neutron powder diffraction, Physica B, 192, 55-69 (1993).
      -
      -A. C. Larson and R. B. Von Dreele, General Structure Analysis System(GSAS), Los Alamos National Laboratory Report, LAUR 86-748, (2004).
      -
      -

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

      -

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

      -

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

      -
      -
        -
      • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
      • -
      • 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.
      • -
      • 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 COPYRIGHT HOLDER “AS IS”. COPYRIGHT HOLDER EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR SUITABILITY FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM FROM INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, TRADE SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE TO ANY PARTY 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 OR RELATING TO THIS AGREEMENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/objects.inv b/static_root/doc/srrietveld/objects.inv deleted file mode 100644 index 597069f6..00000000 Binary files a/static_root/doc/srrietveld/objects.inv and /dev/null differ diff --git a/static_root/doc/srrietveld/quickstart.html b/static_root/doc/srrietveld/quickstart.html deleted file mode 100644 index b5062b32..00000000 --- a/static_root/doc/srrietveld/quickstart.html +++ /dev/null @@ -1,585 +0,0 @@ - - - - - - - - - Tutorial — SrRietveld v1.0 documentation - - - - - - - - - - - - -
      -
      -
      -
      - -
      -

      Tutorial

      -
      -

      SrRietveld Basics

      -
        -
      • A command line version of SrRietveld is currently available. A graphical user
      • -
      -

      interface will be developed in the future release.

      -
        -
      • The structure data, refinement strategy, and instrument data will be stored in
      • -
      -

      XML files, and the files will be passed to the program as option values

      -
        -
      • The SrRietveld input files are in XML format. The syntax of the XML files is
      • -
      -

      illustrated in this user manual. There are some tools provided in SrRietveld to -generate XML file templates.

      -
        -
      • There are three types of input files:

        -
          -
        • Instrument file – defining the parameters related to the instrument and
        • -
        -

        experiment by instrument scientists.

        -
        -

        Importance: required

        -
        -
          -
        • Crystal structure model file – defining the crystal structure model to be
        • -
        -

        refined.

        -
        -

        Importance: required

        -
        -
          -
        • Refinement strategy file – defining the sequence to refine parameters.

          -

          Importance: optional

          -

          If this file is not given, SrRietveld will perform the refinement by using -a default refinement strategy.

          -
        • -
        -
      • -
      -
      -
      -

      SrRietveld Command Lines

      -

      This introduction is base on Linux / Mac machines. Current release of -SrRietveld is not available in Windows

      -
      -

      srr

      -

      After SrRietveld is correctly installed in the computer, the main command for -SrRietveld is srr.

      -

      The format to run the ‘’srr’’ command should be,:

      -
      srr [SCRIPT NAME] [OPTIONs]
      -
      -

      The SCRIPT NAME is a work or abbreviation to tell the program what kind of -task to complete. Then the necessary data will be passed through *OPTION*s. To -get the full list of available *SCRIPT NAME*s, open a terminal, type in:

      -
      srr
      -
      -
      -

      or:

      -
      srr --help
      -
      -
      -

      a list of script names, their abbreviations, and a short description for each -will be listed in the terminal.

      -

      Similarly, to get immediate help on every script name, simply type in:

      -

      srr [SCRIPT NAME] –help

      -
      -
      -

      srr SCRIPTNAME

      -

      If a script name is given, SrRietveld will prompt the help information if the -script name is correct.

      -
        -
      • Example 1:

        -
        ``> srr refine``
        -
        -

        Output:

        -
        Automatic Launched Refinement On Single Refinement
        -
        -calculatepattern -h  For Help
        -
        -
      • -
      • Example 2:

        -
        ``> srr cal``
        -
        -

        Output:

        -
        Automatic Launched Refinement On Single Refinement
        -
        -cal        -h  For Help
        -
        -
      • -
      • Example 3:

        -
        ``> srr xyz``
        -
        -

        Output:

        -
        Script xyz        is not supported.  Programm is quit
        -Usage: srr [SCRIPT NAME] [OPTION]...
        -SrRietveld User Interface Application.
        -Run the task defined by the SCRIPT NAME, where the specifications are listed
        -in OPTIONs.
        -
        -Supported script names include:
        -
        -
      • -
      -

      # cal , calculatepattern Simulate diffraction pattern -# pp , plotpattern Plot the refinement result (pattern) from -# script ‘refine’

      -
      -
      -
      refine, refine Multiple step refinement on single
      -
      experiment or co-refinement on several -data sets
      -
      -
      -

      # sc , saveconfig Save configuration XML file from existing -# files to set up SrRietveld -# seqfit, sequentialfit Sequential fitting on data sets from a -# series of experiements -# vrr , viewrefineresult Viewing the result coming from script -# ‘refine’ -# vspr , viewsamplingfitresult Viewing the result coming from a series -# of sampling refinements -# vsrr , viewsequentialfitresult Viewing the result coming from script -# ‘sequentialfit’

      -
      -
      - --- - - - -
      --h, --helpinfo display this help and exit
      -
      -

      Note that in parenthesis are the corresponding shortened name of the -application script

      -
      -
      -
      -

      srr SCRIPTNAME --help or srr SCRIPTNAME -h

      -

      This command will print the help information of the specified script.

      -
        -
      • Example 1:

        -
        > srr refine --help
        -
        -

        Output:

        -
      • -
      -

      Usage: refine [options]

      -
      -
      Options:
      -
      --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      --h, --helpshow this help message and exit
      --i INSTRUMENT, --instrument=INSTRUMENT
       (1) Name of Instrument iparm file (2) Name of -Instrument XML File
      --s STRUCTURE, --structure=STRUCTURE
       Name of CIF File (.cif) or SrRietveld Crystal -Structure XML File (.xml)
      --d DATAFILE, --data=DATAFILE
       Full-path Name of Data File
      --r STRATEGYFILE, --strategy=STRATEGYFILE
       (1) Name of Refinement Strategy or (2) Name of -SrRietveld Refinement Strategy File
      ---bank=BANKSBank(s) to refine in T.O.F. data
      --b BACKGROUNDFILE, --background=BACKGROUNDFILE
       Name of Data File Containing Background Parameter or -Background XML file
      --e ENGINE, --engine=ENGINE
       Type of Refinement Engine (i.e.,Refinement Backend). -Fullprof or GSAS
      ---excludedregion=EXCLUDEDREGIONFILE
       Name of XML file to Indicate User Specified Excluded -Region
      ---infofile=INFOFILE
       Information file. Information file contains 2 columns -fordatafile and value of environment quantity (e.g. -temperature)
      ---datadirectory=DATADIRECTORY
       Directory of source data file
      -
      -
      -
      -

      Calculating Pattern

      -

      The first step is to calculate the pattern according to the proposed structure model, -to make sure that the model is not obviously incorrect.

      -

      The proposed structure of NaCl is the structure at room temperature. -Therefore, by referring to NaCl_Info_All.txt, we choose -Data/NaCl_ramp01_10f_200ms_1059.chi as the pattern to compare.

      -
      -
        -
      1. The simplest option that user can use:

        -
        > srr calculatepattern -s s_nacl.xml
        -
        -

        The instrument profile will be searched in the current working directory, -i.e., i_rapdf_idd11.xml

        -
      2. -
      3. User is suggested to specify an instrument file instead:

        -
        > srr calculatepattern -i i_rapdf_idd11_cal.xml -s s_nacl.xml
        -
        -
      4. -
      5. SrRietveld pattern calculation provides more functionalities including

        -
          -
        • compare the calculated pattern to a given data file;
        • -
        -

        Try the complete command as:

        -
        > srr calculatepattern -i i_rapdf_idd11_cal.xml -s s_nacl.xml \
        -  -d Data/NaCl_ramp01_10f_200ms_1059.chi \
        -  -b backgroundtemp.dat --scale=1.0E-6
        -
        -

        Or:

        -
        > srr calculatepattern --instrument=i_rapdf_idd11_cal.xml --structure=s_nacl.xml \
        -  --data=Data/NaCl_ramp01_10f_200ms_1059.chi --background=backgroundtemp.dat \
        -  --scale=1.0E-6
        -
        -

        ..image:: figures/f_calculatepattern.png

        -

        The calculated pattern and the real experimental pattern will be plotted against each other. -If the magnitude of them are not close enough, the scale factor can be tuned by inputting -an appropriate value with option –scale.

        -

        The –scale factor should not be large, or the calculated pattern may be overflow.

        -
      6. -
      -
      -
      -
      -

      Refinement on a single measurement srr refine

      -

      It is better to do Rietveld refinement on a single diffraction measurement, -before starting the sequential refinement.

      -

      Because the starting structure model is at room temperature, -we pickup the data set NaCl_ramp01_10f_200ms_1059.chi, -which was measured at room temperature.

      -
        -
      1. Try one of the following commands, which are equivalent to SrRietveld:

        -
        > srr refine -i i_rapdf_idd11_cal.xml -s s_nacl.xml -d Data/NaCl_ramp01_10f_200ms_1059.chi \
        -  -b backgrountemp.dat -v refine_1059.proj
        -> srr refine --instrument=i_rapdf_idd11_cal.xml --structure=s_nacl.xml \
        -  --data=Data/NaCl_ramp01_10f_200ms_1059.chi --background=backgrountemp.dat \
        -  --saveas=refine_1059.proj
        -
        -

        The refinement will be launched with the convergence strategy defined in SrRietveld. -And the refinement result will be saved in file refine_1059.proj -The refinement engine in default is Fullprof.

        -

        ..image:: figures/f_refineprocess.png

        -
      2. -
      3. If you do not want to use the automatic background selection provided in SrRietveld, -but rather trust the background points selected by yourself, -you can add one more option -u or --useinputbackground:

        -
        > srr refine -i i_rapdf_idd11_cal.xml -s s_nacl.xml -d Data/NaCl_ramp01_10f_200ms_1059.chi \
        -  -b backgrountemp.dat -v refine_1059.proj -u
        -> srr refine --instrument=i_rapdf_idd11_cal.xml --structure=s_nacl.xml \
        -  --data=Data/NaCl_ramp01_10f_200ms_1059.chi --background=backgrountemp.dat \
        -  --saveas=refine_1059.proj --useinputbackground
        -
        -

        The result can be different if you use the background selected by SrRietveld or by yourself.

        -
      4. -
      5. The default refinement backend is FullProf. -You can specify the refinement backend by option --engine (-e). -The supported engine names are

        -
          -
        • Fullprof
        • -
        • GSAS
        • -
        -

        For example, if you want to use GSAS as the refinement backend, the commands can be:

        -
        > srr refine -i i_rapdf_idd11_cal.xml -s s_nacl.xml -d Data/NaCl_ramp01_10f_200ms_1059.chi \
        -  -b backgrountemp.dat -v refine_1059.proj -u -e gsas
        -> srr refine --instrument=i_rapdf_idd11_cal.xml --structure=s_nacl.xml \
        -  --data=Data/NaCl_ramp01_10f_200ms_1059.chi --background=backgrountemp.dat \
        -  --saveas=refine_1059.proj --useinputbackground --engine=gsas
        -
        -
      6. -
      -
      -
      -

      Plotting Pattern From Refinement Result srr plotpattern

      -

      Script plotpattern allows the user to view the calculated diffraction pattern, -the observed one and the difference between them.

      -
        -
      1. User can view the diffraction pattern of the final result (last round) as:

        -
        > srr plotpattern --project=refine_1059.proj
        -> srr plotpattern -p refine_1059.proj
        -
        -

        ..image:: figures/f_refineplotsingle_best.png

        -
      2. -
      3. User can view the diffraction pattern of at a specific step by option --step, -such as:

        -
        > srr plotpattern -p refine_1059.proj --step=3
        -> srr plotpattern --project=refine_1059.proj --step=3
        -
        -
      4. -
      -
      -..image:: figures/f_refineplotsingle_step3.png
      -
        -
      1. The user can also require the patterns to be plot in d-spacing by option ---dspacing. -For example, in this case:

        -
        > srr plotpattern --project=refine_1059.proj --dspacing
        -
        -

        ..image:: figures/f_refineplotsingle_best_dspacing.png

        -
      2. -
      -
      -
      -

      Viewing Refined Parameter Value From Refinement Result srr viewrefineresult

      -

      User can look up a parameter for its value after refinement by command -srr viewrefineresult.

      -
        -
      1. Example 1: read chi^2:

        -
        > srr viewrefineresult -p refine_1059.proj --parameter=chi2`
        -> srr viewrefineresult --project=refine_1059.proj --parameter=chi2`
        -
        -

        ..image:: figures/f_refineresult_chi2.png

        -
      2. -
      3. Example 2: read value of Biso of all atoms:

        -
        > srr viewrefineresult -p refine_1059.proj --parameter=biso
        -> srr viewrefineresult -project=refine_1059.proj --parameter=biso
        -
        -
      4. -
      -
      -

      These two equivalent commands will give the Biso of both Na and Cl atoms -of the step at which the best convergence is made.

      -

      ..image:: figures/f_refineresult_step3.png

      -
      -
        -
      1. Example 3: Read value of Biso of atom Na:

        -
        > srr viewrefineresult -p refine_1059.proj --parameter=biso --atom=Na
        -> srr viewrefineresult -project=refine_1059.proj --parameter=biso --atom=Na
        -
        -
      2. -
      -
      -These will show the parameters’ values with uncertainties. -..image:: figures/f_refineresult_step3.png
      -
        -
      1. If the user is interested to see how one specific parameters changes -along refinement, he/she can add an option --step=all
      2. -
      -
      -
      -

      Saving configuration from saved project file srr saveconfig

      -

      Script saveconfig is multiple purposed to let the user to

      -
        -
      1. extract the information from a refinement project file to a SrRietveld recognizable XML file, -including
          -
        • instrument file
        • -
        • structure file
        • -
        -
      2. -
      3. generate the template of SrRietveld recognizable XML file, including
          -
        • instrument file
        • -
        • structure file
        • -
        • ...
        • -
        -
      4. -
      -

      After a refinement is completed and saved to a SrRietveld project file, -user can export the refined crystal structure to a SrRietveld structure file in XML format, -which can be used as an input for future refinement.

      -

      > srr saveconfig -p refine_1059.proj -s nacl259.xml

      -

      User can also export the refinement strategy file, -such that she/he can modify to the refinement strategy, including sequence of refinement guides, -to refine the structure model again for better convergence.

      -

      srr saveconfig -p refine_1059.proj -r refinestrategy_userdefine.xml

      -

      The user can use any text editor or specific XML editor to modify the XML containing -refinement strategy.

      -

      For example, the user can do further refinement based on the previous refinement result:

      -

      > srr refine -i i_rapdf_idd11_cal.xml -s s_nacl259.xml -d Data/NaCl_ramp01_10f_200ms_1059.chi -b backgrountemp.dat -v refine_1059.proj

      -

      or if with other refinement strategy

      -

      > srr refine -i i_rapdf_idd11_cal.xml -s s_nacl259.xml -d Data/NaCl_ramp01_10f_200ms_1059.chi -b backgrountemp.dat -v refine_1059b.proj -r refinestrategy_userdefine.xml

      -
      -
      -

      Sequential fitting on a series of measurements

      -

      SrRietveld supports sequential refinement on a set of measurements on same material -but in different environment, for example, temperature or pressure.

      -

      In this tutorial, it is a temperature series.

      -

      Before starting the refinement, the user should have

      -
        -
      1. calibrated instrument file: i_rapdf_idd11_cal.xml
      2. -
      3. proposed structure model file: s_nacl.xml, or s_nacl_X.xml that is exported -from the result of previous refinement, for example refine_1059.proj or refine_1059b.proj
      4. -
      5. data-environment parameter value list file: NaCl_Info_All.txt
      6. -
      -

      > srr sequentialfit -i i_radpf_idd11_cal.xml -s s_nacl_02.xml -l Data -f NaCl_Info_All.txt -b backgroundtemp.dat -n T --refinedirection=down --start=295.0 -v seqrefine_nacl.proj

      -

      By this command, SrRietveld will refine all the measurements starting from 295.0 K down to the lowest temperature -measured int the experiment, while all the data are stored in directory Data. -The refinement engine in default is Fullprof.

      -

      With additional option, ---engine=gsas or -e gsas -SrRietveld will use GSAS as refinement engine.

      -

      SrRietveld’s sequential refinement will save the refinement results in several files and directories.

      -

      In the example just shown, SrRietveld will

      -
        -
      1. save all the refinement history and parameter to a single file, seqrefine_nacl.proj. -It will be a large file, but with all information
      2. -
      3. generate a directory named, seqrefine_nacl
      4. -
      5. generate a light-weight XML file in directory seqrefine_nacl. -In this XML file, only the information of chi2, Rwp, and crystal structures are saved.
      6. -
      7. the project files of refinement on every single measurement. -These files will be stored in directory seqrefine_nacl.
      8. -
      -
      -
      -

      View refinement results of sequential refinements

      -

      The user will use a different script: srr viewsequentialrefineresult.py (srvsr) to -look up the parameters from the result of sequential fitting.

      -
        -
      • > srr viewsequentialfitresult -o seqrefine_nacl --parameter=chi2 -p -list chi^2 in all the refinements
      • -
      • > srr viewsequentialfitresult -o seqrefine_nacl --parameter=biso -p -: list Biso of all the atoms in all the refinements
      • -
      • > srr viewsequentialfitresult -o seqrefine_nacl --parameter=biso --atom=Cl -p -: list Biso of atom Cl in all the refinements
      • -
      -

      The option -p is used to plot the result.

      -
      -
      -
      -
      -

      Tutorial On X-ray Diffraction Data

      -

      The purpose of this example is to familiarize the novice user with the -SrRietveld basics.

      -

      The goal is to refine a couple of hundreds of measurements on NaCl -low resolution X-ray powder diffraction data collected at -beamline 11ID-B at at the Advanced Photon Source at Argonne National Laboratory.

      -

      The data files can be

      -
        -
      1. downloaded
      2. -
      3. copied from diffpy.srrietveld package.
      4. -
      -

      Select the directory RAPDF/NaCl

      -

      Inside, you will find

      -
        -
      1. i_rapdf_idd11_cal.xml: the instrument XML file calibrated using Ni data;
      2. -
      3. s_nacl.xml: the structure of NaCl obtained from the literature;
      4. -
      5. backgroundtemp.txt: a background file;
      6. -
      7. NaCl_Inof_All.txt: 2 column file listing the data file name and their corresponding temperature;
      8. -
      9. Directory Data/ containing 321 data sets measured at 321 different temperatures.
      10. -
      -

      More tutorial can be found in ??? -There are some command scripts files with posfix sh.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/quickstart_wz.html b/static_root/doc/srrietveld/quickstart_wz.html deleted file mode 100644 index 97c384b2..00000000 --- a/static_root/doc/srrietveld/quickstart_wz.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - - Tutorial — SrRietveld v1.0 documentation - - - - - - - - - - - -
      -
      -
      -
      - -
      -

      Tutorial

      -
      -

      SrRietveld Basics

      -
        -
      • A command line version of SrRietveld is currently available. A graphical user interface will be developed in the future release.

        -
      • -
      • The structure data, refinement strategy, and instrument data will be stored in XML files, and the files will be passed to the program as option values

        -
      • -
      • The SrRietveld input files are in XML format. The syntax of the XML files is illustrated in this user manual. There are some tools provided in SrRietveld to generate XML file templates.

        -
      • -
      • There are three types of input files:

        -
          -
        • Instrument file – defining the parameters related to the instrument and experiment by instrument scientists.

          -

          Importance: required

          -
        • -
        • Crystal structure model file – defining the crystal structure model to be refined.

          -

          Importance: required

          -
        • -
        • Refinement strategy file – defining the sequence to refine parameters.

          -

          Importance: optional

          -

          If this file is not given, SrRietveld will perform the refinement by using a default refinement strategy.

          -
        • -
        -
      • -
      -
      -
      -

      SrRietveld Command Lines

      -

      This introduction is base on Linux / Mac machines. Current release of SrRietveld is not available in Windows

      -
      -

      srr

      -

      After SrRietveld is correctly installed in the computer, the main command for SrRietveld is srr.

      -

      The format to run the ‘’srr’’ command should be,:

      -
      srr [SCRIPT NAME] [OPTIONs]
      -
      -

      The SCRIPT NAME is a work or abbreviation to tell the program what kind of task to complete. Then the necessary data will be passed through *OPTION*s. To get the full list of available *SCRIPT NAME*s, open a terminal, type in:

      -
      srr
      -
      -
      -

      or:

      -
      srr --help
      -
      -
      -

      a list of script names, their abbreviations, and a short description for each will be listed in the terminal.

      -

      Similarly, to get immediate help on every script name, simply type in:

      -

      srr [SCRIPT NAME] –help

      -
      -
      -

      srr <SCRIPTNAME>

      -

      If a script name is given, SrRietveld will prompt the help information if the script name is correct.

      -
        -
      • Example 1:

        -
        ``> srr calculatepattern``
        -
        -

        Output:

        -
        Automatic Launched Refinement On Single Refinement
        -
        -calculatepattern -h  For Help
        -
        -
      • -
      • Example 2:

        -
        ``> srr cal``
        -
        -

        Output:

        -
        Automatic Launched Refinement On Single Refinement
        -
        -cal        -h  For Help
        -
        -
      • -
      • Example 3:

        -
        ``> srr xyz``
        -
        -

        Output:

        -
        Script xyz        is not supported.  Programm is quit
        -Usage: srr [SCRIPT NAME] [OPTION]...
        -SrRietveld User Interface Application.
        -Run the task defined by the SCRIPT NAME, where the specifications are listed in OPTIONs.
        -
        -Supported script names include:
        -    cal   , calculatepattern         Simulate diffraction pattern
        -    pp    , plotpattern              Plot the refinement result (pattern) from
        -                                     script 'refine'
        -    refine, refine                   Multiple step refinement on single
        -                                     experiment or co-refinement on several
        -                                     data sets
        -    sc    , saveconfig               Save configuration XML file from existing
        -                                     files to set up SrRietveld
        -    seqfit, sequentialfit            Sequential fitting on data sets from a
        -                                     series of experiements
        -    vrr   , viewrefineresult         Viewing the result coming from script
        -                                     'refine'
        -    vspr  , viewsamplingfitresult    Viewing the result coming from a series
        -                                     of sampling refinements
        -    vsrr  , viewsequentialfitresult  Viewing the result coming from script
        -                                     'sequentialfit'
        -
        -        -h, --help
        -              info    display this help and exit
        -
        -Note that in parenthesis are the corresponding shortened name of the application script
        -
        -
      • -
      -
      -
      -

      srr <SCRIPTNAME> --help or srr <SCRIPTNAME> -h

      -

      This command will print the help information of the specified script.

      -
        -
      • Example 1:

        -
        > srr calculatepattern --help
        -
        -

        or:

        -
        > srr cal --help
        -
        -

        Output:

        -
        Usage: cal [options]
        -
        -Options:
        -  -h, --help            show this help message and exit
        -  -i INSTRUMENT, --instrument=INSTRUMENT
        -                        (1) Name of Instrument (2) Name of Instrument XML File
        -  --pcr=PCRFILENAME     Name of Fullprof pcr File
        -  --iparm=IPARMFILENAME
        -                        Name of GSAS iparm Instrument File
        -  -s STRUCTUREXML, --structure=STRUCTUREXML
        -                        Name of CIF File (.cif) or SrRietveld Crystal
        -                        Structure XML File (.xml)
        -  --bank=BANKS          Bank(s) to refine in T.O.F. data
        -  -b BACKGROUNDFNAME, --background=BACKGROUNDFNAME
        -                        Name of Data File Containing Background Parameter
        -  -v SAVEFILENAME, --saveas=SAVEFILENAME
        -                        Name of Output File
        -  -e ENGINE, --engine=ENGINE
        -                        Type of Refinement Engine (i.e.,Refinement Backend).
        -                        Fullprof or GSAS
        -  --range=RANGE         Range of Calculated Pattern.  Using --range=begin,end
        -  --scale=SCALE         Scale factor
        -  -a, --autoscale       Automatically scale the calcualted pattern to input
        -                        pattern for bettern comparison
        -  --compare             Compare with input data file in plot
        -
        -
      • -
      -
      -

      Calculating Pattern

      -

      The first step is to calculate the pattern according to the proposed structure model, -to make sure that the model is not obviously incorrect.

      -

      The proposed structure of NaCl is the structure at room temperature. -Therefore, by referring to NaCl_Info_All.txt, we choose -Data/NaCl_ramp01_10f_200ms_1059.chi as the pattern to compare.

      -
      -
        -
      1. The simplest option that user can use:

        -
        > srr calculatepattern -s s_nacl.xml
        -
        -

        The instrument profile will be searched in the current working directory, -i.e., i_rapdf_idd11.xml

        -
      2. -
      3. User is suggested to specify an instrument file instead:

        -
        > srr calculatepattern -i i_rapdf_idd11_cal.xml -s s_nacl.xml
        -
        -
      4. -
      5. SrRietveld pattern calculation provides more functionalities including

        -
          -
        • compare the calculated pattern to a given data file;
        • -
        -

        Try the complete command as:

        -
        > srr calculatepattern -i i_rapdf_idd11_cal.xml -s s_nacl.xml \
        -  -d Data/NaCl_ramp01_10f_200ms_1059.chi \
        -  -b backgroundtemp.dat --scale=1.0E-6
        -
        -

        Or:

        -
        > srr calculatepattern --instrument=i_rapdf_idd11_cal.xml --structure=s_nacl.xml \
        -  --data=Data/NaCl_ramp01_10f_200ms_1059.chi --background=backgroundtemp.dat \
        -  --scale=1.0E-6
        -
        -

        ..image:: figures/f_calculatepattern.png

        -

        The calculated pattern and the real experimental pattern will be plotted against each other. -If the magnitude of them are not close enough, the scale factor can be tuned by inputting -an appropriate value with option –scale.

        -

        The –scale factor should not be large, or the calculated pattern may be overflow.

        -
      6. -
      -
      -
      -
      -

      Refinement on a single measurement srr refine

      -

      It is better to do Rietveld refinement on a single diffraction measurement, -before starting the sequential refinement.

      -

      Because the starting structure model is at room temperature, -we pickup the data set NaCl_ramp01_10f_200ms_1059.chi, -which was measured at room temperature.

      -
        -
      1. Try one of the following commands, which are equivalent to SrRietveld:

        -
        > srr refine -i i_rapdf_idd11_cal.xml -s s_nacl.xml -d Data/NaCl_ramp01_10f_200ms_1059.chi \
        -  -b backgrountemp.dat -v refine_1059.proj
        -> srr refine --instrument=i_rapdf_idd11_cal.xml --structure=s_nacl.xml \
        -  --data=Data/NaCl_ramp01_10f_200ms_1059.chi --background=backgrountemp.dat \
        -  --saveas=refine_1059.proj
        -
        -

        The refinement will be launched with the convergence strategy defined in SrRietveld. -And the refinement result will be saved in file refine_1059.proj -The refinement engine in default is Fullprof.

        -

        ..image:: figures/f_refineprocess.png

        -
      2. -
      3. If you do not want to use the automatic background selection provided in SrRietveld, -but rather trust the background points selected by yourself, -you can add one more option -u or --useinputbackground:

        -
        > srr refine -i i_rapdf_idd11_cal.xml -s s_nacl.xml -d Data/NaCl_ramp01_10f_200ms_1059.chi \
        -  -b backgrountemp.dat -v refine_1059.proj -u
        -> srr refine --instrument=i_rapdf_idd11_cal.xml --structure=s_nacl.xml \
        -  --data=Data/NaCl_ramp01_10f_200ms_1059.chi --background=backgrountemp.dat \
        -  --saveas=refine_1059.proj --useinputbackground
        -
        -

        The result can be different if you use the background selected by SrRietveld or by yourself.

        -
      4. -
      5. The default refinement backend is FullProf. -You can specify the refinement backend by option --engine (-e). -The supported engine names are

        -
          -
        • Fullprof
        • -
        • GSAS
        • -
        -

        For example, if you want to use GSAS as the refinement backend, the commands can be:

        -
        > srr refine -i i_rapdf_idd11_cal.xml -s s_nacl.xml -d Data/NaCl_ramp01_10f_200ms_1059.chi \
        -  -b backgrountemp.dat -v refine_1059.proj -u -e gsas
        -> srr refine --instrument=i_rapdf_idd11_cal.xml --structure=s_nacl.xml \
        -  --data=Data/NaCl_ramp01_10f_200ms_1059.chi --background=backgrountemp.dat \
        -  --saveas=refine_1059.proj --useinputbackground --engine=gsas
        -
        -
      6. -
      -
      -
      -

      Plotting Pattern From Refinement Result srr plotpattern

      -

      Script plotpattern allows the user to view the calculated diffraction pattern, -the observed one and the difference between them.

      -
        -
      1. User can view the diffraction pattern of the final result (last round) as:

        -
        > srr plotpattern --project=refine_1059.proj
        -> srr plotpattern -p refine_1059.proj
        -
        -

        ..image:: figures/f_refineplotsingle_best.png

        -
      2. -
      3. User can view the diffraction pattern of at a specific step by option --step, -such as:

        -
        > srr plotpattern -p refine_1059.proj --step=3
        -> srr plotpattern --project=refine_1059.proj --step=3
        -
        -
      4. -
      -
      -..image:: figures/f_refineplotsingle_step3.png
      -
        -
      1. The user can also require the patterns to be plot in d-spacing by option ---dspacing. -For example, in this case:

        -
        > srr plotpattern --project=refine_1059.proj --dspacing
        -
        -

        ..image:: figures/f_refineplotsingle_best_dspacing.png

        -
      2. -
      -
      -
      -

      Viewing Refined Parameter Value From Refinement Result srr viewrefineresult

      -

      User can look up a parameter for its value after refinement by command -srr viewrefineresult.

      -
        -
      1. Example 1: read chi^2:

        -
        > srr viewrefineresult -p refine_1059.proj --parameter=chi2`
        -> srr viewrefineresult --project=refine_1059.proj --parameter=chi2`
        -
        -

        ..image:: figures/f_refineresult_chi2.png

        -
      2. -
      3. Example 2: read value of Biso of all atoms:

        -
        > srr viewrefineresult -p refine_1059.proj --parameter=biso
        -> srr viewrefineresult -project=refine_1059.proj --parameter=biso
        -
        -
      4. -
      -
      -

      These two equivalent commands will give the Biso of both Na and Cl atoms -of the step at which the best convergence is made.

      -

      ..image:: figures/f_refineresult_step3.png

      -
      -
        -
      1. Example 3: Read value of Biso of atom Na:

        -
        > srr viewrefineresult -p refine_1059.proj --parameter=biso --atom=Na
        -> srr viewrefineresult -project=refine_1059.proj --parameter=biso --atom=Na
        -
        -
      2. -
      -
      -These will show the parameters’ values with uncertainties. -..image:: figures/f_refineresult_step3.png
      -
        -
      1. If the user is interested to see how one specific parameters changes -along refinement, he/she can add an option --step=all
      2. -
      -
      -
      -

      Saving configuration from saved project file srr saveconfig

      -

      Script saveconfig is multiple purposed to let the user to

      -
        -
      1. extract the information from a refinement project file to a SrRietveld recognizable XML file, -including
          -
        • instrument file
        • -
        • structure file
        • -
        -
      2. -
      3. generate the template of SrRietveld recognizable XML file, including
          -
        • instrument file
        • -
        • structure file
        • -
        • ...
        • -
        -
      4. -
      -

      After a refinement is completed and saved to a SrRietveld project file, -user can export the refined crystal structure to a SrRietveld structure file in XML format, -which can be used as an input for future refinement.

      -

      > srr saveconfig -p refine_1059.proj -s nacl259.xml

      -

      User can also export the refinement strategy file, -such that she/he can modify to the refinement strategy, including sequence of refinement guides, -to refine the structure model again for better convergence.

      -

      srr saveconfig -p refine_1059.proj -r refinestrategy_userdefine.xml

      -

      The user can use any text editor or specific XML editor to modify the XML containing -refinement strategy.

      -

      For example, the user can do further refinement based on the previous refinement result:

      -

      > srr refine -i i_rapdf_idd11_cal.xml -s s_nacl259.xml -d Data/NaCl_ramp01_10f_200ms_1059.chi -b backgrountemp.dat -v refine_1059.proj

      -

      or if with other refinement strategy

      -

      > srr refine -i i_rapdf_idd11_cal.xml -s s_nacl259.xml -d Data/NaCl_ramp01_10f_200ms_1059.chi -b backgrountemp.dat -v refine_1059b.proj -r refinestrategy_userdefine.xml

      -
      -
      -

      Sequential fitting on a series of measurements

      -

      SrRietveld supports sequential refinement on a set of measurements on same material -but in different environment, for example, temperature or pressure.

      -

      In this tutorial, it is a temperature series.

      -

      Before starting the refinement, the user should have

      -
        -
      1. calibrated instrument file: i_rapdf_idd11_cal.xml
      2. -
      3. proposed structure model file: s_nacl.xml, or s_nacl_X.xml that is exported -from the result of previous refinement, for example refine_1059.proj or refine_1059b.proj
      4. -
      5. data-environment parameter value list file: NaCl_Info_All.txt
      6. -
      -

      > srr sequentialfit -i i_radpf_idd11_cal.xml -s s_nacl_02.xml -l Data -f NaCl_Info_All.txt -b backgroundtemp.dat -n T --refinedirection=down --start=295.0 -v seqrefine_nacl.proj

      -

      By this command, SrRietveld will refine all the measurements starting from 295.0 K down to the lowest temperature -measured int the experiment, while all the data are stored in directory Data. -The refinement engine in default is Fullprof.

      -

      With additional option, ---engine=gsas or -e gsas -SrRietveld will use GSAS as refinement engine.

      -

      SrRietveld’s sequential refinement will save the refinement results in several files and directories.

      -

      In the example just shown, SrRietveld will

      -
        -
      1. save all the refinement history and parameter to a single file, seqrefine_nacl.proj. -It will be a large file, but with all information
      2. -
      3. generate a directory named, seqrefine_nacl
      4. -
      5. generate a light-weight XML file in directory seqrefine_nacl. -In this XML file, only the information of chi2, Rwp, and crystal structures are saved.
      6. -
      7. the project files of refinement on every single measurement. -These files will be stored in directory seqrefine_nacl.
      8. -
      -
      -
      -

      View refinement results of sequential refinements

      -

      The user will use a different script: srr viewsequentialrefineresult.py (srvsr) to -look up the parameters from the result of sequential fitting.

      -
        -
      • > srr viewsequentialfitresult -o seqrefine_nacl --parameter=chi2 -p -list chi^2 in all the refinements
      • -
      • > srr viewsequentialfitresult -o seqrefine_nacl --parameter=biso -p -: list Biso of all the atoms in all the refinements
      • -
      • > srr viewsequentialfitresult -o seqrefine_nacl --parameter=biso --atom=Cl -p -: list Biso of atom Cl in all the refinements
      • -
      -

      The option -p is used to plot the result.

      -
      -
      -
      -
      -

      Tutorial On X-ray Diffraction Data

      -

      The purpose of this example is to familiarize the novice user with the -SrRietveld basics.

      -

      The goal is to refine a couple of hundreds of measurements on NaCl -low resolution X-ray powder diffraction data collected at -beamline 11ID-B at at the Advanced Photon Source at Argonne National Laboratory.

      -

      The data files can be

      -
        -
      1. downloaded
      2. -
      3. copied from diffpy.srrietveld package.
      4. -
      -

      Select the directory RAPDF/NaCl

      -

      Inside, you will find

      -
        -
      1. i_rapdf_idd11_cal.xml: the instrument XML file calibrated using Ni data;
      2. -
      3. s_nacl.xml: the structure of NaCl obtained from the literature;
      4. -
      5. backgroundtemp.txt: a background file;
      6. -
      7. NaCl_Inof_All.txt: 2 column file listing the data file name and their corresponding temperature;
      8. -
      9. Directory Data/ containing 321 data sets measured at 321 different temperatures.
      10. -
      -

      More tutorial can be found in ??? -There are some command scripts files with posfix sh.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/reference.html b/static_root/doc/srrietveld/reference.html deleted file mode 100644 index 28e07c4b..00000000 --- a/static_root/doc/srrietveld/reference.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - - - - Reference — SrRietveld 1.0-r6875 documentation - - - - - - - - - - - - - - - -
      -
      -
      -
      - -
      -

      Reference

      -
      -

      The Main Window Layout

      -

      The SrRietveld GUI window in start up is shown in the figure below. At the top of the window is the menu bar, which contains drop-down menus with various functions. Below the menu bar is the tool bar, which contains icons for commonly used operations such as creating a new project, opening an existing project, saving a project, executing a refinement, stopping a refinement and making a quick plot. Below the tool bar are three panels. The top left pane is the Experiments panel, the top right is the Current Actions panel, and the bottom is the Output panel.

      -
      -
      -_images/SrRietveld1.png -

      -Layout of SrRietveld main window

      The Experiments panel is used for navigation. The Jobs panel shows the list of jobs and their status in the current project. The right panel has multiple context-sensitive uses. Through it, the user sets up the refinement, configures the fit attributes, sets the fit constraints, reviews the fit settings, displays fitting results. The refinement progress is displayed in the Output panel. All panels except the right panel are dockable windows that can be dragged across the screen, resized, and arranged to accommodate the individual visual needs of the user. Finally, important context sensitive functions (discussed later) are also available through mouse operations such as right-clicking.

      -

      The Jobs, Experiments, and Output panes can be undocked or moved to other positions of main window by drag and drop. Users can also close or reopen the Jobs and Output pane by click on the x icon on their title bars, or go to the Layout menu on the menu bar. If users would like to restore the default layout of the main window, go to the menu Layout->Restore default layout.

      -
      -
      -

      The Experiments Panel

      -
      -

      General Layout

      -
      -
      -_images/experiment_panel.jpg -

      -The Experiments panel

      When a user clicks on a category in the Experiments panel, the right panel will be updated with the parameters in that category. We will now go through all of the categories in the Experiments panel.

      -

      All variables contains all of the parameters; it is further broken up into three categories. Phase contains the parameters related to the phase information, such as phase names, lattice parameters in different phases, and atoms information in each phase; Pattern contains information on observed / calculated patterns, which may include the original data file, the background type and coefficients; and Profile contains peak profile information.

      -

      If we click Strategy, we see a strategy editor in the right panel. The refinement strategy and strategy file will be introduced in Refinement Strategy .

      -

      User defined tag contains the customized tags other than the predefined. The user can define their own tag and categorize variables in their own way.

      -
      -
      -

      User Defined Tags

      -
      -
      -_images/tree_context_menu.png -

      -The context menu of user definable tags on Experiments panel

      To define a customized tag, right click on the tag User defined or one of its child tags, a context menu will pop up, click on Add, a user defined tag edit dialog will pop up. All the variables are listed on the left list of the dialog. The user can click the variables and move it to the right list to contain it in this user defined tag. The tag name can also be edited in the input box on the top of the dialog.

      -
      -
      -_images/edit_user_defined.png -

      -The user defined tag edit dialog

      -

      Note

      -

      It is possible to categorize the parameters from different refinement under the same user defined tag, only when the refinements have the same dimensions (same number of fits). This confine is due to the constraint set by the underlying data structure.

      -
      -
      -
      -
      -

      The Job Panel

      -
      -
      -_images/job_treectrl.png -

      -The Job panel

      The job panel shows the list of the jobs in the current project. Once a user added a job to the project, it will be shown to the end of the job list in the panel. To add a job, user has to select a refinement in the Experiment, and select the datasets in the grid to the right panel, which will be refined in the job. Then click the Refinement->Add job. User can also add the job by click on the button in the tool bar.

      -

      The icons in front of the jobs listed in the panel shows the status of the job:

      -
      square - submitted, ready to run
      -parallel red bars - paused, indicates user stopped the refinement
      -red cross - error, error occurred during refinement, the job is not completed
      -green check mark - finished, job is completed alright
      -
      -

      When users start the refinement, SrRietveld will start to run the jobs in the list, from the first submitted job from the top of the list.

      -
      -

      Note

      -

      If no datasets are selected in the grid panel to the right, all datasets in the selected refinement will be added to the job.

      -
      -

      In the figure above, it can be seen that users can manage the job from the context menu on the job panel. Corresponding functions can also be accessed in the Refinement menu on the menu bar.

      -
      -
      -

      The Work Flow in SrRietveld

      -

      SrRietveld organizes work flow in the following categories:

      -
      -
        -
      • -
        project
        -
          -
        • -
          refinement
          -
            -
          • fit
          • -
          -
          -
          -
        • -
        -
        -
        -
      • -
      -
      -

      Each time you run SrRietveld you are working with a single project. You can save and load projects but only one project is open at a time and everything you see in the GUI is associated with that project. The structure of the project is illustrated in the tree control view on the left panel of GUI. Within the projects are refinements and fits. Each fit is a single refinement consisting of one or more phases. A fit can at the same time contain one or more datasets. An refinement is a series of fits that are controlled by the same template EXP or PCR file. For example, it could be a sequential set of fits on many data-sets collected as a function of temperature, or it could be multiple refinements carried out on the same dataset using the same model for some reason such as bootstrap error analysis.

      -
      -
      -

      Refinement Strategy

      -
      -

      What is Refinement Strategy?

      -

      SrRietveld uses strategies to automate refinements in place of the extensive human interaction necessary with GSAS or FullProf. A strategy defines a series of actions that are applied during the refinement. At each step, refinement parameters could be enabled and disabled. Additionally, constraints can be put on the parameters. This enables the user to set up an automatic refinement process.

      -
      -

      Note

      -

      If the strategy is disabled, all the parameters ever turned on in the strategy steps will be turned on in the one step refinement. This will, in some cases, cause divergence.

      -
      -

      Strategy means the order of the refinement on selected parameters. It is essentially the controller of the refinement. In the SrRietveld GUI, one strategy editor is designed to show the strategy that SrRietveld will use (Figure). Following is what it looks like:

      -
      -
      -

      The Strategy Panel

      -
      -
      -_images/SrRietveld2.png -

      -The view of strategy editor

      There are two parts in the strategy panel. As can be seen in the above figure, the top part shows the list of refinable parameters that user can select to add at selected row (the refinables), while the bottom is a list view of actions will be executed for each step. In the strategy action list view, there are two check boxes which enables the user to skip the refinement strategies during refinement to save time, and automatically turn the strategy on if the refinement diverges. As can be seen in the above figure, if the Enable strategy is checked, the strategy will be enabled and the actions in the strategy list will be applied to each refinement. Other wise, if the Enable strategy is not checked, the strategy steps will be skipped by default. But if the Enable strategy when diverge is checked, the diverged refinement will be rerun with the strategy turned on.

      -
      -

      Note

      -

      When the Enable strategy is not checked and the Enable strategy when diverge is checked, if the refinement on one dataset diverges, SrRietveld will automatically rerun the refinement on that dataset with the strategy turned on. If the refinement still diverges, the software will continue on next dataset and the previous one will be marked as diverged.

      -
      -
      -
      -

      Work with Strategy in SrRietveld

      -

      In the grid views, it can be seen in the column label that if a parameter is turned on in one of the strategy steps, the parameter name will be prefixed with a @ mark. To edit the parameter list in strategy steps, user can select and right click the parameter column label, and hover mouse over Turn on parameters submenu, the strategy submenu list will show. The including step will be ticked in the list. User can add or remove the selected parameter from a step by clicking on the menu item.

      -
      -

      Note

      -

      User can also go to Refinement->Turn on parameter for the same list. If the parameter is not a refinable, the Turn on parameters submenu will be disabled.

      -

      Enlarge

      -
      -_images/turn-on-parameters.png -

      -The sub menu to turn on and off parameters in strategy steps

      It can be seen that when a new refinement is created, a default strategy will be automatically loaded. Users can use these default strategy to handle many common refinement jobs. On the other hand, any changes made to the strategy will be saved to the strategy, therefore will be loaded next time users open and run refinement in the same project.

      -
      -

      Note

      -

      The constraint window is supposed to show the constraint information of the refinement, though the functionality will be completed in the next release. The constraint information in the setup files (EXP, PCR files) will be directly passed, users can not view or edit the constraint information within SrRietveld for now.

      -
      -
      -
      -_images/SrRietveld3.png -

      -Real-time refinement with strategy

      In SrRietveld strategy, when the GSAS refinement engine is used, the background function coefficients and lattice parameters (a, b, c, alpha, beta, and gamma) should be turned on / off as a combination, while in FullProf engine these parameters can be flagged separately.

      -
      -
      -

      Export and Load Strategy

      -

      Users can export the current strategy into a text file in local disk (Menu->Export->Export strategy). This text file can be loaded into another experiment later (Menu->Load->Load strategy). It is worth to mention that the strategy files from a different engine refinement may not be used.

      -
      -
      -
      -

      Data Files

      -

      SrRietveld takes data file in formats of .chi, .dat, .xye, .gsa, .gda, .fxye, and other standard two-column/three-column histogram data file formats. For data file in .chi, .dat, .txt, and .xye formats in GSAS refinements, the data files will be converted to .gsa file format. On the other hand, in FullProf refinements, the data files in .chi, .gsa, .gda, fxye, and .raw will be converted to .dat format, though to convert from .gsa, .gda, .fxye, and .raw, GSAS installation and .EXP setup file will be needed.

      -
      -
      The data list file contains the information of the environment parameter list (such as the temperature) and the corresponding data file paths. In SrRietveld, this file is a .info file.
      -
        -
      • The .info data list file is a multi-column data file, with one column being the environment parameter list, the other column denotes the paths of the data files. The number of columns is determined by the number of banks in the histogram file. Though in .gsa file, one data file contains multi-bank histogram information, there could be only one data file column for multiple banks.
      • -
      • The first line of the data file must be the labels of the data columns.
      • -
      • The label for the environment parameter list can be any string (without any space). The label of the data file paths columns can be either datafile (only one data file for each fit) or bank1 bank2 bank3 ... (for multiple data files for each fit)
      • -
      • The .info file can also be a CSV file (Comma Separated Values)
      • -
      • No space in each label string, since that is confusing in terms of the number of columns.
      • -
      -
      -
      -

      There is one .info file in the example data folder, which reads as follows:

      -
      T   Datafile
      -155.2        NaCl_ramp01_10f_200ms_0969.chi
      -156.2        NaCl_ramp01_10f_200ms_0970.chi
      -157.4        NaCl_ramp01_10f_200ms_0971.chi
      -158.4        NaCl_ramp01_10f_200ms_0972.chi
      -159.7        NaCl_ramp01_10f_200ms_0973.chi
      -160.8        NaCl_ramp01_10f_200ms_0974.chi
      -161.8        NaCl_ramp01_10f_200ms_0975.chi
      -....
      -
      -

      For a multi-bank case, the .info file can be read as:

      -
      T   bank1   bank2   bank3
      -728 728.gsa 728.gsa 728.gsa
      -729 729.gsa 729.gsa 729.gsa
      -835 835.gsa 835.gsa 835.gsa
      -897 897.gsa 897.gsa 897.gsa
      -898 898.gsa 898.gsa 898.gsa
      -899 899.gsa 899.gsa 899.gsa
      -900 900.gsa 900.gsa 900.gsa
      -901 901.gsa 901.gsa 901.gsa
      -902 902.gsa 902.gsa 902.gsa
      -903 903.gsa 903.gsa 903.gsa
      -904 904.gsa 904.gsa 904.gsa
      -905 905.gsa 905.gsa 905.gsa
      -....
      -
      -
      -

      Note

      -

      Please make sure the data files listed in the .info file do exist. SrRietveld will check the existence of the data files before refinement starts.

      -
      -
      -
      -

      Plot Window

      -

      To plot the data in SrRietveld, one can click on the column title of the data which will be plotted, and click on the plot button on the toolbar. A plot window will then show up. As can be seen in the screenshot (Figure).

      -
      -
      -_images/plot_back.jpg -

      -The plot of one of the background coefficients in plot window.

      It can be seen that an plot window with extended functionality is implemented. We plotted one of the background coefficients against the changing environmental variable, which is temperature in our case. In addition to the main plot window, as shown above, SrRietveld also implemented a console to the bottom of the plot window, from where the user will have full control over the data and the plot view. The console is essentially takes python command.

      -

      To the left, there are two tabs - Curves List panel and Dimension panel. The Curves List panel is listing all curves on the plot area and provide tools to modify the curves style. In the Dimension panel, which is shown in the figure above, there are three sub-panels. Users can select the available X and Y axis listed in these panels. The Y axis selection is only available when the data is 3D or above, to say, there are two changing environmental variables.

      -

      The third sub-panel is a Stack panel. The items listed in the Stack panel can be a second variable affecting the curves in the current plot area. When one of these items is selected, multiple curves will show in the plot area, with each curve representing a data point of the Stack variable. An example can be seen in the screenshot (Figure).

      -
      -
      -_images/plot_stack.jpg -

      -The plot of one of the background coefficients in plot window.

      In this example, the Order of this background coefficient is listed in the Stack panel, which represents the results from different refinement steps. The refinement steps are defined in Strategy editor. As aforementioned, according to the refinement strategy used in the Tutorial, there are 7 refinement steps in total. The background coefficients are turned on (started to be refined) from the second step, thus there are 5 steps which will include the background coefficients as results. The stack view, different curves represents this background coefficient in different steps in the refinement, as shown in the legend, and changing with time, as indicated in X-axis.

      -
      -

      Plot the Pattern on Different Environment Parameters

      -

      When plotting the pattern, user may want to view the pattern for a certain temperature. The plot window in SrRietveld enables the users to navigate in multidimensional data.

      -

      To select the pattern for a certain temperature, the user has to first select the experiment node on the tree control panel on the left of the main window, and click on the ‘Plot’ icon in the toolbar. The plot window will show with the first pattern plotted. Click on the ‘Show’ icon on the toolbar, then a navigation panel will show to the left of the plot window. Select the ‘Curve’ tab, the Data index tree control panel will be on the lower half of the ‘Curve’ tab panel. The changing environmental variables will be listed in the window, which is ‘T’ in this example. Double click on the ‘T’ node then a list of all temperatures in the sequential refinement will be expanded. User then can select the pattern on a specific temperature by double clicking on the temperature node on that list, as can be seen in the Figure below.

      -
      -
      -_images/plot_select_temperature.png -

      -Plot the pattern at a certain temperature in sequential refinement

      -
      -
      -

      Run SrRietveld from Command line

      -

      Users can run SrRietveld from command line. Currently only a few options are available. But more options will be added in later releases of SrRietveld.

      -

      After the bin folder containing SrRietveld application interface is added in the system PATH environment variable, user can run SrRietveld from command line from any folder:

      -
      srrietveld
      -
      -
      -

      To list the help information, one can type in:

      -
      srrietveld --help
      -
      -
      -

      And a brief usage information and option summary would be displayed in -the terminal

      -
      SrRietveld - perform and analyse a series of Rietveld refinements.
      -Usage:  srrietveld [options] prototype.EXP
      -        srrietveld [options] prototype.PCR
      -to start a new project based on prototype GSAS or FullProf refinement or
      -        srrietveld project.srr
      -to open an existing SrRietveld project.
      -
      -Options:
      -    -h, --help      display this help and exit
      -    -v, --version   show program version and exit
      -    -d, --debug     debug mode - temporary files are not removed, standard
      -                    output is not captured to the GUI window.
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/scripting_interface.html b/static_root/doc/srrietveld/scripting_interface.html deleted file mode 100644 index 550f8eeb..00000000 --- a/static_root/doc/srrietveld/scripting_interface.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - Scripting Interface — SrRietveld 1.0-r6875 documentation - - - - - - - - - - - - - - -
      - -
      - -
      -
      -
      -
      - -
      -

      Scripting Interface

      -

      This part contains the introduction to the scripting interface of SrRietveld. The full API documents for SrRietveld scripts can be found in -here.

      -

      Currently the scripting interface is mostly useful to analyze a completed project. The result data can be easily retrieved and plotted. Also, the data objects in the project can be converted to a data list, which can be used in further analysis, or other modules.

      -
      -

      Structure of the Project Data File

      -

      After the all refinements in a SrRietveld project are complete, the data are saved into a project file, which is actually an HDF5 binary data file. With the scripting interface, users can walk through the structure and obtain the certain result data.

      -

      The data are stored in Datasets, a Dataset is a Python wrapper class over the HDF5 data node. The Dataset usually contains a list of values, which represent the list of single refinement in the project. The Dataset has an interface similar to a list in Python. For example, in the example project file NaCl.srr, user can access the chi2 value of the GSAS refinement on the first single run, as bellow:

      -
      >>>from diffpy.srrietveld.project import Project
      ->>>proj = Project('NaCl.srr')
      ->>>gsas_refinement = proj.listRefinements()[0]
      ->>>chi2 = gsas_refinement.getChi2()
      ->>>chi2
      -<diffpy.refinementdata.hdf5.dataset.Dataset object at 0x365a110>
      ->>>chi2[0]
      -2.5699999999999998
      -
      -
      -

      The Datasets are organized in different Objects. The Object in the project can contain Datasets or other Objects. The structure of a project is illustrated in the following scheme

      -
      -
      -_images/project_structure.png -

      -The scheme for project data structure

        -
      • Datasets are listed under Objects
      • -
      • Objects may contain other lower level Objects as shown in the figure
      • -
      • A Project may contain multiple Refinements. A Refinement contains information defines a refinement job.
      • -
      • In the scripting interface, a Refinement object contains three categories of accessible Objects: Phases, Patterns, and Profiles.
      • -
      • A Phase object contains the lattice parameters and defines a phase structure. It also contains the list of Atoms.
      • -
      • A Pattern object contains the histogram information, such as the Tmin, Tmax, and the Background coefficients. A Pattern object also contains the ExcludedRegion objects.
      • -
      • A Profile object contains the peak profile parameters. Containing Datasets include the number of coefficients, the profile function type, and the list of the profile function coefficients.
      • -
      -
      -
      -

      Access Functions

      -

      The scripting interface provides convenient access functions to retrieve the Datasets and Objects saved in a Project file. The SrRietveld scripting interface API document contains detailed instructions on these access functions. Some commonly used functions are summarized as follows.

      -
      -

      Create a Project

      -

      The API doc for Project class can be found here.

      -

      To create a Project instance, import and initialize the Project class:

      -
      >>>from diffpy.srrietveld.project import Project
      ->>>proj = Project('NaCl.srr')
      -
      -
      -
      -
      -

      Investigate into the Refinement

      -

      The API doc for Refinement class can be found here.

      -

      The Refinement objects can be listed under Project:

      -
      >>>proj.listRefinements()
      -[<diffpy.srrietveld.refinement.Refinement object at 0x2e05a90>, <diffpy.srrietveld.refinement.Refinement object at 0x2e05dd0>]
      -
      -
      -

      To list the names and get a specific refinement by its name:

      -
      >>>proj.listRefinementNames()
      -['NACL_EXP', 'NaCl_pcr']
      ->>>gsas_refinement = proj.getRefinementByName('NACL_EXP')
      -<diffpy.srrietveld.refinement.Refinement object at 0x2e05a90>
      -
      -
      -

      Now a GSAS type refinement object is obtained from the project. Users can get the data by its access functions:

      -
      >>>gsas_refinement.getName()
      -'NACL_EXP'
      ->>>gsas.refinement.getNumOfCycles()
      -<diffpy.refinementdata.hdf5.dataset.Dataset object at 0x365a390>
      ->>>chi2 = gsas_refinement.getChi2()
      ->>>chi2[300]
      -4.5919999999999996
      -
      -
      -

      Similarly, the Phase, Pattern, and Profile objects can be listed under Refinement:

      -
      >>>gsas_refinement.listPhases()
      -[<diffpy.srrietveld.phase.Phase object at 0x2e20190>]
      ->>>gsas_refinement.listPhaseNames()
      -['NaCl']
      ->>>gsas_refinement.listPatterns()
      -[<diffpy.srrietveld.pattern.Pattern object at 0x2e108d0>]
      ->>>gsas_refinement.listProfiles()
      -[<diffpy.srrietveld.profile.Profile object at 0x2e10310>]
      -
      -
      -
      -
      -

      Phase Structure

      -

      The API doc for Phase class can be found here.

      -

      The Phase object contains the lattice parameters and the Atom objects:

      -
      >>>phase = gsas_refinement.getPhaseByName('NaCl')
      ->>>phase.getLatticeA()
      -<diffpy.refinementdata.hdf5.dataset.Dataset object at 0x365a550>
      ->>>max(phase.getLatticeA())
      -5.6840650000000004
      -
      -
      -
      -

      Note

      -

      Dataset objects have the *[]* operators reloaded and a generic interface similar to the built in list type. The values in Dataset represent the values in the series of single refinement. And this Dataset object can be directly passed into functions which accept a list.

      -
      -
      -
      -

      Atoms in the Phase

      -

      The API doc for Atom class can be found here.

      -

      The Atom objects are listed under Phase:

      -
      >>>phase.listAtomNames()
      -['NA1', 'CL2']
      ->>>na = phase.getAtomByName('NA1')
      ->>>na.getUiso()
      -<diffpy.refinementdata.hdf5.dataset.Dataset object at 0x365a750>
      ->>>na.getBiso()
      -<diffpy.refinementdata.hdf5.dataset.Dataset object at 0x365a810>
      -
      -
      -
      -

      Note

      -

      In GSAS refinement, the Biso values are calculated from Uiso values and stored in the project file. Users can directly access to the Biso values under Atom. Similarly in FullProf, the Uiso values are calculated from Biso values.

      -
      -
      -
      -

      Pattern Objects

      -

      The API doc for Pattern class can be found here. -The API doc for ExcludedRegion class can be found here.

      -

      The Pattern object contains the histogram data and the background coefficients:

      -
      >>>gsas_refinement.listPatterns()
      -[<diffpy.srrietveld.pattern.Pattern object at 0x2e108d0>]
      ->>>pattern = gsas_refinement.listPatterns()[0]
      ->>>pattern.getBackgroundCoefficients()[319]
      -array([ 1941.42,  1773.07,  1818.96,  1640.05,  1365.27,  1141.02])
      ->>>pattern.listExcludedRegions()[0].getEnd()[319]
      -1000.0
      -
      -
      -
      -

      Note

      -

      The getBackgroundCoefficients function will return a multi-dimension arrays. The first dimension is the length of single refinements. The second dimension is the number of the coefficients, which can be obtained from the function getNumOfBackgroundCoefficients under Pattern object.

      -
      -
      -
      -

      Peak Profiles

      -

      The API doc for Profile class can be found here.

      -

      The Profile object contains the profile function applied to the pattern:

      -
      >>>profile = gsas_refinement.listProfiles()[0]
      ->>>profile.getProfileType()
      -2
      ->>>profile.listCoefficientNames()
      -['GU', 'GV', 'GW', 'LX', 'LY', 'trns', 'asym', 'shft', 'GP', 'stec', 'ptec', 'sfec', 'L11', 'L22', 'L33', 'L12', 'L13', 'L23']
      -
      -
      -
      -

      Note

      -

      The scripts have same interfaces despite of differences in engine types. Though the returned values may have different meanings. For example, the profile and background function type identification numbers are different in GSAS and FullProf. Users have to refer to the manuals for details.

      -
      -
      -
      -
      -

      Data Visualization and Post-analysis

      -
      -

      Plot the Dataset

      -

      Users can plot the Dataset directly by using the plot member function under Project (API doc <http://www.diffpy.org/doc/srrietveld/api/diffpy.srrietveld.project.Project-class.html#plot>_):

      -
      >>>a = phase.getLatticeA()
      ->>>b = phase.getLatticeB()
      ->>>temperature = gsas_refinement.get('T')
      ->>>from diffpy.refinementdata.plot import backend
      ->>>backend.use('wx')
      ->>>proj.plot([a, b], temperature)
      -
      -
      -

      Also, users can convert the Dataset object into list, and plot the data with other visualization packages such as matplotlib.

      -
      -
      -

      Post-analysis

      -

      The Dataset objects can be easily converted to list or numpy.array objects, which can be readily imported to other models:

      -
      >>>chi2 = gsas_refinement.getChi2()
      ->>>chi2_list = list(chi2)
      ->>>from numpy import array
      ->>>chi2_array = array(chi2_list)
      -
      -
      -
      -
      -
      -

      A Comprehensive Example

      -

      An example is introduced below to show the usage of the scripting interface. The NaCl.srr project data file is read into Python. The lattice parameter a values from GSAS and FullProf engines are plotted and compared. The Uiso values of Na, Cl atoms, from both GSAS and FullProf engines are plotted. Also, the Uiso values in temperature series are fitted with Debye model. The whole script is in the example folder, and also can be found in the -SVN repository.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/search.html b/static_root/doc/srrietveld/search.html deleted file mode 100644 index d3390ea4..00000000 --- a/static_root/doc/srrietveld/search.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - Search — SrRietveld 1.0-r6875 documentation - - - - - - - - - - - - - - - - -
      -
      -
      -
      - -
      -
      -
      -
      - -

      Search

      -
      - -

      - Please activate JavaScript to enable the search - functionality. -

      -
      -

      - From here you can search these documents. Enter your search - words into the box below and click "search". Note that the search - function will automatically search for all of the words. Pages - containing fewer words won't appear in the result list. -

      -
      - - - -
      - -
      - -
      - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/searchindex.js b/static_root/doc/srrietveld/searchindex.js deleted file mode 100644 index d9b1dcdb..00000000 --- a/static_root/doc/srrietveld/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({objects:{},terms:{all:[5,3,4,1],code:0,consider:5,illustr:[3,1],skip:[5,1],prefix:[5,4,1],concept:2,edu:2,follow:[5,0,3,4,1],disk:[5,1],row:[5,1],hierarch:4,categori:[3,5,1],procur:0,depend:[0,5,4],nacl_exp:[3,5],sensit:[5,1],effort:5,wizard:4,friendli:2,environment:1,program:[5,0,2,4,1],those:[0,4],allvari:5,under:[5,0,3,4,1],aris:0,neglig:0,worth:1,install_srrietveld:4,merchant:0,datafil:[5,1],sourc:[0,5,4],string:1,internet:5,mous:[5,1],print:5,the_job_panel:5,affect:1,brows:5,relev:5,cool:5,school:2,level:3,button:[5,1],listphasenam:3,list:[5,0,3,4,1],fewer:5,magnet:0,item:[5,1],team:0,laur:0,recogniz:5,prepar:5,dir:4,pleas:[5,0,2,4,1],impli:0,smaller:5,dimens:[3,1],direct:0,past:5,second:[3,5,1],street:2,design:[0,2,1],pass:[3,4,1],download:[5,4],further:[3,4,1],click:[5,4,1],even:0,index:[5,1],what:[0,2,5,1],getatombynam:3,appear:[5,4],compar:3,section:[5,4],brief:1,nacl_ramp01_10f_200ms_0970:1,uniform:2,current:[0,3,5,1],version:[5,0,4,1],unrefin:5,"new":[5,0,2,4,1],ever:1,"public":0,nacl_rapdf_exampl:5,full:[3,1],deriv:0,despit:3,gener:[0,3,5,1],greatli:5,coeffici:[3,1],here:[3,5,4],nacl_ramp01_10f_200ms_0969:1,met:0,l23:3,l22:3,modif:0,ubuntu:4,path:[5,4,1],becom:2,modifi:1,sinc:[5,4,1],valu:[3,5,1],box:[5,1],dreel:0,convert:[3,1],produc:5,forum:2,hdf5:[3,5,4],oxford:5,shift:5,fetch:4,converg:5,throughput:[0,2],behav:5,mfil:5,permit:0,action:1,opinion:[0,5],studi:0,commonli:[3,1],york:[0,2],hardi:4,diamet:5,via:5,depart:[0,2],extra:5,appli:[0,2,3,5,1],modul:3,foundat:[0,2],"while":[5,1],apt:4,readili:3,bashrc:4,unix:[0,5,4],api:3,exit:1,scientif:[0,2,4],instal:[5,0,4,1],txt:1,establish:5,excludedregion:3,select:[5,1],highli:2,plot:[0,1,2,3,4,5],from:[0,1,2,3,4,5],describ:4,zip:[0,5],commun:[0,2,5],chi:[5,1],univers:0,two:[5,1],subvers:4,websit:4,few:1,deviat:5,call:5,recommend:[0,5,4],getbackgroundcoeffici:3,preview:5,type:[2,3,5,1],until:5,more:[5,0,4,1],flat:5,listcoefficientnam:3,desir:2,l13:3,relat:[2,5,1],notic:[0,2],nacl_step_back:5,visual:[0,2,3,1],chi2_arrai:3,oop:2,examin:2,particular:0,hold:5,unpack:[5,4],must:[0,4,1],libg2c0:4,graphic:[5,4],retriev:3,restor:1,local:[5,1],setup:[5,0,4,1],work:[5,0,2,4,1],dev:[2,5,4],histori:5,minimum:5,introduc:[3,1],learn:[2,5],uiso:3,purpos:0,root:4,scatter:[0,2],appropri:4,control:[2,5,1],kapton:5,prompt:[5,4],want:[5,1],tar:4,rodriguez:0,sudo:4,share:[2,5,4],indic:1,high:[0,2],unzip:5,wenduo:0,tab:[5,1],onlin:5,occur:1,alwai:4,multipl:[3,5,1],fullprof:[0,1,2,3,4,5],anoth:[5,4,1],how:[5,4],xye:1,confin:1,bank3:1,verifi:4,bank1:1,csv:[5,1],simpl:[0,5],chri:0,updat:[5,1],product:0,"6mm":5,mudd:2,tcsh:4,huge:5,chi2:3,max:3,after:[5,0,3,4,1],reflect:0,befor:[5,4,1],mac:[0,4],mai:[5,0,3,4,1],end:[5,1],philosophi:2,data:[0,1,2,3,4,5],parallel:1,physic:[0,2],fedora:4,util:4,handl:[0,5,1],"short":4,essenti:1,third:1,dmitrii:0,bootstrap:1,ptec:3,correspond:[5,1],sfec:3,caus:[0,5,1],inform:[5,0,3,4,1],"switch":[2,5],maintain:[0,2],environ:[5,0,4,1],block:5,allow:2,enter:5,expgui:[5,4],order:[2,1],origin:1,checkbox:5,feedback:[0,5],softwar:[5,0,2,4,1],over:[3,5,1],move:1,rang:5,argonn:5,paper:0,through:[3,5,1],pane:1,appar:5,diffpi:[0,2,3],still:1,bryndin:0,dynam:4,paramet:[0,2,3,5,1],style:1,group:[2,5,4],fit:[0,2,3,5,1],sodium:5,pcr:[0,5,1],peng:0,tort:0,window:[5,0,4,1],html:3,rapidli:4,restart:5,comprehens:[0,3],mail:5,main:[0,5,1],might:5,alter:5,them:[2,5,4],good:[0,5],"return":3,thei:[5,4],python:[2,3,4,1],auto:5,nacl_al:5,initi:[2,3,5,4],devel:4,dat:1,mention:[4,1],"58kev":5,bank2:1,interrupt:[0,5],now:[0,3,5,1],discuss:1,nor:0,introduct:[0,2,3],down:[5,1],term:1,name:[5,0,3,4,1],trac:4,creativ:2,edit:[5,4,1],drop:[5,1],perkin:5,separ:[4,1],accommod:1,slide:5,mode:1,each:[2,5,1],debug:1,found:[0,3,5,4],intervent:5,gui:[5,0,4,1],juha:0,mean:[3,1],dockabl:1,laboratori:[0,5],individu:1,hard:5,continu:[5,1],wrap:2,redistribut:[0,4],meta:5,wavelength:[2,5],energi:5,extract:[5,4],event:[0,5],special:0,out:[0,5,1],variabl:[5,4,1],"try":[5,4],shown:[3,5,1],space:1,profit:0,miss:5,newli:5,research:0,profil:[5,0,3,4,1],"0x365a750":3,suitabl:2,rel:5,lattic:[3,5,1],hardwar:5,truste:0,gov:4,ref:5,red:1,difficulti:5,"21281\u00e5":5,navig:[5,1],advanc:[0,2,5],manipul:4,guess:2,free:5,standard:[5,4,1],tian:0,quick:[5,1],reason:[5,1],base:[5,1],fxye:1,theori:0,ask:[0,4],org:[3,4],process:[2,5,1],reconfigur:5,launch:5,angl:5,could:[4,1],zxf:4,put:[5,1],filter:5,turn:[5,1],length:3,farrow:0,place:[5,4,1],retain:0,principl:[0,2],confus:1,top:[5,1],"juh\u00e1":0,first:[3,5,1],oper:[3,5,1],endors:0,major:5,directli:[3,5,1],carri:[5,1],onc:[5,1],arrai:3,number:[5,2,3,4,1],nacl:[3,5],reopen:1,instruct:[3,5,4],alreadi:[5,4],wrapper:3,owner:0,beamlin:5,puratron:5,open:[5,4,1],predefin:1,idea:5,differ:[0,1,2,3,4,5],"0x2e05dd0":3,convent:[2,5],script:[0,2,3,5,4],associ:[5,1],bite:[0,5],mkdir:[5,4],system:[5,0,4,1],messag:[5,4],cryostream:5,citi:0,necessarili:0,getnumofcycl:3,accept:3,similarli:[3,5],termin:[5,4,1],scheme:[3,5],cite:0,store:3,editor:[0,5,1],back:5,shell:4,consol:1,option:[5,4,1],tool:[5,4,1],copi:5,setuptool:4,specifi:[5,4],rerun:[5,1],part:[0,3,5,1],l33:3,mostli:3,holder:0,than:[5,1],conveni:[3,5],provid:[0,1,2,3,4,5],"0x2e05a90":3,remov:[5,1],dans:[0,2],zero:5,structur:[0,2,3,5,1],"final":1,project:[0,2,3,5,1],silicon:5,kindli:0,were:5,posit:1,arrang:[5,1],result:[0,2,3,5,1],pre:[2,5,4],synchrotron:5,sai:1,comput:4,"_fg_import_text_data":5,anl:[5,4],modern:2,ani:[5,0,4,1],rai:[2,5],raw:[5,1],aforement:1,have:[5,3,4,1],tabl:[5,4],need:[5,4,1],seen:[5,1],featur:5,getnumofbackgroundcoeffici:3,packag:[0,2,3,5,4],issu:5,engin:[0,1,2,3,4,5],squar:1,lib:4,"0x2e10310":3,diverg:[0,5,1],incid:5,mount:5,contact:[0,2,5],note:[5,3,4,1],liu:0,without:[0,5,1],take:[5,2,4,1],which:[5,2,3,4,1],combin:1,detector:5,bundl:4,singl:[5,2,3,4,1],simplifi:2,zshenv:4,sure:[4,1],distribut:[0,2,4],shall:0,previou:[5,4,1],dialogu:5,most:[5,4],beta:1,sb2896:2,phase:[0,3,5,1],alpha:1,everyth:1,icon:[5,4,1],expert:2,listexcludedregion:3,doc:3,professor:2,later:[5,4,1],flow:[0,2,1],drive:5,physica:0,bracket:5,trial:5,yum:4,exp:[0,5,1],pattern:[0,2,3,5,1],left:[5,1],microsoft:4,show:[3,5,1],text:[5,1],getlatticea:3,let:5,merit:[0,2],getlatticeb:3,distanc:5,permiss:0,elmer:5,bail:2,find:[0,5,4],help:[5,4,1],larson:0,onli:[5,1],submit:[5,1],locat:4,just:5,copyright:0,menu:[5,4,1],configur:1,releas:[4,1],behind:5,should:[5,4,1],parametr:5,busi:0,suppos:1,analyz:[2,3,5],templat:[5,1],factor:5,folder:[0,3,5,1],analys:1,reset:5,hit:5,contribut:2,variou:[5,1],get:[3,5,4],michigan:0,express:0,stop:[0,5,1],autom:[0,2,5,1],beam:5,cannot:5,"import":[3,5,1],report:[0,5],liabl:0,requir:[5,4],layout:[0,5,1],bar:[5,1],enabl:[2,1],organ:[3,1],gda:1,"0x365a110":3,getchi2:3,method:5,reload:[3,5],bad:5,common:[2,4,1],contain:[3,5,1],straight:5,privileg:4,grab:5,where:[4,1],view:[0,5,1],set:[5,2,4,1],refinementdata:3,tree:[5,1],"0x2e108d0":3,see:[5,4,1],winplotr:5,powder:[0,2],fail:[5,4],close:[5,1],becaus:5,xrai:4,statu:[5,1],nacl_step_ov:5,correctli:[5,4],pavol:0,review:1,below:[3,4,1],label:[5,1],state:0,languag:2,between:5,progress:1,neither:0,experi:[0,2,5,1],across:1,attribut:1,accord:1,extend:[2,5,1],numer:5,screen:1,prior:0,pypi:4,extens:[5,2,4,1],job:[0,3,5,1],entir:5,matplotlib:[2,3,4],deby:3,"bo\u017ein":0,solv:[5,4],trn:3,come:[5,4],addit:[5,1],disclaim:0,last:5,chi2_list:3,modular:2,listphas:3,similar:[3,5,4],howev:[0,5,4],ramp:5,incident:0,contract:0,shft:3,etc:[2,5],asym:3,tutori:[5,0,4,1],tmin:3,context:[5,1],improv:[2,5],seri:[2,3,5,1],whole:[3,5],load:[0,5,1],simpli:5,author:0,figur:[3,5,1],address:5,pop:[5,1],walk:3,header:4,uncertainti:5,written:[0,2,4],nacl_pcr:3,linux:[0,5,4],prefixdir:4,typic:2,undock:[5,1],guid:[2,5],wxtool:4,damag:0,liabil:0,listrefin:3,billing:[0,2],platform:[2,5,4],addition:[5,1],srrietveld:[0,1,2,3,4,5],numpi:[2,3,4],due:1,been:5,legend:1,much:5,unexpect:5,toolbar:[5,1],interest:5,grade:5,strategi:[0,2,5,1],flight:2,arxiv:0,both:[3,4],given:5,summari:1,photon:5,consequenti:0,spectrum:5,listatomnam:3,child:[5,1],libg2c:4,former:0,present:[5,4],"case":[5,1],multi:[2,3,5,1],therefor:[5,1],look:[5,4,1],diffract:[0,2,5],servic:0,can:[0,1,2,3,4,5],defin:[0,3,5,1],calcul:[2,3,1],overrid:5,abov:[5,0,4,1],error:[5,4,1],pytabl:4,exist:[5,2,4,1],tmax:3,bin:[4,1],layer:2,cell:5,ctrl:5,r6870:[],alon:5,von:0,r6875:0,activ:5,scipi:2,against:[5,1],mani:[5,2,4,1],sever:5,scienc:[0,2],develop:[0,2,5,4],welcom:0,getbiso:3,grant:[0,4],perform:[2,1],suggest:[2,5],make:[5,0,4,1],cross:[5,2,4,1],same:[5,2,3,4,1],member:[0,3],binari:[0,3,5,4],instanc:3,diffractomet:2,document:[0,3,5],neutron:[0,2],complet:[3,5,1],finish:[5,4,1],columbia:[0,2],screenshot:1,again:5,effect:4,coffe:5,hand:1,temporari:1,user:[0,1,2,3,4,5],refin:[0,1,2,3,4,5],nation:[0,5],stack:1,expand:1,built:3,submenu:[5,1],"break":5,lower:[3,1],task:2,off:[5,1],center:0,getend:3,com:[5,4],thu:[5,1],min:5,well:[2,5],comma:1,object:[0,2,3],gsa:[0,1,2,3,4,5],exampl:[5,0,3,4,1],command:[5,0,4,1],greatest:4,thi:[5,0,3,4,1],choos:5,model:[2,3,5,1],termial:4,getrefinementbynam:3,usual:[3,5,4],comment:2,bellow:[3,5],paus:1,execut:[2,4,1],half:1,obtain:[3,5,4],detail:[3,5,4],front:1,shape:5,observ:1,pythonx:4,human:[5,1],speed:5,yet:5,timur:0,cut:[5,4],easi:2,also:[0,1,2,3,4,5],mark:[5,1],cl2:3,point:1,except:1,shortcut:5,desktop:[5,4],identif:3,instrument:5,add:[5,0,4,1],bank:[5,1],input:[2,5,1],distinguish:5,save:[0,3,5,1],build:[2,4],real:[0,5,1],applic:[0,2,5,1],hover:[5,1],advis:0,format:[5,4,1],read:[3,5,1],preexist:[0,5],test:[5,4],temperatur:[3,5,1],grid:[5,1],know:5,background:[3,5,1],bit:4,tick:1,licens:0,loss:0,nsf:2,like:[5,1],specif:[0,3,1],ill:4,cooler:5,manual:[0,3],collect:[5,1],necessari:[5,4,1],either:[5,2,4,1],output:[2,5,1],resiz:1,amorph:5,manag:[4,1],underli:1,encount:5,www:[3,4],right:[5,1],exemplari:0,carvaj:0,acknowledg:0,interact:[5,1],some:[5,3,4,1],begin:5,wxpython:4,sampl:5,respect:[0,5,4],"120th":2,nacl_ramp01_10f_200ms_0973:1,indirect:0,nacl_ramp01_10f_200ms_0971:1,listpattern:3,librari:4,nacl_ramp01_10f_200ms_0975:1,total:1,lead:0,alamo:0,"function":[0,1,2,3,4,5],"0x365a810":3,tube:5,though:[3,5,1],l11:3,l12:3,summar:3,substitut:0,mathemat:[0,2],larg:[2,5],proj:3,toolkit:[2,4],condit:[0,5],backend:[3,4],reproduc:0,getnam:3,refer:[0,3,1],stec:3,encourag:5,investig:[0,3],run:[5,0,3,4,1],bold:5,whose:5,usag:[3,1],perpendicular:5,solut:5,broken:1,step:[5,2,4,1],promot:0,repositori:[3,4],boundari:5,post:[0,2,3,4],chlorid:5,panel:[0,5,1],sub:1,about:[5,4],actual:[3,4],would:[5,1],constraint:1,column:[5,1],materi:0,http:[0,3,5,4],srr:[3,5,1],biso:3,stand:5,dialog:[5,4,1],coars:2,disabl:1,gamma:1,own:[2,5,1],effici:2,yingrui:0,possibl:[0,2,5,1],pythonpath:4,within:[5,1],tag:[0,1],automat:[2,5,1],dataset:[0,2,3,5,1],warranti:0,bsd:0,getphasebynam:3,empti:5,contributor:0,chang:[5,4,1],browser:5,next:[5,1],your:[0,2,5,4],encuont:5,instrumentfil:5,wai:[0,2,5,1],area:[5,1],support:4,captur:1,question:5,redock:5,fast:2,custom:1,avail:[5,2,4,1],start:[5,0,4,1],trigger:5,interfac:[5,0,3,4,1],includ:[0,1,2,3,4,5],replac:[5,4],strict:0,analysi:[0,2,3,1],svn:3,properli:5,form:[0,5],enough:5,shang:0,three:[3,5,1],histogram:[3,5,1],content:5,bodi:0,link:[5,4],measur:5,atom:[0,3,5,1],line:[5,0,4,1],highest:5,categor:[5,1],bug:[0,5],conclus:0,info:[5,1],made:[5,4,1],wise:1,emil:0,consist:[5,1],jiwu:0,whether:0,access:[0,3,5,1],"0x365a550":3,displai:[5,1],record:5,dmr:[0,2],limit:0,getuiso:3,site:4,highlight:5,problem:[5,4],archiv:[0,5,4],email:[2,5],curv:[5,1],enlarg:[3,5,1],constant:2,creat:[5,0,3,4,1],certain:[3,5,1],dure:[5,4,1],proceed:4,repres:[3,1],nacl_ramp01_10f_200ms_0972:1,implement:[2,1],file:[5,0,3,4,1],our:[5,4,1],request:5,disagl:5,"0x2e20190":3,check:[5,4,1],otherwis:[0,5,4],denot:1,readi:[5,1],macro:2,listprofil:3,googl:[2,5],getprofiletyp:3,titl:1,sequenti:[0,2,5,1],gsas_refin:3,when:[5,4,1],green:1,virtual:4,orient:2,"default":[5,4,1],"0x365a390":3,other:[5,0,3,4,1],role:5,nacl_ramp01_10f_200ms_0974:1,normal:5,writabl:4,you:[5,0,4,1],davi:0,node:[3,5,1],determin:[0,1],zhou:0,sequenc:5,"class":3,astronomi:0,multidimension:1,drag:[5,1],scale:5,recent:[0,4],peak:[0,3,1],easili:[2,3,4],doubl:[5,4,1],debian:4,listrefinementnam:3,simon:[0,2],rietveld:[0,2,5,1],axi:1,fund:[0,2],directori:[5,4],bottom:[5,1],descript:5,flag:1,na1:3,ignor:5,time:[0,2,5,1],alright:1,"export":[5,0,4,1],scroll:5,prototyp:1},objtypes:{},titles:["Welcome to SrRietveld documentation!","Reference","Introduction","Scripting Interface","Installation","Tutorial and Example"],objnames:{},filenames:["index","reference","intro","scripting_interface","install","tutorial"]}) \ No newline at end of file diff --git a/static_root/doc/srrietveld/srrietveld.pdf b/static_root/doc/srrietveld/srrietveld.pdf deleted file mode 100644 index 2b8d3396..00000000 Binary files a/static_root/doc/srrietveld/srrietveld.pdf and /dev/null differ diff --git a/static_root/doc/srrietveld/tutorial.html b/static_root/doc/srrietveld/tutorial.html deleted file mode 100644 index b89e4f41..00000000 --- a/static_root/doc/srrietveld/tutorial.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - - - - - Tutorial and Example — SrRietveld 1.0-r6875 documentation - - - - - - - - - - - - - - - - -
      -
      -
      -
      - -
      -

      Tutorial and Example

      -

      This tutorial contains a guide for users to complete an example Rietveld parametric refinement with SrRietveld, as well as other major functionalities in SrRietveld software.

      -
      -

      Example

      -

      The data files for this example can be downloaded from here.

      -
      -

      Experiment Data

      -

      Sample: NaCl (sodium chloride) from Puratronic® (99.999%, 5N grade), contained in a 1 mm diameter Kapton tube mounted perpendicular to the synchrotron beam.

      -

      Beamline: 11-ID-B at Advanced Photon Source (APS) at Argonne National Laboratory (ANL). The beam energy is 58keV and x-ray wavelength of 0.21281Å.

      -

      Temperature ramping: The temperature was ramped continuously from 155.2 K to 500 K at a speed of 3 K/min.

      -

      Instruments: The sample was cooled using a Oxford cryostream cooler. The data were collected on a 2D Perkin-Elmer amorphous silicon detector mounted 128.6mm behind the sample and perpendicular to the beam.

      -
      -
      -

      Create the Example Folder

      -

      We recommend the users to create a new working directory and work on this example within this new folder.

      -
      -

      For Windows Users

      -

      Create a new folder on your hard drive. And put the downloaded example package into the newly created folder. Unzip the package.

      -
      -
      -

      For Linux/Unix Users

      -
      -

      Linux/Unix users may need to type in commands in a terminal. Examples of commands that need to be typed on the command line are shown boxed in bold like:

      -
      this
      -
      -
      -
      -

      It should be possible to cut and paste them from the documentation into the command prompt to save you time. Text in angle brackets should be replaced with the value relevant to your case.

      -

      Begin by creating your working directory:

      -
      mkdir path/to/my/working/directory
      -
      -

      The downloaded package is in the form of a zipped archive file. Save the zip file in your working directory. It should be possible to do this from the browser by right clicking on the link and browsing to the right directory. Go to the working directory:

      -
      cd path/to/my/working/directory
      -
      -

      and unpack the zip file:

      -
      unzip srrietveld-examples.zip
      -
      -

      This should create a directory tree with all of the example data: NaCl_RAPDF_example

      -
      -

      Note

      -

      After the zip file just downloaded is extracted, the contents of the NaCl_RAPDF_example folder can be read as following,

      -

      Data - a directory that contains all the raw data in CHI format files

      -

      NaCl.srr - a HDF5 format binary project file contains the refinement setup and results of this example. This example project contains two experiments, one is refined with GSAS as the refinement engine and the other is refined with FullProf. This is created by SrRietveld and can, in turn, be read by SrRietveld. You will create this file when you do the tutorial. This is provided by way of a solution to the problem. You can check your project file against this one.

      -

      NaCl.EXP - the refinement setup file for the GSAS engine. This file can be created or edited using programs such as EXPGUI.

      -

      NaCl.pcr - the refinement setup file for the FullProf engine. This file can be created or edited using programs such as WinPLOTR.

      -
      -
      -
      -
      -

      Start SrRietveld GUI

      -

      Once the SrRietveld program is properly setup and the example files are downloaded, the user can start SrRietveld to run the examples. On Windows, SrRietveld can be started by clicking the quick link icon on the desktop or in program list.

      -

      To start SrRietveld in Linux/Unix, type on the command line:

      -
      srrietveld
      -
      -
      -

      If the system cannot find the srrietveld command, the system PATH environment variable may not be set up correctly. Please go back to the installation section of SrRietveld, and check if the script path is added to the system PATH variable.

      -
      -

      Note

      -

      SrRietveld is a cross platform application, its Graphical User Interface looks and behaves the same on different operating systems. Details about the GUI layout can be found here.

      -
      -
      -
      -_images/SrRietveld1.png -

      -Layout of the SrRietveld main window. There are three main panels. On the left is -the “Experiments” panel, the role of the main panel on the right is context sensitive, it -changes depending on what is selected in the experiments panel, but it will be used for editing and -controlling refinements, and viewing numerical results. The bottom panel is the “Output” panel that -shows outputs from SrRietveld engines as they run. At the top is a toolbar and a number of drop-down lists. -The layout of the GUI can be reconfigured by sliding boundaries between panels. Panels can also be undocked -and redocked in a different arrangement by grabbing the top of the panel by holding down the left -mouse button and dragging the mouse.

      -
      -

      Creating a Simple Project Using a Preexisting EXP/PCR File

      -

      Each time you open SrRietveld you are working on a single project. You can open an existing project or -start a new project. Here we will start a new project by clicking on File->New project. When SrRietveld -starts, a new empty project will be loaded in the work place automatically.

      -

      Within a project we can create refinements, which may contain a series of related fit s. -Each fit may contain one or more phases and one or more histogram files. In conventional Rietveld refinement -jobs, users usually work on one fit each refinement.

      -

      SrRietveld uses an EXP (for GSAS refinement) or PCR (for FullProf refinement) as template to create a -refinement. The same settings, including the refinement strategy (see here) -will be applied to all fit s in a refinement.

      -

      In the current example we have a series of 320 NaCl data-sets collected as a function of temperature. We -are going to create an project, which contains a GSAS refinement and FullProf refinement. The refinements -will be sequentially refined with corresponding engine.

      -

      To add a new refinement to the project, one can click on the Add new refinement icon on the toolbar, or -File->New fit... on the menu bar, or right click on an empty area on the experiments panel.

      -

      A file dialog will pop up. Then navigate in the file dialog to the NaCl example folder and select NaCl.EXP.

      -
      -

      Note

      -

      It is possible to override this step and create a new project with a new experiment directly by typing at the command line:

      -
      srrietveld NaCl.EXP
      -
      -

      or

      -
      srrietveld NaCl.pcr
      -
      -

      This will launch SrRietveld GUI with the experiment pre-created provided the NaCl.EXP file is present in the current directory.

      -

      To learn how to run SrRietveld from command line, please see the instructions here.

      -
      -
      -

      Note

      -

      Currently, users need to use GSAS (EXPGUI) or FullProf (WinPLOTR) to create the EXP / PCR setup files to create a new experiment in SrRietveld. Users can change the initial values of the refinement. But can not alter the number of phases or number of atoms specified in the EXP/PCR files.

      -
      -
      -
      -

      The Setup Panels and Strategy Editor

      -

      After the EXP or PCR file has been loaded you will see a list of icons in the Experiments panel (left panel). -The refinement parameters are categorized into different folders. (Figure). Users can -navigate through the icons, the values of contained parameters will show to the right panel.

      -
      -

      NaCl_EXP – the name of the refinement

      -
      -

      All variables – all refinement setting parameters

      -

      Phase – The phase information, such as the lattice parameters, phase name, atoms, etc.

      -

      Patterns – The histogram file information, such as the data file path, instrument file path, incident spectrum data file, etc.

      -

      Profile – The setup parameter for the profile, such as the scale factor, zero shift, etc.

      -
      -

      Strategy – The strategy setup interface. (see here)

      -

      User defined – user created category.

      -
      -

      Right click on the icons will trigger a context menu, which provides additional functionalities.

      -
      -

      Note

      -

      User can define their own category icon under the User defined. Just right click on the User defined icon, click Add child

      -
      -
      -
      -

      Load Data

      -

      Next the data will be loaded into the refinement. -First, select the refinement on the experiment panel (left panel), the click the Load the data to a refinement -icon. A file dialog will open. After the user selected the data file or data list information file from the file -dialog, the

      -
      -

      Note

      -

      User can also use the Ctrl+L shortcut or by clicking Load->Data to open the dialog.

      -
      -

      There are two schemes to load a sequence of data into the refinement:

      -
        -
      • User can directly select the data files to load. An index will be automatically generated for the list.
      • -
      • To associate the list of data files with the environment variables, user can prepare a INFO file, which will -contain the list of environment variable values and the relative paths to the INFO file. User can choose -this INFO file and SrRietveld will load the data file specified.
      • -
      -

      In this example, select the NaCl_All.info file in the directory NaCl_RAPDF_example/Data/, -The list of data files and the temperature will be listed in a dialog before load into the -refinement (Figure).

      -
      -
      -_images/load_data.png -

      -The load data dialogue box. This is obtained by making an experiment active by selecting the -main experiment tab (in this case it is called “NaCl”), then clicking on the Load drop-down menu and -selecting data. We have browsed to the directory containing the data and selected the NaCl.info file -that contains a list of data-files and the temperature at which the data were measured. In this figure all -the files are shown selected, so when “replace” button is clicked these datasets will be loaded into this -experiment (replacing any data-files that were associated with the experiment). Only the selected files will -be loaded.

      -

      Note

      -

      By default, all the files in the .info are selected but this can be changed using normal selection methods -(select a single file, select multiples files by holding down Ctrl button and clicking files, or select -ranges of files by holding down shift and clicking the file at each end of the range).

      -
      -

      The NaCl_All.info file is a multi column text file, which contains the datafile names and -the corresponding temperature on which the data were collected. After the sequential refinement -data are loaded, select Pattern in the Experiments panel. We see that it contains a row of -meta data for each loaded dataset (Figure). The names of the files that -correspond to each row are in the Datafile column. Similarly, the Instrumentfile contains -the instrument file path, and the MFIL column contains the incident spectrum data file path (for GSAS refinements).

      -

      Details about the data file list file (.info file) format can be found here.

      -
      -

      Note

      -

      In the case of multi-bank data, data file for each bank has to be specified. If a data file for a bank is missing, -the data file path from the previous bank will be copied, otherwise, if more data files are listed than the number -of the banks, the extra data file will be ignored.

      -
      -
      -
      -_images/pattern_node.png -

      -The Pattern setup panel. We can see which data-files, or diffraction “patterns”, are associated with -the experiment by clicking on the pattern node in the experiment and looking in the main panel. -Also apparent in this panel are other parameters in the fits that are associated with the pattern such as -background parameters and the instrument parameter file that will be used with the refinement.

      -
      -

      Refinement Strategy

      -
      -

      Note

      -

      For more details on strategy in SrRietveld, please see here.

      -
      -

      Now we have loaded a EXP file and created an “refinement” and we have associated -a series of data-sets to this experiment. We are now ready to set up the refinement strategy. -SrRietveld uses strategies to automate refinements in place of the extensive human interaction -necessary with GSAS or FullProf.

      -

      The strategy is a sequence of refinements on one data set. To obtain convergence, usually fewer parameters will be turned on at the beginning steps of the strategy and more parameters will be turned on at the following steps. At the last step all parameters to be refined will be turned on. This process can improve the convergence of the refinement on one data set when the starting value is not close enough to the results. While in most cases, the user will have a refinement setup file with good results ready to establish a project in SrRietveld, the strategy steps will be turned off by default. The user can also let the program to automatically turn on the strategy steps when the refinement diverges on one dataset. Therefore when the refinement diverges, the software will rerun the refinement with all strategy steps turned on on the same dataset. If the second trial fails again, the software will mark the bad dataset and continue to the next.

      -

      The turned on parameter will show a prefix @ in its label. To add a parameter to a step of strategy, user can select that column, and right click on the column label, hover the mouse over Turn on parameters submenu, user can remove or add this parameter to the listed steps.

      -

      Select the Strategy icon on the NaCl experiment in the Experiments panel. -The SrRietveld default strategy can be seen in the strategy panel to the right. We will use the default strategy so there is no need to edit it. Users can edit the strategy in the strategy editor panel. The user defined strategy can also be exported to local disk as a text file, which can be loaded into another experiment with same refinement engine.

      -
      -

      Note

      -

      SrRietveld sets up a default strategy for each newly created experiment. For details of -how to edit the strategy, please go here

      -
      -
      -
      -

      Real Time Plotting

      -

      Now we will open the real time plot windows so we can follow the refinement. When the refinement starts, -all the fits in the experiment will be carried out. We can choose to follow any refined parameter, or -the goodness-of-fit R-factors, as a function of the fit number or, if as here we have associated a parameter -such as temperature with each fit, we can plot the refined parameter vs. temperature. We would like -to follow the T-dependence of the a-lattice parameter. To do this we need to select this parameter column. -Either select the AllVariables or Phase node in the NaCl experiment in the Experiments. The main -panel will then show either all the variables in a huge table, or just the parameters associated with the structural -model of the phase. All the variables associated with a single fit are in a single column of the table.

      -

      Scroll until you find the parameter of interest and select the column by clicking on the top of the column. Then click Tools -> Plot from the Menu Bar, or click the plot icon in the Tool Bar. A plot window will pop up (Figure).

      -

      You can select more than one parameter to plot by holding down Ctrl and selecting more parameters. If two parameters have similar values they will look good in one plot window, which will auto-scale based on the refined values. You can open as many plot windows as you like and so it is also possible to follow multiple parameters with different values in multiple plot windows.

      -
      -
      -_images/plot_window.png -

      -A plot window has been opened by selecting the column corresponding to the parameter, in this case it is the a-lattice parameter then clicking the plot icon on the tool bar. It looks flat because the refinements have not started and the initial values for this parameter is the same for each fit at each temperature.

      -

      Note

      -

      Since the refinement has not started yet, the curve in the plot window is a straight line. However, The shape of the curve will be updated in real time after the refinement starts.

      -
      -
      -
      -

      Add a job to the job list

      -
      -
      -_images/add_job.png -

      To add a job to the job list of the project, one has to select a refinement in the Experiment panel, and select the datasets to be included in the job from the right panel (grid panel). Then click on the menu item Experiment->Add job. The job will be added and shown in the Job panel list. To be noted, If no dataset is selected in the grid panel when adding the job, all datasets in the selected refinement will be included in the job.

      -

      A detailed instruction on the Job panel can be found in :ref:here <the_job_panel>.

      -
      -
      -

      Start the Sequential Refinement

      -

      To start the refinement jobs listed in the Job panel, simply click on the Start a refinement button in the tool bar. SrRietveld will automatically run the refinement jobs in the job panel from the top of the list. Because of the large number of fits, the refinement will take some time to complete. You can take a break and have a coffee and come back later to view the results, or you can interrupt the fit and restart it with fewer data-sets loaded (see bellow).

      -
      -

      Note

      -

      During a refinement, SrRietveld switches to the strategy view, with the active refinement step highlighted, output -messages from the engine will be printed in the output panel, and the parameter values in the strategy -view and the plot window will be updated in real time (Figure). The grid data view above the strategy panel will also be updated in real time during the refinement.

      -

      Enlarge

      -
      -_images/running.png -

      -SrRietveld is running

      User can also refine certain fits in the list. Simply select the rows in the data grid view on the right panel, and start the refinement by right clicking on the row labels, then SrRietveld will refine only the selected fits.

      -
      -
      -

      Handling Divergent Refinements

      -

      FullProf has difficulty converging the fit at certain temperatures, which would require considerable human intervention if FullProf were being used without SrRietveld. However SrRietveld can handle the divergence during sequential refinement. When the refinement on certain temperature diverges, SrRietveld will skip the current dataset and continue on the refinement on the next refinement. The diverged datasets will be highlighted in the result grid view, as can be seen in the figure bellow. The results shown in the figure are saved in the project file NaCl_step_over.srr file under the example folder.

      -

      To converge the diverged fits you can try and rerun the refinements. Each data-set has a status associated with it so that SrRietveld knows if it is not-run, converged, or not converged. The refinement can be rerun on all datasets or just not-run and not-converged datasets. If necessary you can change the starting parameter values or the refinement strategy by editing in the SrRietveld window to help convergence.

      -
      -
      -_images/exception.png -

      -The SrRietveld software can handle the diverged refinement on datasets during sequential refinements. The above figure shows the results of the sequential refinements with a different version of FullProf which produced some diverged refinements on some datasets, which is highlighted in the grid view. The step-over example results are saved in NaCl_step_back.srr in the example folder.

      -

      Note

      -

      The results shown above are obtained with FullProf v4.80. We also found that different versions of FullProf may produce different refinement results on our testing with the same settings. So if you get any results different from what are showing above, a different version number may be the reason.

      -
      -
      -
      -

      Viewing the Results

      -

      After the refinements are complete, to view the results, click on the highest node in the Experiments panel (NaCl_EXP in our example). The results, consisting of all the refined parameters and their standard deviations, will appear in the right panel (Figure). It can be seen that there are several checkboxes, above the grid data view, All, Unrefined, Converged, and Diverged. Users can use these checkboxes to filter the refinement to be shown in the grid bellow.

      -
      -
      -_images/result.png -

      -The result panel

      -

      Note

      -

      In the result panel the uncertainties will show when possible. The uncertainties will not be -displayed in other panels.

      -
      -
        -
      • To plot the result values against the environment parameters, select the entire column by click on the label, click on Tools->Plot or click on the plot button on the tool bar
      • -
      • To plot two result values against each other, select the two columns, click on Tools->Plot XY
      • -
      • To plot the refinement history of a result value, switch to the result panel (click NaCl node on the left Experiments panel), select the entire column in the result panel to the right, click on Tools->Plot history
      • -
      • To plot the current pattern of the diffraction data, select the NaCl node on the Experiments panel, click on Tools->Plot or click on the plot button on the tool bar
      • -
      -
      -

      Note

      -

      As can be seen in the plot window interface, the functionality of SrRietveld plot window is extended (Figure). The details about the extended plot window in SrRietveld can be found in here.

      -
      -
      -
      -_images/plot_setup.png -

      -The extended plot window

      -
      -

      Setup and Run the FullProf Refinement with SrRietveld

      -

      User can load more than one refinements in a project. As the GSAS refinement has already completed on the NaCl data, users can load the FullProf refinement into the project. Simply click Add new refinement... button in the toolbar and select the PCR file in the example folder. One can load the data and start the refinement similar as shown above.

      -
      -
      -

      After the Refinement

      -

      SrRietveld provides convenient access to the refinement data and results.

      -
      -

      Export the data view to CSV file

      -

      The values in the grid data view can be exported to CSV file. Users can click the menu button Export->CSV. A dialog will be popped up for the user to input the csv file name. If no cell is selected in the grid view, the whole view will be exported to the csv file. The user can also select the cell in the grid data view and export. In this case, the minimum block in the data view containing the selected cells will be exported.

      -
      -
      -

      Load the data view from a text data file

      -

      If users would like to change the values in the grid view, a text data file in multi column or CSV format can be loaded into the grid. By clicking Menu->Load->Import text data, a preview dialog will show. User can choose the format of the file, or make any changed on values on cells, before importing these data into the grid view. -.. _fg_import_text_data:

      -
      -
      _images/import_text_data.png -

      -The extended plot window

      -
      -
      -

      Export the refinement setup files

      -

      User can also export the refinement results to the EXP or pcr files which are recognizable by GSAS and FullProf, respectively. User can select the single refinement in the grid data view, from which the data will be exported, and then select the Export->EXP/pcr and a dialog will pop up. Users can input the descriptive part of the file name, the software will prefix the user given name to distinguish the setup file exported from different refinements in a sequence.

      -
      -
      -

      Export the distance and angle information from the refinement

      -
      -

      Note

      -

      The DISAGL file exportation is only available for refinement with GSAS engine.

      -
      -

      Similar to the refinement setup files, the distance and angle information can be exported to DISAGL files. User can select the single refinement in the grid data view, from which the data will be exported, and then select the Export->DISAGL and a dialog will pop up. Users can input the descriptive part of the file name, the software will prefix the user given name to distinguish the setup file exported from different refinements in a sequence.

      -
      -
      -
      -

      Re-running the Refinement

      -

      Depending on the results, one might need to re-run the refinement using different initial values. To change the initial values, select the node that you’re interested in from the Experiments panel, then double click the cell whose value you want to change in the right panel, edit the value, and then hit Enter to update the value. Once all changes have been made, reset the fits status via Refinement->Reset, then re-run the refinement as detailed above.

      -

      Additionally, it is also possible to update the initial values using GSAS or FullProf and then reloading the setup file in SrRietveld.

      -
      -
      -

      Stop the Sequential Refinement

      -

      While SrRietveld is running refinements on sequential data, the sequential refinement can be terminated at any time by clicking the Stop button in the tool bar (also available in the menu Run->stop), as shown in the Figure bellow.

      -
      -
      -_images/stop_sequential.png -

      -Stop the sequential refinement by clicking the button in tool bar

      Please be noted that the Stop button will only be activated when the sequential refinement is running and the top node of the experiment on the left panel is selected (NaCl in this case). After stopped the sequential refinement can be restarted by click the Start a refinement button in tool bar or Run->Sequential in the menu.

      -
      -

      Note

      -

      While the stop button is clicked, the SrRietveld will record this event and stop after finish the refinement on current dataset.

      -
      -
      -
      -

      Saving and Loading Project Files

      -

      The user can save the current settings by click on File->Save Project..., results, and strategy into a stand-alone binary file in HDF5 format, with the file extension .SRR. This file can be loaded to analyze the result or continue refinement.

      -
      -

      Note

      -

      The refinement strategy information will be also saved in the project binary file. The data file and instrument file paths will be saved in the project binary file.

      -
      -

      In the example folder there are two HDF5 project files provided.

      -
      -
        -
      • NaCl.srr – the project file with FullProf as refinement engine
      • -
      -
      -

      To open an project, click File->Open project... in menu or directly click on the open file icon in tool bar, then just choose the data file to load from the opened file dialog.

      -

      These files contains the complete refinement setup information and refinement results for two different refinement engines. User can view the results and settings saved in the .SRR file via.

      -
      -
      -

      Archive the Project File and Source Files in zip

      -

      It is possible to archive the project file and source files in a zip file, which is much smaller thus convenient to handle via internet. To archive the current project, the user can click on the Archive project in zip button in toolbar. Then a file dialog will show, by which user can select the path and file name of the zip file.

      -
      -
      -
      -

      Bug Report and User Feedback

      -
      -

      Bugs Bite Me!

      -

      Though efforts are made to make SrRietveld program bug-free, different work environments, unexpected conditions, or various platforms and hardwares may cause errors while using this program. In this case, if you can report the error message back to the development group, it will help us in improvement on SrRietveld greatly. Users can submit the bug reports to the developers mailing list in Google group: http://groups.google.com/group/srrietveld-dev.

      -

      For your convenience, when the program encounters an error, a report window will pop up, as can be seen in the following figure.

      -
      -
      -_images/bug_report.png -

      -The bug report window when the program encuonters an error.

      -

      Note

      -

      Though the user’s email address is optional in the error report form, we encourage the user to provide this information, so that the developers can contact the user for more details of the reported error.

      -
      -
      -
      -

      User Feedback and Community

      -

      The opinions from SrRietveld users are important to us. The user community can also be used to solve issues in various use cases. If you have any questions, suggestions, feature request, or just some ideas to share with us, please share with us in the SrRietveld user online community in Google Groups: http://groups.google.com/group/srrietveld-users.

      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srrietveld/xml_interface.html b/static_root/doc/srrietveld/xml_interface.html deleted file mode 100644 index b289e6fd..00000000 --- a/static_root/doc/srrietveld/xml_interface.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - - The XML Interface — SrRietveld vBeta 1.0 documentation - - - - - - - - - -
      -
      -

      Table Of Contents

      - - -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      The XML Interface

      -

      Currently SrRietveld is running from command lines in a terminal. The input values are provided in the format of data files, mostly in the form of XML files.

      -

      There are three major files: the instrument file, the structure file, and the refinement strategy file

      -
      -

      Instrument File

      -
      -

      The instrument file is passed into the –instrument or -i option in refinement or sequential refinement. The instrument file can either be .iparm files or .xml data files. A typical .xml file will be read as follows:

      -
      <?xml version="1.0" ?>
      -<INSTRUMENT Name="11_IDC" Type="Xray">
      -        <BACKGROUND Type="Polynomial" Order="3" Coefficients="1230,-34"/>
      -        <ENERGY Lambda="0.107751" Lambda2="0.107751" Ratio="0.0" Resolution="5.0e-3"/>
      -        <PEAKPROFILE Scale="1.25" Ctof="0.003" Type="TCHPseudoVoigtProfile" U="1400.38" V="0.0" W="18.0919" X="0.0" Y="5.0" Z="0.0"/>
      -        <SETUP Zero="-0.18">
      -                <EXCLUDEDREGION Begin="0.0" End="0.51"/>
      -                <EXCLUDEDREGION Begin="30.0" End="50.0"/>
      -        </SETUP>
      -</INSTRUMENT>
      -
      -

      The tags in the xml file is discussed as follows:

      -
      -
      -

      <INSTRUMENT/>

      -
      -

      This is the root XML tag, which contains all the information of the instrument. There are two attibutes: Name, and Type. The Name tag is merely a note on the experiment instrument name. The value for Type can be:

      -
      "Constant Wave Length"
      -"Xray"
      -"NeutronCW"
      -"TOF"
      -"ThermalNeutronTOF"
      -
      -
      -
      -
      -
      -

      <BACKGROUND/>

      -
      -

      The background type and specifications are contained in this tag. The background type can be defined as following values:

      -
      "Interpolated"
      -"Polynomial"
      -"Chebyschev"
      -"CFourier"
      -"QExp"
      -"QExpInv"
      -
      -
      -
      -

      Note

      -

      If the background type is “Interpolated”, a file with customer picked background points have to be provide to the refinement engine

      -
      -

      The order of the background function s provided in the “Order” attribute, if applicable. The default value for “Order” is 12, if not provided in the XML file.

      -

      Also, the user can provide the coefficients to the refinement engine, and the coefficients of the background equation should be separated with comma:

      -
      Coefficients="b0,b1"
      -
      -
      -
      -
      -
      -

      <ENERGY/>

      -
      -

      The energy related instrument information is specified in this tag.

      -

      The attributes:

      -

      Lambda1, Lambda2 - wavelengths, unit is Ångström.

      -

      Ratio -

      -

      Resolution - ΔE/E

      -
      -
      -
      -

      <PEAKPROFILE/>

      -
      -

      This tag contains the peak profile information in the refinement. The attributes include:

      -

      Scale - The scale on the height of the peaks

      -

      Ctof - Peak width cutoff

      -

      U, V, W, X, Y, Z - The peak profile coefficients

      -

      Type - Type of peak profile, which can be:

      -
      "GaussianProfile"
      -"TCHPseudoVoigtProfile"
      -"FCJPseudoVoigtProfile"
      -"FCJMicroPVProfile"
      -"GaussianExp"
      -"TOFPseudoVoigtIkedaCarpenter"
      -"PseudoVoigtExp"
      -"PseudoVoigtMicroExp"
      -
      -
      -
      -
      -
      -

      <SETUP/>

      -
      -

      This tag contains other setups in the instrument related refinement parameters. Users can specify the excluded regions in a sub tag <EXCLUDEDREGION />. The attribute:

      -

      Zero - The zero shift value on the calculated pattern

      -
      -
      -
      -
      -

      Structure File

      -
      -

      The structure file contains the initial value of the material structure. A typical structure information file can be read as following:

      -
      <?xml version="1.0" ?>
      -<MODEL>
      -        <PHASE Name="BaFe2As2" SpaceGroup="I 4/m m m" Type="User" a="3.95" alpha="90.0" b="3.95" beta="90.0" c="12.945" gamma="90.0">
      -                <ATOM occ='1.0' Element='Ba' Uiso='0.01251' Tag='BA' y='0.0' x='0.0' z='0.0'/>
      -                <ATOM occ='1.0' Element='Fe' Uiso='0.005159' Tag='FE' y='0.5' x='0.0' z='0.25'/>
      -                <ATOM occ='1.0' Element='As' Uiso='0.003928' Tag='AS' y='0.0' x='0.0' z='0.353539'/>
      -        </PHASE>
      -</MODEL>
      -
      -

      The <MODEL /> tag is the root node, which contains all the information for the proposed structure model. Inside the model, there could be more than one phase. The structure information for each phase is contained in the <PHASE /> tag.

      -
      -
      -

      <PHASE/>

      -
      -

      The attributes in this tag can be:

      -

      Name - The name of the phase

      -

      SpaceGroup - The space group indicator of this phase

      -

      Type - If the value is User, the engine will read the structure information in this xml file. -If the type value is CIF, the engine will read the CIFName attribute value as the CIF file name and read the structure information in the CIF file.

      -

      CIFName - The value should be the CIF file name which contains the structure information. This attribute is only available when the Type is set to be “CIF”

      -

      a, b, c, alpha, beta, gamma - The lattice contants of the phase model

      -
      -
      -
      -

      <ATOM/>

      -
      -

      This contains the atom information under a phase.

      -

      occ - Occupation of the atom

      -

      Element - The element name of the atom

      -

      Uiso - The initial guess of the Uiso value of this atom

      -

      Tag - The tag to be displayed for this atom in the result visualization

      -

      x, y, z - The position information of the atom

      -
      -
      -
      -
      -

      Strategy File

      -
      -

      Users can define the refinement strategy by editing the strategy file. A typical strategy file reads as following:

      -
      <?xml version="1.0" ?>
      -<REFINESTRATEGY>
      -        <STEP Refine-Type="rietveld" Stage="1" Step-Number="1">
      -                <ADDGUIDE Guide="ScaleGuide" Stage="1"/>
      -        </STEP>
      -        <STEP Refine-Type="rietveld" Stage="1" Step-Number="2">
      -                <ADDGUIDE Guide="ZeroGuide" Stage="1"/>
      -        </STEP>
      -        <STEP Refine-Type="rietveld" Stage="1" Step-Number="3">
      -                <ADDGUIDE Guide="BackgroundGuide" Stage="1"/>
      -        </STEP>
      -        <STEP Refine-Type="rietveld" Stage="1" Step-Number="4">
      -                <ADDGUIDE Guide="LatticeGuide" Stage="1"/>
      -        </STEP>
      -        <STEP Refine-Type="rietveld" Stage="1" Step-Number="5">
      -                <ADDGUIDE Guide="BackgroundGuide" Stage="1"/>
      -        </STEP>
      -        <STEP Refine-Type="rietveld" Stage="1" Step-Number="6">
      -                <ADDGUIDE Guide="FractionalCoordinateGuide" Stage="1"/>
      -        </STEP>
      -        <STEP Refine-Type="rietveld" Stage="1" Step-Number="7">
      -                <ADDGUIDE Guide="PeakShapeGuide" Stage="1"/>
      -        </STEP>
      -        <STEP Refine-Type="rietveld" Stage="1" Step-Number="8">
      -                <ADDGUIDE Guide="ADPGuide" Stage="1"/>
      -        </STEP>
      -</REFINESTRATEGY>
      -
      -

      It can be seen that under the root node <REFINESTRATEGY/> the refinement steps are defined.

      -
      -
      -

      <STEP/>

      -
      -

      This tag defines the steps in the strategy.

      -

      Refine-Type - rietveld or lebail

      -

      Stage - An integer indicates the stage of the refinement

      -

      Step-Number - An integer indicates the order of the steps, the bigger the later

      -
      -The child node <ADDGUIDE/> or <REMOVEGUIDE/> can be added to the <STEP/> node
      -
      -
      -
      -

      <ADDGUIDE/> and <REMOVEGUIDE/>

      -
      -

      The tag defines the details of the step to remove or add.

      -

      Guide - The parameter to refine. The value for this attribute can be:

      -
      "ADPGuide"
      -"BackgroundGuide"
      -"FractionalCoordinateGuide"
      -"LatticeGuide"
      -"OccupancyGuide"
      -"PeakShapeGuide"
      -"ScaleGuide"
      -"ExpDecayGuide"
      -"ZeroGuide"
      -"AbsorptionCorrectionGuide"
      -"WavelengthGuide"
      -
      -
      -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/static_root/doc/srxplanar/index.html b/static_root/doc/srxplanar/index.html deleted file mode 100644 index d2e17d14..00000000 --- a/static_root/doc/srxplanar/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - -Page Redirection - - -If you are not redirected automatically, follow the -link. diff --git a/static_root/doc/structure/index.html b/static_root/doc/structure/index.html deleted file mode 100644 index b8a49feb..00000000 --- a/static_root/doc/structure/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - -Page Redirection - - -If you are not redirected automatically, follow the -link. diff --git a/static_root/doc/utils/index.html b/static_root/doc/utils/index.html deleted file mode 100644 index b0dd9311..00000000 --- a/static_root/doc/utils/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - -Page Redirection - - -If you are not redirected automatically, follow the link diff --git a/static_root/doc/xinterpdf/Shi-jac-2018.pdf b/static_root/doc/xinterpdf/Shi-jac-2018.pdf deleted file mode 100644 index 3d39bd7d..00000000 Binary files a/static_root/doc/xinterpdf/Shi-jac-2018.pdf and /dev/null differ diff --git a/static_root/doc/xinterpdf/xINTERPDF_User_Guide_20180615.pdf b/static_root/doc/xinterpdf/xINTERPDF_User_Guide_20180615.pdf deleted file mode 100644 index 1c418924..00000000 Binary files a/static_root/doc/xinterpdf/xINTERPDF_User_Guide_20180615.pdf and /dev/null differ diff --git a/static_root/products/pdfgetx3.html b/static_root/products/pdfgetx3.html deleted file mode 100644 index 6bbf31f1..00000000 --- a/static_root/products/pdfgetx3.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - -Page Redirection - -If you are not redirected automatically, -follow the link. diff --git a/styles/diffpy.css b/styles/diffpy.css new file mode 100644 index 00000000..d79a8497 --- /dev/null +++ b/styles/diffpy.css @@ -0,0 +1,175 @@ +body, td, p { + font-family: arial,helvetica,sans-serif; + font-family: arial,helvetica,sans-serif; +} + +th { + font-family: arial,helvetica,sans-serif; + font-weight: bold; + text-align: left; +} + +em { + font-weight: bold; + font-style: italic; +} + +.darkbg { + background-color: #007f00; +} + +.lightbg { + background-color: #cccc99; +} + +.sidebar { + font-family: arial,helvetica,sans-serif; + background-color: #f0f0dd; + font-size: small; +} + +.topheader { + font-family: arial,helvetica,sans-serif; + font-size: large; + font-weight: bold; + background-color: #cccc99; +} + +.sidebarheader { + font-family: arial,helvetica,sans-serif; + font-size: small; + font-weight: bold; +} + +.newsdate { + font-style: italic; + color: #6666cc; + font-size:small; +} + +pre,code { + font-family: "andale mono", "monotype.com", "courier new", monospace; +} + +h1 { + font-family: arial,helvetica,sans-serif; + font-size: medium; + font-weight: bold; + color: #000066; +} + +.txth1 { + font-family: arial,helvetica,sans-serif; + font-size: medium; + font-weight: bold; + color: #000066; +} + +h2 { + font-family: arial,helvetica,sans-serif; + font-size: small; + font-weight: bold; + color: #000066; +} + +.txth2 { + font-family: arial,helvetica,sans-serif; + font-size: small; + font-weight: bold; + color: #000066; +} + +h3 { + font-family: arial,helvetica,sans-serif; + font-size: x-small; + font-weight: bold; + color: #000066; +} + +.txth3 { + font-family: arial,helvetica,sans-serif; + font-size: x-small; + font-weight: bold; + color: #000066; +} + +small { + font-family: arial,helvetica,sans-serif; + font-size: 75%; +} + +a.small { + font-family: arial,helvetica,sans-serif; + font-size: 75%; + text-decoration: none; + color: #000066 +} + +.style1 { + color: #666666 +} + +input { + font-family: arial,helvetica,sans-serif; +} + +textarea { + font-family: arial, helvetica, sans-serif; + width: 100%; +} + +.prompt { + font-family: arial,helvetica,sans-serif; + font-weight: bold; +} + +.errortext { + font-family: arial,helvetica,sans-serif; + color: #cc0000 +} + +.errorheader { + font-family: arial,helvetica,sans-serif; + color: #cc0000; + font-size: medium; +} + +.tableheader { + font-family: arial,helvetica,sans-serif; + font-weight: bold; + background-color: #CCCC99; +} + +.rowodd { + font-family: arial,helvetica,sans-serif; + background-color: #F0F0DD; +} + +.roweven { + font-family: arial,helvetica,sans-serif; + background-color: #CCCC99; +} + +tr.tableheader th { + font-family: arial,helvetica,sans-serif; + background-color: #CCCC99; + text-align: center; +} + + +td.checker { + background-color: #007f00; + background-image: url(/images/checkerboard.png); +} + +.license { + font-family: "andale mono", "monotype.com", "courier new", monospace; + font-size: 75%; +} + +li { padding-bottom: 6pt } + +IMG.middle { + vertical-align: top; + border: 0; +} diff --git a/themes/bootstrap/globaltoc.html b/themes/bootstrap/globaltoc.html deleted file mode 100644 index d5df46c6..00000000 --- a/themes/bootstrap/globaltoc.html +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/themes/bootstrap/layout.html b/themes/bootstrap/layout.html deleted file mode 100644 index c21e4414..00000000 --- a/themes/bootstrap/layout.html +++ /dev/null @@ -1,107 +0,0 @@ -{% extends "basic/layout.html" %} - -{% if theme_bootstrap_version == "3" %} - {% set bootstrap_version, navbar_version = "3.3.7", "" %} - {% set bs_span_prefix = "col-md-" %} -{% else %} - {% set bootstrap_version, navbar_version = "2.3.2", "-2" %} - {% set bs_span_prefix = "span" %} -{% endif %} - -{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and sidebars %} - -{%- set bs_content_width = render_sidebar and "9" or "12"%} - -{%- block doctype -%} - -{%- endblock %} - -{# Sidebar: Rework into our Bootstrap nav section. #} -{% macro navBar() %} -{% include "navbar" + navbar_version + ".html" %} -{% endmacro %} - -{% if theme_bootstrap_version == "3" %} - {%- macro bsidebar() %} - {%- if render_sidebar %} -
      - -
      - {%- endif %} - {%- endmacro %} -{% else %} - {%- macro bsidebar() %} - {%- if render_sidebar %} -
      - -
      - {%- endif %} - {%- endmacro %} -{% endif %} - -{%- block extrahead %} - - - - - - - - -{% endblock %} - -{# Silence the sidebar's, relbar's #} -{% block header %}{% endblock %} -{% block relbar1 %}{% endblock %} -{% block relbar2 %}{% endblock %} -{% block sidebarsourcelink %}{% endblock %} - -{%- block content %} -{{ navBar() }} -
      -
      - {%- block sidebar1 %}{{ bsidebar() }}{% endblock %} -
      - {% block body %}{% endblock %} -
      - {% block sidebar2 %} {# possible location for sidebar #} {% endblock %} -
      -
      -{%- endblock %} - -{%- block footer %} -
      -
      -

      - Back to top - {% if theme_source_link_position == "footer" %} -
      - {% include "sourcelink.html" %} - {% endif %} -

      -

      - {%- if show_copyright %} - {%- if hasdoc('copyright') %} - {% trans path=pathto('copyright'), copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}
      - {%- else %} - {% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}
      - {%- endif %} - {%- endif %} - {%- if last_updated %} - {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
      - {%- endif %} - {%- if show_sphinx %} - {% trans sphinx_version=sphinx_version|e %}Created using Sphinx {{ sphinx_version }}.{% endtrans %}
      - {%- endif %} -

      -
      -
      -{%- endblock %} diff --git a/themes/bootstrap/localtoc.html b/themes/bootstrap/localtoc.html deleted file mode 100644 index 6e6c03b8..00000000 --- a/themes/bootstrap/localtoc.html +++ /dev/null @@ -1 +0,0 @@ -{{ toc }} diff --git a/themes/bootstrap/navbar-2.html b/themes/bootstrap/navbar-2.html deleted file mode 100644 index 5f7116fc..00000000 --- a/themes/bootstrap/navbar-2.html +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/themes/bootstrap/navbar.html b/themes/bootstrap/navbar.html deleted file mode 100644 index 5c1d9b9b..00000000 --- a/themes/bootstrap/navbar.html +++ /dev/null @@ -1,49 +0,0 @@ - diff --git a/themes/bootstrap/navbarsearchbox.html b/themes/bootstrap/navbarsearchbox.html deleted file mode 100644 index 82e93389..00000000 --- a/themes/bootstrap/navbarsearchbox.html +++ /dev/null @@ -1,9 +0,0 @@ -{%- if pagename != "search" %} - -{%- endif %} diff --git a/themes/bootstrap/navbartoc.html b/themes/bootstrap/navbartoc.html deleted file mode 100644 index 8def043a..00000000 --- a/themes/bootstrap/navbartoc.html +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/themes/bootstrap/relations.html b/themes/bootstrap/relations.html deleted file mode 100644 index 7bdc8f1f..00000000 --- a/themes/bootstrap/relations.html +++ /dev/null @@ -1,19 +0,0 @@ -{# Switch to icon instead of text in `sm` view size for BS3 only. #} -{%- if prev %} -
    • - - {%- if theme_bootstrap_version == "2" -%}{%- endif -%} - {%- if theme_bootstrap_version == "3" -%}{%- endif -%} - - -
    • -{%- endif %} -{%- if next %} -
    • - - {%- if theme_bootstrap_version == "2" -%}{%- endif -%} - {%- if theme_bootstrap_version == "3" -%}{%- endif -%} - - -
    • -{%- endif %} diff --git a/themes/bootstrap/search.html b/themes/bootstrap/search.html deleted file mode 100644 index 60a6601b..00000000 --- a/themes/bootstrap/search.html +++ /dev/null @@ -1,69 +0,0 @@ -{# - basic/search.html - ~~~~~~~~~~~~~~~~~ - - Template for the search page. - - :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -#} -{%- extends "layout.html" %} -{% set title = _('Search') %} -{% block extrahead %} - - - {# this is used when loading the search index using $.ajax fails, - such as on Chrome for documents on localhost #} - - {{ super() }} -{% endblock %} -{% block body %} -

      {{ _('Search') }}

      -
      - -

      - {% trans %}Please activate JavaScript to enable the search - functionality.{% endtrans %} -

      -
      -

      - {% trans %}From here you can search these documents. Enter your search - words into the box below and click "search". Note that the search - function will automatically search for all of the words. Pages - containing fewer words won't appear in the result list.{% endtrans %} -

      - - {% if theme_bootstrap_version == "3" %} -
      -
      - -
      - - -
      - {% else %} - - {% endif %} - - {% if search_performed %} -

      {{ _('Search Results') }}

      - {% if not search_results %} -

      {{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}

      - {% endif %} - {% endif %} -
      - {% if search_results %} -
        - {% for href, caption, context in search_results %} -
      • {{ caption }} -
        {{ context|e }}
        -
      • - {% endfor %} -
      - {% endif %} -
      -{% endblock %} diff --git a/themes/bootstrap/searchbox.html b/themes/bootstrap/searchbox.html deleted file mode 100644 index 53755f37..00000000 --- a/themes/bootstrap/searchbox.html +++ /dev/null @@ -1,9 +0,0 @@ -{%- if pagename != "search" %} -
      -
      - -
      - - -
      -{%- endif %} diff --git a/themes/bootstrap/searchresults.html b/themes/bootstrap/searchresults.html deleted file mode 100644 index cfb0aa40..00000000 --- a/themes/bootstrap/searchresults.html +++ /dev/null @@ -1,38 +0,0 @@ -{# - basic/searchresults.html - ~~~~~~~~~~~~~~~~~~~~~~~~ - - Template for the body of the search results page. - - :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -#} -

      Search

      -

      - From here you can search these documents. Enter your search - words into the box below and click "search". -

      - - - -{%- if search_performed %} -

      Search Results

      - {%- if not search_results %} -

      Your search did not match any results.

      - {%- endif %} -{%- endif %} -
      - {%- if search_results %} - - {%- endif %} -
      diff --git a/themes/bootstrap/sourcelink.html b/themes/bootstrap/sourcelink.html deleted file mode 100644 index 3cf73358..00000000 --- a/themes/bootstrap/sourcelink.html +++ /dev/null @@ -1,6 +0,0 @@ -{%- if show_source and has_source and sourcename %} - -{%- endif %} diff --git a/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap-responsive.css b/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap-responsive.css deleted file mode 100644 index 09e88ce3..00000000 --- a/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap-responsive.css +++ /dev/null @@ -1,1109 +0,0 @@ -/*! - * Bootstrap Responsive v2.3.2 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ - -.clearfix { - *zoom: 1; -} - -.clearfix:before, -.clearfix:after { - display: table; - line-height: 0; - content: ""; -} - -.clearfix:after { - clear: both; -} - -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -@-ms-viewport { - width: device-width; -} - -.hidden { - display: none; - visibility: hidden; -} - -.visible-phone { - display: none !important; -} - -.visible-tablet { - display: none !important; -} - -.hidden-desktop { - display: none !important; -} - -.visible-desktop { - display: inherit !important; -} - -@media (min-width: 768px) and (max-width: 979px) { - .hidden-desktop { - display: inherit !important; - } - .visible-desktop { - display: none !important ; - } - .visible-tablet { - display: inherit !important; - } - .hidden-tablet { - display: none !important; - } -} - -@media (max-width: 767px) { - .hidden-desktop { - display: inherit !important; - } - .visible-desktop { - display: none !important; - } - .visible-phone { - display: inherit !important; - } - .hidden-phone { - display: none !important; - } -} - -.visible-print { - display: none !important; -} - -@media print { - .visible-print { - display: inherit !important; - } - .hidden-print { - display: none !important; - } -} - -@media (min-width: 1200px) { - .row { - margin-left: -30px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - line-height: 0; - content: ""; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - min-height: 1px; - margin-left: 30px; - } - .container, - .navbar-static-top .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 1170px; - } - .span12 { - width: 1170px; - } - .span11 { - width: 1070px; - } - .span10 { - width: 970px; - } - .span9 { - width: 870px; - } - .span8 { - width: 770px; - } - .span7 { - width: 670px; - } - .span6 { - width: 570px; - } - .span5 { - width: 470px; - } - .span4 { - width: 370px; - } - .span3 { - width: 270px; - } - .span2 { - width: 170px; - } - .span1 { - width: 70px; - } - .offset12 { - margin-left: 1230px; - } - .offset11 { - margin-left: 1130px; - } - .offset10 { - margin-left: 1030px; - } - .offset9 { - margin-left: 930px; - } - .offset8 { - margin-left: 830px; - } - .offset7 { - margin-left: 730px; - } - .offset6 { - margin-left: 630px; - } - .offset5 { - margin-left: 530px; - } - .offset4 { - margin-left: 430px; - } - .offset3 { - margin-left: 330px; - } - .offset2 { - margin-left: 230px; - } - .offset1 { - margin-left: 130px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, - .row-fluid:after { - display: table; - line-height: 0; - content: ""; - } - .row-fluid:after { - clear: both; - } - .row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 30px; - margin-left: 2.564102564102564%; - *margin-left: 2.5109110747408616%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .row-fluid [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .controls-row [class*="span"] + [class*="span"] { - margin-left: 2.564102564102564%; - } - .row-fluid .span12 { - width: 100%; - *width: 99.94680851063829%; - } - .row-fluid .span11 { - width: 91.45299145299145%; - *width: 91.39979996362975%; - } - .row-fluid .span10 { - width: 82.90598290598291%; - *width: 82.8527914166212%; - } - .row-fluid .span9 { - width: 74.35897435897436%; - *width: 74.30578286961266%; - } - .row-fluid .span8 { - width: 65.81196581196582%; - *width: 65.75877432260411%; - } - .row-fluid .span7 { - width: 57.26495726495726%; - *width: 57.21176577559556%; - } - .row-fluid .span6 { - width: 48.717948717948715%; - *width: 48.664757228587014%; - } - .row-fluid .span5 { - width: 40.17094017094017%; - *width: 40.11774868157847%; - } - .row-fluid .span4 { - width: 31.623931623931625%; - *width: 31.570740134569924%; - } - .row-fluid .span3 { - width: 23.076923076923077%; - *width: 23.023731587561375%; - } - .row-fluid .span2 { - width: 14.52991452991453%; - *width: 14.476723040552828%; - } - .row-fluid .span1 { - width: 5.982905982905983%; - *width: 5.929714493544281%; - } - .row-fluid .offset12 { - margin-left: 105.12820512820512%; - *margin-left: 105.02182214948171%; - } - .row-fluid .offset12:first-child { - margin-left: 102.56410256410257%; - *margin-left: 102.45771958537915%; - } - .row-fluid .offset11 { - margin-left: 96.58119658119658%; - *margin-left: 96.47481360247316%; - } - .row-fluid .offset11:first-child { - margin-left: 94.01709401709402%; - *margin-left: 93.91071103837061%; - } - .row-fluid .offset10 { - margin-left: 88.03418803418803%; - *margin-left: 87.92780505546462%; - } - .row-fluid .offset10:first-child { - margin-left: 85.47008547008548%; - *margin-left: 85.36370249136206%; - } - .row-fluid .offset9 { - margin-left: 79.48717948717949%; - *margin-left: 79.38079650845607%; - } - .row-fluid .offset9:first-child { - margin-left: 76.92307692307693%; - *margin-left: 76.81669394435352%; - } - .row-fluid .offset8 { - margin-left: 70.94017094017094%; - *margin-left: 70.83378796144753%; - } - .row-fluid .offset8:first-child { - margin-left: 68.37606837606839%; - *margin-left: 68.26968539734497%; - } - .row-fluid .offset7 { - margin-left: 62.393162393162385%; - *margin-left: 62.28677941443899%; - } - .row-fluid .offset7:first-child { - margin-left: 59.82905982905982%; - *margin-left: 59.72267685033642%; - } - .row-fluid .offset6 { - margin-left: 53.84615384615384%; - *margin-left: 53.739770867430444%; - } - .row-fluid .offset6:first-child { - margin-left: 51.28205128205128%; - *margin-left: 51.175668303327875%; - } - .row-fluid .offset5 { - margin-left: 45.299145299145295%; - *margin-left: 45.1927623204219%; - } - .row-fluid .offset5:first-child { - margin-left: 42.73504273504273%; - *margin-left: 42.62865975631933%; - } - .row-fluid .offset4 { - margin-left: 36.75213675213675%; - *margin-left: 36.645753773413354%; - } - .row-fluid .offset4:first-child { - margin-left: 34.18803418803419%; - *margin-left: 34.081651209310785%; - } - .row-fluid .offset3 { - margin-left: 28.205128205128204%; - *margin-left: 28.0987452264048%; - } - .row-fluid .offset3:first-child { - margin-left: 25.641025641025642%; - *margin-left: 25.53464266230224%; - } - .row-fluid .offset2 { - margin-left: 19.65811965811966%; - *margin-left: 19.551736679396257%; - } - .row-fluid .offset2:first-child { - margin-left: 17.094017094017094%; - *margin-left: 16.98763411529369%; - } - .row-fluid .offset1 { - margin-left: 11.11111111111111%; - *margin-left: 11.004728132387708%; - } - .row-fluid .offset1:first-child { - margin-left: 8.547008547008547%; - *margin-left: 8.440625568285142%; - } - input, - textarea, - .uneditable-input { - margin-left: 0; - } - .controls-row [class*="span"] + [class*="span"] { - margin-left: 30px; - } - input.span12, - textarea.span12, - .uneditable-input.span12 { - width: 1156px; - } - input.span11, - textarea.span11, - .uneditable-input.span11 { - width: 1056px; - } - input.span10, - textarea.span10, - .uneditable-input.span10 { - width: 956px; - } - input.span9, - textarea.span9, - .uneditable-input.span9 { - width: 856px; - } - input.span8, - textarea.span8, - .uneditable-input.span8 { - width: 756px; - } - input.span7, - textarea.span7, - .uneditable-input.span7 { - width: 656px; - } - input.span6, - textarea.span6, - .uneditable-input.span6 { - width: 556px; - } - input.span5, - textarea.span5, - .uneditable-input.span5 { - width: 456px; - } - input.span4, - textarea.span4, - .uneditable-input.span4 { - width: 356px; - } - input.span3, - textarea.span3, - .uneditable-input.span3 { - width: 256px; - } - input.span2, - textarea.span2, - .uneditable-input.span2 { - width: 156px; - } - input.span1, - textarea.span1, - .uneditable-input.span1 { - width: 56px; - } - .thumbnails { - margin-left: -30px; - } - .thumbnails > li { - margin-left: 30px; - } - .row-fluid .thumbnails { - margin-left: 0; - } -} - -@media (min-width: 768px) and (max-width: 979px) { - .row { - margin-left: -20px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - line-height: 0; - content: ""; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - min-height: 1px; - margin-left: 20px; - } - .container, - .navbar-static-top .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 724px; - } - .span12 { - width: 724px; - } - .span11 { - width: 662px; - } - .span10 { - width: 600px; - } - .span9 { - width: 538px; - } - .span8 { - width: 476px; - } - .span7 { - width: 414px; - } - .span6 { - width: 352px; - } - .span5 { - width: 290px; - } - .span4 { - width: 228px; - } - .span3 { - width: 166px; - } - .span2 { - width: 104px; - } - .span1 { - width: 42px; - } - .offset12 { - margin-left: 764px; - } - .offset11 { - margin-left: 702px; - } - .offset10 { - margin-left: 640px; - } - .offset9 { - margin-left: 578px; - } - .offset8 { - margin-left: 516px; - } - .offset7 { - margin-left: 454px; - } - .offset6 { - margin-left: 392px; - } - .offset5 { - margin-left: 330px; - } - .offset4 { - margin-left: 268px; - } - .offset3 { - margin-left: 206px; - } - .offset2 { - margin-left: 144px; - } - .offset1 { - margin-left: 82px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, - .row-fluid:after { - display: table; - line-height: 0; - content: ""; - } - .row-fluid:after { - clear: both; - } - .row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 30px; - margin-left: 2.7624309392265194%; - *margin-left: 2.709239449864817%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .row-fluid [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .controls-row [class*="span"] + [class*="span"] { - margin-left: 2.7624309392265194%; - } - .row-fluid .span12 { - width: 100%; - *width: 99.94680851063829%; - } - .row-fluid .span11 { - width: 91.43646408839778%; - *width: 91.38327259903608%; - } - .row-fluid .span10 { - width: 82.87292817679558%; - *width: 82.81973668743387%; - } - .row-fluid .span9 { - width: 74.30939226519337%; - *width: 74.25620077583166%; - } - .row-fluid .span8 { - width: 65.74585635359117%; - *width: 65.69266486422946%; - } - .row-fluid .span7 { - width: 57.18232044198895%; - *width: 57.12912895262725%; - } - .row-fluid .span6 { - width: 48.61878453038674%; - *width: 48.56559304102504%; - } - .row-fluid .span5 { - width: 40.05524861878453%; - *width: 40.00205712942283%; - } - .row-fluid .span4 { - width: 31.491712707182323%; - *width: 31.43852121782062%; - } - .row-fluid .span3 { - width: 22.92817679558011%; - *width: 22.87498530621841%; - } - .row-fluid .span2 { - width: 14.3646408839779%; - *width: 14.311449394616199%; - } - .row-fluid .span1 { - width: 5.801104972375691%; - *width: 5.747913483013988%; - } - .row-fluid .offset12 { - margin-left: 105.52486187845304%; - *margin-left: 105.41847889972962%; - } - .row-fluid .offset12:first-child { - margin-left: 102.76243093922652%; - *margin-left: 102.6560479605031%; - } - .row-fluid .offset11 { - margin-left: 96.96132596685082%; - *margin-left: 96.8549429881274%; - } - .row-fluid .offset11:first-child { - margin-left: 94.1988950276243%; - *margin-left: 94.09251204890089%; - } - .row-fluid .offset10 { - margin-left: 88.39779005524862%; - *margin-left: 88.2914070765252%; - } - .row-fluid .offset10:first-child { - margin-left: 85.6353591160221%; - *margin-left: 85.52897613729868%; - } - .row-fluid .offset9 { - margin-left: 79.8342541436464%; - *margin-left: 79.72787116492299%; - } - .row-fluid .offset9:first-child { - margin-left: 77.07182320441989%; - *margin-left: 76.96544022569647%; - } - .row-fluid .offset8 { - margin-left: 71.2707182320442%; - *margin-left: 71.16433525332079%; - } - .row-fluid .offset8:first-child { - margin-left: 68.50828729281768%; - *margin-left: 68.40190431409427%; - } - .row-fluid .offset7 { - margin-left: 62.70718232044199%; - *margin-left: 62.600799341718584%; - } - .row-fluid .offset7:first-child { - margin-left: 59.94475138121547%; - *margin-left: 59.838368402492065%; - } - .row-fluid .offset6 { - margin-left: 54.14364640883978%; - *margin-left: 54.037263430116376%; - } - .row-fluid .offset6:first-child { - margin-left: 51.38121546961326%; - *margin-left: 51.27483249088986%; - } - .row-fluid .offset5 { - margin-left: 45.58011049723757%; - *margin-left: 45.47372751851417%; - } - .row-fluid .offset5:first-child { - margin-left: 42.81767955801105%; - *margin-left: 42.71129657928765%; - } - .row-fluid .offset4 { - margin-left: 37.01657458563536%; - *margin-left: 36.91019160691196%; - } - .row-fluid .offset4:first-child { - margin-left: 34.25414364640884%; - *margin-left: 34.14776066768544%; - } - .row-fluid .offset3 { - margin-left: 28.45303867403315%; - *margin-left: 28.346655695309746%; - } - .row-fluid .offset3:first-child { - margin-left: 25.69060773480663%; - *margin-left: 25.584224756083227%; - } - .row-fluid .offset2 { - margin-left: 19.88950276243094%; - *margin-left: 19.783119783707537%; - } - .row-fluid .offset2:first-child { - margin-left: 17.12707182320442%; - *margin-left: 17.02068884448102%; - } - .row-fluid .offset1 { - margin-left: 11.32596685082873%; - *margin-left: 11.219583872105325%; - } - .row-fluid .offset1:first-child { - margin-left: 8.56353591160221%; - *margin-left: 8.457152932878806%; - } - input, - textarea, - .uneditable-input { - margin-left: 0; - } - .controls-row [class*="span"] + [class*="span"] { - margin-left: 20px; - } - input.span12, - textarea.span12, - .uneditable-input.span12 { - width: 710px; - } - input.span11, - textarea.span11, - .uneditable-input.span11 { - width: 648px; - } - input.span10, - textarea.span10, - .uneditable-input.span10 { - width: 586px; - } - input.span9, - textarea.span9, - .uneditable-input.span9 { - width: 524px; - } - input.span8, - textarea.span8, - .uneditable-input.span8 { - width: 462px; - } - input.span7, - textarea.span7, - .uneditable-input.span7 { - width: 400px; - } - input.span6, - textarea.span6, - .uneditable-input.span6 { - width: 338px; - } - input.span5, - textarea.span5, - .uneditable-input.span5 { - width: 276px; - } - input.span4, - textarea.span4, - .uneditable-input.span4 { - width: 214px; - } - input.span3, - textarea.span3, - .uneditable-input.span3 { - width: 152px; - } - input.span2, - textarea.span2, - .uneditable-input.span2 { - width: 90px; - } - input.span1, - textarea.span1, - .uneditable-input.span1 { - width: 28px; - } -} - -@media (max-width: 767px) { - body { - padding-right: 20px; - padding-left: 20px; - } - .navbar-fixed-top, - .navbar-fixed-bottom, - .navbar-static-top { - margin-right: -20px; - margin-left: -20px; - } - .container-fluid { - padding: 0; - } - .dl-horizontal dt { - float: none; - width: auto; - clear: none; - text-align: left; - } - .dl-horizontal dd { - margin-left: 0; - } - .container { - width: auto; - } - .row-fluid { - width: 100%; - } - .row, - .thumbnails { - margin-left: 0; - } - .thumbnails > li { - float: none; - margin-left: 0; - } - [class*="span"], - .uneditable-input[class*="span"], - .row-fluid [class*="span"] { - display: block; - float: none; - width: 100%; - margin-left: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .span12, - .row-fluid .span12 { - width: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .row-fluid [class*="offset"]:first-child { - margin-left: 0; - } - .input-large, - .input-xlarge, - .input-xxlarge, - input[class*="span"], - select[class*="span"], - textarea[class*="span"], - .uneditable-input { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .input-prepend input, - .input-append input, - .input-prepend input[class*="span"], - .input-append input[class*="span"] { - display: inline-block; - width: auto; - } - .controls-row [class*="span"] + [class*="span"] { - margin-left: 0; - } - .modal { - position: fixed; - top: 20px; - right: 20px; - left: 20px; - width: auto; - margin: 0; - } - .modal.fade { - top: -100px; - } - .modal.fade.in { - top: 20px; - } -} - -@media (max-width: 480px) { - .nav-collapse { - -webkit-transform: translate3d(0, 0, 0); - } - .page-header h1 small { - display: block; - line-height: 20px; - } - input[type="checkbox"], - input[type="radio"] { - border: 1px solid #ccc; - } - .form-horizontal .control-label { - float: none; - width: auto; - padding-top: 0; - text-align: left; - } - .form-horizontal .controls { - margin-left: 0; - } - .form-horizontal .control-list { - padding-top: 0; - } - .form-horizontal .form-actions { - padding-right: 10px; - padding-left: 10px; - } - .media .pull-left, - .media .pull-right { - display: block; - float: none; - margin-bottom: 10px; - } - .media-object { - margin-right: 0; - margin-left: 0; - } - .modal { - top: 10px; - right: 10px; - left: 10px; - } - .modal-header .close { - padding: 10px; - margin: -10px; - } - .carousel-caption { - position: static; - } -} - -@media (max-width: 979px) { - body { - padding-top: 0; - } - .navbar-fixed-top, - .navbar-fixed-bottom { - position: static; - } - .navbar-fixed-top { - margin-bottom: 20px; - } - .navbar-fixed-bottom { - margin-top: 20px; - } - .navbar-fixed-top .navbar-inner, - .navbar-fixed-bottom .navbar-inner { - padding: 5px; - } - .navbar .container { - width: auto; - padding: 0; - } - .navbar .brand { - padding-right: 10px; - padding-left: 10px; - margin: 0 0 0 -5px; - } - .nav-collapse { - clear: both; - } - .nav-collapse .nav { - float: none; - margin: 0 0 10px; - } - .nav-collapse .nav > li { - float: none; - } - .nav-collapse .nav > li > a { - margin-bottom: 2px; - } - .nav-collapse .nav > .divider-vertical { - display: none; - } - .nav-collapse .nav .nav-header { - color: #777777; - text-shadow: none; - } - .nav-collapse .nav > li > a, - .nav-collapse .dropdown-menu a { - padding: 9px 15px; - font-weight: bold; - color: #777777; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - } - .nav-collapse .btn { - padding: 4px 10px 4px; - font-weight: normal; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - } - .nav-collapse .dropdown-menu li + li a { - margin-bottom: 2px; - } - .nav-collapse .nav > li > a:hover, - .nav-collapse .nav > li > a:focus, - .nav-collapse .dropdown-menu a:hover, - .nav-collapse .dropdown-menu a:focus { - background-color: #f2f2f2; - } - .navbar-inverse .nav-collapse .nav > li > a, - .navbar-inverse .nav-collapse .dropdown-menu a { - color: #999999; - } - .navbar-inverse .nav-collapse .nav > li > a:hover, - .navbar-inverse .nav-collapse .nav > li > a:focus, - .navbar-inverse .nav-collapse .dropdown-menu a:hover, - .navbar-inverse .nav-collapse .dropdown-menu a:focus { - background-color: #111111; - } - .nav-collapse.in .btn-group { - padding: 0; - margin-top: 5px; - } - .nav-collapse .dropdown-menu { - position: static; - top: auto; - left: auto; - display: none; - float: none; - max-width: none; - padding: 0; - margin: 0 15px; - background-color: transparent; - border: none; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - } - .nav-collapse .open > .dropdown-menu { - display: block; - } - .nav-collapse .dropdown-menu:before, - .nav-collapse .dropdown-menu:after { - display: none; - } - .nav-collapse .dropdown-menu .divider { - display: none; - } - .nav-collapse .nav > li > .dropdown-menu:before, - .nav-collapse .nav > li > .dropdown-menu:after { - display: none; - } - .nav-collapse .navbar-form, - .nav-collapse .navbar-search { - float: none; - padding: 10px 15px; - margin: 10px 0; - border-top: 1px solid #f2f2f2; - border-bottom: 1px solid #f2f2f2; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - } - .navbar-inverse .nav-collapse .navbar-form, - .navbar-inverse .nav-collapse .navbar-search { - border-top-color: #111111; - border-bottom-color: #111111; - } - .navbar .nav-collapse .nav.pull-right { - float: none; - margin-left: 0; - } - .nav-collapse, - .nav-collapse.collapse { - height: 0; - overflow: hidden; - } - .navbar .btn-navbar { - display: block; - } - .navbar-static .navbar-inner { - padding-right: 10px; - padding-left: 10px; - } -} - -@media (min-width: 980px) { - .nav-collapse.collapse { - height: auto !important; - overflow: visible !important; - } -} diff --git a/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap-responsive.min.css b/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap-responsive.min.css deleted file mode 100644 index f4ede63f..00000000 --- a/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap-responsive.min.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Bootstrap Responsive v2.3.2 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} diff --git a/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap.css b/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap.css deleted file mode 100644 index b725064a..00000000 --- a/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap.css +++ /dev/null @@ -1,6167 +0,0 @@ -/*! - * Bootstrap v2.3.2 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ - -.clearfix { - *zoom: 1; -} - -.clearfix:before, -.clearfix:after { - display: table; - line-height: 0; - content: ""; -} - -.clearfix:after { - clear: both; -} - -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -nav, -section { - display: block; -} - -audio, -canvas, -video { - display: inline-block; - *display: inline; - *zoom: 1; -} - -audio:not([controls]) { - display: none; -} - -html { - font-size: 100%; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} - -a:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -a:hover, -a:active { - outline: 0; -} - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -img { - width: auto\9; - height: auto; - max-width: 100%; - vertical-align: middle; - border: 0; - -ms-interpolation-mode: bicubic; -} - -#map_canvas img, -.google-maps img { - max-width: none; -} - -button, -input, -select, -textarea { - margin: 0; - font-size: 100%; - vertical-align: middle; -} - -button, -input { - *overflow: visible; - line-height: normal; -} - -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - cursor: pointer; - -webkit-appearance: button; -} - -label, -select, -button, -input[type="button"], -input[type="reset"], -input[type="submit"], -input[type="radio"], -input[type="checkbox"] { - cursor: pointer; -} - -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} - -input[type="search"]::-webkit-search-decoration, -input[type="search"]::-webkit-search-cancel-button { - -webkit-appearance: none; -} - -textarea { - overflow: auto; - vertical-align: top; -} - -@media print { - * { - color: #000 !important; - text-shadow: none !important; - background: transparent !important; - box-shadow: none !important; - } - a, - a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - .ir a:after, - a[href^="javascript:"]:after, - a[href^="#"]:after { - content: ""; - } - pre, - blockquote { - border: 1px solid #999; - page-break-inside: avoid; - } - thead { - display: table-header-group; - } - tr, - img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - @page { - margin: 0.5cm; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } -} - -body { - margin: 0; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 20px; - color: #333333; - background-color: #ffffff; -} - -a { - color: #0088cc; - text-decoration: none; -} - -a:hover, -a:focus { - color: #005580; - text-decoration: underline; -} - -.img-rounded { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.img-polaroid { - padding: 4px; - background-color: #fff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -} - -.img-circle { - -webkit-border-radius: 500px; - -moz-border-radius: 500px; - border-radius: 500px; -} - -.row { - margin-left: -20px; - *zoom: 1; -} - -.row:before, -.row:after { - display: table; - line-height: 0; - content: ""; -} - -.row:after { - clear: both; -} - -[class*="span"] { - float: left; - min-height: 1px; - margin-left: 20px; -} - -.container, -.navbar-static-top .container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 940px; -} - -.span12 { - width: 940px; -} - -.span11 { - width: 860px; -} - -.span10 { - width: 780px; -} - -.span9 { - width: 700px; -} - -.span8 { - width: 620px; -} - -.span7 { - width: 540px; -} - -.span6 { - width: 460px; -} - -.span5 { - width: 380px; -} - -.span4 { - width: 300px; -} - -.span3 { - width: 220px; -} - -.span2 { - width: 140px; -} - -.span1 { - width: 60px; -} - -.offset12 { - margin-left: 980px; -} - -.offset11 { - margin-left: 900px; -} - -.offset10 { - margin-left: 820px; -} - -.offset9 { - margin-left: 740px; -} - -.offset8 { - margin-left: 660px; -} - -.offset7 { - margin-left: 580px; -} - -.offset6 { - margin-left: 500px; -} - -.offset5 { - margin-left: 420px; -} - -.offset4 { - margin-left: 340px; -} - -.offset3 { - margin-left: 260px; -} - -.offset2 { - margin-left: 180px; -} - -.offset1 { - margin-left: 100px; -} - -.row-fluid { - width: 100%; - *zoom: 1; -} - -.row-fluid:before, -.row-fluid:after { - display: table; - line-height: 0; - content: ""; -} - -.row-fluid:after { - clear: both; -} - -.row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 30px; - margin-left: 2.127659574468085%; - *margin-left: 2.074468085106383%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.row-fluid [class*="span"]:first-child { - margin-left: 0; -} - -.row-fluid .controls-row [class*="span"] + [class*="span"] { - margin-left: 2.127659574468085%; -} - -.row-fluid .span12 { - width: 100%; - *width: 99.94680851063829%; -} - -.row-fluid .span11 { - width: 91.48936170212765%; - *width: 91.43617021276594%; -} - -.row-fluid .span10 { - width: 82.97872340425532%; - *width: 82.92553191489361%; -} - -.row-fluid .span9 { - width: 74.46808510638297%; - *width: 74.41489361702126%; -} - -.row-fluid .span8 { - width: 65.95744680851064%; - *width: 65.90425531914893%; -} - -.row-fluid .span7 { - width: 57.44680851063829%; - *width: 57.39361702127659%; -} - -.row-fluid .span6 { - width: 48.93617021276595%; - *width: 48.88297872340425%; -} - -.row-fluid .span5 { - width: 40.42553191489362%; - *width: 40.37234042553192%; -} - -.row-fluid .span4 { - width: 31.914893617021278%; - *width: 31.861702127659576%; -} - -.row-fluid .span3 { - width: 23.404255319148934%; - *width: 23.351063829787233%; -} - -.row-fluid .span2 { - width: 14.893617021276595%; - *width: 14.840425531914894%; -} - -.row-fluid .span1 { - width: 6.382978723404255%; - *width: 6.329787234042553%; -} - -.row-fluid .offset12 { - margin-left: 104.25531914893617%; - *margin-left: 104.14893617021275%; -} - -.row-fluid .offset12:first-child { - margin-left: 102.12765957446808%; - *margin-left: 102.02127659574467%; -} - -.row-fluid .offset11 { - margin-left: 95.74468085106382%; - *margin-left: 95.6382978723404%; -} - -.row-fluid .offset11:first-child { - margin-left: 93.61702127659574%; - *margin-left: 93.51063829787232%; -} - -.row-fluid .offset10 { - margin-left: 87.23404255319149%; - *margin-left: 87.12765957446807%; -} - -.row-fluid .offset10:first-child { - margin-left: 85.1063829787234%; - *margin-left: 84.99999999999999%; -} - -.row-fluid .offset9 { - margin-left: 78.72340425531914%; - *margin-left: 78.61702127659572%; -} - -.row-fluid .offset9:first-child { - margin-left: 76.59574468085106%; - *margin-left: 76.48936170212764%; -} - -.row-fluid .offset8 { - margin-left: 70.2127659574468%; - *margin-left: 70.10638297872339%; -} - -.row-fluid .offset8:first-child { - margin-left: 68.08510638297872%; - *margin-left: 67.9787234042553%; -} - -.row-fluid .offset7 { - margin-left: 61.70212765957446%; - *margin-left: 61.59574468085106%; -} - -.row-fluid .offset7:first-child { - margin-left: 59.574468085106375%; - *margin-left: 59.46808510638297%; -} - -.row-fluid .offset6 { - margin-left: 53.191489361702125%; - *margin-left: 53.085106382978715%; -} - -.row-fluid .offset6:first-child { - margin-left: 51.063829787234035%; - *margin-left: 50.95744680851063%; -} - -.row-fluid .offset5 { - margin-left: 44.68085106382979%; - *margin-left: 44.57446808510638%; -} - -.row-fluid .offset5:first-child { - margin-left: 42.5531914893617%; - *margin-left: 42.4468085106383%; -} - -.row-fluid .offset4 { - margin-left: 36.170212765957444%; - *margin-left: 36.06382978723405%; -} - -.row-fluid .offset4:first-child { - margin-left: 34.04255319148936%; - *margin-left: 33.93617021276596%; -} - -.row-fluid .offset3 { - margin-left: 27.659574468085104%; - *margin-left: 27.5531914893617%; -} - -.row-fluid .offset3:first-child { - margin-left: 25.53191489361702%; - *margin-left: 25.425531914893618%; -} - -.row-fluid .offset2 { - margin-left: 19.148936170212764%; - *margin-left: 19.04255319148936%; -} - -.row-fluid .offset2:first-child { - margin-left: 17.02127659574468%; - *margin-left: 16.914893617021278%; -} - -.row-fluid .offset1 { - margin-left: 10.638297872340425%; - *margin-left: 10.53191489361702%; -} - -.row-fluid .offset1:first-child { - margin-left: 8.51063829787234%; - *margin-left: 8.404255319148938%; -} - -[class*="span"].hide, -.row-fluid [class*="span"].hide { - display: none; -} - -[class*="span"].pull-right, -.row-fluid [class*="span"].pull-right { - float: right; -} - -.container { - margin-right: auto; - margin-left: auto; - *zoom: 1; -} - -.container:before, -.container:after { - display: table; - line-height: 0; - content: ""; -} - -.container:after { - clear: both; -} - -.container-fluid { - padding-right: 20px; - padding-left: 20px; - *zoom: 1; -} - -.container-fluid:before, -.container-fluid:after { - display: table; - line-height: 0; - content: ""; -} - -.container-fluid:after { - clear: both; -} - -p { - margin: 0 0 10px; -} - -.lead { - margin-bottom: 20px; - font-size: 21px; - font-weight: 200; - line-height: 30px; -} - -small { - font-size: 85%; -} - -strong { - font-weight: bold; -} - -em { - font-style: italic; -} - -cite { - font-style: normal; -} - -.muted { - color: #999999; -} - -a.muted:hover, -a.muted:focus { - color: #808080; -} - -.text-warning { - color: #c09853; -} - -a.text-warning:hover, -a.text-warning:focus { - color: #a47e3c; -} - -.text-error { - color: #b94a48; -} - -a.text-error:hover, -a.text-error:focus { - color: #953b39; -} - -.text-info { - color: #3a87ad; -} - -a.text-info:hover, -a.text-info:focus { - color: #2d6987; -} - -.text-success { - color: #468847; -} - -a.text-success:hover, -a.text-success:focus { - color: #356635; -} - -.text-left { - text-align: left; -} - -.text-right { - text-align: right; -} - -.text-center { - text-align: center; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 10px 0; - font-family: inherit; - font-weight: bold; - line-height: 20px; - color: inherit; - text-rendering: optimizelegibility; -} - -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small { - font-weight: normal; - line-height: 1; - color: #999999; -} - -h1, -h2, -h3 { - line-height: 40px; -} - -h1 { - font-size: 38.5px; -} - -h2 { - font-size: 31.5px; -} - -h3 { - font-size: 24.5px; -} - -h4 { - font-size: 17.5px; -} - -h5 { - font-size: 14px; -} - -h6 { - font-size: 11.9px; -} - -h1 small { - font-size: 24.5px; -} - -h2 small { - font-size: 17.5px; -} - -h3 small { - font-size: 14px; -} - -h4 small { - font-size: 14px; -} - -.page-header { - padding-bottom: 9px; - margin: 20px 0 30px; - border-bottom: 1px solid #eeeeee; -} - -ul, -ol { - padding: 0; - margin: 0 0 10px 25px; -} - -ul ul, -ul ol, -ol ol, -ol ul { - margin-bottom: 0; -} - -li { - line-height: 20px; -} - -ul.unstyled, -ol.unstyled { - margin-left: 0; - list-style: none; -} - -ul.inline, -ol.inline { - margin-left: 0; - list-style: none; -} - -ul.inline > li, -ol.inline > li { - display: inline-block; - *display: inline; - padding-right: 5px; - padding-left: 5px; - *zoom: 1; -} - -dl { - margin-bottom: 20px; -} - -dt, -dd { - line-height: 20px; -} - -dt { - font-weight: bold; -} - -dd { - margin-left: 10px; -} - -.dl-horizontal { - *zoom: 1; -} - -.dl-horizontal:before, -.dl-horizontal:after { - display: table; - line-height: 0; - content: ""; -} - -.dl-horizontal:after { - clear: both; -} - -.dl-horizontal dt { - float: left; - width: 160px; - overflow: hidden; - clear: left; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; -} - -.dl-horizontal dd { - margin-left: 180px; -} - -hr { - margin: 20px 0; - border: 0; - border-top: 1px solid #eeeeee; - border-bottom: 1px solid #ffffff; -} - -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #999999; -} - -abbr.initialism { - font-size: 90%; - text-transform: uppercase; -} - -blockquote { - padding: 0 0 0 15px; - margin: 0 0 20px; - border-left: 5px solid #eeeeee; -} - -blockquote p { - margin-bottom: 0; - font-size: 17.5px; - font-weight: 300; - line-height: 1.25; -} - -blockquote small { - display: block; - line-height: 20px; - color: #999999; -} - -blockquote small:before { - content: '\2014 \00A0'; -} - -blockquote.pull-right { - float: right; - padding-right: 15px; - padding-left: 0; - border-right: 5px solid #eeeeee; - border-left: 0; -} - -blockquote.pull-right p, -blockquote.pull-right small { - text-align: right; -} - -blockquote.pull-right small:before { - content: ''; -} - -blockquote.pull-right small:after { - content: '\00A0 \2014'; -} - -q:before, -q:after, -blockquote:before, -blockquote:after { - content: ""; -} - -address { - display: block; - margin-bottom: 20px; - font-style: normal; - line-height: 20px; -} - -code, -pre { - padding: 0 3px 2px; - font-family: Monaco, Menlo, Consolas, "Courier New", monospace; - font-size: 12px; - color: #333333; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -code { - padding: 2px 4px; - color: #d14; - white-space: nowrap; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; -} - -pre { - display: block; - padding: 9.5px; - margin: 0 0 10px; - font-size: 13px; - line-height: 20px; - word-break: break-all; - word-wrap: break-word; - white-space: pre; - white-space: pre-wrap; - background-color: #f5f5f5; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.15); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -pre.prettyprint { - margin-bottom: 20px; -} - -pre code { - padding: 0; - color: inherit; - white-space: pre; - white-space: pre-wrap; - background-color: transparent; - border: 0; -} - -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} - -form { - margin: 0 0 20px; -} - -fieldset { - padding: 0; - margin: 0; - border: 0; -} - -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 20px; - font-size: 21px; - line-height: 40px; - color: #333333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} - -legend small { - font-size: 15px; - color: #999999; -} - -label, -input, -button, -select, -textarea { - font-size: 14px; - font-weight: normal; - line-height: 20px; -} - -input, -button, -select, -textarea { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -label { - display: block; - margin-bottom: 5px; -} - -select, -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - display: inline-block; - height: 20px; - padding: 4px 6px; - margin-bottom: 10px; - font-size: 14px; - line-height: 20px; - color: #555555; - vertical-align: middle; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -input, -textarea, -.uneditable-input { - width: 206px; -} - -textarea { - height: auto; -} - -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - background-color: #ffffff; - border: 1px solid #cccccc; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; - -moz-transition: border linear 0.2s, box-shadow linear 0.2s; - -o-transition: border linear 0.2s, box-shadow linear 0.2s; - transition: border linear 0.2s, box-shadow linear 0.2s; -} - -textarea:focus, -input[type="text"]:focus, -input[type="password"]:focus, -input[type="datetime"]:focus, -input[type="datetime-local"]:focus, -input[type="date"]:focus, -input[type="month"]:focus, -input[type="time"]:focus, -input[type="week"]:focus, -input[type="number"]:focus, -input[type="email"]:focus, -input[type="url"]:focus, -input[type="search"]:focus, -input[type="tel"]:focus, -input[type="color"]:focus, -.uneditable-input:focus { - border-color: rgba(82, 168, 236, 0.8); - outline: 0; - outline: thin dotted \9; - /* IE6-9 */ - - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); -} - -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - *margin-top: 0; - line-height: normal; -} - -input[type="file"], -input[type="image"], -input[type="submit"], -input[type="reset"], -input[type="button"], -input[type="radio"], -input[type="checkbox"] { - width: auto; -} - -select, -input[type="file"] { - height: 30px; - /* In IE7, the height of the select element cannot be changed by height, only font-size */ - - *margin-top: 4px; - /* For IE7, add top margin to align select with labels */ - - line-height: 30px; -} - -select { - width: 220px; - background-color: #ffffff; - border: 1px solid #cccccc; -} - -select[multiple], -select[size] { - height: auto; -} - -select:focus, -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.uneditable-input, -.uneditable-textarea { - color: #999999; - cursor: not-allowed; - background-color: #fcfcfc; - border-color: #cccccc; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); -} - -.uneditable-input { - overflow: hidden; - white-space: nowrap; -} - -.uneditable-textarea { - width: auto; - height: auto; -} - -input:-moz-placeholder, -textarea:-moz-placeholder { - color: #999999; -} - -input:-ms-input-placeholder, -textarea:-ms-input-placeholder { - color: #999999; -} - -input::-webkit-input-placeholder, -textarea::-webkit-input-placeholder { - color: #999999; -} - -.radio, -.checkbox { - min-height: 20px; - padding-left: 20px; -} - -.radio input[type="radio"], -.checkbox input[type="checkbox"] { - float: left; - margin-left: -20px; -} - -.controls > .radio:first-child, -.controls > .checkbox:first-child { - padding-top: 5px; -} - -.radio.inline, -.checkbox.inline { - display: inline-block; - padding-top: 5px; - margin-bottom: 0; - vertical-align: middle; -} - -.radio.inline + .radio.inline, -.checkbox.inline + .checkbox.inline { - margin-left: 10px; -} - -.input-mini { - width: 60px; -} - -.input-small { - width: 90px; -} - -.input-medium { - width: 150px; -} - -.input-large { - width: 210px; -} - -.input-xlarge { - width: 270px; -} - -.input-xxlarge { - width: 530px; -} - -input[class*="span"], -select[class*="span"], -textarea[class*="span"], -.uneditable-input[class*="span"], -.row-fluid input[class*="span"], -.row-fluid select[class*="span"], -.row-fluid textarea[class*="span"], -.row-fluid .uneditable-input[class*="span"] { - float: none; - margin-left: 0; -} - -.input-append input[class*="span"], -.input-append .uneditable-input[class*="span"], -.input-prepend input[class*="span"], -.input-prepend .uneditable-input[class*="span"], -.row-fluid input[class*="span"], -.row-fluid select[class*="span"], -.row-fluid textarea[class*="span"], -.row-fluid .uneditable-input[class*="span"], -.row-fluid .input-prepend [class*="span"], -.row-fluid .input-append [class*="span"] { - display: inline-block; -} - -input, -textarea, -.uneditable-input { - margin-left: 0; -} - -.controls-row [class*="span"] + [class*="span"] { - margin-left: 20px; -} - -input.span12, -textarea.span12, -.uneditable-input.span12 { - width: 926px; -} - -input.span11, -textarea.span11, -.uneditable-input.span11 { - width: 846px; -} - -input.span10, -textarea.span10, -.uneditable-input.span10 { - width: 766px; -} - -input.span9, -textarea.span9, -.uneditable-input.span9 { - width: 686px; -} - -input.span8, -textarea.span8, -.uneditable-input.span8 { - width: 606px; -} - -input.span7, -textarea.span7, -.uneditable-input.span7 { - width: 526px; -} - -input.span6, -textarea.span6, -.uneditable-input.span6 { - width: 446px; -} - -input.span5, -textarea.span5, -.uneditable-input.span5 { - width: 366px; -} - -input.span4, -textarea.span4, -.uneditable-input.span4 { - width: 286px; -} - -input.span3, -textarea.span3, -.uneditable-input.span3 { - width: 206px; -} - -input.span2, -textarea.span2, -.uneditable-input.span2 { - width: 126px; -} - -input.span1, -textarea.span1, -.uneditable-input.span1 { - width: 46px; -} - -.controls-row { - *zoom: 1; -} - -.controls-row:before, -.controls-row:after { - display: table; - line-height: 0; - content: ""; -} - -.controls-row:after { - clear: both; -} - -.controls-row [class*="span"], -.row-fluid .controls-row [class*="span"] { - float: left; -} - -.controls-row .checkbox[class*="span"], -.controls-row .radio[class*="span"] { - padding-top: 5px; -} - -input[disabled], -select[disabled], -textarea[disabled], -input[readonly], -select[readonly], -textarea[readonly] { - cursor: not-allowed; - background-color: #eeeeee; -} - -input[type="radio"][disabled], -input[type="checkbox"][disabled], -input[type="radio"][readonly], -input[type="checkbox"][readonly] { - background-color: transparent; -} - -.control-group.warning .control-label, -.control-group.warning .help-block, -.control-group.warning .help-inline { - color: #c09853; -} - -.control-group.warning .checkbox, -.control-group.warning .radio, -.control-group.warning input, -.control-group.warning select, -.control-group.warning textarea { - color: #c09853; -} - -.control-group.warning input, -.control-group.warning select, -.control-group.warning textarea { - border-color: #c09853; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.warning input:focus, -.control-group.warning select:focus, -.control-group.warning textarea:focus { - border-color: #a47e3c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; -} - -.control-group.warning .input-prepend .add-on, -.control-group.warning .input-append .add-on { - color: #c09853; - background-color: #fcf8e3; - border-color: #c09853; -} - -.control-group.error .control-label, -.control-group.error .help-block, -.control-group.error .help-inline { - color: #b94a48; -} - -.control-group.error .checkbox, -.control-group.error .radio, -.control-group.error input, -.control-group.error select, -.control-group.error textarea { - color: #b94a48; -} - -.control-group.error input, -.control-group.error select, -.control-group.error textarea { - border-color: #b94a48; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.error input:focus, -.control-group.error select:focus, -.control-group.error textarea:focus { - border-color: #953b39; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; -} - -.control-group.error .input-prepend .add-on, -.control-group.error .input-append .add-on { - color: #b94a48; - background-color: #f2dede; - border-color: #b94a48; -} - -.control-group.success .control-label, -.control-group.success .help-block, -.control-group.success .help-inline { - color: #468847; -} - -.control-group.success .checkbox, -.control-group.success .radio, -.control-group.success input, -.control-group.success select, -.control-group.success textarea { - color: #468847; -} - -.control-group.success input, -.control-group.success select, -.control-group.success textarea { - border-color: #468847; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.success input:focus, -.control-group.success select:focus, -.control-group.success textarea:focus { - border-color: #356635; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; -} - -.control-group.success .input-prepend .add-on, -.control-group.success .input-append .add-on { - color: #468847; - background-color: #dff0d8; - border-color: #468847; -} - -.control-group.info .control-label, -.control-group.info .help-block, -.control-group.info .help-inline { - color: #3a87ad; -} - -.control-group.info .checkbox, -.control-group.info .radio, -.control-group.info input, -.control-group.info select, -.control-group.info textarea { - color: #3a87ad; -} - -.control-group.info input, -.control-group.info select, -.control-group.info textarea { - border-color: #3a87ad; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.control-group.info input:focus, -.control-group.info select:focus, -.control-group.info textarea:focus { - border-color: #2d6987; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; -} - -.control-group.info .input-prepend .add-on, -.control-group.info .input-append .add-on { - color: #3a87ad; - background-color: #d9edf7; - border-color: #3a87ad; -} - -input:focus:invalid, -textarea:focus:invalid, -select:focus:invalid { - color: #b94a48; - border-color: #ee5f5b; -} - -input:focus:invalid:focus, -textarea:focus:invalid:focus, -select:focus:invalid:focus { - border-color: #e9322d; - -webkit-box-shadow: 0 0 6px #f8b9b7; - -moz-box-shadow: 0 0 6px #f8b9b7; - box-shadow: 0 0 6px #f8b9b7; -} - -.form-actions { - padding: 19px 20px 20px; - margin-top: 20px; - margin-bottom: 20px; - background-color: #f5f5f5; - border-top: 1px solid #e5e5e5; - *zoom: 1; -} - -.form-actions:before, -.form-actions:after { - display: table; - line-height: 0; - content: ""; -} - -.form-actions:after { - clear: both; -} - -.help-block, -.help-inline { - color: #595959; -} - -.help-block { - display: block; - margin-bottom: 10px; -} - -.help-inline { - display: inline-block; - *display: inline; - padding-left: 5px; - vertical-align: middle; - *zoom: 1; -} - -.input-append, -.input-prepend { - display: inline-block; - margin-bottom: 10px; - font-size: 0; - white-space: nowrap; - vertical-align: middle; -} - -.input-append input, -.input-prepend input, -.input-append select, -.input-prepend select, -.input-append .uneditable-input, -.input-prepend .uneditable-input, -.input-append .dropdown-menu, -.input-prepend .dropdown-menu, -.input-append .popover, -.input-prepend .popover { - font-size: 14px; -} - -.input-append input, -.input-prepend input, -.input-append select, -.input-prepend select, -.input-append .uneditable-input, -.input-prepend .uneditable-input { - position: relative; - margin-bottom: 0; - *margin-left: 0; - vertical-align: top; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-append input:focus, -.input-prepend input:focus, -.input-append select:focus, -.input-prepend select:focus, -.input-append .uneditable-input:focus, -.input-prepend .uneditable-input:focus { - z-index: 2; -} - -.input-append .add-on, -.input-prepend .add-on { - display: inline-block; - width: auto; - height: 20px; - min-width: 16px; - padding: 4px 5px; - font-size: 14px; - font-weight: normal; - line-height: 20px; - text-align: center; - text-shadow: 0 1px 0 #ffffff; - background-color: #eeeeee; - border: 1px solid #ccc; -} - -.input-append .add-on, -.input-prepend .add-on, -.input-append .btn, -.input-prepend .btn, -.input-append .btn-group > .dropdown-toggle, -.input-prepend .btn-group > .dropdown-toggle { - vertical-align: top; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.input-append .active, -.input-prepend .active { - background-color: #a9dba9; - border-color: #46a546; -} - -.input-prepend .add-on, -.input-prepend .btn { - margin-right: -1px; -} - -.input-prepend .add-on:first-child, -.input-prepend .btn:first-child { - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-append input, -.input-append select, -.input-append .uneditable-input { - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-append input + .btn-group .btn:last-child, -.input-append select + .btn-group .btn:last-child, -.input-append .uneditable-input + .btn-group .btn:last-child { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-append .add-on, -.input-append .btn, -.input-append .btn-group { - margin-left: -1px; -} - -.input-append .add-on:last-child, -.input-append .btn:last-child, -.input-append .btn-group:last-child > .dropdown-toggle { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append input, -.input-prepend.input-append select, -.input-prepend.input-append .uneditable-input { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.input-prepend.input-append input + .btn-group .btn, -.input-prepend.input-append select + .btn-group .btn, -.input-prepend.input-append .uneditable-input + .btn-group .btn { - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append .add-on:first-child, -.input-prepend.input-append .btn:first-child { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.input-prepend.input-append .add-on:last-child, -.input-prepend.input-append .btn:last-child { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.input-prepend.input-append .btn-group:first-child { - margin-left: 0; -} - -input.search-query { - padding-right: 14px; - padding-right: 4px \9; - padding-left: 14px; - padding-left: 4px \9; - /* IE7-8 doesn't have border-radius, so don't indent the padding */ - - margin-bottom: 0; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -/* Allow for input prepend/append in search forms */ - -.form-search .input-append .search-query, -.form-search .input-prepend .search-query { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.form-search .input-append .search-query { - -webkit-border-radius: 14px 0 0 14px; - -moz-border-radius: 14px 0 0 14px; - border-radius: 14px 0 0 14px; -} - -.form-search .input-append .btn { - -webkit-border-radius: 0 14px 14px 0; - -moz-border-radius: 0 14px 14px 0; - border-radius: 0 14px 14px 0; -} - -.form-search .input-prepend .search-query { - -webkit-border-radius: 0 14px 14px 0; - -moz-border-radius: 0 14px 14px 0; - border-radius: 0 14px 14px 0; -} - -.form-search .input-prepend .btn { - -webkit-border-radius: 14px 0 0 14px; - -moz-border-radius: 14px 0 0 14px; - border-radius: 14px 0 0 14px; -} - -.form-search input, -.form-inline input, -.form-horizontal input, -.form-search textarea, -.form-inline textarea, -.form-horizontal textarea, -.form-search select, -.form-inline select, -.form-horizontal select, -.form-search .help-inline, -.form-inline .help-inline, -.form-horizontal .help-inline, -.form-search .uneditable-input, -.form-inline .uneditable-input, -.form-horizontal .uneditable-input, -.form-search .input-prepend, -.form-inline .input-prepend, -.form-horizontal .input-prepend, -.form-search .input-append, -.form-inline .input-append, -.form-horizontal .input-append { - display: inline-block; - *display: inline; - margin-bottom: 0; - vertical-align: middle; - *zoom: 1; -} - -.form-search .hide, -.form-inline .hide, -.form-horizontal .hide { - display: none; -} - -.form-search label, -.form-inline label, -.form-search .btn-group, -.form-inline .btn-group { - display: inline-block; -} - -.form-search .input-append, -.form-inline .input-append, -.form-search .input-prepend, -.form-inline .input-prepend { - margin-bottom: 0; -} - -.form-search .radio, -.form-search .checkbox, -.form-inline .radio, -.form-inline .checkbox { - padding-left: 0; - margin-bottom: 0; - vertical-align: middle; -} - -.form-search .radio input[type="radio"], -.form-search .checkbox input[type="checkbox"], -.form-inline .radio input[type="radio"], -.form-inline .checkbox input[type="checkbox"] { - float: left; - margin-right: 3px; - margin-left: 0; -} - -.control-group { - margin-bottom: 10px; -} - -legend + .control-group { - margin-top: 20px; - -webkit-margin-top-collapse: separate; -} - -.form-horizontal .control-group { - margin-bottom: 20px; - *zoom: 1; -} - -.form-horizontal .control-group:before, -.form-horizontal .control-group:after { - display: table; - line-height: 0; - content: ""; -} - -.form-horizontal .control-group:after { - clear: both; -} - -.form-horizontal .control-label { - float: left; - width: 160px; - padding-top: 5px; - text-align: right; -} - -.form-horizontal .controls { - *display: inline-block; - *padding-left: 20px; - margin-left: 180px; - *margin-left: 0; -} - -.form-horizontal .controls:first-child { - *padding-left: 180px; -} - -.form-horizontal .help-block { - margin-bottom: 0; -} - -.form-horizontal input + .help-block, -.form-horizontal select + .help-block, -.form-horizontal textarea + .help-block, -.form-horizontal .uneditable-input + .help-block, -.form-horizontal .input-prepend + .help-block, -.form-horizontal .input-append + .help-block { - margin-top: 10px; -} - -.form-horizontal .form-actions { - padding-left: 180px; -} - -table { - max-width: 100%; - background-color: transparent; - border-collapse: collapse; - border-spacing: 0; -} - -.table { - width: 100%; - margin-bottom: 20px; -} - -.table th, -.table td { - padding: 8px; - line-height: 20px; - text-align: left; - vertical-align: top; - border-top: 1px solid #dddddd; -} - -.table th { - font-weight: bold; -} - -.table thead th { - vertical-align: bottom; -} - -.table caption + thead tr:first-child th, -.table caption + thead tr:first-child td, -.table colgroup + thead tr:first-child th, -.table colgroup + thead tr:first-child td, -.table thead:first-child tr:first-child th, -.table thead:first-child tr:first-child td { - border-top: 0; -} - -.table tbody + tbody { - border-top: 2px solid #dddddd; -} - -.table .table { - background-color: #ffffff; -} - -.table-condensed th, -.table-condensed td { - padding: 4px 5px; -} - -.table-bordered { - border: 1px solid #dddddd; - border-collapse: separate; - *border-collapse: collapse; - border-left: 0; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.table-bordered th, -.table-bordered td { - border-left: 1px solid #dddddd; -} - -.table-bordered caption + thead tr:first-child th, -.table-bordered caption + tbody tr:first-child th, -.table-bordered caption + tbody tr:first-child td, -.table-bordered colgroup + thead tr:first-child th, -.table-bordered colgroup + tbody tr:first-child th, -.table-bordered colgroup + tbody tr:first-child td, -.table-bordered thead:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child td { - border-top: 0; -} - -.table-bordered thead:first-child tr:first-child > th:first-child, -.table-bordered tbody:first-child tr:first-child > td:first-child, -.table-bordered tbody:first-child tr:first-child > th:first-child { - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; -} - -.table-bordered thead:first-child tr:first-child > th:last-child, -.table-bordered tbody:first-child tr:first-child > td:last-child, -.table-bordered tbody:first-child tr:first-child > th:last-child { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; -} - -.table-bordered thead:last-child tr:last-child > th:first-child, -.table-bordered tbody:last-child tr:last-child > td:first-child, -.table-bordered tbody:last-child tr:last-child > th:first-child, -.table-bordered tfoot:last-child tr:last-child > td:first-child, -.table-bordered tfoot:last-child tr:last-child > th:first-child { - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; -} - -.table-bordered thead:last-child tr:last-child > th:last-child, -.table-bordered tbody:last-child tr:last-child > td:last-child, -.table-bordered tbody:last-child tr:last-child > th:last-child, -.table-bordered tfoot:last-child tr:last-child > td:last-child, -.table-bordered tfoot:last-child tr:last-child > th:last-child { - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; -} - -.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { - -webkit-border-bottom-left-radius: 0; - border-bottom-left-radius: 0; - -moz-border-radius-bottomleft: 0; -} - -.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - -moz-border-radius-bottomright: 0; -} - -.table-bordered caption + thead tr:first-child th:first-child, -.table-bordered caption + tbody tr:first-child td:first-child, -.table-bordered colgroup + thead tr:first-child th:first-child, -.table-bordered colgroup + tbody tr:first-child td:first-child { - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; -} - -.table-bordered caption + thead tr:first-child th:last-child, -.table-bordered caption + tbody tr:first-child td:last-child, -.table-bordered colgroup + thead tr:first-child th:last-child, -.table-bordered colgroup + tbody tr:first-child td:last-child { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; -} - -.table-striped tbody > tr:nth-child(odd) > td, -.table-striped tbody > tr:nth-child(odd) > th { - background-color: #f9f9f9; -} - -.table-hover tbody tr:hover > td, -.table-hover tbody tr:hover > th { - background-color: #f5f5f5; -} - -table td[class*="span"], -table th[class*="span"], -.row-fluid table td[class*="span"], -.row-fluid table th[class*="span"] { - display: table-cell; - float: none; - margin-left: 0; -} - -.table td.span1, -.table th.span1 { - float: none; - width: 44px; - margin-left: 0; -} - -.table td.span2, -.table th.span2 { - float: none; - width: 124px; - margin-left: 0; -} - -.table td.span3, -.table th.span3 { - float: none; - width: 204px; - margin-left: 0; -} - -.table td.span4, -.table th.span4 { - float: none; - width: 284px; - margin-left: 0; -} - -.table td.span5, -.table th.span5 { - float: none; - width: 364px; - margin-left: 0; -} - -.table td.span6, -.table th.span6 { - float: none; - width: 444px; - margin-left: 0; -} - -.table td.span7, -.table th.span7 { - float: none; - width: 524px; - margin-left: 0; -} - -.table td.span8, -.table th.span8 { - float: none; - width: 604px; - margin-left: 0; -} - -.table td.span9, -.table th.span9 { - float: none; - width: 684px; - margin-left: 0; -} - -.table td.span10, -.table th.span10 { - float: none; - width: 764px; - margin-left: 0; -} - -.table td.span11, -.table th.span11 { - float: none; - width: 844px; - margin-left: 0; -} - -.table td.span12, -.table th.span12 { - float: none; - width: 924px; - margin-left: 0; -} - -.table tbody tr.success > td { - background-color: #dff0d8; -} - -.table tbody tr.error > td { - background-color: #f2dede; -} - -.table tbody tr.warning > td { - background-color: #fcf8e3; -} - -.table tbody tr.info > td { - background-color: #d9edf7; -} - -.table-hover tbody tr.success:hover > td { - background-color: #d0e9c6; -} - -.table-hover tbody tr.error:hover > td { - background-color: #ebcccc; -} - -.table-hover tbody tr.warning:hover > td { - background-color: #faf2cc; -} - -.table-hover tbody tr.info:hover > td { - background-color: #c4e3f3; -} - -[class^="icon-"], -[class*=" icon-"] { - display: inline-block; - width: 14px; - height: 14px; - margin-top: 1px; - *margin-right: .3em; - line-height: 14px; - vertical-align: text-top; - background-image: url("../img/glyphicons-halflings.png"); - background-position: 14px 14px; - background-repeat: no-repeat; -} - -/* White icons with optional class, or on hover/focus/active states of certain elements */ - -.icon-white, -.nav-pills > .active > a > [class^="icon-"], -.nav-pills > .active > a > [class*=" icon-"], -.nav-list > .active > a > [class^="icon-"], -.nav-list > .active > a > [class*=" icon-"], -.navbar-inverse .nav > .active > a > [class^="icon-"], -.navbar-inverse .nav > .active > a > [class*=" icon-"], -.dropdown-menu > li > a:hover > [class^="icon-"], -.dropdown-menu > li > a:focus > [class^="icon-"], -.dropdown-menu > li > a:hover > [class*=" icon-"], -.dropdown-menu > li > a:focus > [class*=" icon-"], -.dropdown-menu > .active > a > [class^="icon-"], -.dropdown-menu > .active > a > [class*=" icon-"], -.dropdown-submenu:hover > a > [class^="icon-"], -.dropdown-submenu:focus > a > [class^="icon-"], -.dropdown-submenu:hover > a > [class*=" icon-"], -.dropdown-submenu:focus > a > [class*=" icon-"] { - background-image: url("../img/glyphicons-halflings-white.png"); -} - -.icon-glass { - background-position: 0 0; -} - -.icon-music { - background-position: -24px 0; -} - -.icon-search { - background-position: -48px 0; -} - -.icon-envelope { - background-position: -72px 0; -} - -.icon-heart { - background-position: -96px 0; -} - -.icon-star { - background-position: -120px 0; -} - -.icon-star-empty { - background-position: -144px 0; -} - -.icon-user { - background-position: -168px 0; -} - -.icon-film { - background-position: -192px 0; -} - -.icon-th-large { - background-position: -216px 0; -} - -.icon-th { - background-position: -240px 0; -} - -.icon-th-list { - background-position: -264px 0; -} - -.icon-ok { - background-position: -288px 0; -} - -.icon-remove { - background-position: -312px 0; -} - -.icon-zoom-in { - background-position: -336px 0; -} - -.icon-zoom-out { - background-position: -360px 0; -} - -.icon-off { - background-position: -384px 0; -} - -.icon-signal { - background-position: -408px 0; -} - -.icon-cog { - background-position: -432px 0; -} - -.icon-trash { - background-position: -456px 0; -} - -.icon-home { - background-position: 0 -24px; -} - -.icon-file { - background-position: -24px -24px; -} - -.icon-time { - background-position: -48px -24px; -} - -.icon-road { - background-position: -72px -24px; -} - -.icon-download-alt { - background-position: -96px -24px; -} - -.icon-download { - background-position: -120px -24px; -} - -.icon-upload { - background-position: -144px -24px; -} - -.icon-inbox { - background-position: -168px -24px; -} - -.icon-play-circle { - background-position: -192px -24px; -} - -.icon-repeat { - background-position: -216px -24px; -} - -.icon-refresh { - background-position: -240px -24px; -} - -.icon-list-alt { - background-position: -264px -24px; -} - -.icon-lock { - background-position: -287px -24px; -} - -.icon-flag { - background-position: -312px -24px; -} - -.icon-headphones { - background-position: -336px -24px; -} - -.icon-volume-off { - background-position: -360px -24px; -} - -.icon-volume-down { - background-position: -384px -24px; -} - -.icon-volume-up { - background-position: -408px -24px; -} - -.icon-qrcode { - background-position: -432px -24px; -} - -.icon-barcode { - background-position: -456px -24px; -} - -.icon-tag { - background-position: 0 -48px; -} - -.icon-tags { - background-position: -25px -48px; -} - -.icon-book { - background-position: -48px -48px; -} - -.icon-bookmark { - background-position: -72px -48px; -} - -.icon-print { - background-position: -96px -48px; -} - -.icon-camera { - background-position: -120px -48px; -} - -.icon-font { - background-position: -144px -48px; -} - -.icon-bold { - background-position: -167px -48px; -} - -.icon-italic { - background-position: -192px -48px; -} - -.icon-text-height { - background-position: -216px -48px; -} - -.icon-text-width { - background-position: -240px -48px; -} - -.icon-align-left { - background-position: -264px -48px; -} - -.icon-align-center { - background-position: -288px -48px; -} - -.icon-align-right { - background-position: -312px -48px; -} - -.icon-align-justify { - background-position: -336px -48px; -} - -.icon-list { - background-position: -360px -48px; -} - -.icon-indent-left { - background-position: -384px -48px; -} - -.icon-indent-right { - background-position: -408px -48px; -} - -.icon-facetime-video { - background-position: -432px -48px; -} - -.icon-picture { - background-position: -456px -48px; -} - -.icon-pencil { - background-position: 0 -72px; -} - -.icon-map-marker { - background-position: -24px -72px; -} - -.icon-adjust { - background-position: -48px -72px; -} - -.icon-tint { - background-position: -72px -72px; -} - -.icon-edit { - background-position: -96px -72px; -} - -.icon-share { - background-position: -120px -72px; -} - -.icon-check { - background-position: -144px -72px; -} - -.icon-move { - background-position: -168px -72px; -} - -.icon-step-backward { - background-position: -192px -72px; -} - -.icon-fast-backward { - background-position: -216px -72px; -} - -.icon-backward { - background-position: -240px -72px; -} - -.icon-play { - background-position: -264px -72px; -} - -.icon-pause { - background-position: -288px -72px; -} - -.icon-stop { - background-position: -312px -72px; -} - -.icon-forward { - background-position: -336px -72px; -} - -.icon-fast-forward { - background-position: -360px -72px; -} - -.icon-step-forward { - background-position: -384px -72px; -} - -.icon-eject { - background-position: -408px -72px; -} - -.icon-chevron-left { - background-position: -432px -72px; -} - -.icon-chevron-right { - background-position: -456px -72px; -} - -.icon-plus-sign { - background-position: 0 -96px; -} - -.icon-minus-sign { - background-position: -24px -96px; -} - -.icon-remove-sign { - background-position: -48px -96px; -} - -.icon-ok-sign { - background-position: -72px -96px; -} - -.icon-question-sign { - background-position: -96px -96px; -} - -.icon-info-sign { - background-position: -120px -96px; -} - -.icon-screenshot { - background-position: -144px -96px; -} - -.icon-remove-circle { - background-position: -168px -96px; -} - -.icon-ok-circle { - background-position: -192px -96px; -} - -.icon-ban-circle { - background-position: -216px -96px; -} - -.icon-arrow-left { - background-position: -240px -96px; -} - -.icon-arrow-right { - background-position: -264px -96px; -} - -.icon-arrow-up { - background-position: -289px -96px; -} - -.icon-arrow-down { - background-position: -312px -96px; -} - -.icon-share-alt { - background-position: -336px -96px; -} - -.icon-resize-full { - background-position: -360px -96px; -} - -.icon-resize-small { - background-position: -384px -96px; -} - -.icon-plus { - background-position: -408px -96px; -} - -.icon-minus { - background-position: -433px -96px; -} - -.icon-asterisk { - background-position: -456px -96px; -} - -.icon-exclamation-sign { - background-position: 0 -120px; -} - -.icon-gift { - background-position: -24px -120px; -} - -.icon-leaf { - background-position: -48px -120px; -} - -.icon-fire { - background-position: -72px -120px; -} - -.icon-eye-open { - background-position: -96px -120px; -} - -.icon-eye-close { - background-position: -120px -120px; -} - -.icon-warning-sign { - background-position: -144px -120px; -} - -.icon-plane { - background-position: -168px -120px; -} - -.icon-calendar { - background-position: -192px -120px; -} - -.icon-random { - width: 16px; - background-position: -216px -120px; -} - -.icon-comment { - background-position: -240px -120px; -} - -.icon-magnet { - background-position: -264px -120px; -} - -.icon-chevron-up { - background-position: -288px -120px; -} - -.icon-chevron-down { - background-position: -313px -119px; -} - -.icon-retweet { - background-position: -336px -120px; -} - -.icon-shopping-cart { - background-position: -360px -120px; -} - -.icon-folder-close { - width: 16px; - background-position: -384px -120px; -} - -.icon-folder-open { - width: 16px; - background-position: -408px -120px; -} - -.icon-resize-vertical { - background-position: -432px -119px; -} - -.icon-resize-horizontal { - background-position: -456px -118px; -} - -.icon-hdd { - background-position: 0 -144px; -} - -.icon-bullhorn { - background-position: -24px -144px; -} - -.icon-bell { - background-position: -48px -144px; -} - -.icon-certificate { - background-position: -72px -144px; -} - -.icon-thumbs-up { - background-position: -96px -144px; -} - -.icon-thumbs-down { - background-position: -120px -144px; -} - -.icon-hand-right { - background-position: -144px -144px; -} - -.icon-hand-left { - background-position: -168px -144px; -} - -.icon-hand-up { - background-position: -192px -144px; -} - -.icon-hand-down { - background-position: -216px -144px; -} - -.icon-circle-arrow-right { - background-position: -240px -144px; -} - -.icon-circle-arrow-left { - background-position: -264px -144px; -} - -.icon-circle-arrow-up { - background-position: -288px -144px; -} - -.icon-circle-arrow-down { - background-position: -312px -144px; -} - -.icon-globe { - background-position: -336px -144px; -} - -.icon-wrench { - background-position: -360px -144px; -} - -.icon-tasks { - background-position: -384px -144px; -} - -.icon-filter { - background-position: -408px -144px; -} - -.icon-briefcase { - background-position: -432px -144px; -} - -.icon-fullscreen { - background-position: -456px -144px; -} - -.dropup, -.dropdown { - position: relative; -} - -.dropdown-toggle { - *margin-bottom: -3px; -} - -.dropdown-toggle:active, -.open .dropdown-toggle { - outline: 0; -} - -.caret { - display: inline-block; - width: 0; - height: 0; - vertical-align: top; - border-top: 4px solid #000000; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - content: ""; -} - -.dropdown .caret { - margin-top: 8px; - margin-left: 2px; -} - -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - *border-right-width: 2px; - *border-bottom-width: 2px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -.dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.dropdown-menu .divider { - *width: 100%; - height: 1px; - margin: 9px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} - -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 20px; - color: #333333; - white-space: nowrap; -} - -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus, -.dropdown-submenu:hover > a, -.dropdown-submenu:focus > a { - color: #ffffff; - text-decoration: none; - background-color: #0081c2; - background-image: -moz-linear-gradient(top, #0088cc, #0077b3); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); - background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); - background-image: -o-linear-gradient(top, #0088cc, #0077b3); - background-image: linear-gradient(to bottom, #0088cc, #0077b3); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); -} - -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #ffffff; - text-decoration: none; - background-color: #0081c2; - background-image: -moz-linear-gradient(top, #0088cc, #0077b3); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); - background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); - background-image: -o-linear-gradient(top, #0088cc, #0077b3); - background-image: linear-gradient(to bottom, #0088cc, #0077b3); - background-repeat: repeat-x; - outline: 0; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); -} - -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #999999; -} - -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - cursor: default; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.open { - *z-index: 1000; -} - -.open > .dropdown-menu { - display: block; -} - -.dropdown-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 990; -} - -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} - -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - border-top: 0; - border-bottom: 4px solid #000000; - content: ""; -} - -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; -} - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu > .dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - -webkit-border-radius: 0 6px 6px 6px; - -moz-border-radius: 0 6px 6px 6px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover > .dropdown-menu { - display: block; -} - -.dropup .dropdown-submenu > .dropdown-menu { - top: auto; - bottom: 0; - margin-top: 0; - margin-bottom: -2px; - -webkit-border-radius: 5px 5px 5px 0; - -moz-border-radius: 5px 5px 5px 0; - border-radius: 5px 5px 5px 0; -} - -.dropdown-submenu > a:after { - display: block; - float: right; - width: 0; - height: 0; - margin-top: 5px; - margin-right: -10px; - border-color: transparent; - border-left-color: #cccccc; - border-style: solid; - border-width: 5px 0 5px 5px; - content: " "; -} - -.dropdown-submenu:hover > a:after { - border-left-color: #ffffff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left > .dropdown-menu { - left: -100%; - margin-left: 10px; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; -} - -.dropdown .dropdown-menu .nav-header { - padding-right: 20px; - padding-left: 20px; -} - -.typeahead { - z-index: 1051; - margin-top: 2px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -} - -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, 0.15); -} - -.well-large { - padding: 24px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.well-small { - padding: 9px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.fade { - opacity: 0; - -webkit-transition: opacity 0.15s linear; - -moz-transition: opacity 0.15s linear; - -o-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; -} - -.fade.in { - opacity: 1; -} - -.collapse { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition: height 0.35s ease; - -moz-transition: height 0.35s ease; - -o-transition: height 0.35s ease; - transition: height 0.35s ease; -} - -.collapse.in { - height: auto; -} - -.close { - float: right; - font-size: 20px; - font-weight: bold; - line-height: 20px; - color: #000000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); -} - -.close:hover, -.close:focus { - color: #000000; - text-decoration: none; - cursor: pointer; - opacity: 0.4; - filter: alpha(opacity=40); -} - -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} - -.btn { - display: inline-block; - *display: inline; - padding: 4px 12px; - margin-bottom: 0; - *margin-left: .3em; - font-size: 14px; - line-height: 20px; - color: #333333; - text-align: center; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - vertical-align: middle; - cursor: pointer; - background-color: #f5f5f5; - *background-color: #e6e6e6; - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); - background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); - background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-repeat: repeat-x; - border: 1px solid #cccccc; - *border: 0; - border-color: #e6e6e6 #e6e6e6 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - border-bottom-color: #b3b3b3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - *zoom: 1; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn:hover, -.btn:focus, -.btn:active, -.btn.active, -.btn.disabled, -.btn[disabled] { - color: #333333; - background-color: #e6e6e6; - *background-color: #d9d9d9; -} - -.btn:active, -.btn.active { - background-color: #cccccc \9; -} - -.btn:first-child { - *margin-left: 0; -} - -.btn:hover, -.btn:focus { - color: #333333; - text-decoration: none; - background-position: 0 -15px; - -webkit-transition: background-position 0.1s linear; - -moz-transition: background-position 0.1s linear; - -o-transition: background-position 0.1s linear; - transition: background-position 0.1s linear; -} - -.btn:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.btn.active, -.btn:active { - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn.disabled, -.btn[disabled] { - cursor: default; - background-image: none; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - -.btn-large { - padding: 11px 19px; - font-size: 17.5px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.btn-large [class^="icon-"], -.btn-large [class*=" icon-"] { - margin-top: 4px; -} - -.btn-small { - padding: 2px 10px; - font-size: 11.9px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.btn-small [class^="icon-"], -.btn-small [class*=" icon-"] { - margin-top: 0; -} - -.btn-mini [class^="icon-"], -.btn-mini [class*=" icon-"] { - margin-top: -1px; -} - -.btn-mini { - padding: 0 6px; - font-size: 10.5px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.btn-block { - display: block; - width: 100%; - padding-right: 0; - padding-left: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.btn-block + .btn-block { - margin-top: 5px; -} - -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} - -.btn-primary.active, -.btn-warning.active, -.btn-danger.active, -.btn-success.active, -.btn-info.active, -.btn-inverse.active { - color: rgba(255, 255, 255, 0.75); -} - -.btn-primary { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #006dcc; - *background-color: #0044cc; - background-image: -moz-linear-gradient(top, #0088cc, #0044cc); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); - background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); - background-image: -o-linear-gradient(top, #0088cc, #0044cc); - background-image: linear-gradient(to bottom, #0088cc, #0044cc); - background-repeat: repeat-x; - border-color: #0044cc #0044cc #002a80; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-primary:hover, -.btn-primary:focus, -.btn-primary:active, -.btn-primary.active, -.btn-primary.disabled, -.btn-primary[disabled] { - color: #ffffff; - background-color: #0044cc; - *background-color: #003bb3; -} - -.btn-primary:active, -.btn-primary.active { - background-color: #003399 \9; -} - -.btn-warning { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #faa732; - *background-color: #f89406; - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(to bottom, #fbb450, #f89406); - background-repeat: repeat-x; - border-color: #f89406 #f89406 #ad6704; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-warning:hover, -.btn-warning:focus, -.btn-warning:active, -.btn-warning.active, -.btn-warning.disabled, -.btn-warning[disabled] { - color: #ffffff; - background-color: #f89406; - *background-color: #df8505; -} - -.btn-warning:active, -.btn-warning.active { - background-color: #c67605 \9; -} - -.btn-danger { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #da4f49; - *background-color: #bd362f; - background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); - background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); - background-repeat: repeat-x; - border-color: #bd362f #bd362f #802420; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-danger:hover, -.btn-danger:focus, -.btn-danger:active, -.btn-danger.active, -.btn-danger.disabled, -.btn-danger[disabled] { - color: #ffffff; - background-color: #bd362f; - *background-color: #a9302a; -} - -.btn-danger:active, -.btn-danger.active { - background-color: #942a25 \9; -} - -.btn-success { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #5bb75b; - *background-color: #51a351; - background-image: -moz-linear-gradient(top, #62c462, #51a351); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); - background-image: -webkit-linear-gradient(top, #62c462, #51a351); - background-image: -o-linear-gradient(top, #62c462, #51a351); - background-image: linear-gradient(to bottom, #62c462, #51a351); - background-repeat: repeat-x; - border-color: #51a351 #51a351 #387038; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-success:hover, -.btn-success:focus, -.btn-success:active, -.btn-success.active, -.btn-success.disabled, -.btn-success[disabled] { - color: #ffffff; - background-color: #51a351; - *background-color: #499249; -} - -.btn-success:active, -.btn-success.active { - background-color: #408140 \9; -} - -.btn-info { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #49afcd; - *background-color: #2f96b4; - background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); - background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); - background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); - background-repeat: repeat-x; - border-color: #2f96b4 #2f96b4 #1f6377; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-info:hover, -.btn-info:focus, -.btn-info:active, -.btn-info.active, -.btn-info.disabled, -.btn-info[disabled] { - color: #ffffff; - background-color: #2f96b4; - *background-color: #2a85a0; -} - -.btn-info:active, -.btn-info.active { - background-color: #24748c \9; -} - -.btn-inverse { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #363636; - *background-color: #222222; - background-image: -moz-linear-gradient(top, #444444, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); - background-image: -webkit-linear-gradient(top, #444444, #222222); - background-image: -o-linear-gradient(top, #444444, #222222); - background-image: linear-gradient(to bottom, #444444, #222222); - background-repeat: repeat-x; - border-color: #222222 #222222 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-inverse:hover, -.btn-inverse:focus, -.btn-inverse:active, -.btn-inverse.active, -.btn-inverse.disabled, -.btn-inverse[disabled] { - color: #ffffff; - background-color: #222222; - *background-color: #151515; -} - -.btn-inverse:active, -.btn-inverse.active { - background-color: #080808 \9; -} - -button.btn, -input[type="submit"].btn { - *padding-top: 3px; - *padding-bottom: 3px; -} - -button.btn::-moz-focus-inner, -input[type="submit"].btn::-moz-focus-inner { - padding: 0; - border: 0; -} - -button.btn.btn-large, -input[type="submit"].btn.btn-large { - *padding-top: 7px; - *padding-bottom: 7px; -} - -button.btn.btn-small, -input[type="submit"].btn.btn-small { - *padding-top: 3px; - *padding-bottom: 3px; -} - -button.btn.btn-mini, -input[type="submit"].btn.btn-mini { - *padding-top: 1px; - *padding-bottom: 1px; -} - -.btn-link, -.btn-link:active, -.btn-link[disabled] { - background-color: transparent; - background-image: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - -.btn-link { - color: #0088cc; - cursor: pointer; - border-color: transparent; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-link:hover, -.btn-link:focus { - color: #005580; - text-decoration: underline; - background-color: transparent; -} - -.btn-link[disabled]:hover, -.btn-link[disabled]:focus { - color: #333333; - text-decoration: none; -} - -.btn-group { - position: relative; - display: inline-block; - *display: inline; - *margin-left: .3em; - font-size: 0; - white-space: nowrap; - vertical-align: middle; - *zoom: 1; -} - -.btn-group:first-child { - *margin-left: 0; -} - -.btn-group + .btn-group { - margin-left: 5px; -} - -.btn-toolbar { - margin-top: 10px; - margin-bottom: 10px; - font-size: 0; -} - -.btn-toolbar > .btn + .btn, -.btn-toolbar > .btn-group + .btn, -.btn-toolbar > .btn + .btn-group { - margin-left: 5px; -} - -.btn-group > .btn { - position: relative; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-group > .btn + .btn { - margin-left: -1px; -} - -.btn-group > .btn, -.btn-group > .dropdown-menu, -.btn-group > .popover { - font-size: 14px; -} - -.btn-group > .btn-mini { - font-size: 10.5px; -} - -.btn-group > .btn-small { - font-size: 11.9px; -} - -.btn-group > .btn-large { - font-size: 17.5px; -} - -.btn-group > .btn:first-child { - margin-left: 0; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-topleft: 4px; -} - -.btn-group > .btn:last-child, -.btn-group > .dropdown-toggle { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 4px; -} - -.btn-group > .btn.large:first-child { - margin-left: 0; - -webkit-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -webkit-border-top-left-radius: 6px; - border-top-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - -moz-border-radius-topleft: 6px; -} - -.btn-group > .btn.large:last-child, -.btn-group > .large.dropdown-toggle { - -webkit-border-top-right-radius: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-bottomright: 6px; -} - -.btn-group > .btn:hover, -.btn-group > .btn:focus, -.btn-group > .btn:active, -.btn-group > .btn.active { - z-index: 2; -} - -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} - -.btn-group > .btn + .dropdown-toggle { - *padding-top: 5px; - padding-right: 8px; - *padding-bottom: 5px; - padding-left: 8px; - -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn-group > .btn-mini + .dropdown-toggle { - *padding-top: 2px; - padding-right: 5px; - *padding-bottom: 2px; - padding-left: 5px; -} - -.btn-group > .btn-small + .dropdown-toggle { - *padding-top: 5px; - *padding-bottom: 4px; -} - -.btn-group > .btn-large + .dropdown-toggle { - *padding-top: 7px; - padding-right: 12px; - *padding-bottom: 7px; - padding-left: 12px; -} - -.btn-group.open .dropdown-toggle { - background-image: none; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn-group.open .btn.dropdown-toggle { - background-color: #e6e6e6; -} - -.btn-group.open .btn-primary.dropdown-toggle { - background-color: #0044cc; -} - -.btn-group.open .btn-warning.dropdown-toggle { - background-color: #f89406; -} - -.btn-group.open .btn-danger.dropdown-toggle { - background-color: #bd362f; -} - -.btn-group.open .btn-success.dropdown-toggle { - background-color: #51a351; -} - -.btn-group.open .btn-info.dropdown-toggle { - background-color: #2f96b4; -} - -.btn-group.open .btn-inverse.dropdown-toggle { - background-color: #222222; -} - -.btn .caret { - margin-top: 8px; - margin-left: 0; -} - -.btn-large .caret { - margin-top: 6px; -} - -.btn-large .caret { - border-top-width: 5px; - border-right-width: 5px; - border-left-width: 5px; -} - -.btn-mini .caret, -.btn-small .caret { - margin-top: 8px; -} - -.dropup .btn-large .caret { - border-bottom-width: 5px; -} - -.btn-primary .caret, -.btn-warning .caret, -.btn-danger .caret, -.btn-info .caret, -.btn-success .caret, -.btn-inverse .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.btn-group-vertical { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; -} - -.btn-group-vertical > .btn { - display: block; - float: none; - max-width: 100%; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-group-vertical > .btn + .btn { - margin-top: -1px; - margin-left: 0; -} - -.btn-group-vertical > .btn:first-child { - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} - -.btn-group-vertical > .btn:last-child { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -.btn-group-vertical > .btn-large:first-child { - -webkit-border-radius: 6px 6px 0 0; - -moz-border-radius: 6px 6px 0 0; - border-radius: 6px 6px 0 0; -} - -.btn-group-vertical > .btn-large:last-child { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} - -.alert { - padding: 8px 35px 8px 14px; - margin-bottom: 20px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - background-color: #fcf8e3; - border: 1px solid #fbeed5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.alert, -.alert h4 { - color: #c09853; -} - -.alert h4 { - margin: 0; -} - -.alert .close { - position: relative; - top: -2px; - right: -21px; - line-height: 20px; -} - -.alert-success { - color: #468847; - background-color: #dff0d8; - border-color: #d6e9c6; -} - -.alert-success h4 { - color: #468847; -} - -.alert-danger, -.alert-error { - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7; -} - -.alert-danger h4, -.alert-error h4 { - color: #b94a48; -} - -.alert-info { - color: #3a87ad; - background-color: #d9edf7; - border-color: #bce8f1; -} - -.alert-info h4 { - color: #3a87ad; -} - -.alert-block { - padding-top: 14px; - padding-bottom: 14px; -} - -.alert-block > p, -.alert-block > ul { - margin-bottom: 0; -} - -.alert-block p + p { - margin-top: 5px; -} - -.nav { - margin-bottom: 20px; - margin-left: 0; - list-style: none; -} - -.nav > li > a { - display: block; -} - -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} - -.nav > li > a > img { - max-width: none; -} - -.nav > .pull-right { - float: right; -} - -.nav-header { - display: block; - padding: 3px 15px; - font-size: 11px; - font-weight: bold; - line-height: 20px; - color: #999999; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-transform: uppercase; -} - -.nav li + .nav-header { - margin-top: 9px; -} - -.nav-list { - padding-right: 15px; - padding-left: 15px; - margin-bottom: 0; -} - -.nav-list > li > a, -.nav-list .nav-header { - margin-right: -15px; - margin-left: -15px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -} - -.nav-list > li > a { - padding: 3px 15px; -} - -.nav-list > .active > a, -.nav-list > .active > a:hover, -.nav-list > .active > a:focus { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); - background-color: #0088cc; -} - -.nav-list [class^="icon-"], -.nav-list [class*=" icon-"] { - margin-right: 2px; -} - -.nav-list .divider { - *width: 100%; - height: 1px; - margin: 9px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} - -.nav-tabs, -.nav-pills { - *zoom: 1; -} - -.nav-tabs:before, -.nav-pills:before, -.nav-tabs:after, -.nav-pills:after { - display: table; - line-height: 0; - content: ""; -} - -.nav-tabs:after, -.nav-pills:after { - clear: both; -} - -.nav-tabs > li, -.nav-pills > li { - float: left; -} - -.nav-tabs > li > a, -.nav-pills > li > a { - padding-right: 12px; - padding-left: 12px; - margin-right: 2px; - line-height: 14px; -} - -.nav-tabs { - border-bottom: 1px solid #ddd; -} - -.nav-tabs > li { - margin-bottom: -1px; -} - -.nav-tabs > li > a { - padding-top: 8px; - padding-bottom: 8px; - line-height: 20px; - border: 1px solid transparent; - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} - -.nav-tabs > li > a:hover, -.nav-tabs > li > a:focus { - border-color: #eeeeee #eeeeee #dddddd; -} - -.nav-tabs > .active > a, -.nav-tabs > .active > a:hover, -.nav-tabs > .active > a:focus { - color: #555555; - cursor: default; - background-color: #ffffff; - border: 1px solid #ddd; - border-bottom-color: transparent; -} - -.nav-pills > li > a { - padding-top: 8px; - padding-bottom: 8px; - margin-top: 2px; - margin-bottom: 2px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.nav-pills > .active > a, -.nav-pills > .active > a:hover, -.nav-pills > .active > a:focus { - color: #ffffff; - background-color: #0088cc; -} - -.nav-stacked > li { - float: none; -} - -.nav-stacked > li > a { - margin-right: 0; -} - -.nav-tabs.nav-stacked { - border-bottom: 0; -} - -.nav-tabs.nav-stacked > li > a { - border: 1px solid #ddd; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.nav-tabs.nav-stacked > li:first-child > a { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-topleft: 4px; -} - -.nav-tabs.nav-stacked > li:last-child > a { - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -moz-border-radius-bottomright: 4px; - -moz-border-radius-bottomleft: 4px; -} - -.nav-tabs.nav-stacked > li > a:hover, -.nav-tabs.nav-stacked > li > a:focus { - z-index: 2; - border-color: #ddd; -} - -.nav-pills.nav-stacked > li > a { - margin-bottom: 3px; -} - -.nav-pills.nav-stacked > li:last-child > a { - margin-bottom: 1px; -} - -.nav-tabs .dropdown-menu { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} - -.nav-pills .dropdown-menu { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.nav .dropdown-toggle .caret { - margin-top: 6px; - border-top-color: #0088cc; - border-bottom-color: #0088cc; -} - -.nav .dropdown-toggle:hover .caret, -.nav .dropdown-toggle:focus .caret { - border-top-color: #005580; - border-bottom-color: #005580; -} - -/* move down carets for tabs */ - -.nav-tabs .dropdown-toggle .caret { - margin-top: 8px; -} - -.nav .active .dropdown-toggle .caret { - border-top-color: #fff; - border-bottom-color: #fff; -} - -.nav-tabs .active .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} - -.nav > .dropdown.active > a:hover, -.nav > .dropdown.active > a:focus { - cursor: pointer; -} - -.nav-tabs .open .dropdown-toggle, -.nav-pills .open .dropdown-toggle, -.nav > li.dropdown.open.active > a:hover, -.nav > li.dropdown.open.active > a:focus { - color: #ffffff; - background-color: #999999; - border-color: #999999; -} - -.nav li.dropdown.open .caret, -.nav li.dropdown.open.active .caret, -.nav li.dropdown.open a:hover .caret, -.nav li.dropdown.open a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; - opacity: 1; - filter: alpha(opacity=100); -} - -.tabs-stacked .open > a:hover, -.tabs-stacked .open > a:focus { - border-color: #999999; -} - -.tabbable { - *zoom: 1; -} - -.tabbable:before, -.tabbable:after { - display: table; - line-height: 0; - content: ""; -} - -.tabbable:after { - clear: both; -} - -.tab-content { - overflow: auto; -} - -.tabs-below > .nav-tabs, -.tabs-right > .nav-tabs, -.tabs-left > .nav-tabs { - border-bottom: 0; -} - -.tab-content > .tab-pane, -.pill-content > .pill-pane { - display: none; -} - -.tab-content > .active, -.pill-content > .active { - display: block; -} - -.tabs-below > .nav-tabs { - border-top: 1px solid #ddd; -} - -.tabs-below > .nav-tabs > li { - margin-top: -1px; - margin-bottom: 0; -} - -.tabs-below > .nav-tabs > li > a { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -.tabs-below > .nav-tabs > li > a:hover, -.tabs-below > .nav-tabs > li > a:focus { - border-top-color: #ddd; - border-bottom-color: transparent; -} - -.tabs-below > .nav-tabs > .active > a, -.tabs-below > .nav-tabs > .active > a:hover, -.tabs-below > .nav-tabs > .active > a:focus { - border-color: transparent #ddd #ddd #ddd; -} - -.tabs-left > .nav-tabs > li, -.tabs-right > .nav-tabs > li { - float: none; -} - -.tabs-left > .nav-tabs > li > a, -.tabs-right > .nav-tabs > li > a { - min-width: 74px; - margin-right: 0; - margin-bottom: 3px; -} - -.tabs-left > .nav-tabs { - float: left; - margin-right: 19px; - border-right: 1px solid #ddd; -} - -.tabs-left > .nav-tabs > li > a { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.tabs-left > .nav-tabs > li > a:hover, -.tabs-left > .nav-tabs > li > a:focus { - border-color: #eeeeee #dddddd #eeeeee #eeeeee; -} - -.tabs-left > .nav-tabs .active > a, -.tabs-left > .nav-tabs .active > a:hover, -.tabs-left > .nav-tabs .active > a:focus { - border-color: #ddd transparent #ddd #ddd; - *border-right-color: #ffffff; -} - -.tabs-right > .nav-tabs { - float: right; - margin-left: 19px; - border-left: 1px solid #ddd; -} - -.tabs-right > .nav-tabs > li > a { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.tabs-right > .nav-tabs > li > a:hover, -.tabs-right > .nav-tabs > li > a:focus { - border-color: #eeeeee #eeeeee #eeeeee #dddddd; -} - -.tabs-right > .nav-tabs .active > a, -.tabs-right > .nav-tabs .active > a:hover, -.tabs-right > .nav-tabs .active > a:focus { - border-color: #ddd #ddd #ddd transparent; - *border-left-color: #ffffff; -} - -.nav > .disabled > a { - color: #999999; -} - -.nav > .disabled > a:hover, -.nav > .disabled > a:focus { - text-decoration: none; - cursor: default; - background-color: transparent; -} - -.navbar { - *position: relative; - *z-index: 2; - margin-bottom: 20px; - overflow: visible; -} - -.navbar-inner { - min-height: 40px; - padding-right: 20px; - padding-left: 20px; - background-color: #fafafa; - background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); - background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); - background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); - background-repeat: repeat-x; - border: 1px solid #d4d4d4; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); - *zoom: 1; - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); -} - -.navbar-inner:before, -.navbar-inner:after { - display: table; - line-height: 0; - content: ""; -} - -.navbar-inner:after { - clear: both; -} - -.navbar .container { - width: auto; -} - -.nav-collapse.collapse { - height: auto; - overflow: visible; -} - -.navbar .brand { - display: block; - float: left; - padding: 10px 20px 10px; - margin-left: -20px; - font-size: 20px; - font-weight: 200; - color: #777777; - text-shadow: 0 1px 0 #ffffff; -} - -.navbar .brand:hover, -.navbar .brand:focus { - text-decoration: none; -} - -.navbar-text { - margin-bottom: 0; - line-height: 40px; - color: #777777; -} - -.navbar-link { - color: #777777; -} - -.navbar-link:hover, -.navbar-link:focus { - color: #333333; -} - -.navbar .divider-vertical { - height: 40px; - margin: 0 9px; - border-right: 1px solid #ffffff; - border-left: 1px solid #f2f2f2; -} - -.navbar .btn, -.navbar .btn-group { - margin-top: 5px; -} - -.navbar .btn-group .btn, -.navbar .input-prepend .btn, -.navbar .input-append .btn, -.navbar .input-prepend .btn-group, -.navbar .input-append .btn-group { - margin-top: 0; -} - -.navbar-form { - margin-bottom: 0; - *zoom: 1; -} - -.navbar-form:before, -.navbar-form:after { - display: table; - line-height: 0; - content: ""; -} - -.navbar-form:after { - clear: both; -} - -.navbar-form input, -.navbar-form select, -.navbar-form .radio, -.navbar-form .checkbox { - margin-top: 5px; -} - -.navbar-form input, -.navbar-form select, -.navbar-form .btn { - display: inline-block; - margin-bottom: 0; -} - -.navbar-form input[type="image"], -.navbar-form input[type="checkbox"], -.navbar-form input[type="radio"] { - margin-top: 3px; -} - -.navbar-form .input-append, -.navbar-form .input-prepend { - margin-top: 5px; - white-space: nowrap; -} - -.navbar-form .input-append input, -.navbar-form .input-prepend input { - margin-top: 0; -} - -.navbar-search { - position: relative; - float: left; - margin-top: 5px; - margin-bottom: 0; -} - -.navbar-search .search-query { - padding: 4px 14px; - margin-bottom: 0; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - font-weight: normal; - line-height: 1; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -.navbar-static-top { - position: static; - margin-bottom: 0; -} - -.navbar-static-top .navbar-inner { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; - margin-bottom: 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-static-top .navbar-inner { - border-width: 0 0 1px; -} - -.navbar-fixed-bottom .navbar-inner { - border-width: 1px 0 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-fixed-bottom .navbar-inner { - padding-right: 0; - padding-left: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.navbar-static-top .container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 940px; -} - -.navbar-fixed-top { - top: 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-static-top .navbar-inner { - -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); -} - -.navbar-fixed-bottom { - bottom: 0; -} - -.navbar-fixed-bottom .navbar-inner { - -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); - box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); -} - -.navbar .nav { - position: relative; - left: 0; - display: block; - float: left; - margin: 0 10px 0 0; -} - -.navbar .nav.pull-right { - float: right; - margin-right: 0; -} - -.navbar .nav > li { - float: left; -} - -.navbar .nav > li > a { - float: none; - padding: 10px 15px 10px; - color: #777777; - text-decoration: none; - text-shadow: 0 1px 0 #ffffff; -} - -.navbar .nav .dropdown-toggle .caret { - margin-top: 8px; -} - -.navbar .nav > li > a:focus, -.navbar .nav > li > a:hover { - color: #333333; - text-decoration: none; - background-color: transparent; -} - -.navbar .nav > .active > a, -.navbar .nav > .active > a:hover, -.navbar .nav > .active > a:focus { - color: #555555; - text-decoration: none; - background-color: #e5e5e5; - -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); -} - -.navbar .btn-navbar { - display: none; - float: right; - padding: 7px 10px; - margin-right: 5px; - margin-left: 5px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #ededed; - *background-color: #e5e5e5; - background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); - background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); - background-repeat: repeat-x; - border-color: #e5e5e5 #e5e5e5 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); -} - -.navbar .btn-navbar:hover, -.navbar .btn-navbar:focus, -.navbar .btn-navbar:active, -.navbar .btn-navbar.active, -.navbar .btn-navbar.disabled, -.navbar .btn-navbar[disabled] { - color: #ffffff; - background-color: #e5e5e5; - *background-color: #d9d9d9; -} - -.navbar .btn-navbar:active, -.navbar .btn-navbar.active { - background-color: #cccccc \9; -} - -.navbar .btn-navbar .icon-bar { - display: block; - width: 18px; - height: 2px; - background-color: #f5f5f5; - -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; - -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -} - -.btn-navbar .icon-bar + .icon-bar { - margin-top: 3px; -} - -.navbar .nav > li > .dropdown-menu:before { - position: absolute; - top: -7px; - left: 9px; - display: inline-block; - border-right: 7px solid transparent; - border-bottom: 7px solid #ccc; - border-left: 7px solid transparent; - border-bottom-color: rgba(0, 0, 0, 0.2); - content: ''; -} - -.navbar .nav > li > .dropdown-menu:after { - position: absolute; - top: -6px; - left: 10px; - display: inline-block; - border-right: 6px solid transparent; - border-bottom: 6px solid #ffffff; - border-left: 6px solid transparent; - content: ''; -} - -.navbar-fixed-bottom .nav > li > .dropdown-menu:before { - top: auto; - bottom: -7px; - border-top: 7px solid #ccc; - border-bottom: 0; - border-top-color: rgba(0, 0, 0, 0.2); -} - -.navbar-fixed-bottom .nav > li > .dropdown-menu:after { - top: auto; - bottom: -6px; - border-top: 6px solid #ffffff; - border-bottom: 0; -} - -.navbar .nav li.dropdown > a:hover .caret, -.navbar .nav li.dropdown > a:focus .caret { - border-top-color: #333333; - border-bottom-color: #333333; -} - -.navbar .nav li.dropdown.open > .dropdown-toggle, -.navbar .nav li.dropdown.active > .dropdown-toggle, -.navbar .nav li.dropdown.open.active > .dropdown-toggle { - color: #555555; - background-color: #e5e5e5; -} - -.navbar .nav li.dropdown > .dropdown-toggle .caret { - border-top-color: #777777; - border-bottom-color: #777777; -} - -.navbar .nav li.dropdown.open > .dropdown-toggle .caret, -.navbar .nav li.dropdown.active > .dropdown-toggle .caret, -.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} - -.navbar .pull-right > li > .dropdown-menu, -.navbar .nav > li > .dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu:before, -.navbar .nav > li > .dropdown-menu.pull-right:before { - right: 12px; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu:after, -.navbar .nav > li > .dropdown-menu.pull-right:after { - right: 13px; - left: auto; -} - -.navbar .pull-right > li > .dropdown-menu .dropdown-menu, -.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { - right: 100%; - left: auto; - margin-right: -1px; - margin-left: 0; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; -} - -.navbar-inverse .navbar-inner { - background-color: #1b1b1b; - background-image: -moz-linear-gradient(top, #222222, #111111); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); - background-image: -webkit-linear-gradient(top, #222222, #111111); - background-image: -o-linear-gradient(top, #222222, #111111); - background-image: linear-gradient(to bottom, #222222, #111111); - background-repeat: repeat-x; - border-color: #252525; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); -} - -.navbar-inverse .brand, -.navbar-inverse .nav > li > a { - color: #999999; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); -} - -.navbar-inverse .brand:hover, -.navbar-inverse .nav > li > a:hover, -.navbar-inverse .brand:focus, -.navbar-inverse .nav > li > a:focus { - color: #ffffff; -} - -.navbar-inverse .brand { - color: #999999; -} - -.navbar-inverse .navbar-text { - color: #999999; -} - -.navbar-inverse .nav > li > a:focus, -.navbar-inverse .nav > li > a:hover { - color: #ffffff; - background-color: transparent; -} - -.navbar-inverse .nav .active > a, -.navbar-inverse .nav .active > a:hover, -.navbar-inverse .nav .active > a:focus { - color: #ffffff; - background-color: #111111; -} - -.navbar-inverse .navbar-link { - color: #999999; -} - -.navbar-inverse .navbar-link:hover, -.navbar-inverse .navbar-link:focus { - color: #ffffff; -} - -.navbar-inverse .divider-vertical { - border-right-color: #222222; - border-left-color: #111111; -} - -.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, -.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, -.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { - color: #ffffff; - background-color: #111111; -} - -.navbar-inverse .nav li.dropdown > a:hover .caret, -.navbar-inverse .nav li.dropdown > a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { - border-top-color: #999999; - border-bottom-color: #999999; -} - -.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, -.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, -.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.navbar-inverse .navbar-search .search-query { - color: #ffffff; - background-color: #515151; - border-color: #111111; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; -} - -.navbar-inverse .navbar-search .search-query:-moz-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { - color: #cccccc; -} - -.navbar-inverse .navbar-search .search-query:focus, -.navbar-inverse .navbar-search .search-query.focused { - padding: 5px 15px; - color: #333333; - text-shadow: 0 1px 0 #ffffff; - background-color: #ffffff; - border: 0; - outline: 0; - -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); -} - -.navbar-inverse .btn-navbar { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e0e0e; - *background-color: #040404; - background-image: -moz-linear-gradient(top, #151515, #040404); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); - background-image: -webkit-linear-gradient(top, #151515, #040404); - background-image: -o-linear-gradient(top, #151515, #040404); - background-image: linear-gradient(to bottom, #151515, #040404); - background-repeat: repeat-x; - border-color: #040404 #040404 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.navbar-inverse .btn-navbar:hover, -.navbar-inverse .btn-navbar:focus, -.navbar-inverse .btn-navbar:active, -.navbar-inverse .btn-navbar.active, -.navbar-inverse .btn-navbar.disabled, -.navbar-inverse .btn-navbar[disabled] { - color: #ffffff; - background-color: #040404; - *background-color: #000000; -} - -.navbar-inverse .btn-navbar:active, -.navbar-inverse .btn-navbar.active { - background-color: #000000 \9; -} - -.breadcrumb { - padding: 8px 15px; - margin: 0 0 20px; - list-style: none; - background-color: #f5f5f5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.breadcrumb > li { - display: inline-block; - *display: inline; - text-shadow: 0 1px 0 #ffffff; - *zoom: 1; -} - -.breadcrumb > li > .divider { - padding: 0 5px; - color: #ccc; -} - -.breadcrumb > .active { - color: #999999; -} - -.pagination { - margin: 20px 0; -} - -.pagination ul { - display: inline-block; - *display: inline; - margin-bottom: 0; - margin-left: 0; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - *zoom: 1; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.pagination ul > li { - display: inline; -} - -.pagination ul > li > a, -.pagination ul > li > span { - float: left; - padding: 4px 12px; - line-height: 20px; - text-decoration: none; - background-color: #ffffff; - border: 1px solid #dddddd; - border-left-width: 0; -} - -.pagination ul > li > a:hover, -.pagination ul > li > a:focus, -.pagination ul > .active > a, -.pagination ul > .active > span { - background-color: #f5f5f5; -} - -.pagination ul > .active > a, -.pagination ul > .active > span { - color: #999999; - cursor: default; -} - -.pagination ul > .disabled > span, -.pagination ul > .disabled > a, -.pagination ul > .disabled > a:hover, -.pagination ul > .disabled > a:focus { - color: #999999; - cursor: default; - background-color: transparent; -} - -.pagination ul > li:first-child > a, -.pagination ul > li:first-child > span { - border-left-width: 1px; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-topleft: 4px; -} - -.pagination ul > li:last-child > a, -.pagination ul > li:last-child > span { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 4px; -} - -.pagination-centered { - text-align: center; -} - -.pagination-right { - text-align: right; -} - -.pagination-large ul > li > a, -.pagination-large ul > li > span { - padding: 11px 19px; - font-size: 17.5px; -} - -.pagination-large ul > li:first-child > a, -.pagination-large ul > li:first-child > span { - -webkit-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -webkit-border-top-left-radius: 6px; - border-top-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - -moz-border-radius-topleft: 6px; -} - -.pagination-large ul > li:last-child > a, -.pagination-large ul > li:last-child > span { - -webkit-border-top-right-radius: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-bottomright: 6px; -} - -.pagination-mini ul > li:first-child > a, -.pagination-small ul > li:first-child > a, -.pagination-mini ul > li:first-child > span, -.pagination-small ul > li:first-child > span { - -webkit-border-bottom-left-radius: 3px; - border-bottom-left-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-left-radius: 3px; - -moz-border-radius-bottomleft: 3px; - -moz-border-radius-topleft: 3px; -} - -.pagination-mini ul > li:last-child > a, -.pagination-small ul > li:last-child > a, -.pagination-mini ul > li:last-child > span, -.pagination-small ul > li:last-child > span { - -webkit-border-top-right-radius: 3px; - border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; - border-bottom-right-radius: 3px; - -moz-border-radius-topright: 3px; - -moz-border-radius-bottomright: 3px; -} - -.pagination-small ul > li > a, -.pagination-small ul > li > span { - padding: 2px 10px; - font-size: 11.9px; -} - -.pagination-mini ul > li > a, -.pagination-mini ul > li > span { - padding: 0 6px; - font-size: 10.5px; -} - -.pager { - margin: 20px 0; - text-align: center; - list-style: none; - *zoom: 1; -} - -.pager:before, -.pager:after { - display: table; - line-height: 0; - content: ""; -} - -.pager:after { - clear: both; -} - -.pager li { - display: inline; -} - -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #f5f5f5; -} - -.pager .next > a, -.pager .next > span { - float: right; -} - -.pager .previous > a, -.pager .previous > span { - float: left; -} - -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #999999; - cursor: default; - background-color: #fff; -} - -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000000; -} - -.modal-backdrop.fade { - opacity: 0; -} - -.modal-backdrop, -.modal-backdrop.fade.in { - opacity: 0.8; - filter: alpha(opacity=80); -} - -.modal { - position: fixed; - top: 10%; - left: 50%; - z-index: 1050; - width: 560px; - margin-left: -280px; - background-color: #ffffff; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, 0.3); - *border: 1px solid #999; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - outline: none; - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; -} - -.modal.fade { - top: -25%; - -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; - -moz-transition: opacity 0.3s linear, top 0.3s ease-out; - -o-transition: opacity 0.3s linear, top 0.3s ease-out; - transition: opacity 0.3s linear, top 0.3s ease-out; -} - -.modal.fade.in { - top: 10%; -} - -.modal-header { - padding: 9px 15px; - border-bottom: 1px solid #eee; -} - -.modal-header .close { - margin-top: 2px; -} - -.modal-header h3 { - margin: 0; - line-height: 30px; -} - -.modal-body { - position: relative; - max-height: 400px; - padding: 15px; - overflow-y: auto; -} - -.modal-form { - margin-bottom: 0; -} - -.modal-footer { - padding: 14px 15px 15px; - margin-bottom: 0; - text-align: right; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - *zoom: 1; - -webkit-box-shadow: inset 0 1px 0 #ffffff; - -moz-box-shadow: inset 0 1px 0 #ffffff; - box-shadow: inset 0 1px 0 #ffffff; -} - -.modal-footer:before, -.modal-footer:after { - display: table; - line-height: 0; - content: ""; -} - -.modal-footer:after { - clear: both; -} - -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} - -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} - -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} - -.tooltip { - position: absolute; - z-index: 1030; - display: block; - font-size: 11px; - line-height: 1.4; - opacity: 0; - filter: alpha(opacity=0); - visibility: visible; -} - -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} - -.tooltip.top { - padding: 5px 0; - margin-top: -3px; -} - -.tooltip.right { - padding: 0 5px; - margin-left: 3px; -} - -.tooltip.bottom { - padding: 5px 0; - margin-top: 3px; -} - -.tooltip.left { - padding: 0 5px; - margin-left: -3px; -} - -.tooltip-inner { - max-width: 200px; - padding: 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-top-color: #000000; - border-width: 5px 5px 0; -} - -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-right-color: #000000; - border-width: 5px 5px 5px 0; -} - -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-left-color: #000000; - border-width: 5px 0 5px 5px; -} - -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-bottom-color: #000000; - border-width: 0 5px 5px; -} - -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1010; - display: none; - max-width: 276px; - padding: 1px; - text-align: left; - white-space: normal; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -.popover.top { - margin-top: -10px; -} - -.popover.right { - margin-left: 10px; -} - -.popover.bottom { - margin-top: 10px; -} - -.popover.left { - margin-left: -10px; -} - -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - font-weight: normal; - line-height: 18px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - -webkit-border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - border-radius: 5px 5px 0 0; -} - -.popover-title:empty { - display: none; -} - -.popover-content { - padding: 9px 14px; -} - -.popover .arrow, -.popover .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.popover .arrow { - border-width: 11px; -} - -.popover .arrow:after { - border-width: 10px; - content: ""; -} - -.popover.top .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999; - border-top-color: rgba(0, 0, 0, 0.25); - border-bottom-width: 0; -} - -.popover.top .arrow:after { - bottom: 1px; - margin-left: -10px; - border-top-color: #ffffff; - border-bottom-width: 0; -} - -.popover.right .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999; - border-right-color: rgba(0, 0, 0, 0.25); - border-left-width: 0; -} - -.popover.right .arrow:after { - bottom: -10px; - left: 1px; - border-right-color: #ffffff; - border-left-width: 0; -} - -.popover.bottom .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-bottom-color: #999; - border-bottom-color: rgba(0, 0, 0, 0.25); - border-top-width: 0; -} - -.popover.bottom .arrow:after { - top: 1px; - margin-left: -10px; - border-bottom-color: #ffffff; - border-top-width: 0; -} - -.popover.left .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-left-color: #999; - border-left-color: rgba(0, 0, 0, 0.25); - border-right-width: 0; -} - -.popover.left .arrow:after { - right: 1px; - bottom: -10px; - border-left-color: #ffffff; - border-right-width: 0; -} - -.thumbnails { - margin-left: -20px; - list-style: none; - *zoom: 1; -} - -.thumbnails:before, -.thumbnails:after { - display: table; - line-height: 0; - content: ""; -} - -.thumbnails:after { - clear: both; -} - -.row-fluid .thumbnails { - margin-left: 0; -} - -.thumbnails > li { - float: left; - margin-bottom: 20px; - margin-left: 20px; -} - -.thumbnail { - display: block; - padding: 4px; - line-height: 20px; - border: 1px solid #ddd; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -o-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; -} - -a.thumbnail:hover, -a.thumbnail:focus { - border-color: #0088cc; - -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -} - -.thumbnail > img { - display: block; - max-width: 100%; - margin-right: auto; - margin-left: auto; -} - -.thumbnail .caption { - padding: 9px; - color: #555555; -} - -.media, -.media-body { - overflow: hidden; - *overflow: visible; - zoom: 1; -} - -.media, -.media .media { - margin-top: 15px; -} - -.media:first-child { - margin-top: 0; -} - -.media-object { - display: block; -} - -.media-heading { - margin: 0 0 5px; -} - -.media > .pull-left { - margin-right: 10px; -} - -.media > .pull-right { - margin-left: 10px; -} - -.media-list { - margin-left: 0; - list-style: none; -} - -.label, -.badge { - display: inline-block; - padding: 2px 4px; - font-size: 11.844px; - font-weight: bold; - line-height: 14px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - white-space: nowrap; - vertical-align: baseline; - background-color: #999999; -} - -.label { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.badge { - padding-right: 9px; - padding-left: 9px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; - border-radius: 9px; -} - -.label:empty, -.badge:empty { - display: none; -} - -a.label:hover, -a.label:focus, -a.badge:hover, -a.badge:focus { - color: #ffffff; - text-decoration: none; - cursor: pointer; -} - -.label-important, -.badge-important { - background-color: #b94a48; -} - -.label-important[href], -.badge-important[href] { - background-color: #953b39; -} - -.label-warning, -.badge-warning { - background-color: #f89406; -} - -.label-warning[href], -.badge-warning[href] { - background-color: #c67605; -} - -.label-success, -.badge-success { - background-color: #468847; -} - -.label-success[href], -.badge-success[href] { - background-color: #356635; -} - -.label-info, -.badge-info { - background-color: #3a87ad; -} - -.label-info[href], -.badge-info[href] { - background-color: #2d6987; -} - -.label-inverse, -.badge-inverse { - background-color: #333333; -} - -.label-inverse[href], -.badge-inverse[href] { - background-color: #1a1a1a; -} - -.btn .label, -.btn .badge { - position: relative; - top: -1px; -} - -.btn-mini .label, -.btn-mini .badge { - top: 0; -} - -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-moz-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-ms-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-o-keyframes progress-bar-stripes { - from { - background-position: 0 0; - } - to { - background-position: 40px 0; - } -} - -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -.progress { - height: 20px; - margin-bottom: 20px; - overflow: hidden; - background-color: #f7f7f7; - background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); - background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); - background-repeat: repeat-x; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -} - -.progress .bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - color: #ffffff; - text-align: center; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e90d2; - background-image: -moz-linear-gradient(top, #149bdf, #0480be); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); - background-image: -webkit-linear-gradient(top, #149bdf, #0480be); - background-image: -o-linear-gradient(top, #149bdf, #0480be); - background-image: linear-gradient(to bottom, #149bdf, #0480be); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-transition: width 0.6s ease; - -moz-transition: width 0.6s ease; - -o-transition: width 0.6s ease; - transition: width 0.6s ease; -} - -.progress .bar + .bar { - -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); -} - -.progress-striped .bar { - background-color: #149bdf; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - -moz-background-size: 40px 40px; - -o-background-size: 40px 40px; - background-size: 40px 40px; -} - -.progress.active .bar { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -moz-animation: progress-bar-stripes 2s linear infinite; - -ms-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} - -.progress-danger .bar, -.progress .bar-danger { - background-color: #dd514c; - background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); - background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); -} - -.progress-danger.progress-striped .bar, -.progress-striped .bar-danger { - background-color: #ee5f5b; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-success .bar, -.progress .bar-success { - background-color: #5eb95e; - background-image: -moz-linear-gradient(top, #62c462, #57a957); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); - background-image: -webkit-linear-gradient(top, #62c462, #57a957); - background-image: -o-linear-gradient(top, #62c462, #57a957); - background-image: linear-gradient(to bottom, #62c462, #57a957); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); -} - -.progress-success.progress-striped .bar, -.progress-striped .bar-success { - background-color: #62c462; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-info .bar, -.progress .bar-info { - background-color: #4bb1cf; - background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); - background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); - background-image: -o-linear-gradient(top, #5bc0de, #339bb9); - background-image: linear-gradient(to bottom, #5bc0de, #339bb9); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); -} - -.progress-info.progress-striped .bar, -.progress-striped .bar-info { - background-color: #5bc0de; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-warning .bar, -.progress .bar-warning { - background-color: #faa732; - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(to bottom, #fbb450, #f89406); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); -} - -.progress-warning.progress-striped .bar, -.progress-striped .bar-warning { - background-color: #fbb450; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.accordion { - margin-bottom: 20px; -} - -.accordion-group { - margin-bottom: 2px; - border: 1px solid #e5e5e5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.accordion-heading { - border-bottom: 0; -} - -.accordion-heading .accordion-toggle { - display: block; - padding: 8px 15px; -} - -.accordion-toggle { - cursor: pointer; -} - -.accordion-inner { - padding: 9px 15px; - border-top: 1px solid #e5e5e5; -} - -.carousel { - position: relative; - margin-bottom: 20px; - line-height: 1; -} - -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; -} - -.carousel-inner > .item { - position: relative; - display: none; - -webkit-transition: 0.6s ease-in-out left; - -moz-transition: 0.6s ease-in-out left; - -o-transition: 0.6s ease-in-out left; - transition: 0.6s ease-in-out left; -} - -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - line-height: 1; -} - -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; -} - -.carousel-inner > .active { - left: 0; -} - -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} - -.carousel-inner > .next { - left: 100%; -} - -.carousel-inner > .prev { - left: -100%; -} - -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; -} - -.carousel-inner > .active.left { - left: -100%; -} - -.carousel-inner > .active.right { - left: 100%; -} - -.carousel-control { - position: absolute; - top: 40%; - left: 15px; - width: 40px; - height: 40px; - margin-top: -20px; - font-size: 60px; - font-weight: 100; - line-height: 30px; - color: #ffffff; - text-align: center; - background: #222222; - border: 3px solid #ffffff; - -webkit-border-radius: 23px; - -moz-border-radius: 23px; - border-radius: 23px; - opacity: 0.5; - filter: alpha(opacity=50); -} - -.carousel-control.right { - right: 15px; - left: auto; -} - -.carousel-control:hover, -.carousel-control:focus { - color: #ffffff; - text-decoration: none; - opacity: 0.9; - filter: alpha(opacity=90); -} - -.carousel-indicators { - position: absolute; - top: 15px; - right: 15px; - z-index: 5; - margin: 0; - list-style: none; -} - -.carousel-indicators li { - display: block; - float: left; - width: 10px; - height: 10px; - margin-left: 5px; - text-indent: -999px; - background-color: #ccc; - background-color: rgba(255, 255, 255, 0.25); - border-radius: 5px; -} - -.carousel-indicators .active { - background-color: #fff; -} - -.carousel-caption { - position: absolute; - right: 0; - bottom: 0; - left: 0; - padding: 15px; - background: #333333; - background: rgba(0, 0, 0, 0.75); -} - -.carousel-caption h4, -.carousel-caption p { - line-height: 20px; - color: #ffffff; -} - -.carousel-caption h4 { - margin: 0 0 5px; -} - -.carousel-caption p { - margin-bottom: 0; -} - -.hero-unit { - padding: 60px; - margin-bottom: 30px; - font-size: 18px; - font-weight: 200; - line-height: 30px; - color: inherit; - background-color: #eeeeee; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.hero-unit h1 { - margin-bottom: 0; - font-size: 60px; - line-height: 1; - letter-spacing: -1px; - color: inherit; -} - -.hero-unit li { - line-height: 30px; -} - -.pull-right { - float: right; -} - -.pull-left { - float: left; -} - -.hide { - display: none; -} - -.show { - display: block; -} - -.invisible { - visibility: hidden; -} - -.affix { - position: fixed; -} diff --git a/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap.min.css b/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap.min.css deleted file mode 100644 index b6428e69..00000000 --- a/themes/bootstrap/static/bootstrap-2.3.2/css/bootstrap.min.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Bootstrap v2.3.2 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} diff --git a/themes/bootstrap/static/bootstrap-2.3.2/img/glyphicons-halflings-white.png b/themes/bootstrap/static/bootstrap-2.3.2/img/glyphicons-halflings-white.png deleted file mode 100644 index 3bf6484a..00000000 Binary files a/themes/bootstrap/static/bootstrap-2.3.2/img/glyphicons-halflings-white.png and /dev/null differ diff --git a/themes/bootstrap/static/bootstrap-2.3.2/img/glyphicons-halflings.png b/themes/bootstrap/static/bootstrap-2.3.2/img/glyphicons-halflings.png deleted file mode 100644 index a9969993..00000000 Binary files a/themes/bootstrap/static/bootstrap-2.3.2/img/glyphicons-halflings.png and /dev/null differ diff --git a/themes/bootstrap/static/bootstrap-2.3.2/js/bootstrap.js b/themes/bootstrap/static/bootstrap-2.3.2/js/bootstrap.js deleted file mode 100644 index 638bb187..00000000 --- a/themes/bootstrap/static/bootstrap-2.3.2/js/bootstrap.js +++ /dev/null @@ -1,2287 +0,0 @@ -/* =================================================== - * bootstrap-transition.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#transitions - * =================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) - * ======================================================= */ - - $(function () { - - $.support.transition = (function () { - - var transitionEnd = (function () { - - var el = document.createElement('bootstrap') - , transEndEventNames = { - 'WebkitTransition' : 'webkitTransitionEnd' - , 'MozTransition' : 'transitionend' - , 'OTransition' : 'oTransitionEnd otransitionend' - , 'transition' : 'transitionend' - } - , name - - for (name in transEndEventNames){ - if (el.style[name] !== undefined) { - return transEndEventNames[name] - } - } - - }()) - - return transitionEnd && { - end: transitionEnd - } - - })() - - }) - -}(window.$jqTheme || window.jQuery); -/* ========================================================== - * bootstrap-alert.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#alerts - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* ALERT CLASS DEFINITION - * ====================== */ - - var dismiss = '[data-dismiss="alert"]' - , Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.prototype.close = function (e) { - var $this = $(this) - , selector = $this.attr('data-target') - , $parent - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 - } - - $parent = $(selector) - - e && e.preventDefault() - - $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) - - $parent.trigger(e = $.Event('close')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - $parent - .trigger('closed') - .remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent.on($.support.transition.end, removeElement) : - removeElement() - } - - - /* ALERT PLUGIN DEFINITION - * ======================= */ - - var old = $.fn.alert - - $.fn.alert = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('alert') - if (!data) $this.data('alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.alert.Constructor = Alert - - - /* ALERT NO CONFLICT - * ================= */ - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - /* ALERT DATA-API - * ============== */ - - $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) - -}(window.$jqTheme || window.jQuery); -/* ============================================================ - * bootstrap-button.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#buttons - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* BUTTON PUBLIC CLASS DEFINITION - * ============================== */ - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.button.defaults, options) - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - , $el = this.$element - , data = $el.data() - , val = $el.is('input') ? 'val' : 'html' - - state = state + 'Text' - data.resetText || $el.data('resetText', $el[val]()) - - $el[val](data[state] || this.options[state]) - - // push to event loop to allow forms to submit - setTimeout(function () { - state == 'loadingText' ? - $el.addClass(d).attr(d, d) : - $el.removeClass(d).removeAttr(d) - }, 0) - } - - Button.prototype.toggle = function () { - var $parent = this.$element.closest('[data-toggle="buttons-radio"]') - - $parent && $parent - .find('.active') - .removeClass('active') - - this.$element.toggleClass('active') - } - - - /* BUTTON PLUGIN DEFINITION - * ======================== */ - - var old = $.fn.button - - $.fn.button = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('button') - , options = typeof option == 'object' && option - if (!data) $this.data('button', (data = new Button(this, options))) - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - $.fn.button.defaults = { - loadingText: 'loading...' - } - - $.fn.button.Constructor = Button - - - /* BUTTON NO CONFLICT - * ================== */ - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - /* BUTTON DATA-API - * =============== */ - - $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - }) - -}(window.$jqTheme || window.jQuery); -/* ========================================================== - * bootstrap-carousel.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#carousel - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* CAROUSEL CLASS DEFINITION - * ========================= */ - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.options.pause == 'hover' && this.$element - .on('mouseenter', $.proxy(this.pause, this)) - .on('mouseleave', $.proxy(this.cycle, this)) - } - - Carousel.prototype = { - - cycle: function (e) { - if (!e) this.paused = false - if (this.interval) clearInterval(this.interval); - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - return this - } - - , getActiveIndex: function () { - this.$active = this.$element.find('.item.active') - this.$items = this.$active.parent().children() - return this.$items.index(this.$active) - } - - , to: function (pos) { - var activeIndex = this.getActiveIndex() - , that = this - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) { - return this.$element.one('slid', function () { - that.to(pos) - }) - } - - if (activeIndex == pos) { - return this.pause().cycle() - } - - return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) - } - - , pause: function (e) { - if (!e) this.paused = true - if (this.$element.find('.next, .prev').length && $.support.transition.end) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } - clearInterval(this.interval) - this.interval = null - return this - } - - , next: function () { - if (this.sliding) return - return this.slide('next') - } - - , prev: function () { - if (this.sliding) return - return this.slide('prev') - } - - , slide: function (type, next) { - var $active = this.$element.find('.item.active') - , $next = next || $active[type]() - , isCycling = this.interval - , direction = type == 'next' ? 'left' : 'right' - , fallback = type == 'next' ? 'first' : 'last' - , that = this - , e - - this.sliding = true - - isCycling && this.pause() - - $next = $next.length ? $next : this.$element.find('.item')[fallback]() - - e = $.Event('slide', { - relatedTarget: $next[0] - , direction: direction - }) - - if ($next.hasClass('active')) return - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - this.$element.one('slid', function () { - var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) - $nextIndicator && $nextIndicator.addClass('active') - }) - } - - if ($.support.transition && this.$element.hasClass('slide')) { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - this.$element.one($.support.transition.end, function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { that.$element.trigger('slid') }, 0) - }) - } else { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger('slid') - } - - isCycling && this.cycle() - - return this - } - - } - - - /* CAROUSEL PLUGIN DEFINITION - * ========================== */ - - var old = $.fn.carousel - - $.fn.carousel = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('carousel') - , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) - , action = typeof option == 'string' ? option : options.slide - if (!data) $this.data('carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - $.fn.carousel.defaults = { - interval: 5000 - , pause: 'hover' - } - - $.fn.carousel.Constructor = Carousel - - - /* CAROUSEL NO CONFLICT - * ==================== */ - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - /* CAROUSEL DATA-API - * ================= */ - - $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { - var $this = $(this), href - , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , options = $.extend({}, $target.data(), $this.data()) - , slideIndex - - $target.carousel(options) - - if (slideIndex = $this.attr('data-slide-to')) { - $target.data('carousel').pause().to(slideIndex).cycle() - } - - e.preventDefault() - }) - -}(window.$jqTheme || window.jQuery); -/* ============================================================= - * bootstrap-collapse.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#collapse - * ============================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* COLLAPSE PUBLIC CLASS DEFINITION - * ================================ */ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.collapse.defaults, options) - - if (this.options.parent) { - this.$parent = $(this.options.parent) - } - - this.options.toggle && this.toggle() - } - - Collapse.prototype = { - - constructor: Collapse - - , dimension: function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - , show: function () { - var dimension - , scroll - , actives - , hasData - - if (this.transitioning || this.$element.hasClass('in')) return - - dimension = this.dimension() - scroll = $.camelCase(['scroll', dimension].join('-')) - actives = this.$parent && this.$parent.find('> .accordion-group > .in') - - if (actives && actives.length) { - hasData = actives.data('collapse') - if (hasData && hasData.transitioning) return - actives.collapse('hide') - hasData || actives.data('collapse', null) - } - - this.$element[dimension](0) - this.transition('addClass', $.Event('show'), 'shown') - $.support.transition && this.$element[dimension](this.$element[0][scroll]) - } - - , hide: function () { - var dimension - if (this.transitioning || !this.$element.hasClass('in')) return - dimension = this.dimension() - this.reset(this.$element[dimension]()) - this.transition('removeClass', $.Event('hide'), 'hidden') - this.$element[dimension](0) - } - - , reset: function (size) { - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - [dimension](size || 'auto') - [0].offsetWidth - - this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') - - return this - } - - , transition: function (method, startEvent, completeEvent) { - var that = this - , complete = function () { - if (startEvent.type == 'show') that.reset() - that.transitioning = 0 - that.$element.trigger(completeEvent) - } - - this.$element.trigger(startEvent) - - if (startEvent.isDefaultPrevented()) return - - this.transitioning = 1 - - this.$element[method]('in') - - $.support.transition && this.$element.hasClass('collapse') ? - this.$element.one($.support.transition.end, complete) : - complete() - } - - , toggle: function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - } - - - /* COLLAPSE PLUGIN DEFINITION - * ========================== */ - - var old = $.fn.collapse - - $.fn.collapse = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('collapse') - , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) - if (!data) $this.data('collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.collapse.defaults = { - toggle: true - } - - $.fn.collapse.Constructor = Collapse - - - /* COLLAPSE NO CONFLICT - * ==================== */ - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - /* COLLAPSE DATA-API - * ================= */ - - $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { - var $this = $(this), href - , target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - , option = $(target).data('collapse') ? 'toggle' : $this.data() - $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - $(target).collapse(option) - }) - -}(window.$jqTheme || window.jQuery); -/* ============================================================ - * bootstrap-dropdown.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#dropdowns - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* DROPDOWN CLASS DEFINITION - * ========================= */ - - var toggle = '[data-toggle=dropdown]' - , Dropdown = function (element) { - var $el = $(element).on('click.dropdown.data-api', this.toggle) - $('html').on('click.dropdown.data-api', function () { - $el.parent().removeClass('open') - }) - } - - Dropdown.prototype = { - - constructor: Dropdown - - , toggle: function (e) { - var $this = $(this) - , $parent - , isActive - - if ($this.is('.disabled, :disabled')) return - - $parent = getParent($this) - - isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement) { - // if mobile we we use a backdrop because click events don't delegate - $('